Subject: [FreeVMS] About BIG and LITTLE ENDIAN
zakaria@sympatico.ca
Date: Thu Oct 09 2003 - 03:54:36 CEST
Hello,
Just to say a few words about testing big and little endian machines. It seems that this is a known issue :-)
Test1:
#ifdef BIG_ENDIAN
puts("big");
#else
puts("not big");
#endif
#ifdef LITTLE_ENDIAN
puts("little");
#else
puts("not little");
#endif
Test2:
#if BYTE_ORDER == BIG_ENDIAN
puts("-- big endian");
#elif BYTE_ORDER == LITTLE_ENDIAN
puts("-- little endian");
#endif
Test1 won't work, since both BIG_ENDIAN and LITTLE_ENDIAN are defined (in ctypes.h). You will get big and little.
Test2 will work fine. BYTE_ORDER is defined for the machine in endian.h
Broken code in file rms/access.h (I didn't check all freevms code...)
Zakaria,
-- Liste de diffusion FreeVMS Pour se désinscrire : mailto:freevms-request@ml.free.fr?subject=unsubscribe
This archive was generated by hypermail 2b25 : Thu Oct 09 2003 - 03:55:55 CEST