pkgsrc/lang/cu-prolog/patches/patch-ae
2015-12-29 23:34:43 +00:00

35 lines
843 B
Text

$NetBSD: patch-ae,v 1.4 2015/12/29 23:34:45 dholland Exp $
Avoid void main.
Do sunos4 allocation hack only on sunos4.
--- main.c.orig 1995-01-27 08:38:48.000000000 +0100
+++ main.c 2004-07-03 21:32:55.000000000 +0200
@@ -33,7 +33,7 @@
struct itrace *newflist_save;
-void main(argc,argv)
+int main(argc,argv)
int argc;
char *argv[];
{
@@ -303,13 +303,16 @@
void heap_realloc() /* reallocate system/user heaps */
{
+#if SUN4 == 1
cfree((char *)sheap); SHEAP_SIZE=SHEAP_SIZE*1.2; system_heap_alloc();
-/* free(heap); HEAP_SIZE *= 1.2;
+#else
+ free(heap); HEAP_SIZE *= 1.2;
free(cheap); CHEAP_SIZE *= 1.2;
free(eheap); ESP_SIZE *= 1.2;
free(ustack); USTACK_SIZE *= 1.2;
free(nheap); NAME_SIZE *= 1.2;
- heap_alloc(); */
+ heap_alloc();
+#endif /* SUN4 */
init_status();
}