summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2011-09-22 02:42:01 +0000
committerBenny Prijono <bennylp@teluu.com>2011-09-22 02:42:01 +0000
commit461337c8c702cb5fc6386a3634736249ebee6353 (patch)
tree07aefb81ec768ecff9e51fa8f0c23160505ffe89
parentb4bbc77f85a2e78b45da5863d522347a53be2151 (diff)
Remove default endianness for bi-endian systems such as MIPS, ARM, and PowerPC, and raise compilation error instead. Thanks Howard Lin for the suggestion (misc, re #1252)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3766 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjlib/include/pj/config.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index c5a3b476..ad375859 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -165,7 +165,7 @@
#elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
defined(__IA64__) || defined( _M_IA64)
/*
- * Intel IA64 processor, little endian
+ * Intel IA64 processor, default to little endian
*/
# undef PJ_M_IA64
# define PJ_M_IA64 1
@@ -203,15 +203,14 @@
#elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
/*
- * MIPS, default to little endian
+ * MIPS, bi-endian, so raise error if endianness is not configured
*/
# undef PJ_M_MIPS
# define PJ_M_MIPS 1
# define PJ_M_NAME "mips"
# define PJ_HAS_PENTIUM 0
-# if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
-# define PJ_IS_LITTLE_ENDIAN 1
-# define PJ_IS_BIG_ENDIAN 0
+# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+# error Endianness must be declared for this processor
# endif
@@ -229,29 +228,29 @@
#elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) || \
defined(ARMV4) || defined(__arm__)
/*
- * ARM, default to little endian
+ * ARM, bi-endian, so raise error if endianness is not configured
*/
# undef PJ_M_ARMV4
# define PJ_M_ARMV4 1
# define PJ_M_NAME "armv4"
# define PJ_HAS_PENTIUM 0
-# if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
-# define PJ_IS_LITTLE_ENDIAN 1
-# define PJ_IS_BIG_ENDIAN 0
+# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+# error Endianness must be declared for this processor
# endif
#elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
defined(_ARCH_PPC)
/*
- * PowerPC, big endian
+ * PowerPC, bi-endian, so raise error if endianness is not configured
*/
# undef PJ_M_POWERPC
# define PJ_M_POWERPC 1
# define PJ_M_NAME "powerpc"
# define PJ_HAS_PENTIUM 0
-# define PJ_IS_LITTLE_ENDIAN 0
-# define PJ_IS_BIG_ENDIAN 1
+# if !PJ_IS_LITTLE_ENDIAN && !PJ_IS_BIG_ENDIAN
+# error Endianness must be declared for this processor
+# endif
#elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \
defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2)