summaryrefslogtreecommitdiff
path: root/lang/caml-light/patches/patch-ac
blob: 954ad56e92eed2352c74aad1424fd2534aed0457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-ac,v 1.1 2008/09/05 02:07:51 dholland Exp $

Fix 64-bit build.
Fix build with gcc4.

--- runtime/main.c~	1997-04-24 10:51:06.000000000 -0400
+++ runtime/main.c	2008-09-04 21:09:25.000000000 -0400
@@ -1,6 +1,7 @@
 /* Start-up code */
 
 #include <stdio.h>
+#include <unistd.h>
 #ifdef __MWERKS__
 #include "myfcntl.h"
 #else
@@ -125,6 +126,7 @@ Algorithm:
 
 */
 
+int
 #ifdef HAS_UI
 caml_main(argc, argv)
 #else
@@ -133,9 +135,9 @@ main(argc, argv)
      int argc;
      char * argv[];
 {
-  int fd;
+  volatile int fd;
   struct exec_trailer trail;
-  int i;
+  volatile int i;
   struct longjmp_buffer raise_buf;
   struct channel * chan;
   int verbose_init = 0, percent_free_init = Percent_free_def;