]> code.delx.au - gnu-emacs/commitdiff
[WINDOWSNT]: Undefine DISABLE_DIRECT_ACCESS. Force
authorRichard M. Stallman <rms@gnu.org>
Sat, 2 May 1998 06:43:03 +0000 (06:43 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 2 May 1998 06:43:03 +0000 (06:43 +0000)
all file i/o to be in binary mode.  Include ntlib.h.

lib-src/movemail.c

index 64cae0b46a798dc1d72830af5f5f71bf8b9505bb..cb374982303d812484879b6840b0928848d7027a 100644 (file)
@@ -79,6 +79,7 @@ Boston, MA 02111-1307, USA.  */
 #endif
 
 #ifdef WINDOWSNT
+#include "ntlib.h"
 #undef access
 #undef unlink
 #define fork() 0
@@ -87,8 +88,16 @@ Boston, MA 02111-1307, USA.  */
    though the locking call succeeds (and indeed blocks local access from
    other NT programs).  If you have direct file access using an NFS
    client or something other than Samba, the locking call might work
-   properly - make sure it does before you enable this! */
-#define DISABLE_DIRECT_ACCESS
+   properly - make sure it does before you enable this!
+
+   [18-Feb-97 andrewi] I now believe my comment above to be incorrect,
+   since it was based on a misunderstanding of how locking calls are
+   implemented and used on Unix.  */
+//#define DISABLE_DIRECT_ACCESS
+
+/* Ensure all file i/o is in binary mode. */
+#include <fcntl.h>
+int _fmode = _O_BINARY;
 #endif /* WINDOWSNT */
 
 /* Cancel substitutions made by config.h for Emacs.  */