From 87e7c10c51282edde56fd891d4ad24566982adea Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 13 Mar 2009 12:15:43 +0000 Subject: Ticket #729: MacOS X endianness detection on universal build (thanks Ruud Klaver for the patch) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2510 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/compat/m_auto.h.in | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'pjlib/include') diff --git a/pjlib/include/pj/compat/m_auto.h.in b/pjlib/include/pj/compat/m_auto.h.in index 5324fe2e..79330b9b 100644 --- a/pjlib/include/pj/compat/m_auto.h.in +++ b/pjlib/include/pj/compat/m_auto.h.in @@ -28,8 +28,18 @@ /* Machine name, filled in by autoconf script */ #undef PJ_M_NAME -/* Endianness, as detected by autoconf */ -#undef WORDS_BIGENDIAN +/* Endianness. It's reported on pjsip list on 09/02/13 that autoconf + * endianness detection failed for universal build, so special case + * for it here. Thanks Ruud Klaver for the fix. + */ +#ifdef PJ_DARWINOS +# ifdef __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else + /* Endianness, as detected by autoconf */ +# undef WORDS_BIGENDIAN +#endif #ifdef WORDS_BIGENDIAN # define PJ_IS_LITTLE_ENDIAN 0 @@ -47,3 +57,4 @@ #define PJ_HAS_PENTIUM 0 #endif /* __PJ_COMPAT_M_AUTO_H__ */ + -- cgit v1.2.3