Changeset 19779


Ignore:
Timestamp:
2009-06-10T00:05:46+12:00 (15 years ago)
Author:
davidb
Message:

Mac and Linux differ in the data-type given to 'off_t'. For Mac it is 'long long int' and for Linux it is 'long int'. This fix ensures our GDBM uses the same size for both, allowing them to read the same GDBM files. Chose to make off_t 'long' rather that 'long long' as this is what Linux seems to do (at least the CentOS in the lab). An improvement would be to investitage why Linux is only 'long' and see if there is a setting to make it use long long'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/common-src/packages/gdbm/gdbm-1.8.3/gdbmdefs.h

    r18074 r19779  
    2828#include "systems.h"
    2929#include "gdbmconst.h"
     30
     31/* On MacOS X, off_t is "long long int" but on Linux (CentOS) it is "long int"
     32   The following ensure that we use the same for both, and so lets
     33   GDBM read the same database files */
     34
     35#undef off_t
     36#define off_t long
    3037
    3138/* The type definitions are next.  */
Note: See TracChangeset for help on using the changeset viewer.