Ignore:
Timestamp:
2008-12-03T14:13:06+13:00 (15 years ago)
Author:
mdewsnip
Message:

Code modifications to allow the GDBM library to read both little-endian and big-endian GDBM files, thus hopefully removing all the nasty endianness problems Greenstone has had with collections built on different architectures. By Michael Dewsnip at DL Consulting Ltd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/bucket.c

    r18019 r18038  
    3232
    3333#include "gdbmdefs.h"
     34
     35#include "gsdlmods.h"
    3436
    3537
     
    115117      if (num_bytes != dbf->header->bucket_size)
    116118    _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      }
    117125    }
    118126
Note: See TracChangeset for help on using the changeset viewer.