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:
@@ -25,6 +25,23 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "types.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__) || \
|
#if defined(_MSC_VER) || defined(__BORLANDC__) || \
|
||||||
defined(__DMC__) || defined(__SC__) || \
|
defined(__DMC__) || defined(__SC__) || \
|
||||||
defined(__WATCOMC__) || defined(__LCC__)
|
defined(__WATCOMC__) || defined(__LCC__)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
// for inline
|
// for inline
|
||||||
#include "config.h"
|
#include "endian_uqm.h"
|
||||||
// for WORDS_BIGENDIAN
|
// for WORDS_BIGENDIAN
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "libs/sound/sound.h"
|
#include "libs/sound/sound.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#include "endian_uqm.h"
|
||||||
|
|
||||||
#if defined (__APPLE__)
|
#if defined (__APPLE__)
|
||||||
# include <OpenAL/al.h>
|
# include <OpenAL/al.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user