updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mingw32-ocaml / mingw32-ocaml-win32-compat.patch
blob6fb7e0a637204defbff296a71d4932424f512d09
1 Index: build-tree/ocaml-3.12.0/byterun/win32.c
2 ===================================================================
3 --- build-tree.orig/ocaml-3.12.0/byterun/win32.c 2010-08-11 11:16:55.000000000 -0500
4 +++ build-tree/ocaml-3.12.0/byterun/win32.c 2010-08-11 11:17:30.000000000 -0500
5 @@ -37,6 +37,26 @@
7 #include "flexdll.h"
9 +/* XXX including <io.h> gets ../byterun/io.h for some reason.
10 + * Including the real io.h using the full path fails because of
11 + * some strange bug in the system header file itself. Give up and
12 + * just define _finddata_t explicitly here.
13 + */
14 +#ifndef _FSIZE_T_DEFINED
15 +typedef unsigned long _fsize_t;
16 +#define _FSIZE_T_DEFINED
18 +struct _finddata_t
20 + unsigned attrib;
21 + time_t time_create;
22 + time_t time_access;
23 + time_t time_write;
24 + _fsize_t size;
25 + char name[FILENAME_MAX];
26 +};
27 +#endif
29 #ifndef S_ISREG
30 #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
31 #endif
32 @@ -95,7 +115,7 @@
33 pathlen = strlen(name) + 1;
34 if (pathlen < 256) pathlen = 256;
35 while (1) {
36 - fullname = stat_alloc(pathlen);
37 + fullname = caml_stat_alloc(pathlen);
38 retcode = SearchPath(NULL, /* use system search path */
39 name,
40 ".exe", /* add .exe extension if needed */
41 @@ -109,7 +129,7 @@
42 break;
44 if (retcode < pathlen) break;
45 - stat_free(fullname);
46 + caml_stat_free(fullname);
47 pathlen = retcode + 1;
49 return fullname;
50 Index: build-tree/ocaml-3.12.0/otherlibs/systhreads/st_win32.h
51 ===================================================================
52 --- build-tree.orig/ocaml-3.12.0/otherlibs/systhreads/st_win32.h 2010-08-11 11:16:55.000000000 -0500
53 +++ build-tree/ocaml-3.12.0/otherlibs/systhreads/st_win32.h 2010-08-11 11:17:07.000000000 -0500
54 @@ -16,7 +16,7 @@
55 /* Win32 implementation of the "st" interface */
57 #include <windows.h>
58 -#include <WinError.h>
59 +#include <winerror.h>
60 #include <stdio.h>
61 #include <signal.h>