ffi.h.in: Add typedef for ffi_arg.
authorJeff Sturm <jsturm@one-point.com>
Sun, 24 Feb 2002 17:31:45 +0000 (17:31 +0000)
committerJeff Sturm <jsturm@gcc.gnu.org>
Sun, 24 Feb 2002 17:31:45 +0000 (17:31 +0000)
        * include/ffi.h.in: Add typedef for ffi_arg.
        * src/ffitest.c (main): Declare rint with ffi_arg.

From-SVN: r50006

libffi/ChangeLog
libffi/include/ffi.h.in
libffi/src/ffitest.c

index f98ef9f9924e8178a9feb70aafc6006f8fbc5898..ad33876a7dc069efc26a52d3ebd9cd5f0a825ce8 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-24  Jeff Sturm  <jsturm@one-point.com>
+
+       * include/ffi.h.in: Add typedef for ffi_arg.
+       * src/ffitest.c (main): Declare rint with ffi_arg.
 2002-02-21  Andreas Tobler  <toa@pop.agri.ch>
 
        * src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate
index bcb999abe03a3efda40953b6ae2f90f0c67c9ad9..90ed269230580814ddd2092ed6fe165b8f715edd 100644 (file)
@@ -307,6 +307,16 @@ typedef struct {
 
 } ffi_cif;
 
+#if SIZEOF_ARG == 4
+typedef UINT32 ffi_arg;
+#else
+#if SIZEOF_ARG == 8
+typedef UINT64 ffi_arg;
+#else
+-- unsupported configuration
+#endif
+#endif
+
 /* ---- Definitions for the raw API -------------------------------------- */
 
 #if !FFI_NO_RAW_API
index a03f045b2fb27cb135dbdb4b3de930be1e2549b3..ba47ba408d16ea6a8c7d759c4e341cba7042965b 100644 (file)
@@ -222,11 +222,7 @@ int main(/*@unused@*/ int argc, /*@unused@*/ char *argv[])
   signed int si1;
   signed int si2;
 
-#if defined(ALPHA) || defined(IA64) || defined(SPARC64) || (defined(MIPS) && (_MIPS_SIM == _ABIN32))
-  long long rint;
-#else
-  int rint;
-#endif
+  ffi_arg rint;
   long long rlonglong;
 
   ffi_type ts1_type;