Changeset 35556 for main/trunk


Ignore:
Timestamp:
2021-10-12T16:45:01+13:00 (3 years ago)
Author:
davidb
Message:

Changes/fixes after testing on Linux 32-bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/packages/javagdbm/jni/gdbmjava.c

    r35554 r35556  
    124124
    125125#    else
    126 #      error Windows OS neither 32-bit nor 64-bit.  SIZEOF_VOID_P not specified
     126#error "VisualStudio C compile neither 32-bit nor 64-bit.  SIZEOF_VOID_P not specified"
    127127#    endif
    128128
    129 #  else /* Presumably Unix */
    130 #    if defined( __ILP32 )     /* i.e., int, long and pointer are all 32-bits */
     129#  elif defined ( __GNUC__ ) /* Presumably Unix or Unix-like platform */
     130
     131#    if defined( __i386__ ) /* i.e., ILP32: int, long and pointer are all 32-bits */
    131132#      define SIZEOF_VOID_P 4
    132133
    133 #    elif defined( __LP64 )    /* i.e., long, and pointer are both 64-bits */
     134#    elif defined( __X86_64__ )    /* i.e., LP64: long, and pointer are both 64-bits */
    134135#      define SIZEOF_VOID_P 8
    135136
    136137#    else
    137 #      error Compiler's 'sizeof' model not matched as either IILP32 or LP64.  SIZEOF_VOID_P not specified
     138#error "GCC 'sizeof' model not matched as either ILP32 (32-bit) or LP64 (64-bit).  SIZEOF_VOID_P not specified"
    138139#    endif
     140
     141#  else
     142#error "Unrecognized compiler: SIZEOF_LONG not specified"
     143
    139144#  endif
    140145#endif
     
    151156
    152157#    else
    153 #      error Windows OS neither 32-bit nor 64-bit.  SIZEOF_LONG not specified
     158#error "VisualStudio C compiler neither 32-bit nor 64-bit.  SIZEOF_LONG not specified"
    154159#    endif
    155160
    156 #  else /* Presumably Unix */
    157 #    if defined( __ILP32 )
     161#  elif __GNUC__  /* Presumably Unix or Unix-like platform */
     162#    if defined( __i386__ )
    158163#      define SIZEOF_LONG 4
    159164
    160 #    elif defined( __LP64 )
     165#    elif defined( __X86_64__ )
    161166#      define SIZEOF_LONG 8
    162167
    163168#    else
    164 #      error Compiler's 'sizeof' model not matched as either IILP32 or LP64.  SIZEOF_LONG not specified
     169#error "GCC 'sizeof' model not matched as either ILP32 (32-bit) or LP64 (64-bit_.  SIZEOF_LONG not specified"
    165170#    endif
     171
     172#  else
     173#error "Unrecognized compiler: SIZEOF_LONG not specified"
    166174#  endif
    167175#endif
Note: See TracChangeset for help on using the changeset viewer.