* include/ffi_common.h: Delete, after moving contents to...
authorgreen <green>
Mon, 23 Apr 2001 00:32:03 +0000 (00:32 +0000)
committergreen <green>
Mon, 23 Apr 2001 00:32:03 +0000 (00:32 +0000)
        * include/ffi_private.h: Subsume contents of ffi_common.h.
        * include/Makefile.am (noinst_HEADERS): Remove ffi_common.h.
        * include/Makefile.in: Rebuilt.
        * arm/ffi.c, m68k/ffi.c, mips/ffi.c, powerpc/ffi.c, s390/ffi.c,
        ia64/ffi.c: Include ffi_private.h, not ffi_common.h.
        * alpha/ffi.c, sparc/ffi.c, x86/ffi.c: Don't include ffi_common.h.
        * types.c, raw_api.c, java_raw_api.c, prep_cif.c: Don't include
        ffi_common.h.
        * debug.c: Include ffi_private.h instead of ffi_common.h.

        * mips/ffi.c (calc_n32_struct_flags): Make static.
        (FIX_ARGP): Remove call to debugging routine ffi_stop_here.

        * mips/n32.S: Include ffi_private.h.
        * mips/o32.S: Include ffi_private.h.

23 files changed:
libffi/ChangeLog
libffi/README
libffi/alpha/ffi.c
libffi/arm/ffi.c
libffi/debug.c
libffi/ia64/ffi.c
libffi/include/Makefile.am
libffi/include/Makefile.in
libffi/include/ffi_common.h [deleted file]
libffi/include/ffi_private.h
libffi/java_raw_api.c
libffi/m68k/ffi.c
libffi/mips/ffi.c
libffi/mips/n32.S
libffi/mips/o32.S
libffi/powerpc/ffi.c
libffi/prep_cif.c
libffi/raw_api.c
libffi/s390/ffi.c
libffi/sparc/ffi.c
libffi/testsuite/lib/libffi.exp
libffi/testsuite/libffi.call/many.c
libffi/types.c

index b58d0fb..8f42ec0 100644 (file)
@@ -1,3 +1,22 @@
+Sun Apr 22 15:50:08 2001  Anthony Green  <green@redhat.com>
+
+       * include/ffi_common.h: Delete, after moving contents to...
+       * include/ffi_private.h: Subsume contents of ffi_common.h.
+       * include/Makefile.am (noinst_HEADERS): Remove ffi_common.h.
+       * include/Makefile.in: Rebuilt.
+       * arm/ffi.c, m68k/ffi.c, mips/ffi.c, powerpc/ffi.c, s390/ffi.c,
+       ia64/ffi.c: Include ffi_private.h, not ffi_common.h.
+       * alpha/ffi.c, sparc/ffi.c, x86/ffi.c: Don't include ffi_common.h.
+       * types.c, raw_api.c, java_raw_api.c, prep_cif.c: Don't include
+       ffi_common.h.
+       * debug.c: Include ffi_private.h instead of ffi_common.h.
+
+       * mips/ffi.c (calc_n32_struct_flags): Make static.
+       (FIX_ARGP): Remove call to debugging routine ffi_stop_here.
+
+       * mips/n32.S: Include ffi_private.h.
+       * mips/o32.S: Include ffi_private.h.
+
 Sun Apr 22 12:37:44 2001  Anthony Green  <green@redhat.com>
 
        * README: Update some comments.
index 05b0046..7dc1fa5 100644 (file)
@@ -476,7 +476,7 @@ History
 Authors & Credits
 =================
 
-libffi was written by Anthony Green <green@cygnus.com>.
+libffi was written by Anthony Green <green@redhat.com>.
 
 Portions of libffi were derived from Gianni Mariani's free gencall
 library for Silicon Graphics machines.
@@ -488,7 +488,7 @@ The initial Sparc port was derived from code contributed by the fine
 folks at Visible Decisions Inc.  Further enhancements were made by
 Gordon Irlam while at Cygnus Solutions.
 
-The Alpha port was written by Richard Henderson at Cygnus Solutions.
+The Alpha port was written by Richard Henderson at Cygnus Solutions/Red Hat.
 
 Andreas Schwab ported libffi to m68k Linux and provided a number of
 bug fixes.
index 94bd6bc..30d30f0 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <ffi.h>
 #include <ffi_private.h>
-#include <ffi_common.h>
 
 #include <stdlib.h>
 
index 0ede742..c4e8faf 100644 (file)
@@ -24,7 +24,7 @@
    ----------------------------------------------------------------------- */
 
 #include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
 
 #include <stdlib.h>
 
index 17196ba..4241659 100644 (file)
@@ -22,7 +22,7 @@
    ----------------------------------------------------------------------- */
 
 #include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
 #include <stdlib.h>
 #include <stdio.h>
 
index bb4fbb7..c84f86f 100644 (file)
@@ -25,7 +25,7 @@
    ----------------------------------------------------------------------- */
 
 #include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
 
 #include <stdlib.h>
 
index 4307727..525984f 100644 (file)
@@ -2,5 +2,5 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-noinst_HEADERS=ffi_common.h ffi_private.h
+noinst_HEADERS=ffi_private.h
 include_HEADERS=ffi.h
index 4223d62..853774d 100644 (file)
@@ -81,7 +81,7 @@ libffi_basedir = @libffi_basedir@
 
 AUTOMAKE_OPTIONS = foreign
 
-noinst_HEADERS = ffi_common.h ffi_private.h
+noinst_HEADERS = ffi_private.h
 include_HEADERS = ffi.h
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = ../fficonfig.h
diff --git a/libffi/include/ffi_common.h b/libffi/include/ffi_common.h
deleted file mode 100644 (file)
index 2120754..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -----------------------------------------------------------------------
-   ffi_common.h - Copyright (c) 1996  Red Hat, Inc.
-
-   $Id: ffi_common.h,v 1.3 2001/04/09 00:58:37 green Exp $
-
-   Common internal definitions and macros. Only necessary for building
-   libffi.
-   ----------------------------------------------------------------------- */
-
-#ifndef FFI_COMMON_H
-#define FFI_COMMON_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Do not move this. Some versions of AIX are very picky about where
-   this is positioned. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# if HAVE_ALLOCA_H
-#  include <alloca.h>
-# else
-#  ifdef _AIX
- #pragma alloca
-#  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
-
-/* Check for the existence of memcpy. */
-#if STDC_HEADERS
-# include <string.h>
-#else
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
-#ifndef __cplusplus
-/* bool is a keyword in C++ */
-/*@-cppnames@*/
-typedef int bool;
-/*@=cppnames@*/
-#endif
-
-#ifdef FFI_DEBUG
-
-/* Debugging functions */
-/*@exits@*/ int ffi_assert(/*@temp@*/ char *file, int line);
-void ffi_stop_here(void);
-bool ffi_type_test(/*@temp@*/ /*@out@*/ ffi_type *a);
-
-#define FFI_ASSERT(x) ((x) ? 0 : ffi_assert(__FILE__,__LINE__))
-
-#else
-
-#define FFI_ASSERT(x) 
-
-#endif
-
-/* Perform machine dependent cif processing */
-ffi_status ffi_prep_cif_machdep(ffi_cif *cif);
-
-/* Extended cif, used in callback from assembly routine */
-typedef struct
-{
-  /*@dependent@*/ ffi_cif *cif;
-  /*@dependent@*/ void *rvalue;
-  /*@dependent@*/ void **avalue;
-} extended_cif;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
index 59644b9..d3af43b 100644 (file)
 #define SIZEOF_ARG SIZEOF_VOID_P
 #endif
 
+#ifndef __ASSEMBLER__
+/* This part of the private header file is only for C code.  */
+
+/* Check for the existence of memcpy. */
+#if STDC_HEADERS
+# include <string.h>
+#else
+# ifndef HAVE_MEMCPY
+#  define memcpy(d, s, n) bcopy ((s), (d), (n))
+# endif
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+
+#ifndef __cplusplus
+/* bool is a keyword in C++ */
+typedef int bool;
+#endif
+
+#ifdef FFI_DEBUG
+/* Debugging functions */
+void ffi_stop_here(void);
+bool ffi_type_test(ffi_type *a);
+#define FFI_ASSERT(x) ((x) ? 0 : ffi_assert(__FILE__,__LINE__))
+#else
+#define FFI_ASSERT(x) 
+#endif
+
+/* Perform machine dependent cif processing */
+ffi_status ffi_prep_cif_machdep(ffi_cif *cif);
+
+/* Extended cif, used in callback from assembly routine */
+typedef struct
+{
+  ffi_cif *cif;
+  void *rvalue;
+  void **avalue;
+} extended_cif;
+
+#endif /* __ASSEMBLER__ */
+
index 9d82e4b..1b00cd3 100644 (file)
@@ -34,7 +34,6 @@
 
 #include <ffi.h>
 #include <ffi_private.h>
-#include <ffi_common.h>
 
 #if !defined(NO_JAVA_RAW_API) && !defined(FFI_NO_RAW_API)
 
index c5d9507..e9686f4 100644 (file)
@@ -5,7 +5,7 @@
    ----------------------------------------------------------------------- */
 
 #include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
 
 #include <stdlib.h>
 
index fb733b2..9709819 100644 (file)
@@ -24,7 +24,7 @@
    ----------------------------------------------------------------------- */
 
 #include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
 #include <mips/mips.h>
 
 #include <stdlib.h>
@@ -35,7 +35,6 @@ FFI_ASSERT(argp <= &stack[bytes]); \
 if (argp == &stack[bytes]) \
 { \
   argp = stack; \
-  ffi_stop_here(); \
 }
 #else
 #define FIX_ARGP 
@@ -194,7 +193,7 @@ static void ffi_prep_args(char *stack,
    passed in an integer register". This code traverses structure
    definitions and generates the appropriate flags. */
 
-unsigned calc_n32_struct_flags(ffi_type *arg, unsigned *shift)
+static unsigned calc_n32_struct_flags(ffi_type *arg, unsigned *shift)
 {
   unsigned flags = 0;
   unsigned index = 0;
index ee137b7..4eeef07 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   n32.S - Copyright (c) 1996, 1998  Cygnus Solutions
+   n32.S - Copyright (c) 1996, 1998, 2001  Red Hat, Inc.
    
    MIPS Foreign Function Interface 
 
@@ -25,6 +25,7 @@
 
 #define LIBFFI_ASM     
 #include <ffi.h>
+#include <ffi_private.h>
 #include <mips/mips.h>
        
 /* Only build this code if we are compiling for n32 */ 
index 9c8bbb2..6efc8f7 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   o32.S - Copyright (c) 1996, 1998  Cygnus Solutions
+   o32.S - Copyright (c) 1996, 1998, 2001  Red Hat, Inc.
    
    MIPS Foreign Function Interface 
 
@@ -25,6 +25,7 @@
 
 #define LIBFFI_ASM     
 #include <ffi.h>
+#include <ffi_private.h>
 #include <mips/mips.h>
 
 /* Only build this code if we are compiling for o32 */ 
index 309848e..2042962 100644 (file)
@@ -3,7 +3,7 @@
    
    PowerPC Foreign Function Interface 
 
-   $Id: ffi.c,v 1.1 2001/04/22 18:28:36 green Exp $
+   $Id: ffi.c,v 1.2 2001/04/23 00:32:03 green Exp $
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
@@ -26,7 +26,7 @@
    ----------------------------------------------------------------------- */
 
 #include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
 
 #include <stdlib.h>
 #include <stdio.h>
index 5e97a18..1073303 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <ffi.h>
 #include <ffi_private.h>
-#include <ffi_common.h>
 #include <stdlib.h>
 
 
index 4830709..c41cf2e 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <ffi.h>
 #include <ffi_private.h>
-#include <ffi_common.h>
 
 #if !FFI_NO_RAW_API
 
index 5498883..f605152 100644 (file)
@@ -28,7 +28,7 @@
 /*====================================================================*/\r
  \r
 #include <ffi.h>\r
-#include <ffi_common.h>\r
+#include <ffi_private.h>\r
  \r
 #include <stdlib.h>\r
 #include <stdio.h>\r
index 65e295b..f7d909b 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <ffi.h>
 #include <ffi_private.h>
-#include <ffi_common.h>
 
 #include <stdlib.h>
 
index 58c5408..00c28d3 100644 (file)
@@ -34,9 +34,9 @@ proc test_libffi {src} {
 
     $status "$testcase"
 
-    if { $status == "pass" } {
-       remote_file build delete $executable;
-    }
+#    if { $status == "pass" } {
+#      remote_file build delete $executable;
+#    }
 } 
 
 # Local Variables:
index 01a2138..1b3d72c 100644 (file)
@@ -16,7 +16,7 @@ static float many(float f1,
                  float f12,
                  float f13)
 {
-#if 0
+#if 1
   printf("%f %f %f %f %f %f %f %f %f %f %f %f %f\n",
         (double) f1, (double) f2, (double) f3, (double) f4, (double) f5, 
         (double) f6, (double) f7, (double) f8, (double) f9, (double) f10,
@@ -60,4 +60,4 @@ main ()
       exit(0);
     else
       abort();
-  }
+}
index d1eb089..9ab573d 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <ffi.h>
 #include <ffi_private.h>
-#include <ffi_common.h>
 
 /* Type definitions */