* 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 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.
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.
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.
#include <ffi.h>
#include <ffi_private.h>
-#include <ffi_common.h>
#include <stdlib.h>
----------------------------------------------------------------------- */
#include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
#include <stdlib.h>
----------------------------------------------------------------------- */
#include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
#include <stdlib.h>
#include <stdio.h>
----------------------------------------------------------------------- */
#include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
#include <stdlib.h>
AUTOMAKE_OPTIONS = foreign
-noinst_HEADERS=ffi_common.h ffi_private.h
+noinst_HEADERS=ffi_private.h
include_HEADERS=ffi.h
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
+++ /dev/null
-/* -----------------------------------------------------------------------
- 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
-
-
#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__ */
+
#include <ffi.h>
#include <ffi_private.h>
-#include <ffi_common.h>
#if !defined(NO_JAVA_RAW_API) && !defined(FFI_NO_RAW_API)
----------------------------------------------------------------------- */
#include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
#include <stdlib.h>
----------------------------------------------------------------------- */
#include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
#include <mips/mips.h>
#include <stdlib.h>
if (argp == &stack[bytes]) \
{ \
argp = stack; \
- ffi_stop_here(); \
}
#else
#define FIX_ARGP
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;
/* -----------------------------------------------------------------------
- n32.S - Copyright (c) 1996, 1998 Cygnus Solutions
+ n32.S - Copyright (c) 1996, 1998, 2001 Red Hat, Inc.
MIPS Foreign Function Interface
#define LIBFFI_ASM
#include <ffi.h>
+#include <ffi_private.h>
#include <mips/mips.h>
/* Only build this code if we are compiling for n32 */
/* -----------------------------------------------------------------------
- o32.S - Copyright (c) 1996, 1998 Cygnus Solutions
+ o32.S - Copyright (c) 1996, 1998, 2001 Red Hat, Inc.
MIPS Foreign Function Interface
#define LIBFFI_ASM
#include <ffi.h>
+#include <ffi_private.h>
#include <mips/mips.h>
/* Only build this code if we are compiling for o32 */
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
----------------------------------------------------------------------- */
#include <ffi.h>
-#include <ffi_common.h>
+#include <ffi_private.h>
#include <stdlib.h>
#include <stdio.h>
#include <ffi.h>
#include <ffi_private.h>
-#include <ffi_common.h>
#include <stdlib.h>
#include <ffi.h>
#include <ffi_private.h>
-#include <ffi_common.h>
#if !FFI_NO_RAW_API
/*====================================================================*/\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
#include <ffi.h>
#include <ffi_private.h>
-#include <ffi_common.h>
#include <stdlib.h>
$status "$testcase"
- if { $status == "pass" } {
- remote_file build delete $executable;
- }
+# if { $status == "pass" } {
+# remote_file build delete $executable;
+# }
}
# Local Variables:
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,
exit(0);
else
abort();
- }
+}
#include <ffi.h>
#include <ffi_private.h>
-#include <ffi_common.h>
/* Type definitions */