* Building 3.0.10rc5 on AIX 5.2 or newer
@ 2011-02-25 21:42 Uli Link
0 siblings, 0 replies; only message in thread
From: Uli Link @ 2011-02-25 21:42 UTC (permalink / raw)
To: libffi-discuss; +Cc: usmc_1811, dwitte
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
I forgot about a slight difference between AIX 5.1 and earlier and AIX
5.2 and later:
AIX 5.2 introduced the C99 runtime and headers, so ffi.h.in needs a
further patch to compile with IBM XLC on AIX 5.2 or later which has
LLONG_MAX.
Sorry, I only tested on my Mozilla build host running AIX 5.1 :-(
AIX native preprocessor needs non-integer literals properly suffixed.
--
Uli Link
[-- Attachment #2: libffi-ffi_h_in.patch --]
[-- Type: text/plain, Size: 1007 bytes --]
diff -U 8 -p libffi-3.0.10rc5.org/include/ffi.h.in libffi-3.0.10rc5/include/ffi.h.in
--- libffi-3.0.10rc5.org/include/ffi.h.in 2011-02-13 14:05:35.000000000 +0100
+++ libffi-3.0.10rc5/include/ffi.h.in 2011-02-25 22:14:10.000000000 +0100
@@ -81,21 +81,25 @@ extern "C" {
#define FFI_64_BIT_MAX 9223372036854775807
#ifdef LONG_LONG_MAX
# define FFI_LONG_LONG_MAX LONG_LONG_MAX
#else
# ifdef LLONG_MAX
# define FFI_LONG_LONG_MAX LLONG_MAX
+# ifdef _AIX52 /* or newer has C99 LLONG_MAX */
+# undef FFI_64_BIT_MAX
+# define FFI_64_BIT_MAX 9223372036854775807LL
+# endif /* _AIX52 or newer */
# else
# ifdef __GNUC__
# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__
# endif
-# ifdef _AIX
+# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */
# ifndef __PPC64__
# if defined (__IBMC__) || defined (__IBMCPP__)
# define FFI_LONG_LONG_MAX LONGLONG_MAX
# endif
# endif /* __PPC64__ */
# undef FFI_64_BIT_MAX
# define FFI_64_BIT_MAX 9223372036854775807LL
# endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-25 21:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-25 21:42 Building 3.0.10rc5 on AIX 5.2 or newer Uli Link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).