summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-07-04 13:44:46 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-07-04 13:44:46 +0200
commit05364c886fc6e21547b351abaf12419237b5b39d (patch)
tree0269f1b7696b6d0d0404d96d1c7f59ad45a70a3d /plugins
parent3ffe80c51c395ce1c19174f39d2089c8c7b7b473 (diff)
ao plugin: bigendian detection
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ao/Makefile.am2
-rwxr-xr-xplugins/ao/ao.h12
2 files changed, 13 insertions, 1 deletions
diff --git a/plugins/ao/Makefile.am b/plugins/ao/Makefile.am
index 82209227..c332adf4 100644
--- a/plugins/ao/Makefile.am
+++ b/plugins/ao/Makefile.am
@@ -20,6 +20,6 @@ eng_psf/peops2/adsr.h eng_psf/peops2/dma.h eng_psf/peops2/externals.h eng_psf/pe
ao_la_LDFLAGS = -module -fPIC
ao_la_LIBADD = $(LDADD)
-AM_CFLAGS = $(CFLAGS) -Wall -DPATH_MAX=1024 -DHAS_PSXCPU=1 -I.. -Ieng_ssf -Ieng_qsf -Ieng_dsf -DLSB_FIRST=1 -lm $(ZLIB_LIBS)
+AM_CFLAGS = $(CFLAGS) -Wall -DPATH_MAX=1024 -DHAS_PSXCPU=1 -I.. -Ieng_ssf -Ieng_qsf -Ieng_dsf -lm $(ZLIB_LIBS)
endif
diff --git a/plugins/ao/ao.h b/plugins/ao/ao.h
index 44320286..87a1b00c 100755
--- a/plugins/ao/ao.h
+++ b/plugins/ao/ao.h
@@ -7,6 +7,10 @@
#ifndef __AO_H
#define __AO_H
+#ifdef HAVE_CONFIG_H
+#include "../../config.h"
+#endif
+
#define AO_SUCCESS 1
#define AO_FAIL 0
#define AO_FAIL_DECOMPRESSION -1
@@ -27,6 +31,7 @@ enum
COMMAND_JUMP
};
+#if 0
/* Compiler defines for Xcode */
#ifdef __BIG_ENDIAN__
#undef LSB_FIRST
@@ -35,6 +40,13 @@ enum
#ifdef __LITTLE_ENDIAN__
#define LSB_FIRST 1
#endif
+#endif
+
+#ifdef WORDS_BIGENDIAN
+ #undef LSB_FIRST
+#else
+ #define LSB_FIRST 1
+#endif
typedef unsigned char ao_bool;