Changeset 18038 for gsdl/trunk
- Timestamp:
- 2008-12-03T14:13:06+13:00 (15 years ago)
- Location:
- gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/Makefile.in
r18020 r18038 68 68 gdbmreorg.c gdbmseq.c gdbmsync.c gdbmerrno.c gdbmexists.c gdbmfdesc.c \ 69 69 gdbmsetopt.c bucket.c falloc.c findkey.c global.c hash.c update.c \ 70 version.c 70 version.c gsdlmods.c 71 71 72 72 TEST_CF = testdbm.c testndbm.c testgdbm.c … … 81 81 gdbmreorg.o gdbmseq.o gdbmsync.o gdbmerrno.o gdbmexists.o gdbmfdesc.o \ 82 82 gdbmsetopt.o bucket.o falloc.o findkey.o global.o hash.o update.o \ 83 version.o 83 version.o gsdlmods.o 84 84 85 85 DBM_LOF = dbminit.lo delete.lo fetch.lo store.lo seq.lo close.lo … … 91 91 gdbmreorg.lo gdbmseq.lo gdbmsync.lo gdbmerrno.lo gdbmexists.lo \ 92 92 gdbmfdesc.lo gdbmsetopt.lo bucket.lo falloc.lo findkey.lo global.lo \ 93 hash.lo update.lo version.lo 93 hash.lo update.lo version.lo gsdlmods.lo 94 94 95 95 TEX_F = gdbm.aux gdbm.cp gdbm.dvi gdbm.fn gdbm.ky gdbm.log gdbm.pg \ -
gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/bucket.c
r18019 r18038 32 32 33 33 #include "gdbmdefs.h" 34 35 #include "gsdlmods.h" 34 36 35 37 … … 115 117 if (num_bytes != dbf->header->bucket_size) 116 118 _gdbm_fatal (dbf, "read error"); 119 120 // GREENSTONE CUSTOMISATION: Swap each value in the bucket if the GDBM file is the wrong endianness 121 if (wrong_endianness) 122 { 123 endian_swap_array((int*) dbf->bucket, dbf->header->bucket_size); 124 } 117 125 } 118 126 -
gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/gdbmopen.c
r18019 r18038 33 33 #include "gdbmdefs.h" 34 34 #include "gdbmerrno.h" 35 36 #include "gsdlmods.h" 37 35 38 36 39 /* Initialize dbm system. FILE is a pointer to the file name. If the file … … 330 333 } 331 334 335 // GREENSTONE CUSTOMISATION: Check if the magic number is reversed 336 // If it is then the GDBM file is the wrong endianness for the current machine 337 wrong_endianness = (partial_header.header_magic == 0xCE9A5713); 338 339 // GREENSTONE CUSTOMISATION: Swap each value in the partial header if the GDBM file is the wrong endianness 340 if (wrong_endianness) 341 { 342 endian_swap_array((int*) &partial_header, sizeof (gdbm_file_header)); 343 } 344 332 345 /* Is the magic number good? */ 333 346 if (partial_header.header_magic != 0x13579ace) … … 349 362 num_bytes = read (dbf->desc, &dbf->header->avail.av_table[1], 350 363 dbf->header->block_size-sizeof (gdbm_file_header)); 364 365 // GREENSTONE CUSTOMISATION: Swap each value in the header if the GDBM file is the wrong endianness 366 if (wrong_endianness) 367 { 368 endian_swap_array((int*) &dbf->header->avail.av_table[1], 369 dbf->header->block_size-sizeof(gdbm_file_header)); 370 } 371 351 372 if (num_bytes != dbf->header->block_size-sizeof (gdbm_file_header)) 352 373 { … … 382 403 } 383 404 405 // GREENSTONE CUSTOMISATION: Swap each value in the directory if the GDBM file is the wrong endianness 406 if (wrong_endianness) 407 { 408 endian_swap_array((int*) dbf->dir, dbf->header->dir_size); 409 } 384 410 } 385 411
Note:
See TracChangeset
for help on using the changeset viewer.