X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=rmac.h;h=ee252efd5473fbb4664b2752b0ce157cdd60ab71;hp=f81b9a94290a11daf4f652d97ac05a3df413b510;hb=0d4ab16ff12046dfaf5f51dc0add2a9bbe777573;hpb=60f204cb9e3905100da0d89f14bb40db764acd9e diff --git a/rmac.h b/rmac.h index f81b9a9..ee252ef 100644 --- a/rmac.h +++ b/rmac.h @@ -55,10 +55,6 @@ #else #ifdef __GCCUNIX__ - #ifdef __MINGW32__ - #define off64_t long - #define off_t long - #endif #include #include @@ -67,6 +63,16 @@ #define _OPEN_FLAGS O_TRUNC|O_CREAT|O_RDWR #define _OPEN_INC O_RDONLY #define _PERM_MODE S_IRUSR|S_IWUSR + + #ifdef __MINGW32__ + #define off64_t long + #define off_t long + #undef _OPEN_FLAGS + #undef _OPEN_INC + #define _OPEN_FLAGS _O_TRUNC|_O_CREAT|_O_BINARY|_O_RDWR + #define _OPEN_INC O_RDONLY|_O_BINARY + #endif + // WARNING WARNING WARNING #define DO_PRAGMA(x) _Pragma (#x) #define WARNING(desc) DO_PRAGMA(message (#desc))