Changeset 1279 for branches/New_Config_Format-branch/gsdl/lib/gsdlconf.h
- Timestamp:
- 2000-07-13T10:21:53+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/New_Config_Format-branch/gsdl/lib/gsdlconf.h
r1076 r1279 30 30 #define GSDLCONF_H 31 31 32 #ifndef __WIN32__ 32 #if defined(__WIN32__) 33 #include "../win32cfg.h" 34 #else 33 35 #include "../config.h" 34 36 #endif … … 78 80 #endif 79 81 82 // mktemp 83 84 #if !defined(__WIN32__) || defined(__GNUC__) 85 #include <unistd.h> 86 #define GSDL_MKTEMP(str) mktemp(str) 87 #else 88 #include <io.h> 89 #define GSDL_MKTEMP(str) _mktemp(str) 90 #endif 91 92 80 93 81 94 // file locking 82 95 83 96 #if defined(__WIN32__) 97 98 #if !defined(LK_UNLOCK) && defined(LK_UNLCK) 99 #define LK_UNLOCK LK_UNLCK 100 #endif 101 102 #if defined (GSDL_USE_IOS_H) 84 103 #include <io.h> 85 104 #include <sys/locking.h> 105 106 #if defined(__GNUC__) 107 #define GSDL_GET_FILEDESC(str) str.filedesc() 108 #else 86 109 #define GSDL_GET_FILEDESC(str) str.fd() 110 #endif 111 87 112 #define GSDL_UNLOCK_FILE(fd) _locking(fd, LK_UNLCK, 200) 88 113 #define GSDL_LOCK_FILE(fd) lock_val = _locking(fd, LK_NBLCK, 200) 114 115 #else 116 117 // when using <fstream> (i.e. VC++ 6.0) I can't work out how 118 // to return a filedesc. File locking won't currently work 119 // for those windows compilers requiring GSDL_USE_IOS_H to 120 // not be set -- Stefan. 121 #define GSDL_GET_FILEDESC(str) 1 122 #define GSDL_LOCK_FILE(fd) lock_val = 0 123 #define GSDL_UNLOCK_FILE(fd) 0 124 #endif 89 125 90 126 #else
Note:
See TracChangeset
for help on using the changeset viewer.