Fixes for compilation on MacOS.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2525 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2006-11-23 22:41:57 +00:00
parent 4937c9dabc
commit 224f862780
3 changed files with 19 additions and 1 deletions
+17
View File
@@ -25,6 +25,23 @@
#include "config.h"
#include "types.h"
#if defined (__APPLE__) && defined (__GNUC__)
// When using the MacOS gcc compiler to build universal binaries,
// each file will be compiled once for each platform.
// This means that checking endianness beforehand from build.sh will not do,
// but fortunately, gcc defines __BIG_ENDIAN__ or __LITTLE_ENDIAN__ on
// this platform.
# if defined(__BIG_ENDIAN__)
# undef WORDS_BIGENDIAN
# define WORDS_BIGENDIAN
# elif defined(__LITTLE_ENDIAN__)
# undef WORDS_BIGENDIAN
# else
// Neither __BIG_ENDIAN__ nor __LITTLE_ENDIAN__ is defined.
// Fallback to using the build.sh defined value.
# endif
#endif /* __APPLE__ */
#if defined(_MSC_VER) || defined(__BORLANDC__) || \
defined(__DMC__) || defined(__SC__) || \
defined(__WATCOMC__) || defined(__LCC__)
+1 -1
View File
@@ -27,7 +27,7 @@
#include "port.h"
// for inline
#include "config.h"
#include "endian_uqm.h"
// for WORDS_BIGENDIAN
#include "types.h"
@@ -23,6 +23,7 @@
#include "config.h"
#include "libs/sound/sound.h"
#include "options.h"
#include "endian_uqm.h"
#if defined (__APPLE__)
# include <OpenAL/al.h>