Changeset 19779

Show
Ignore:
Timestamp:
10.06.2009 00:05:46 (10 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'

Files:
1 modified

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.  */