diff options
author | Marc Lasson <marc.lasson@lexifi.com> | 2018-02-20 18:45:30 +0100 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2018-05-18 12:19:01 +0100 |
commit | 02e93d657f59551b3b9e028f2d984c6b5f439da1 (patch) | |
tree | 95910ac1922aa5fd63725bac5deaceefba39a1cc /otherlibs | |
parent | 2e864723afa118c9c5d95b48154230fb4a1c0b95 (diff) | |
download | ocaml-02e93d657f59551b3b9e028f2d984c6b5f439da1.tar.gz |
Fix Segfault on Windows 64 bits
The segfault happens when you use a wildcard '*' or '?'
in the argument of the caml program compiled on Windows
64bits.
The handle was corrupted because is cast from
intptr_t (64bits) to int (32bits).
In order to make sure that both `intptr_t` and `uintptr_t`
are available on MSVC we forced the inclusion of <stdint.h>
for versions that have it (starting from Visual Studio 2010
(MSVC version 1600)). For older versions, the typedefs may be
found in <stddef.h>; therefore we forced the inclusion of this
standard header in config.h.
Diffstat (limited to 'otherlibs')
-rw-r--r-- | otherlibs/win32unix/channels.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/otherlibs/win32unix/channels.c b/otherlibs/win32unix/channels.c index 2749a766bd..5dbc86f470 100644 --- a/otherlibs/win32unix/channels.c +++ b/otherlibs/win32unix/channels.c @@ -23,11 +23,6 @@ #include <fcntl.h> #include <io.h> -#if defined(_MSC_VER) && !defined(_INTPTR_T_DEFINED) -typedef int intptr_t; -#define _INTPTR_T_DEFINED -#endif - int win_CRT_fd_of_filedescr(value handle) { if (CRT_fd_val(handle) != NO_CRT_FD) { |