tech-toolchain archive

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

Compat definitions patch for Solaris



Hi,

The attached (add *_ENDIAN definitions to compat_defs.h) was required in
order to build on a Solaris 10 host.  Is it OK to commit?

Thanks,

J

-- 
  My other computer also runs NetBSD    /        Sailing at Newbiggin
        http://www.netbsd.org/        /   http://www.newbigginsailingclub.org/
Index: src/tools/compat/compat_defs.h
===================================================================
RCS file: /cvsroot/src/tools/compat/compat_defs.h,v
retrieving revision 1.80
diff -u -r1.80 compat_defs.h
--- src/tools/compat/compat_defs.h      27 Aug 2011 18:33:22 -0000      1.80
+++ src/tools/compat/compat_defs.h      3 Sep 2011 18:55:18 -0000
@@ -16,6 +16,15 @@
 #define __USE_ISOC99 1
 #endif
 
+/*
+ * Solaris: missing *_ENDIAN definitions
+ */
+#if defined(__svr4__) && defined(__sun__)
+#define LITTLE_ENDIAN   1234    /* least-significant byte first (vax, pc) */
+#define BIG_ENDIAN      4321    /* most-significant byte first (IBM, net) */
+#define PDP_ENDIAN      3412    /* LSB first in word, MSW first in long (pdp) 
*/
+#endif
+
 /* So _NETBSD_SOURCE doesn't end up defined. Define enough to pull in standard
    defs. Other platforms may need similiar defines. */
 #ifdef __NetBSD__


Home | Main Index | Thread Index | Old Index