[pisa-src] Re: r1559 - in trunk: libpisa/global.h libpisa/nat.c libpisa/nat.h pisacd/cdtun.c pisasd/sdtun.c

  • From: Tobias Heer <heer@xxxxxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Sat, 07 Nov 2009 17:23:38 +0100


Am 07.11.2009 um 14:07 schrieb Diego Biurrun:

+ */
+#ifdef __APPLE__
+  #ifndef __BYTE_ORDER
+    #define __BYTE_ORDER  BYTE_ORDER
+  #endif
+  #ifndef __BIG_ENDIAN
+    #define __BIG_ENDIAN BIG_ENDIAN
+  #endif
+#endif

General note: Checking #ifdefs like this does not yield to general
portability and is very ugly overall. Compiler and system capabilities
are subject to rather quick changes.  What if the Apple compiler does
support __BYTE_ORDER next year?

If it supports __BYTE_ORDER next year, this code will stil work.


--
Dipl.-Inform. Tobias Heer, Ph.D. Student
Distributed Systems Group
RWTH Aachen University, Germany
tel: +49 241 80 207 76
web: http://ds.cs.rwth-aachen.de/members/heer








Other related posts: