nhclose
Changes to be committed: modified: include/extern.h modified: src/bones.c modified: src/do.c modified: src/files.c modified: src/music.c modified: src/restore.c modified: src/save.c modified: sys/share/pcmain.c modified: sys/share/pcsys.c modified: sys/share/pcunix.c In order to get level file locking correctly again post 3.4.3 with the newer compilers for windows, I had to funnel close() calls to an intercepting routine. I had two choices: 1. Surround every close() in at least 9 source files with messy: #ifdef WIN32 nhclose(fd); #else close(fd); #endif OR 2. Replace every close() with nhclose() and deal with the special code in the nhclose() version for windows, while just calling close() for other platforms (in files.c). It is also possible, although not done in this commit, to #define nhclose(fd) close(fd) in a header file for non-windows, rather than funnel though a real nhclose() function in files.c.
This commit is contained in:
@@ -743,6 +743,7 @@ E boolean NDECL(recover_savefile);
|
||||
#ifdef SYSCF_FILE
|
||||
E void NDECL(assure_syscf_file);
|
||||
#endif
|
||||
E int FDECL(nhclose, (int));
|
||||
#ifdef HOLD_LOCKFILE_OPEN
|
||||
E void NDECL(really_close);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user