aboutsummaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorDan Horák <dan@danny.cz>2010-08-06 14:26:52 +0200
committerAnthony Green <green@gcc.gnu.org>2010-08-06 12:26:52 +0000
commit3d420bdf4deea364fde519d56be32731a83a6ad4 (patch)
tree105c2336b4252813cb4b4f1e5ef59cba44228c8d /libffi
parent0b4b14ac40a7efec44d96074ec0dd0c0e6bd5fc2 (diff)
downloadgcc-3d420bdf4deea364fde519d56be32731a83a6ad4.zip
gcc-3d420bdf4deea364fde519d56be32731a83a6ad4.tar.gz
gcc-3d420bdf4deea364fde519d56be32731a83a6ad4.tar.bz2
Define libffi macros carefully
From-SVN: r162945
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog7
-rw-r--r--libffi/include/ffi.h.in2
-rw-r--r--libffi/src/powerpc/ffitarget.h6
-rw-r--r--libffi/src/s390/ffitarget.h2
-rw-r--r--libffi/src/sparc/ffitarget.h2
5 files changed, 19 insertions, 0 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index e9a5d0b..2342a77 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -2,6 +2,13 @@
* src/closures.c (selinux_enabled_check): Fix strncmp usage bug.
+2010-07-07 Dan Horák <dan@danny.cz>
+
+ * include/ffi.h.in: Protect #define with #ifndef.
+ * src/powerpc/ffitarget.h: Ditto.
+ * src/s390/ffitarget.h: Ditto.
+ * src/sparc/ffitarget.h: Ditto.
+
2010-07-07 Neil Roberts <neil@linux.intel.com>
* src/x86/sysv.S (ffi_call_SYSV): Align the stack pointer to
diff --git a/libffi/include/ffi.h.in b/libffi/include/ffi.h.in
index df7d2cd..92e38c4 100644
--- a/libffi/include/ffi.h.in
+++ b/libffi/include/ffi.h.in
@@ -57,7 +57,9 @@ extern "C" {
#endif
/* Specify which architecture libffi is configured for. */
+#ifndef @TARGET@
#define @TARGET@
+#endif
/* ---- System configuration information --------------------------------- */
diff --git a/libffi/src/powerpc/ffitarget.h b/libffi/src/powerpc/ffitarget.h
index b4f992e..45529ed 100644
--- a/libffi/src/powerpc/ffitarget.h
+++ b/libffi/src/powerpc/ffitarget.h
@@ -31,12 +31,18 @@
/* ---- System specific configurations ----------------------------------- */
#if defined (POWERPC) && defined (__powerpc64__) /* linux64 */
+#ifndef POWERPC64
#define POWERPC64
+#endif
#elif defined (POWERPC_DARWIN) && defined (__ppc64__) /* Darwin */
+#ifndef POWERPC64
#define POWERPC64
+#endif
#elif defined (POWERPC_AIX) && defined (__64BIT__) /* AIX64 */
+#ifndef POWERPC64
#define POWERPC64
#endif
+#endif
#ifndef LIBFFI_ASM
typedef unsigned long ffi_arg;
diff --git a/libffi/src/s390/ffitarget.h b/libffi/src/s390/ffitarget.h
index 78f3c65..3862738 100644
--- a/libffi/src/s390/ffitarget.h
+++ b/libffi/src/s390/ffitarget.h
@@ -28,8 +28,10 @@
#define LIBFFI_TARGET_H
#if defined (__s390x__)
+#ifndef S390X
#define S390X
#endif
+#endif
/* ---- System specific configurations ----------------------------------- */
diff --git a/libffi/src/sparc/ffitarget.h b/libffi/src/sparc/ffitarget.h
index 1a1a1ac..50554b8 100644
--- a/libffi/src/sparc/ffitarget.h
+++ b/libffi/src/sparc/ffitarget.h
@@ -30,8 +30,10 @@
/* ---- System specific configurations ----------------------------------- */
#if defined(__arch64__) || defined(__sparcv9)
+#ifndef SPARC64
#define SPARC64
#endif
+#endif
#ifndef LIBFFI_ASM
typedef unsigned long ffi_arg;