[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DAR



On Sat, Dec 28, 2002 at 11:02:07AM +1100, Brian May wrote:
> Unfortunately, the Makefile has:
> 
> ####
> #### compilation for 64 bits OS (Alpha, etc.), uncomment the following
> # OS_BITS = 64

Seconds thoughts, it seems that the only reason OS_BITS
is required is for this code here:

#if OS_BITS == 32
  #define U_16 unsigned short
  #define U_32 unsigned long
  #define U_I unsigned int 
  #define S_16 signed short
  #define S_32 signed long
  #define S_I signed int
#else
  #if OS_BITS == 64
    #define U_16 unsigned short
    #define U_32 unsigned int
    #define U_I  unsigned int
    #define S_16 signed short
    #define S_32 signed int
    #define S_I signed int
  #else
    #error // unknown OS_BITS value
    // #error does not exists and is here to force the compilation to fail
  #endif // OS_BITS == 64
#endif // OS_BITS == 32

I think I could instead use something like:

#include <stdint.h>
#define U_16 uint16_t
#define U_32 uint32_t
#define U_I  unsigned int
#define S_16 int16_t
#define S_32 int32_t
#define S_I signed int

However, is there anyway to make this work on non-GNU systems?

(the GNU info page says that these values are GNU specific; I can't
even seem to find a documented way to determine if they have been
defined or not).

Comments?
--
Brian May <bam@debian.org>



Reply to: