Changeset 17879 for gsdl/trunk/common-src
- Timestamp:
- 2008-11-17T18:38:17+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/common-src/src/gdbmedit/gdbmset/gdbmset.cpp
r17782 r17879 67 67 int main (int argc, char *argv[]) 68 68 { 69 // The block_size parameter is ignored unless the file is a new file. 70 // If it is less than 512, dbm will use the stat block size for the file system. 69 71 int block_size = 0; 70 72 GDBM_FILE dbf; … … 79 81 // open the database 80 82 #ifdef __WIN32__ 81 dbf = gdbm_open (argv[1], block_size, GDBM_WRITER, 00664, NULL, 0); 83 // On Windows need to make sure the database is generated if it does not already exist 84 // GDBM_WRCREAT flag means: open database for read/write, create if necessary 85 // http://www.rt.com/man/gdbm.3.html is the Unix man page on gdbm_open 86 // http://trac.greenstone.org/changeset/928 - the 6th param of gdbm_open (only in the 87 // Windows version of the function) was set to 1 when using WRCREAT 88 // http://www.sfr-fresh.com/unix/misc/q-7.11.tar.gz:a/q-7.11/modules/gdbm/README-Gdbm 89 dbf = gdbm_open (argv[1], block_size, GDBM_WRCREAT, 00664, NULL, 1); 82 90 #else 83 91 dbf = gdbm_open (argv[1], block_size, GDBM_WRITER, 00664, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.