1 Misc fixes for byterun/win32.c
3 diff --exclude _build -urN ocaml-3.11.0+beta1.orig/byterun/win32.c ocaml-3.11.0+beta1.mingw/byterun/win32.c
4 --- ocaml-3.11.0+beta1.orig/byterun/win32.c 2008-04-22 13:24:10.000000000 +0100
5 +++ ocaml-3.11.0+beta1.mingw/byterun/win32.c 2008-11-15 15:50:32.000000000 +0000
12 #include <sys/types.h>
18 +/* XXX including <io.h> gets ../byterun/io.h for some reason.
19 + * Including the real io.h using the full path fails because of
20 + * some strange bug in the system header file itself. Give up and
21 + * just define _finddata_t explicitly here.
23 +#ifndef _FSIZE_T_DEFINED
24 +typedef unsigned long _fsize_t;
25 +#define _FSIZE_T_DEFINED
34 + char name[FILENAME_MAX];
39 #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
42 pathlen = strlen(name) + 1;
43 if (pathlen < 256) pathlen = 256;
45 - fullname = stat_alloc(pathlen);
46 + fullname = caml_stat_alloc(pathlen);
47 retcode = SearchPath(NULL, /* use system search path */
49 ".exe", /* add .exe extension if needed */
53 if (retcode < pathlen) break;
54 - stat_free(fullname);
55 + caml_stat_free(fullname);
56 pathlen = retcode + 1;