Changeset 18060
- Timestamp:
- 2008-12-04T12:15:04+13:00 (15 years ago)
- Location:
- gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/gdbmreorg.c
r18019 r18060 164 164 /* Move the new file to old name. */ 165 165 166 #ifdef MSDOS 167 if (close (new_dbf->desc) 168 || unlink (dbf->name) 169 || rename (new_name, dbf->name) 170 || (new_dbf->desc = open (dbf->name, O_RDWR|O_BINARY)) < 0) 171 #else /* not MSDOS */ 166 172 if (rename (new_name, dbf->name) != 0) 173 #endif /* not MSDOS */ 167 174 { 168 175 gdbm_errno = GDBM_REORGANIZE_FAILED; -
gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/systems.h
r18019 r18060 86 86 #else 87 87 88 #ifdef MSDOS 89 #define MY_UNLOCK 0 90 #define MY_READLOCK 1 91 #define MY_WRITELOCK 2 92 int my_locking(int fh, int lmode, long lockoffset, long nbytes); 93 94 #define UNLOCK_FILE(dbf) my_locking(dbf->desc,MY_UNLOCK,0,10) 95 #define READLOCK_FILE(dbf) lock_val=my_locking(dbf->desc,MY_READLOCK,0,10) 96 #define WRITELOCK_FILE(dbf) lock_val=my_locking(dbf->desc,MY_WRITELOCK,0,10) 97 98 #else 99 88 100 /* Assume it is done like System V. */ 89 101 … … 113 125 } 114 126 #endif 127 #endif 115 128 116 129 /* Do we have bcopy? */ … … 125 138 /* Do we have fsync? */ 126 139 #if !HAVE_FSYNC 140 #ifdef MSDOS 141 #define fsync(f) 142 #else 127 143 #define fsync(f) {sync(); sync();} 144 #endif 128 145 #endif 129 146 -
gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/windows/autoconf.h
r18058 r18060 1 1 /* autoconf.h.in. Generated from configure.in by autoheader. */ 2 3 #define MSDOS 2 4 3 5 /* Define to 1 if you have the `bcopy' function. */ … … 11 13 12 14 /* Define to 1 if you have the `flock' function. */ 13 # define HAVE_FLOCK 115 #undef HAVE_FLOCK 14 16 15 17 /* Define to 1 if you have the `fsync' function. */
Note:
See TracChangeset
for help on using the changeset viewer.