Mercurial > emacs
comparison lib-src/movemail.c @ 21905:b1e64615e700
[WINDOWSNT]: Undefine DISABLE_DIRECT_ACCESS. Force
all file i/o to be in binary mode. Include ntlib.h.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 02 May 1998 06:43:03 +0000 |
parents | fe54b9d8ded1 |
children | ee90e9da3a70 |
comparison
equal
deleted
inserted
replaced
21904:f1e5ca32f35d | 21905:b1e64615e700 |
---|---|
77 #ifndef IS_DIRECTORY_SEP | 77 #ifndef IS_DIRECTORY_SEP |
78 #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) | 78 #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) |
79 #endif | 79 #endif |
80 | 80 |
81 #ifdef WINDOWSNT | 81 #ifdef WINDOWSNT |
82 #include "ntlib.h" | |
82 #undef access | 83 #undef access |
83 #undef unlink | 84 #undef unlink |
84 #define fork() 0 | 85 #define fork() 0 |
85 #define sys_wait(var) (*(var) = 0) | 86 #define sys_wait(var) (*(var) = 0) |
86 /* Unfortunately, Samba doesn't seem to properly lock Unix files even | 87 /* Unfortunately, Samba doesn't seem to properly lock Unix files even |
87 though the locking call succeeds (and indeed blocks local access from | 88 though the locking call succeeds (and indeed blocks local access from |
88 other NT programs). If you have direct file access using an NFS | 89 other NT programs). If you have direct file access using an NFS |
89 client or something other than Samba, the locking call might work | 90 client or something other than Samba, the locking call might work |
90 properly - make sure it does before you enable this! */ | 91 properly - make sure it does before you enable this! |
91 #define DISABLE_DIRECT_ACCESS | 92 |
93 [18-Feb-97 andrewi] I now believe my comment above to be incorrect, | |
94 since it was based on a misunderstanding of how locking calls are | |
95 implemented and used on Unix. */ | |
96 //#define DISABLE_DIRECT_ACCESS | |
97 | |
98 /* Ensure all file i/o is in binary mode. */ | |
99 #include <fcntl.h> | |
100 int _fmode = _O_BINARY; | |
92 #endif /* WINDOWSNT */ | 101 #endif /* WINDOWSNT */ |
93 | 102 |
94 /* Cancel substitutions made by config.h for Emacs. */ | 103 /* Cancel substitutions made by config.h for Emacs. */ |
95 #undef open | 104 #undef open |
96 #undef read | 105 #undef read |