Explorar el Código

Set _fmode = O_BINARY at startup; relying upon fmode.o doesn't work
for libraries loaded at run-time (e.g. ctypes).



git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43279 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements hace 14 años
padre
commit
75d57fff63
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      lib/gis/gisinit.c

+ 5 - 1
lib/gis/gisinit.c

@@ -15,9 +15,10 @@
  */
 
 #include <stdio.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
 #include <sys/stat.h>
 #include <locale.h>
 
@@ -112,6 +113,9 @@ void G__check_gisinit(void)
 
 static int gisinit(void)
 {
+#ifdef __MINGW32__
+    _fmode = O_BINARY;
+#endif
     /* Mark window as not set */
     G__.window_set = 0;