Merge pull request #45 from foss-for-synopsys-dwc-arc-processors/arc_support
authorAnthony Green <green@moxielogic.com>
Sat, 2 Nov 2013 21:08:23 +0000 (14:08 -0700)
committerAnthony Green <green@moxielogic.com>
Sat, 2 Nov 2013 21:08:23 +0000 (14:08 -0700)
arc: Fix build error

54 files changed:
.travis.yml
ChangeLog
Makefile.am
Makefile.in
README
aclocal.m4
compile
config.guess
config.sub
configure
configure.ac
depcomp
doc/libffi.info
doc/stamp-vti
doc/version.texi
include/Makefile.in
install-sh
man/Makefile.in
mdate-sh [changed mode: 0644->0755]
missing
src/aarch64/ffi.c
src/aarch64/sysv.S
src/arm/ffi.c
src/arm/gentramp.sh
src/bfin/sysv.S
src/closures.c
src/dlmalloc.c
src/ia64/ffi.c
src/m88k/ffi.c [new file with mode: 0644]
src/m88k/ffitarget.h [new file with mode: 0644]
src/m88k/obsd.S [new file with mode: 0644]
src/microblaze/ffi.c
src/microblaze/sysv.S
src/mips/ffi.c
src/nios2/ffi.c [new file with mode: 0644]
src/nios2/ffitarget.h [new file with mode: 0644]
src/nios2/sysv.S [new file with mode: 0644]
src/powerpc/darwin_closure.S
src/powerpc/ffi.c
src/powerpc/ffi_darwin.c
src/powerpc/linux64_closure.S
src/powerpc/ppc_closure.S
src/prep_cif.c
src/sh/ffi.c
src/tile/tile.S
src/vax/elfbsd.S [new file with mode: 0644]
src/vax/ffi.c [new file with mode: 0644]
src/vax/ffitarget.h [new file with mode: 0644]
src/x86/ffi.c
testsuite/Makefile.in
testsuite/libffi.call/cls_many_mixed_args.c
testsuite/libffi.call/many.c
testsuite/libffi.call/nested_struct11.c
texinfo.tex

index 1a6a425..87d2e25 100644 (file)
@@ -3,6 +3,6 @@ compiler:
   - gcc
   - clang
 
-before_script: sudo apt-get install dejagnu
+before_script: sudo apt-get install dejagnu texinfo
 
 script: ./configure && make && make check
index 837fa88..bbc0745 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,76 @@
+2013-11-02  Vitaly Budovski
+
+       * src/x86/ffi.c (ffi_prep_cif_machdep): Don't align stack for win32.
+
+2013-10-23  Mark H Weaver  <mhw@netris.org>
+
+       * src/mips/ffi.c: Fix handling of uint32_t arguments on the
+       MIPS N32 ABI.
+
+2013-10-13  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * README: Add Nios II to table of supported platforms.
+       * Makefile.am (EXTRA_DIST): Add nios2 files.
+       (nodist_libffi_la_SOURCES): Likewise.
+       * Makefile.in: Regenerated.
+       * configure.ac (nios2*-linux*): New host.
+       (NIOS2): Add AM_CONDITIONAL.
+       * configure: Regenerated.
+       * src/nios2/ffi.c: New.
+       * src/nios2/ffitarget.h: New.
+       * src/nios2/sysv.S: New.
+       * src/prep_cif.c (initialize_aggregate): Handle extra structure
+       alignment via FFI_AGGREGATE_ALIGNMENT.
+       (ffi_prep_cif_core): Conditionalize structure return for NIOS2.
+
+2013-10-10  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * testsuite/libffi.call/cls_many_mixed_args.c (cls_ret_double_fn):
+       Fix uninitialized variable.
+
+2013-10-11  Marcus Shawcroft  <marcus.shawcroft@arm.com>
+
+       * testsuite/libffi.call/many.c (many): Replace * with +.
+
+2013-10-08  Ondřej Bílka  <neleai@seznam.cz>
+
+       * src/aarch64/ffi.c, src/aarch64/sysv.S, src/arm/ffi.c,
+       src/arm/gentramp.sh, src/bfin/sysv.S, src/closures.c,
+       src/dlmalloc.c, src/ia64/ffi.c, src/microblaze/ffi.c,
+       src/microblaze/sysv.S, src/powerpc/darwin_closure.S,
+       src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/sh/ffi.c,
+       src/tile/tile.S, testsuite/libffi.call/nested_struct11.c: Fix
+       spelling errors.
+
+2013-10-08  Anthony Green  <green@moxielogic.com>
+
+       * aclocal.m4, compile, config.guess, config.sub, depcomp,
+       install-sh, mdate-sh, missing, texinfo.tex: Update from upstream.
+       * configure.ac: Update version to 3.0.14-rc0.
+       * Makefile.in, configure, Makefile.in, include/Makefile.in,
+       man/Makefile.in, testsuite/Makefile.in: Rebuilt.
+       * README: Mention M88K and VAX.
+
+2013-07-15  Miod Vallat  <miod@openbsd.org>
+
+       * Makefile.am,
+       configure.ac,
+       src/m88k/ffi.c,
+       src/m88k/ffitarget.h,
+       src/m88k/obsd.S,
+       src/vax/elfbsd.S,
+       src/vax/ffi.c,
+       src/vax/ffitarget.h: Add m88k and vax support.
+
+2013-06-24 Alan Modra  <amodra@gmail.com>
+
+       * src/powerpc/ffi.c (ffi_prep_args_SYSV): Move var declaration
+       before statements.
+       (ffi_prep_args64): Support little-endian.
+       (ffi_closure_helper_SYSV, ffi_closure_helper_LINUX64): Likewise.
+       * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Likewise.
+       * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Likewise.
+
 2013-06-12  Mischa Jonker  <mjonker@synopsys.com>
 
         * configure.ac: Add support for ARC.
        (required for shared libs on cygwin/mingw).
        * Makefile.in: Rebuilt.
 
-2012-10-31  Alan Modra  <amodra@gmail.com>
+2012-10-31  Alan Modra  <amodra@gmail.co>
 
        * src/powerpc/linux64_closure.S: Add new ABI support.
        * src/powerpc/linux64.S: Likewise.
index 19ead77..e9ba8cb 100644 (file)
@@ -20,8 +20,11 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host    \
         src/moxie/ffitarget.h src/moxie/eabi.S src/mips/ffitarget.h    \
         src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h            \
         src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h            \
+        src/m88k/ffi.c src/m88k/obsd.S src/m88k/ffitarget.h            \
         src/microblaze/ffi.c src/microblaze/sysv.S                     \
-        src/microblaze/ffitarget.h src/powerpc/ffi.c                   \
+        src/microblaze/ffitarget.h                                     \
+        src/nios2/ffi.c src/nios2/ffitarget.h src/nios2/sysv.S         \
+        src/powerpc/ffi.c                                              \
         src/powerpc/sysv.S src/powerpc/linux64.S                       \
         src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S        \
         src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S       \
@@ -39,6 +42,7 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host     \
         src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S            \
         src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c              \
         src/tile/ffitarget.h src/tile/tile.S libtool-version           \
+        src/vax/ffi.c src/vax/ffitarget.h src/vax/elfbsd.S             \
         src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S      \
         ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4               \
         m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4                  \
@@ -150,12 +154,18 @@ endif
 if M68K
 nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
 endif
+if M88K
+nodist_libffi_la_SOURCES += src/m88k/ffi.c src/m88k/obsd.S
+endif
 if MOXIE
 nodist_libffi_la_SOURCES += src/moxie/ffi.c src/moxie/eabi.S
 endif
 if MICROBLAZE
 nodist_libffi_la_SOURCES += src/microblaze/ffi.c src/microblaze/sysv.S
 endif
+if NIOS2
+nodist_libffi_la_SOURCES += src/nios2/sysv.S src/nios2/ffi.c
+endif
 if POWERPC
 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
 endif
@@ -216,6 +226,9 @@ endif
 if METAG
 nodist_libffi_la_SOURCES += src/metag/sysv.S src/metag/ffi.c
 endif
+if VAX
+nodist_libffi_la_SOURCES += src/vax/elfbsd.S src/vax/ffi.c
+endif
 
 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
index 44c2551..db84a35 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -65,35 +93,38 @@ target_triplet = @target@
 @IA64_TRUE@am__append_11 = src/ia64/ffi.c src/ia64/unix.S
 @M32R_TRUE@am__append_12 = src/m32r/sysv.S src/m32r/ffi.c
 @M68K_TRUE@am__append_13 = src/m68k/ffi.c src/m68k/sysv.S
-@MOXIE_TRUE@am__append_14 = src/moxie/ffi.c src/moxie/eabi.S
-@MICROBLAZE_TRUE@am__append_15 = src/microblaze/ffi.c src/microblaze/sysv.S
-@POWERPC_TRUE@am__append_16 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
-@POWERPC_AIX_TRUE@am__append_17 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
-@POWERPC_DARWIN_TRUE@am__append_18 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
-@POWERPC_FREEBSD_TRUE@am__append_19 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
-@AARCH64_TRUE@am__append_20 = src/aarch64/sysv.S src/aarch64/ffi.c
-@ARC_TRUE@am__append_21 = src/arc/sysv.S src/arc/ffi.c
-@ARM_TRUE@am__append_22 = src/arm/sysv.S src/arm/ffi.c
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_23 = src/arm/trampoline.S
-@AVR32_TRUE@am__append_24 = src/avr32/sysv.S src/avr32/ffi.c
-@LIBFFI_CRIS_TRUE@am__append_25 = src/cris/sysv.S src/cris/ffi.c
-@FRV_TRUE@am__append_26 = src/frv/eabi.S src/frv/ffi.c
-@S390_TRUE@am__append_27 = src/s390/sysv.S src/s390/ffi.c
-@X86_64_TRUE@am__append_28 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
-@SH_TRUE@am__append_29 = src/sh/sysv.S src/sh/ffi.c
-@SH64_TRUE@am__append_30 = src/sh64/sysv.S src/sh64/ffi.c
-@PA_LINUX_TRUE@am__append_31 = src/pa/linux.S src/pa/ffi.c
-@PA_HPUX_TRUE@am__append_32 = src/pa/hpux32.S src/pa/ffi.c
-@TILE_TRUE@am__append_33 = src/tile/tile.S src/tile/ffi.c
-@XTENSA_TRUE@am__append_34 = src/xtensa/sysv.S src/xtensa/ffi.c
-@METAG_TRUE@am__append_35 = src/metag/sysv.S src/metag/ffi.c
+@M88K_TRUE@am__append_14 = src/m88k/ffi.c src/m88k/obsd.S
+@MOXIE_TRUE@am__append_15 = src/moxie/ffi.c src/moxie/eabi.S
+@MICROBLAZE_TRUE@am__append_16 = src/microblaze/ffi.c src/microblaze/sysv.S
+@NIOS2_TRUE@am__append_17 = src/nios2/sysv.S src/nios2/ffi.c
+@POWERPC_TRUE@am__append_18 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
+@POWERPC_AIX_TRUE@am__append_19 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
+@POWERPC_DARWIN_TRUE@am__append_20 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
+@POWERPC_FREEBSD_TRUE@am__append_21 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
+@AARCH64_TRUE@am__append_22 = src/aarch64/sysv.S src/aarch64/ffi.c
+@ARC_TRUE@am__append_23 = src/arc/sysv.S src/arc/ffi.c
+@ARM_TRUE@am__append_24 = src/arm/sysv.S src/arm/ffi.c
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_25 = src/arm/trampoline.S
+@AVR32_TRUE@am__append_26 = src/avr32/sysv.S src/avr32/ffi.c
+@LIBFFI_CRIS_TRUE@am__append_27 = src/cris/sysv.S src/cris/ffi.c
+@FRV_TRUE@am__append_28 = src/frv/eabi.S src/frv/ffi.c
+@S390_TRUE@am__append_29 = src/s390/sysv.S src/s390/ffi.c
+@X86_64_TRUE@am__append_30 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
+@SH_TRUE@am__append_31 = src/sh/sysv.S src/sh/ffi.c
+@SH64_TRUE@am__append_32 = src/sh64/sysv.S src/sh64/ffi.c
+@PA_LINUX_TRUE@am__append_33 = src/pa/linux.S src/pa/ffi.c
+@PA_HPUX_TRUE@am__append_34 = src/pa/hpux32.S src/pa/ffi.c
+@TILE_TRUE@am__append_35 = src/tile/tile.S src/tile/ffi.c
+@XTENSA_TRUE@am__append_36 = src/xtensa/sysv.S src/xtensa/ffi.c
+@METAG_TRUE@am__append_37 = src/metag/sysv.S src/metag/ffi.c
+@VAX_TRUE@am__append_38 = src/vax/elfbsd.S src/vax/ffi.c
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
-       $(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
-       $(srcdir)/doc/version.texi $(srcdir)/fficonfig.h.in \
-       $(srcdir)/libffi.pc.in $(top_srcdir)/configure ChangeLog \
-       compile config.guess config.sub depcomp install-sh ltmain.sh \
-       mdate-sh missing texinfo.tex
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+       $(top_srcdir)/configure $(am__configure_deps) \
+       $(srcdir)/fficonfig.h.in $(srcdir)/libffi.pc.in depcomp \
+       mdate-sh $(srcdir)/doc/version.texi $(srcdir)/doc/stamp-vti \
+       texinfo.tex ChangeLog README compile config.guess config.sub \
+       install-sh missing ltmain.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
        $(top_srcdir)/m4/ax_append_flag.m4 \
@@ -167,39 +198,42 @@ am_libffi_la_OBJECTS = src/prep_cif.lo src/types.lo src/raw_api.lo \
 @IA64_TRUE@am__objects_11 = src/ia64/ffi.lo src/ia64/unix.lo
 @M32R_TRUE@am__objects_12 = src/m32r/sysv.lo src/m32r/ffi.lo
 @M68K_TRUE@am__objects_13 = src/m68k/ffi.lo src/m68k/sysv.lo
-@MOXIE_TRUE@am__objects_14 = src/moxie/ffi.lo src/moxie/eabi.lo
-@MICROBLAZE_TRUE@am__objects_15 = src/microblaze/ffi.lo \
+@M88K_TRUE@am__objects_14 = src/m88k/ffi.lo src/m88k/obsd.lo
+@MOXIE_TRUE@am__objects_15 = src/moxie/ffi.lo src/moxie/eabi.lo
+@MICROBLAZE_TRUE@am__objects_16 = src/microblaze/ffi.lo \
 @MICROBLAZE_TRUE@      src/microblaze/sysv.lo
-@POWERPC_TRUE@am__objects_16 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
+@NIOS2_TRUE@am__objects_17 = src/nios2/sysv.lo src/nios2/ffi.lo
+@POWERPC_TRUE@am__objects_18 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
 @POWERPC_TRUE@ src/powerpc/ppc_closure.lo \
 @POWERPC_TRUE@ src/powerpc/linux64.lo \
 @POWERPC_TRUE@ src/powerpc/linux64_closure.lo
-@POWERPC_AIX_TRUE@am__objects_17 = src/powerpc/ffi_darwin.lo \
+@POWERPC_AIX_TRUE@am__objects_19 = src/powerpc/ffi_darwin.lo \
 @POWERPC_AIX_TRUE@     src/powerpc/aix.lo \
 @POWERPC_AIX_TRUE@     src/powerpc/aix_closure.lo
-@POWERPC_DARWIN_TRUE@am__objects_18 = src/powerpc/ffi_darwin.lo \
+@POWERPC_DARWIN_TRUE@am__objects_20 = src/powerpc/ffi_darwin.lo \
 @POWERPC_DARWIN_TRUE@  src/powerpc/darwin.lo \
 @POWERPC_DARWIN_TRUE@  src/powerpc/darwin_closure.lo
-@POWERPC_FREEBSD_TRUE@am__objects_19 = src/powerpc/ffi.lo \
+@POWERPC_FREEBSD_TRUE@am__objects_21 = src/powerpc/ffi.lo \
 @POWERPC_FREEBSD_TRUE@ src/powerpc/sysv.lo \
 @POWERPC_FREEBSD_TRUE@ src/powerpc/ppc_closure.lo
-@AARCH64_TRUE@am__objects_20 = src/aarch64/sysv.lo src/aarch64/ffi.lo
-@ARC_TRUE@am__objects_21 = src/arc/sysv.lo src/arc/ffi.lo
-@ARM_TRUE@am__objects_22 = src/arm/sysv.lo src/arm/ffi.lo
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_23 = src/arm/trampoline.lo
-@AVR32_TRUE@am__objects_24 = src/avr32/sysv.lo src/avr32/ffi.lo
-@LIBFFI_CRIS_TRUE@am__objects_25 = src/cris/sysv.lo src/cris/ffi.lo
-@FRV_TRUE@am__objects_26 = src/frv/eabi.lo src/frv/ffi.lo
-@S390_TRUE@am__objects_27 = src/s390/sysv.lo src/s390/ffi.lo
-@X86_64_TRUE@am__objects_28 = src/x86/ffi64.lo src/x86/unix64.lo \
+@AARCH64_TRUE@am__objects_22 = src/aarch64/sysv.lo src/aarch64/ffi.lo
+@ARC_TRUE@am__objects_23 = src/arc/sysv.lo src/arc/ffi.lo
+@ARM_TRUE@am__objects_24 = src/arm/sysv.lo src/arm/ffi.lo
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_25 = src/arm/trampoline.lo
+@AVR32_TRUE@am__objects_26 = src/avr32/sysv.lo src/avr32/ffi.lo
+@LIBFFI_CRIS_TRUE@am__objects_27 = src/cris/sysv.lo src/cris/ffi.lo
+@FRV_TRUE@am__objects_28 = src/frv/eabi.lo src/frv/ffi.lo
+@S390_TRUE@am__objects_29 = src/s390/sysv.lo src/s390/ffi.lo
+@X86_64_TRUE@am__objects_30 = src/x86/ffi64.lo src/x86/unix64.lo \
 @X86_64_TRUE@  src/x86/ffi.lo src/x86/sysv.lo
-@SH_TRUE@am__objects_29 = src/sh/sysv.lo src/sh/ffi.lo
-@SH64_TRUE@am__objects_30 = src/sh64/sysv.lo src/sh64/ffi.lo
-@PA_LINUX_TRUE@am__objects_31 = src/pa/linux.lo src/pa/ffi.lo
-@PA_HPUX_TRUE@am__objects_32 = src/pa/hpux32.lo src/pa/ffi.lo
-@TILE_TRUE@am__objects_33 = src/tile/tile.lo src/tile/ffi.lo
-@XTENSA_TRUE@am__objects_34 = src/xtensa/sysv.lo src/xtensa/ffi.lo
-@METAG_TRUE@am__objects_35 = src/metag/sysv.lo src/metag/ffi.lo
+@SH_TRUE@am__objects_31 = src/sh/sysv.lo src/sh/ffi.lo
+@SH64_TRUE@am__objects_32 = src/sh64/sysv.lo src/sh64/ffi.lo
+@PA_LINUX_TRUE@am__objects_33 = src/pa/linux.lo src/pa/ffi.lo
+@PA_HPUX_TRUE@am__objects_34 = src/pa/hpux32.lo src/pa/ffi.lo
+@TILE_TRUE@am__objects_35 = src/tile/tile.lo src/tile/ffi.lo
+@XTENSA_TRUE@am__objects_36 = src/xtensa/sysv.lo src/xtensa/ffi.lo
+@METAG_TRUE@am__objects_37 = src/metag/sysv.lo src/metag/ffi.lo
+@VAX_TRUE@am__objects_38 = src/vax/elfbsd.lo src/vax/ffi.lo
 nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
        $(am__objects_3) $(am__objects_4) $(am__objects_5) \
        $(am__objects_6) $(am__objects_7) $(am__objects_8) \
@@ -211,17 +245,22 @@ nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
        $(am__objects_24) $(am__objects_25) $(am__objects_26) \
        $(am__objects_27) $(am__objects_28) $(am__objects_29) \
        $(am__objects_30) $(am__objects_31) $(am__objects_32) \
-       $(am__objects_33) $(am__objects_34) $(am__objects_35)
+       $(am__objects_33) $(am__objects_34) $(am__objects_35) \
+       $(am__objects_36) $(am__objects_37) $(am__objects_38)
 libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
        $(nodist_libffi_la_OBJECTS)
-libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libffi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
 libffi_convenience_la_LIBADD =
-am__objects_36 = src/prep_cif.lo src/types.lo src/raw_api.lo \
+am__objects_39 = src/prep_cif.lo src/types.lo src/raw_api.lo \
        src/java_raw_api.lo src/closures.lo
-am_libffi_convenience_la_OBJECTS = $(am__objects_36)
-am__objects_37 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+am_libffi_convenience_la_OBJECTS = $(am__objects_39)
+am__objects_40 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
        $(am__objects_4) $(am__objects_5) $(am__objects_6) \
        $(am__objects_7) $(am__objects_8) $(am__objects_9) \
        $(am__objects_10) $(am__objects_11) $(am__objects_12) \
@@ -232,32 +271,87 @@ am__objects_37 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
        $(am__objects_25) $(am__objects_26) $(am__objects_27) \
        $(am__objects_28) $(am__objects_29) $(am__objects_30) \
        $(am__objects_31) $(am__objects_32) $(am__objects_33) \
-       $(am__objects_34) $(am__objects_35)
-nodist_libffi_convenience_la_OBJECTS = $(am__objects_37)
+       $(am__objects_34) $(am__objects_35) $(am__objects_36) \
+       $(am__objects_37) $(am__objects_38)
+nodist_libffi_convenience_la_OBJECTS = $(am__objects_40)
 libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
        $(nodist_libffi_convenience_la_OBJECTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 am__mv = mv -f
 CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
-LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CCASFLAGS) $(CCASFLAGS)
+AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
+am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
+am__v_CPPAS_0 = @echo "  CPPAS   " $@;
+am__v_CPPAS_1 = 
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
-       $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
 SOURCES = $(libffi_la_SOURCES) $(nodist_libffi_la_SOURCES) \
        $(libffi_convenience_la_SOURCES) \
        $(nodist_libffi_convenience_la_SOURCES)
 DIST_SOURCES = $(libffi_la_SOURCES) $(libffi_convenience_la_SOURCES)
+AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
+am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
+am__v_DVIPS_0 = @echo "  DVIPS   " $@;
+am__v_DVIPS_1 = 
+AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
+am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
+am__v_MAKEINFO_0 = @echo "  MAKEINFO" $@;
+am__v_MAKEINFO_1 = 
+AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
+am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
+am__v_INFOHTML_0 = @echo "  INFOHTML" $@;
+am__v_INFOHTML_1 = 
+AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
+am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
+am__v_TEXI2DVI_0 = @echo "  TEXI2DVI" $@;
+am__v_TEXI2DVI_1 = 
+AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
+am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
+am__v_TEXI2PDF_0 = @echo "  TEXI2PDF" $@;
+am__v_TEXI2PDF_1 = 
+AM_V_texinfo = $(am__v_texinfo_@AM_V@)
+am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
+am__v_texinfo_0 = -q
+am__v_texinfo_1 = 
+AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+am__v_texidevnull_0 = > /dev/null
+am__v_texidevnull_1 = 
 INFO_DEPS = $(srcdir)/doc/libffi.info
 am__TEXINFO_TEX_DIR = $(srcdir)
 DVIS = doc/libffi.dvi
@@ -270,13 +364,14 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
 DVIPS = dvips
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-       html-recursive info-recursive install-data-recursive \
-       install-dvi-recursive install-exec-recursive \
-       install-html-recursive install-info-recursive \
-       install-pdf-recursive install-ps-recursive install-recursive \
-       installcheck-recursive installdirs-recursive pdf-recursive \
-       ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+       ctags-recursive dvi-recursive html-recursive info-recursive \
+       install-data-recursive install-dvi-recursive \
+       install-exec-recursive install-html-recursive \
+       install-info-recursive install-pdf-recursive \
+       install-ps-recursive install-recursive installcheck-recursive \
+       installdirs-recursive pdf-recursive ps-recursive \
+       tags-recursive uninstall-recursive
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -285,9 +380,30 @@ am__can_run_installinfo = \
 DATA = $(pkgconfig_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
        cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+       $(LISP)fficonfig.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
@@ -337,6 +453,7 @@ distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AM_LTLDFLAGS = @AM_LTLDFLAGS@
 AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
 AR = @AR@
@@ -484,8 +601,11 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host  \
         src/moxie/ffitarget.h src/moxie/eabi.S src/mips/ffitarget.h    \
         src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h            \
         src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h            \
+        src/m88k/ffi.c src/m88k/obsd.S src/m88k/ffitarget.h            \
         src/microblaze/ffi.c src/microblaze/sysv.S                     \
-        src/microblaze/ffitarget.h src/powerpc/ffi.c                   \
+        src/microblaze/ffitarget.h                                     \
+        src/nios2/ffi.c src/nios2/ffitarget.h src/nios2/sysv.S         \
+        src/powerpc/ffi.c                                              \
         src/powerpc/sysv.S src/powerpc/linux64.S                       \
         src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S        \
         src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S       \
@@ -503,6 +623,7 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host   \
         src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S            \
         src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c              \
         src/tile/ffitarget.h src/tile/tile.S libtool-version           \
+        src/vax/ffi.c src/vax/ffitarget.h src/vax/elfbsd.S             \
         src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S      \
         ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4               \
         m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4                  \
@@ -574,7 +695,8 @@ nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \
        $(am__append_24) $(am__append_25) $(am__append_26) \
        $(am__append_27) $(am__append_28) $(am__append_29) \
        $(am__append_30) $(am__append_31) $(am__append_32) \
-       $(am__append_33) $(am__append_34) $(am__append_35)
+       $(am__append_33) $(am__append_34) $(am__append_35) \
+       $(am__append_36) $(am__append_37) $(am__append_38)
 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
@@ -648,6 +770,7 @@ clean-noinstLTLIBRARIES:
          echo rm -f $${locs}; \
          rm -f $${locs}; \
        }
+
 install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
        @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \
@@ -790,6 +913,16 @@ src/m68k/ffi.lo: src/m68k/$(am__dirstamp) \
        src/m68k/$(DEPDIR)/$(am__dirstamp)
 src/m68k/sysv.lo: src/m68k/$(am__dirstamp) \
        src/m68k/$(DEPDIR)/$(am__dirstamp)
+src/m88k/$(am__dirstamp):
+       @$(MKDIR_P) src/m88k
+       @: > src/m88k/$(am__dirstamp)
+src/m88k/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/m88k/$(DEPDIR)
+       @: > src/m88k/$(DEPDIR)/$(am__dirstamp)
+src/m88k/ffi.lo: src/m88k/$(am__dirstamp) \
+       src/m88k/$(DEPDIR)/$(am__dirstamp)
+src/m88k/obsd.lo: src/m88k/$(am__dirstamp) \
+       src/m88k/$(DEPDIR)/$(am__dirstamp)
 src/moxie/$(am__dirstamp):
        @$(MKDIR_P) src/moxie
        @: > src/moxie/$(am__dirstamp)
@@ -810,6 +943,16 @@ src/microblaze/ffi.lo: src/microblaze/$(am__dirstamp) \
        src/microblaze/$(DEPDIR)/$(am__dirstamp)
 src/microblaze/sysv.lo: src/microblaze/$(am__dirstamp) \
        src/microblaze/$(DEPDIR)/$(am__dirstamp)
+src/nios2/$(am__dirstamp):
+       @$(MKDIR_P) src/nios2
+       @: > src/nios2/$(am__dirstamp)
+src/nios2/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/nios2/$(DEPDIR)
+       @: > src/nios2/$(DEPDIR)/$(am__dirstamp)
+src/nios2/sysv.lo: src/nios2/$(am__dirstamp) \
+       src/nios2/$(DEPDIR)/$(am__dirstamp)
+src/nios2/ffi.lo: src/nios2/$(am__dirstamp) \
+       src/nios2/$(DEPDIR)/$(am__dirstamp)
 src/powerpc/$(am__dirstamp):
        @$(MKDIR_P) src/powerpc
        @: > src/powerpc/$(am__dirstamp)
@@ -970,10 +1113,22 @@ src/metag/sysv.lo: src/metag/$(am__dirstamp) \
        src/metag/$(DEPDIR)/$(am__dirstamp)
 src/metag/ffi.lo: src/metag/$(am__dirstamp) \
        src/metag/$(DEPDIR)/$(am__dirstamp)
+src/vax/$(am__dirstamp):
+       @$(MKDIR_P) src/vax
+       @: > src/vax/$(am__dirstamp)
+src/vax/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) src/vax/$(DEPDIR)
+       @: > src/vax/$(DEPDIR)/$(am__dirstamp)
+src/vax/elfbsd.lo: src/vax/$(am__dirstamp) \
+       src/vax/$(DEPDIR)/$(am__dirstamp)
+src/vax/ffi.lo: src/vax/$(am__dirstamp) \
+       src/vax/$(DEPDIR)/$(am__dirstamp)
+
 libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES) $(EXTRA_libffi_la_DEPENDENCIES) 
-       $(libffi_la_LINK) -rpath $(toolexeclibdir) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(libffi_la_LINK) -rpath $(toolexeclibdir) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS)
+
 libffi_convenience.la: $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_DEPENDENCIES) $(EXTRA_libffi_convenience_la_DEPENDENCIES) 
-       $(LINK)  $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_LIBADD) $(LIBS)
+       $(AM_V_CCLD)$(LINK)  $(libffi_convenience_la_OBJECTS) $(libffi_convenience_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -1001,6 +1156,8 @@ mostlyclean-compile:
        -rm -f src/m32r/*.lo
        -rm -f src/m68k/*.$(OBJEXT)
        -rm -f src/m68k/*.lo
+       -rm -f src/m88k/*.$(OBJEXT)
+       -rm -f src/m88k/*.lo
        -rm -f src/metag/*.$(OBJEXT)
        -rm -f src/metag/*.lo
        -rm -f src/microblaze/*.$(OBJEXT)
@@ -1009,6 +1166,8 @@ mostlyclean-compile:
        -rm -f src/mips/*.lo
        -rm -f src/moxie/*.$(OBJEXT)
        -rm -f src/moxie/*.lo
+       -rm -f src/nios2/*.$(OBJEXT)
+       -rm -f src/nios2/*.lo
        -rm -f src/pa/*.$(OBJEXT)
        -rm -f src/pa/*.lo
        -rm -f src/powerpc/*.$(OBJEXT)
@@ -1023,6 +1182,8 @@ mostlyclean-compile:
        -rm -f src/sparc/*.lo
        -rm -f src/tile/*.$(OBJEXT)
        -rm -f src/tile/*.lo
+       -rm -f src/vax/*.$(OBJEXT)
+       -rm -f src/vax/*.lo
        -rm -f src/x86/*.$(OBJEXT)
        -rm -f src/x86/*.lo
        -rm -f src/xtensa/*.$(OBJEXT)
@@ -1060,6 +1221,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/m32r/$(DEPDIR)/sysv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/m68k/$(DEPDIR)/ffi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/m68k/$(DEPDIR)/sysv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/m88k/$(DEPDIR)/ffi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/m88k/$(DEPDIR)/obsd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/metag/$(DEPDIR)/ffi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/metag/$(DEPDIR)/sysv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/microblaze/$(DEPDIR)/ffi.Plo@am__quote@
@@ -1069,6 +1232,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/o32.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/moxie/$(DEPDIR)/eabi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/moxie/$(DEPDIR)/ffi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/nios2/$(DEPDIR)/ffi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/nios2/$(DEPDIR)/sysv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/ffi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/hpux32.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/linux.Plo@am__quote@
@@ -1093,6 +1258,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/sparc/$(DEPDIR)/v9.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/tile/$(DEPDIR)/ffi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/tile/$(DEPDIR)/tile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/vax/$(DEPDIR)/elfbsd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/vax/$(DEPDIR)/ffi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/darwin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/darwin64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/ffi.Plo@am__quote@
@@ -1106,52 +1273,52 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@src/xtensa/$(DEPDIR)/sysv.Plo@am__quote@
 
 .S.o:
-@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
 @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
 @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@        $(CPPASCOMPILE) -c -o $@ $<
+@am__fastdepCCAS_FALSE@        $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
 
 .S.obj:
-@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
 @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
 @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@        $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCCAS_FALSE@        $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .S.lo:
-@am__fastdepCCAS_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
 @am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
 @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@    $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCCAS_FALSE@    DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCCAS_FALSE@        $(LTCPPASCOMPILE) -c -o $@ $<
+@am__fastdepCCAS_FALSE@        $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
 
 .c.o:
-@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@   $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
 @am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
 
 .c.obj:
-@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@   $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
 @am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
 .c.lo:
-@am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@   $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
 @am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
 @am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -1170,10 +1337,12 @@ clean-libtool:
        -rm -rf src/ia64/.libs src/ia64/_libs
        -rm -rf src/m32r/.libs src/m32r/_libs
        -rm -rf src/m68k/.libs src/m68k/_libs
+       -rm -rf src/m88k/.libs src/m88k/_libs
        -rm -rf src/metag/.libs src/metag/_libs
        -rm -rf src/microblaze/.libs src/microblaze/_libs
        -rm -rf src/mips/.libs src/mips/_libs
        -rm -rf src/moxie/.libs src/moxie/_libs
+       -rm -rf src/nios2/.libs src/nios2/_libs
        -rm -rf src/pa/.libs src/pa/_libs
        -rm -rf src/powerpc/.libs src/powerpc/_libs
        -rm -rf src/s390/.libs src/s390/_libs
@@ -1181,6 +1350,7 @@ clean-libtool:
        -rm -rf src/sh64/.libs src/sh64/_libs
        -rm -rf src/sparc/.libs src/sparc/_libs
        -rm -rf src/tile/.libs src/tile/_libs
+       -rm -rf src/vax/.libs src/vax/_libs
        -rm -rf src/x86/.libs src/x86/_libs
        -rm -rf src/xtensa/.libs src/xtensa/_libs
 
@@ -1191,7 +1361,7 @@ doc/$(am__dirstamp):
        @: > doc/$(am__dirstamp)
 
 $(srcdir)/doc/libffi.info: doc/libffi.texi $(srcdir)/doc/version.texi
-       restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+       $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
        am__cwd=`pwd` && $(am__cd) $(srcdir) && \
        rm -rf $$backupdir && mkdir $$backupdir && \
        if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
@@ -1213,18 +1383,20 @@ $(srcdir)/doc/libffi.info: doc/libffi.texi $(srcdir)/doc/version.texi
        rm -rf $$backupdir; exit $$rc
 
 doc/libffi.dvi: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
-       $(TEXI2DVI)  --clean -o $@ `test -f 'doc/libffi.texi' || echo '$(srcdir)/'`doc/libffi.texi 
+       $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+       `test -f 'doc/libffi.texi' || echo '$(srcdir)/'`doc/libffi.texi
 
 doc/libffi.pdf: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
-       $(TEXI2PDF)  --clean -o $@ `test -f 'doc/libffi.texi' || echo '$(srcdir)/'`doc/libffi.texi 
+       $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+       `test -f 'doc/libffi.texi' || echo '$(srcdir)/'`doc/libffi.texi
 
 doc/libffi.html: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
-       rm -rf $(@:.html=.htp)
-       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
+       $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
+       $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
         -o $(@:.html=.htp) `test -f 'doc/libffi.texi' || echo '$(srcdir)/'`doc/libffi.texi; \
        then \
          rm -rf $@; \
@@ -1256,8 +1428,8 @@ mostlyclean-vti:
 maintainer-clean-vti:
 @MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi
 .dvi.ps:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-       $(DVIPS)  -o $@ $<
+       $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(DVIPS) $(AM_V_texinfo) -o $@ $<
 
 uninstall-dvi-am:
        @$(NORMAL_UNINSTALL)
@@ -1336,8 +1508,7 @@ dist-info: $(INFO_DEPS)
        done
 
 mostlyclean-aminfo:
-       -rm -rf libffi.aux libffi.cp libffi.cps libffi.fn libffi.ky libffi.log \
-         libffi.pg libffi.tmp libffi.toc libffi.tp libffi.vr
+       -rm -rf doc/libffi.t2d doc/libffi.t2p
 
 clean-aminfo:
        -test -z "doc/libffi.dvi doc/libffi.pdf doc/libffi.ps doc/libffi.html" \
@@ -1377,14 +1548,13 @@ uninstall-pkgconfigDATA:
 # (1) if the variable is set in 'config.status', edit 'config.status'
 #     (which will cause the Makefiles to be regenerated when you run 'make');
 # (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
-       @fail= failcom='exit 1'; \
-       for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=* | --[!k]*);; \
-           *k*) failcom='fail=yes';; \
-         esac; \
-       done; \
+$(am__recursive_targets):
+       @fail=; \
+       if $(am__make_keepgoing); then \
+         failcom='fail=yes'; \
+       else \
+         failcom='exit 1'; \
+       fi; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
        case "$@" in \
@@ -1405,31 +1575,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
-tags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-       done
-ctags-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-       done
-cscopelist-recursive:
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
-       done
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) fficonfig.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
        set x; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -1445,12 +1597,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) fficonfig.h.in $(TAGS_DEPENDENCIES) \
              set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
-       list='$(SOURCES) $(HEADERS) fficonfig.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       $(am__define_uniq_tagged_files); \
        shift; \
        if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
@@ -1462,15 +1609,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) fficonfig.h.in $(TAGS_DEPENDENCIES) \
              $$unique; \
          fi; \
        fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) fficonfig.h.in $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       list='$(SOURCES) $(HEADERS) fficonfig.h.in $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
        test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
             $$unique
@@ -1479,18 +1622,16 @@ GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
-
 cscope: cscope.files
        test ! -s cscope.files \
          || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
 clean-cscope:
        -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
 
-cscope.files: clean-cscope cscopelist-recursive cscopelist
-
-cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
        case "$(srcdir)" in \
          [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
          *) sdir=$(subdir)/$(srcdir) ;; \
@@ -1627,9 +1768,9 @@ distcheck: dist
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
-       chmod -R a-w $(distdir); chmod u+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
+       chmod -R a-w $(distdir)
+       chmod u+w $(distdir)
+       mkdir $(distdir)/_build $(distdir)/_inst
        chmod a-w $(distdir)
        test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -1750,6 +1891,8 @@ distclean-generic:
        -rm -f src/m32r/$(am__dirstamp)
        -rm -f src/m68k/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/m68k/$(am__dirstamp)
+       -rm -f src/m88k/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/m88k/$(am__dirstamp)
        -rm -f src/metag/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/metag/$(am__dirstamp)
        -rm -f src/microblaze/$(DEPDIR)/$(am__dirstamp)
@@ -1758,6 +1901,8 @@ distclean-generic:
        -rm -f src/mips/$(am__dirstamp)
        -rm -f src/moxie/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/moxie/$(am__dirstamp)
+       -rm -f src/nios2/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/nios2/$(am__dirstamp)
        -rm -f src/pa/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/pa/$(am__dirstamp)
        -rm -f src/powerpc/$(DEPDIR)/$(am__dirstamp)
@@ -1772,6 +1917,8 @@ distclean-generic:
        -rm -f src/sparc/$(am__dirstamp)
        -rm -f src/tile/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/tile/$(am__dirstamp)
+       -rm -f src/vax/$(DEPDIR)/$(am__dirstamp)
+       -rm -f src/vax/$(am__dirstamp)
        -rm -f src/x86/$(DEPDIR)/$(am__dirstamp)
        -rm -f src/x86/$(am__dirstamp)
        -rm -f src/xtensa/$(DEPDIR)/$(am__dirstamp)
@@ -1788,7 +1935,7 @@ clean-am: clean-aminfo clean-generic clean-libtool \
 
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arc/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/metag/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
+       -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arc/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/m88k/$(DEPDIR) src/metag/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/nios2/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/vax/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
        distclean-hdr distclean-libtool distclean-tags
@@ -1927,7 +2074,7 @@ installcheck-am:
 maintainer-clean: maintainer-clean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
        -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arc/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/metag/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
+       -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arc/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/m88k/$(DEPDIR) src/metag/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/nios2/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/vax/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-aminfo \
        maintainer-clean-generic maintainer-clean-vti
@@ -1949,18 +2096,15 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
        uninstall-pdf-am uninstall-pkgconfigDATA uninstall-ps-am \
        uninstall-toolexeclibLTLIBRARIES
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
-       cscopelist-recursive ctags-recursive install-am install-strip \
-       tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-       all all-am am--refresh check check-am clean clean-aminfo \
-       clean-cscope clean-generic clean-libtool \
-       clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES cscope \
-       cscopelist cscopelist-recursive ctags ctags-recursive dist \
-       dist-all dist-bzip2 dist-gzip dist-info dist-lzip dist-shar \
-       dist-tarZ dist-xz dist-zip distcheck distclean \
-       distclean-compile distclean-generic distclean-hdr \
+.MAKE: $(am__recursive_targets) all install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+       am--refresh check check-am clean clean-aminfo clean-cscope \
+       clean-generic clean-libtool clean-noinstLTLIBRARIES \
+       clean-toolexeclibLTLIBRARIES cscope cscopelist-am ctags \
+       ctags-am dist dist-all dist-bzip2 dist-gzip dist-info \
+       dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \
+       distclean distclean-compile distclean-generic distclean-hdr \
        distclean-libtool distclean-tags distcleancheck distdir \
        distuninstallcheck dvi dvi-am html html-am info info-am \
        install install-am install-data install-data-am install-dvi \
@@ -1973,7 +2117,7 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
        maintainer-clean-generic maintainer-clean-vti mostlyclean \
        mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \
        mostlyclean-libtool mostlyclean-vti pdf pdf-am ps ps-am tags \
-       tags-recursive uninstall uninstall-am uninstall-dvi-am \
+       tags-am uninstall uninstall-am uninstall-dvi-am \
        uninstall-html-am uninstall-info-am uninstall-pdf-am \
        uninstall-pkgconfigDATA uninstall-ps-am \
        uninstall-toolexeclibLTLIBRARIES
diff --git a/README b/README
index d8e4e9e..f3c9bb7 100644 (file)
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 Status
 ======
 
-libffi-3.0.13 was released on March 17, 2013.  Check the libffi web
+libffi-3.0.14 was released on TBD.  Check the libffi web
 page for updates: <URL:http://sourceware.org/libffi/>.
 
 
@@ -62,15 +62,17 @@ tested:
 | HPPA            | HPUX             | GCC                     |
 | IA-64           | Linux            | GCC                     |
 | M68K            | FreeMiNT         | GCC                     |
-| M68K            | Linux           | GCC                     |
+| M68K            | Linux            | GCC                     |
 | M68K            | RTEMS            | GCC                     |
+| M88K            | OpenBSD/mvme88k  | GCC                     |
 | Meta            | Linux            | GCC                     |
 | MicroBlaze      | Linux            | GCC                     |
 | MIPS            | IRIX             | GCC                     |
 | MIPS            | Linux            | GCC                     |
 | MIPS            | RTEMS            | GCC                     |
 | MIPS64          | Linux            | GCC                     |
-| Moxie                  | Bare metal       | GCC
+| Moxie           | Bare metal       | GCC                     |
+| Nios II         | Linux            | GCC                     |
 | PowerPC 32-bit  | AIX              | IBM XL C                |
 | PowerPC 64-bit  | AIX              | IBM XL C                |
 | PowerPC         | AMIGA            | GCC                     |
@@ -88,6 +90,7 @@ tested:
 | SPARC64         | FreeBSD          | GCC                     |
 | SPARC64         | Solaris          | Oracle Solaris Studio C |
 | TILE-Gx/TILEPro | Linux            | GCC                     |
+| VAX             | OpenBSD/vax      | GCC                     |
 | X86             | FreeBSD          | GCC                     |
 | X86             | GNU HURD         | GCC                     |
 | X86             | Interix          | GCC                     |
@@ -164,6 +167,11 @@ History
 
 See the ChangeLog files for details.
 
+3.0.14 TBD
+        Add Nios II support.
+        Add m88k and DEC VAX support.
+       Fix MIPS N32 ABI bug.
+
 3.0.13 Mar-17-13
        Add Meta support.
        Add missing Moxie bits.
@@ -188,7 +196,6 @@ See the ChangeLog files for details.
 
 3.0.11 Apr-11-12
         Lots of build fixes.
-       Add Amiga newer MacOS support.
        Add support for variadic functions (ffi_prep_cif_var).
        Add Linux/x32 support.
        Add thiscall, fastcall and MSVC cdecl support on Windows.
@@ -340,7 +347,7 @@ See the ChangeLog files for details.
 Authors & Credits
 =================
 
-libffi was originally written by Anthony Green <green@redhat.com>.
+libffi was originally written by Anthony Green <green@moxielogic.com>.
 
 The developers of the GNU Compiler Collection project have made
 innumerable valuable contributions.  See the ChangeLog file for
@@ -364,10 +371,12 @@ frv               Anthony Green
 ia64           Hans Boehm
 m32r           Kazuhiro Inaoka
 m68k           Andreas Schwab
+m88k           Miod Vallat
 microblaze     Nathan Rossi
 mips           Anthony Green, Casey Marshall
 mips64         David Daney
 moxie          Anthony Green
+nios ii                Sandra Loosemore
 pa             Randolph Chung, Dave Anglin, Andreas Tobler
 powerpc                Geoffrey Keating, Andreas Tobler, 
                         David Edelsohn, John Hornkvist
@@ -377,6 +386,7 @@ sh          Kaz Kojima
 sh64           Kaz Kojima
 sparc          Anthony Green, Gordon Irlam
 tile-gx/tilepro Walter Lee
+vax            Miod Vallat
 x86            Anthony Green, Jon Beniston
 x86-64         Bo Thorsen
 xtensa         Chris Zankel
index c3ab272..6292fba 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
@@ -837,24 +838,22 @@ AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
 dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
 
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.12'
+[am__api_version='1.13'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.12.2], [],
+m4_if([$1], [1.13.4], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -870,21 +869,19 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.12.2])dnl
+[AM_AUTOMAKE_VERSION([1.13.4])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # Figure out how to run the assembler.                      -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_PROG_AS
 # ----------
 AC_DEFUN([AM_PROG_AS],
@@ -899,14 +896,12 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
@@ -954,14 +949,12 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
@@ -987,13 +980,12 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 17
 
 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -1179,19 +1171,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -1220,7 +1211,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
@@ -1256,14 +1247,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 19
-
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
@@ -1279,7 +1268,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -1309,8 +1298,7 @@ AC_SUBST([CYGPATH_W])
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
 [AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated.  For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+             [$0: two- and three-arguments forms are deprecated.])
 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
@@ -1364,18 +1352,15 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
                  [_AM_DEPENDENCIES([OBJC])],
                  [m4_define([AC_PROG_OBJC],
                             m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
                  [_AM_DEPENDENCIES([OBJCXX])],
                  [m4_define([AC_PROG_OBJCXX],
-                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
@@ -1409,14 +1394,12 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -1432,14 +1415,12 @@ if test x"${install_sh}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
@@ -1456,14 +1437,12 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
-
 # AM_MAINTAINER_MODE([DEFAULT-MODE])
 # ----------------------------------
 # Control maintainer-specific portions of Makefiles.
@@ -1491,18 +1470,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 ]
 )
 
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
@@ -1545,14 +1520,12 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # AM_PROG_CC_C_O
 # --------------
 # Like AC_PROG_CC_C_O, but changed for automake.
@@ -1581,14 +1554,12 @@ m4_define([AC_PROG_CC],
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -1596,11 +1567,10 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
-
 # AM_MISSING_HAS_RUN
 # ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
@@ -1613,8 +1583,8 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
   AC_MSG_WARN(['missing' script is too old or missing])
@@ -1623,14 +1593,12 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
@@ -1656,14 +1624,12 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
@@ -1739,13 +1705,71 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
 # AM_PROG_INSTALL_STRIP
 # ---------------------
@@ -1769,14 +1793,12 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -1790,14 +1812,12 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
@@ -1811,76 +1831,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
+#
 AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
diff --git a/compile b/compile
index c0096a7..531136b 100755 (executable)
--- a/compile
+++ b/compile
@@ -1,10 +1,9 @@
 #! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -29,21 +28,224 @@ scriptversion=2009-10-06.20; # UTC
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""       $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+       # lazily determine how to convert abs files
+       case `uname -s` in
+         MINGW*)
+           file_conv=mingw
+           ;;
+         CYGWIN*)
+           file_conv=cygwin
+           ;;
+         *)
+           file_conv=wine
+           ;;
+       esac
+      fi
+      case $file_conv/,$2, in
+       *,$file_conv,*)
+         ;;
+       mingw/*)
+         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+         ;;
+       cygwin/*)
+         file=`cygpath -m "$file" || echo "$file"`
+         ;;
+       wine/*)
+         file=`winepath -w "$file" || echo "$file"`
+         ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+       -o)
+         # configure might choose to run compile as 'compile cc -o foo foo.c'.
+         eat=1
+         case $2 in
+           *.o | *.[oO][bB][jJ])
+             func_file_conv "$2"
+             set x "$@" -Fo"$file"
+             shift
+             ;;
+           *)
+             func_file_conv "$2"
+             set x "$@" -Fe"$file"
+             shift
+             ;;
+         esac
+         ;;
+       -I)
+         eat=1
+         func_file_conv "$2" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -I*)
+         func_file_conv "${1#-I}" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -l)
+         eat=1
+         func_cl_dashl "$2"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -l*)
+         func_cl_dashl "${1#-l}"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -L)
+         eat=1
+         func_cl_dashL "$2"
+         ;;
+       -L*)
+         func_cl_dashL "${1#-L}"
+         ;;
+       -static)
+         shared=false
+         ;;
+       -Wl,*)
+         arg=${1#-Wl,}
+         save_ifs="$IFS"; IFS=','
+         for flag in $arg; do
+           IFS="$save_ifs"
+           linker_opts="$linker_opts $flag"
+         done
+         IFS="$save_ifs"
+         ;;
+       -Xlinker)
+         eat=1
+         linker_opts="$linker_opts $2"
+         ;;
+       -*)
+         set x "$@" "$1"
+         shift
+         ;;
+       *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+         func_file_conv "$1"
+         set x "$@" -Tp"$file"
+         shift
+         ;;
+       *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+         func_file_conv "$1" mingw
+         set x "$@" "$file"
+         shift
+         ;;
+       *)
+         set x "$@" "$1"
+         shift
+         ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
     cat <<\EOF
 Usage: compile [--help] [--version] PROGRAM [ARGS]
 
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
 arguments, and rename the output as expected.
 
 If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
+right script to run: please start by reading the file 'INSTALL'.
 
 Report bugs to <bug-automake@gnu.org>.
 EOF
@@ -53,11 +255,13 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
 esac
 
 ofile=
 cfile=
-eat=
 
 for arg
 do
@@ -66,8 +270,8 @@ do
   else
     case $1 in
       -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
+       # configure might choose to run compile as 'compile cc -o foo foo.c'.
+       # So we strip '-o arg' only if arg is an object.
        eat=1
        case $2 in
          *.o | *.obj)
@@ -94,10 +298,10 @@ do
 done
 
 if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
+  # If no '-o' option was seen then we might have been invoked from a
   # pattern rule where we don't need one.  That is ok -- this is a
   # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
+  # '.c' file was seen then we are probably linking.  That is also
   # ok.
   exec "$@"
 fi
@@ -106,7 +310,7 @@ fi
 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
index 1804e9f..b79252d 100755 (executable)
@@ -1,10 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012, 2013 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2012-12-29'
+timestamp='2013-06-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -26,7 +24,7 @@ timestamp='2012-12-29'
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner. 
+# Originally written by Per Bothner.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
@@ -52,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -136,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       LIBC=gnu
+
+       eval $set_cc_for_build
+       cat <<-EOF > $dummy.c
+       #include <features.h>
+       #if defined(__UCLIBC__)
+       LIBC=uclibc
+       #elif defined(__dietlibc__)
+       LIBC=dietlibc
+       #else
+       LIBC=gnu
+       #endif
+       EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       ;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -857,21 +874,21 @@ EOF
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
     aarch64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     aarch64_be:Linux:*:*)
        UNAME_MACHINE=aarch64_be
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -884,59 +901,54 @@ EOF
          EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-gnu
+           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        else
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
                | grep -q __ARM_PCS_VFP
            then
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
            else
-               echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
            fi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     cris:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     crisv32:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
        exit ;;
     frv:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     hexagon:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:Linux:*:*)
-       LIBC=gnu
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #ifdef __dietlibc__
-       LIBC=dietlibc
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-       echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -955,54 +967,63 @@ EOF
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
+    or1k:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       exit ;;
     or32:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-gnu
+       echo sparc-unknown-linux-${LIBC}
        exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+       echo hppa64-unknown-linux-${LIBC}
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-gnu ;;
-         PA8*) echo hppa2.0-unknown-linux-gnu ;;
-         *)    echo hppa-unknown-linux-gnu ;;
+         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+         *)    echo hppa-unknown-linux-${LIBC} ;;
        esac
        exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+       echo powerpc64-unknown-linux-${LIBC}
        exit ;;
     ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
+       echo powerpc-unknown-linux-${LIBC}
+       exit ;;
+    ppc64le:Linux:*:*)
+       echo powerpc64le-unknown-linux-${LIBC}
+       exit ;;
+    ppcle:Linux:*:*)
+       echo powerpcle-unknown-linux-${LIBC}
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux
+       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-gnu
+       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1235,19 +1256,21 @@ EOF
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       case $UNAME_PROCESSOR in
-           i386)
-               eval $set_cc_for_build
-               if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-                 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                     (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-                     grep IS_64BIT_ARCH >/dev/null
-                 then
-                     UNAME_PROCESSOR="x86_64"
-                 fi
-               fi ;;
-           unknown) UNAME_PROCESSOR=powerpc ;;
-       esac
+       eval $set_cc_for_build
+       if test "$UNAME_PROCESSOR" = unknown ; then
+           UNAME_PROCESSOR=powerpc
+       fi
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               case $UNAME_PROCESSOR in
+                   i386) UNAME_PROCESSOR=x86_64 ;;
+                   powerpc) UNAME_PROCESSOR=powerpc64 ;;
+               esac
+           fi
+       fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
index 802a224..c765b34 100755 (executable)
@@ -1,10 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012, 2013 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2012-12-29'
+timestamp='2013-04-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -70,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -256,7 +252,7 @@ case $basic_machine in
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
-       | arc \
+       | arc | arceb \
        | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
        | avr | avr32 \
        | be32 | be64 \
@@ -290,16 +286,17 @@ case $basic_machine in
        | mipsisa64r2 | mipsisa64r2el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipsr5900 | mipsr5900el \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
        | moxie \
        | mt \
        | msp430 \
        | nds32 | nds32le | nds32be \
-       | nios | nios2 \
+       | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
        | open8 \
-       | or32 \
+       | or1k | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
@@ -369,7 +366,7 @@ case $basic_machine in
        | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | be32-* | be64-* \
@@ -407,12 +404,13 @@ case $basic_machine in
        | mipsisa64r2-* | mipsisa64r2el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipsr5900-* | mipsr5900el-* \
        | mipstx39-* | mipstx39el-* \
        | mmix-* \
        | mt-* \
        | msp430-* \
        | nds32-* | nds32le-* | nds32be-* \
-       | nios-* | nios2-* \
+       | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | open8-* \
        | orion-* \
@@ -1008,7 +1006,7 @@ case $basic_machine in
                ;;
        ppc64)  basic_machine=powerpc64-unknown
                ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        ppc64le | powerpc64little | ppc64-le | powerpc64-little)
                basic_machine=powerpc64le-unknown
@@ -1354,7 +1352,7 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-             | -sym* | -kopensolaris* \
+             | -sym* | -kopensolaris* | -plan9* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
              | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1500,9 +1498,6 @@ case $os in
        -aros*)
                os=-aros
                ;;
-       -kaos*)
-               os=-kaos
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
@@ -1594,6 +1589,9 @@ case $basic_machine in
        mips*-*)
                os=-elf
                ;;
+       or1k-*)
+               os=-elf
+               ;;
        or32-*)
                os=-coff
                ;;
index 495389d..02066ce 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libffi 3.0.13.
+# Generated by GNU Autoconf 2.69 for libffi 3.0.14-rc0.
 #
 # Report bugs to <http://github.com/atgreen/libffi/issues>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libffi'
 PACKAGE_TARNAME='libffi'
-PACKAGE_VERSION='3.0.13'
-PACKAGE_STRING='libffi 3.0.13'
+PACKAGE_VERSION='3.0.14-rc0'
+PACKAGE_STRING='libffi 3.0.14-rc0'
 PACKAGE_BUGREPORT='http://github.com/atgreen/libffi/issues'
 PACKAGE_URL=''
 
@@ -649,6 +649,8 @@ HAVE_LONG_DOUBLE
 ALLOCA
 XTENSA_FALSE
 XTENSA_TRUE
+VAX_FALSE
+VAX_TRUE
 TILE_FALSE
 TILE_TRUE
 PA64_HPUX_FALSE
@@ -685,12 +687,16 @@ POWERPC_AIX_FALSE
 POWERPC_AIX_TRUE
 POWERPC_FALSE
 POWERPC_TRUE
+NIOS2_FALSE
+NIOS2_TRUE
 MOXIE_FALSE
 MOXIE_TRUE
 METAG_FALSE
 METAG_TRUE
 MICROBLAZE_FALSE
 MICROBLAZE_TRUE
+M88K_FALSE
+M88K_TRUE
 M68K_FALSE
 M68K_TRUE
 M32R_FALSE
@@ -767,6 +773,10 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -845,6 +855,7 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_builddir
+enable_silent_rules
 enable_dependency_tracking
 enable_shared
 enable_static
@@ -1409,7 +1420,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libffi 3.0.13 to adapt to many kinds of systems.
+\`configure' configures libffi 3.0.14-rc0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1480,7 +1491,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libffi 3.0.13:";;
+     short | recursive ) echo "Configuration of libffi 3.0.14-rc0:";;
    esac
   cat <<\_ACEOF
 
@@ -1490,6 +1501,8 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-builddir      disable automatic build in subdir of sources
 
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
   --enable-dependency-tracking
                           do not reject slow dependency extractors
   --disable-dependency-tracking
@@ -1600,7 +1613,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libffi configure 3.0.13
+libffi configure 3.0.14-rc0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2206,7 +2219,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libffi $as_me 3.0.13, which was
+It was created by libffi $as_me 3.0.14-rc0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2805,7 +2818,7 @@ ax_enable_builddir_auxdir="$am_aux_dir"
 ac_config_commands="$ac_config_commands buildir"
 
 
-am__api_version='1.12'
+am__api_version='1.13'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2986,8 +2999,8 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
@@ -3227,6 +3240,45 @@ else
 fi
 rmdir .tst 2>/dev/null
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
 if test "`cd $srcdir && pwd`" != "`pwd`"; then
   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
   # is not polluted with repeated "-I."
@@ -3249,7 +3301,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libffi'
- VERSION='3.0.13'
+ VERSION='3.0.14-rc0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3289,6 +3341,10 @@ mkdir_p='$(MKDIR_P)'
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
 
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
@@ -3296,6 +3352,7 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
+
 # The same as in boehm-gc and libstdc++. Have to borrow it from there.
 # We must force CC to /not/ be precious variables; otherwise
 # the wrong, non-multilib-adjusted value will be used in multilibs.
@@ -13419,6 +13476,10 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
+  m88k-*-*)
+       TARGET=M88K; TARGETDIR=m88k
+       ;;
+
   microblaze*-*-*)
        TARGET=MICROBLAZE; TARGETDIR=microblaze
        ;;
@@ -13440,6 +13501,10 @@ case "$host" in
        TARGET=MIPS; TARGETDIR=mips
        ;;
 
+  nios2*-linux*)
+       TARGET=NIOS2; TARGETDIR=nios2
+       ;;
+
   powerpc*-*-linux* | powerpc-*-sysv*)
        TARGET=POWERPC; TARGETDIR=powerpc
        ;;
@@ -13484,6 +13549,10 @@ case "$host" in
         TARGET=TILE; TARGETDIR=tile
         ;;
 
+  vax-*-*)
+       TARGET=VAX; TARGETDIR=vax
+       ;;
+
   xtensa*-*)
        TARGET=XTENSA; TARGETDIR=xtensa
        ;;
@@ -13593,6 +13662,14 @@ else
   M68K_FALSE=
 fi
 
+ if test x$TARGET = xM88K; then
+  M88K_TRUE=
+  M88K_FALSE='#'
+else
+  M88K_TRUE='#'
+  M88K_FALSE=
+fi
+
  if test x$TARGET = xMICROBLAZE; then
   MICROBLAZE_TRUE=
   MICROBLAZE_FALSE='#'
@@ -13617,6 +13694,14 @@ else
   MOXIE_FALSE=
 fi
 
+ if test x$TARGET = xNIOS2; then
+  NIOS2_TRUE=
+  NIOS2_FALSE='#'
+else
+  NIOS2_TRUE='#'
+  NIOS2_FALSE=
+fi
+
  if test x$TARGET = xPOWERPC; then
   POWERPC_TRUE=
   POWERPC_FALSE='#'
@@ -13761,6 +13846,14 @@ else
   TILE_FALSE=
 fi
 
+ if test x$TARGET = xVAX; then
+  VAX_TRUE=
+  VAX_FALSE='#'
+else
+  VAX_TRUE='#'
+  VAX_FALSE=
+fi
+
  if test x$TARGET = xXTENSA; then
   XTENSA_TRUE=
   XTENSA_FALSE='#'
@@ -15069,6 +15162,10 @@ if test -z "${M68K_TRUE}" && test -z "${M68K_FALSE}"; then
   as_fn_error $? "conditional \"M68K\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${M88K_TRUE}" && test -z "${M88K_FALSE}"; then
+  as_fn_error $? "conditional \"M88K\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${MICROBLAZE_TRUE}" && test -z "${MICROBLAZE_FALSE}"; then
   as_fn_error $? "conditional \"MICROBLAZE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -15081,6 +15178,10 @@ if test -z "${MOXIE_TRUE}" && test -z "${MOXIE_FALSE}"; then
   as_fn_error $? "conditional \"MOXIE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${NIOS2_TRUE}" && test -z "${NIOS2_FALSE}"; then
+  as_fn_error $? "conditional \"NIOS2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${POWERPC_TRUE}" && test -z "${POWERPC_FALSE}"; then
   as_fn_error $? "conditional \"POWERPC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -15153,6 +15254,10 @@ if test -z "${TILE_TRUE}" && test -z "${TILE_FALSE}"; then
   as_fn_error $? "conditional \"TILE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${VAX_TRUE}" && test -z "${VAX_FALSE}"; then
+  as_fn_error $? "conditional \"VAX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${XTENSA_TRUE}" && test -z "${XTENSA_FALSE}"; then
   as_fn_error $? "conditional \"XTENSA\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -15567,7 +15672,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libffi $as_me 3.0.13, which was
+This file was extended by libffi $as_me 3.0.14-rc0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15637,7 +15742,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libffi config.status 3.0.13
+libffi config.status 3.0.14-rc0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -16837,7 +16942,7 @@ $as_echo "$as_me: build in $ax_enable_builddir (HOST=$ax_enable_builddir_host)"
   fi
  ;;
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
   case $CONFIG_FILES in
@@ -16888,7 +16993,7 @@ $as_echo X"$mf" |
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "am__include" && continue
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
index a26cb46..8246ee9 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
 
 AC_PREREQ(2.68)
 
-AC_INIT([libffi], [3.0.13], [http://github.com/atgreen/libffi/issues])
+AC_INIT([libffi], [3.0.14-rc0], [http://github.com/atgreen/libffi/issues])
 AC_CONFIG_HEADERS([fficonfig.h])
 
 AC_CANONICAL_SYSTEM
@@ -195,6 +195,10 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
+  m88k-*-*)
+       TARGET=M88K; TARGETDIR=m88k
+       ;;
+
   microblaze*-*-*)
        TARGET=MICROBLAZE; TARGETDIR=microblaze
        ;;
@@ -216,6 +220,10 @@ case "$host" in
        TARGET=MIPS; TARGETDIR=mips
        ;;
 
+  nios2*-linux*)
+       TARGET=NIOS2; TARGETDIR=nios2
+       ;;
+
   powerpc*-*-linux* | powerpc-*-sysv*)
        TARGET=POWERPC; TARGETDIR=powerpc
        ;;
@@ -260,6 +268,10 @@ case "$host" in
         TARGET=TILE; TARGETDIR=tile
         ;;
 
+  vax-*-*)
+       TARGET=VAX; TARGETDIR=vax
+       ;;
+
   xtensa*-*)
        TARGET=XTENSA; TARGETDIR=xtensa
        ;;
@@ -285,9 +297,11 @@ AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
 AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
 AM_CONDITIONAL(M32R, test x$TARGET = xM32R)
 AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
+AM_CONDITIONAL(M88K, test x$TARGET = xM88K)
 AM_CONDITIONAL(MICROBLAZE, test x$TARGET = xMICROBLAZE)
 AM_CONDITIONAL(METAG, test x$TARGET = xMETAG)
 AM_CONDITIONAL(MOXIE, test x$TARGET = xMOXIE)
+AM_CONDITIONAL(NIOS2, test x$TARGET = xNIOS2)
 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
 AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
 AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
@@ -306,6 +320,7 @@ AM_CONDITIONAL(PA_LINUX, test x$TARGET = xPA_LINUX)
 AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX)
 AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX)
 AM_CONDITIONAL(TILE, test x$TARGET = xTILE)
+AM_CONDITIONAL(VAX, test x$TARGET = xVAX)
 AM_CONDITIONAL(XTENSA, test x$TARGET = xXTENSA)
 
 AC_HEADER_STDC
diff --git a/depcomp b/depcomp
index df8eea7..4ebd5b3 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -1,10 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
   -h | --h*)
     cat <<\EOF
 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -40,11 +39,11 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake@gnu.org>.
@@ -57,6 +56,66 @@ EOF
     ;;
 esac
 
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
@@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
 
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
 # Some modes work just like other modes, but use different flags.  We
 # parameterize here, but still list the modes in the big case below,
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
@@ -80,18 +142,32 @@ if test "$depmode" = hp; then
 fi
 
 if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
 fi
 
 cygpath_u="cygpath -u -f -"
 if test "$depmode" = msvcmsys; then
-   # This is just like msvisualcpp but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u="sed s,\\\\\\\\,/,g"
-   depmode=msvisualcpp
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
 fi
 
 case "$depmode" in
@@ -114,8 +190,7 @@ gcc3)
   done
   "$@"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -123,13 +198,17 @@ gcc3)
   ;;
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
 ## why we pick this rather obscure method:
 ## - Don't want to use -MD because we'd like the dependencies to end
 ##   up in a subdir.  Having to rename by hand is ugly.
 ##   (We might end up doing this anyway to support other compilers.)
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -137,31 +216,31 @@ gcc)
   fi
   "$@" -Wp,"$gccflag$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+  # The second -e expression handles DOS-style file names with drive
+  # letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
 ## The problem is that when a header file which appears in a .P file
 ## is deleted, the dependency causes make to die (because there is
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
-## well.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -179,8 +258,7 @@ sgi)
     "$@" -MDupdate "$tmpdepfile"
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -188,43 +266,41 @@ sgi)
 
   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
     echo "$object : \\" > "$depfile"
-
     # Clip off the initial element (the dependent).  Don't try to be
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
-
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> "$depfile"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+      >> "$depfile"
   else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.u
     tmpdepfile2=$base.u
@@ -237,9 +313,7 @@ aix)
     "$@" -M
   fi
   stat=$?
-
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
@@ -248,44 +322,100 @@ aix)
   do
     test -f "$tmpdepfile" && break
   done
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
   fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\' :
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
 
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -297,8 +427,8 @@ icc)
   sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
   # Some versions of the HPUX 10.20 sed can't process this invocation
   # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -309,9 +439,8 @@ hp2)
   # 'foo.d', which lands next to the object file, wherever that
   # happens to be.
   # Much of this is similar to the tru64 case; see comments there.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from  "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.d
     tmpdepfile2=$dir.libs/$base.d
@@ -322,8 +451,7 @@ hp2)
     "$@" +Maked
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
      rm -f "$tmpdepfile1" "$tmpdepfile2"
      exit $stat
   fi
@@ -333,77 +461,107 @@ hp2)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
-              s/^ *//
-              s/ \\*$//
-              s/$/:/
-              p
-            }' "$tmpdepfile" >> "$depfile"
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
   else
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile" "$tmpdepfile2"
   ;;
 
 tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mechanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
+  # The Tru64 compiler uses -MD to generate dependencies as a side
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+  # dependencies in 'foo.d' instead, so we check for that too.
+  # Subdirectories are respected.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies in $dir.libs/$base.o.d and
+    # in $dir$base.o.d.  We have to check for both files, because
+    # one of the two compilations can be disabled.  We should prefer
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+    # automatically cleaned when .libs/ is deleted, while ignoring
+    # the former would cause a distcleancheck panic.
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
 
 #nosideeffect)
   # This comment above is used by automake to tell side-effect
@@ -422,7 +580,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -442,18 +600,18 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # Require at least two characters before searching for ':'
   # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -503,12 +661,15 @@ makedepend)
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile" "$tmpdepfile".bak
   ;;
 
@@ -525,7 +686,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -544,10 +705,10 @@ cpp)
     esac
   done
 
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
+  "$@" -E \
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+    sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
   cat < "$tmpdepfile" >> "$depfile"
@@ -579,23 +740,23 @@ msvisualcpp)
       shift
       ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-       set fnord "$@"
-       shift
-       shift
-       ;;
+        set fnord "$@"
+        shift
+        shift
+        ;;
     *)
-       set fnord "$@" "$arg"
-       shift
-       shift
-       ;;
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
     esac
   done
   "$@" -E 2>/dev/null |
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
index 6d5acf8..e57d345 100644 (file)
@@ -1,5 +1,4 @@
-This is ../libffi/doc/libffi.info, produced by makeinfo version 4.13
-from ../libffi/doc/libffi.texi.
+This is libffi.info, produced by makeinfo version 5.1 from libffi.texi.
 
 This manual is for Libffi, a portable foreign-function interface
 library.
@@ -8,10 +7,9 @@ library.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU General Public License as
-     published by the Free Software Foundation; either version 2, or
-     (at your option) any later version.  A copy of the license is
-     included in the section entitled "GNU General Public License".
-
+     published by the Free Software Foundation; either version 2, or (at
+     your option) any later version.  A copy of the license is included
+     in the section entitled "GNU General Public License".
 
 INFO-DIR-SECTION Development
 START-INFO-DIR-ENTRY
@@ -31,10 +29,9 @@ library.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU General Public License as
-     published by the Free Software Foundation; either version 2, or
-     (at your option) any later version.  A copy of the license is
-     included in the section entitled "GNU General Public License".
-
+     published by the Free Software Foundation; either version 2, or (at
+     your option) any later version.  A copy of the license is included
+     in the section entitled "GNU General Public License".
 
 * Menu:
 
@@ -56,25 +53,25 @@ The calling convention is a set of assumptions made by the compiler
 about where function arguments will be found on entry to a function.  A
 calling convention also specifies where the return value for a function
 is found.  The calling convention is also sometimes called the "ABI" or
-"Application Binary Interface".  
+"Application Binary Interface".
 
    Some programs may not know at the time of compilation what arguments
 are to be passed to a function.  For instance, an interpreter may be
 told at run-time about the number and types of arguments used to call a
-given function.  `Libffi' can be used in such programs to provide a
+given function.  'Libffi' can be used in such programs to provide a
 bridge from the interpreter program to compiled code.
 
-   The `libffi' library provides a portable, high level programming
+   The 'libffi' library provides a portable, high level programming
 interface to various calling conventions.  This allows a programmer to
 call any function specified by a call interface description at run time.
 
    FFI stands for Foreign Function Interface.  A foreign function
-interface is the popular name for the interface that allows code
-written in one language to call code written in another language.  The
-`libffi' library really only provides the lowest, machine dependent
-layer of a fully featured foreign function interface.  A layer must
-exist above `libffi' that handles type conversions for values passed
-between the two languages.  
+interface is the popular name for the interface that allows code written
+in one language to call code written in another language.  The 'libffi'
+library really only provides the lowest, machine dependent layer of a
+fully featured foreign function interface.  A layer must exist above
+'libffi' that handles type conversions for values passed between the two
+languages.
 
 \1f
 File: libffi.info,  Node: Using libffi,  Next: Missing Features,  Prev: Introduction,  Up: Top
@@ -97,45 +94,45 @@ File: libffi.info,  Node: The Basics,  Next: Simple Example,  Up: Using libffi
 2.1 The Basics
 ==============
 
-`Libffi' assumes that you have a pointer to the function you wish to
+'Libffi' assumes that you have a pointer to the function you wish to
 call and that you know the number and types of arguments to pass it, as
 well as the return type of the function.
 
-   The first thing you must do is create an `ffi_cif' object that
+   The first thing you must do is create an 'ffi_cif' object that
 matches the signature of the function you wish to call.  This is a
-separate step because it is common to make multiple calls using a
-single `ffi_cif'.  The "cif" in `ffi_cif' stands for Call InterFace.
-To prepare a call interface object, use the function `ffi_prep_cif'.  
+separate step because it is common to make multiple calls using a single
+'ffi_cif'.  The "cif" in 'ffi_cif' stands for Call InterFace.  To
+prepare a call interface object, use the function 'ffi_prep_cif'.
 
  -- Function: ffi_status ffi_prep_cif (ffi_cif *CIF, ffi_abi ABI,
           unsigned int NARGS, ffi_type *RTYPE, ffi_type **ARGTYPES)
      This initializes CIF according to the given parameters.
 
-     ABI is the ABI to use; normally `FFI_DEFAULT_ABI' is what you
-     want.  *note Multiple ABIs:: for more information.
+     ABI is the ABI to use; normally 'FFI_DEFAULT_ABI' is what you want.
+     *note Multiple ABIs:: for more information.
 
      NARGS is the number of arguments that this function accepts.
 
-     RTYPE is a pointer to an `ffi_type' structure that describes the
+     RTYPE is a pointer to an 'ffi_type' structure that describes the
      return type of the function.  *Note Types::.
 
-     ARGTYPES is a vector of `ffi_type' pointers.  ARGTYPES must have
+     ARGTYPES is a vector of 'ffi_type' pointers.  ARGTYPES must have
      NARGS elements.  If NARGS is 0, this argument is ignored.
 
-     `ffi_prep_cif' returns a `libffi' status code, of type
-     `ffi_status'.  This will be either `FFI_OK' if everything worked
-     properly; `FFI_BAD_TYPEDEF' if one of the `ffi_type' objects is
-     incorrect; or `FFI_BAD_ABI' if the ABI parameter is invalid.
+     'ffi_prep_cif' returns a 'libffi' status code, of type
+     'ffi_status'.  This will be either 'FFI_OK' if everything worked
+     properly; 'FFI_BAD_TYPEDEF' if one of the 'ffi_type' objects is
+     incorrect; or 'FFI_BAD_ABI' if the ABI parameter is invalid.
 
    If the function being called is variadic (varargs) then
-`ffi_prep_cif_var' must be used instead of `ffi_prep_cif'.
+'ffi_prep_cif_var' must be used instead of 'ffi_prep_cif'.
 
- -- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi
-          varabi, unsigned int NFIXEDARGS, unsigned int varntotalargs,
-          ffi_type *RTYPE, ffi_type **ARGTYPES)
+ -- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi varabi,
+          unsigned int NFIXEDARGS, unsigned int varntotalargs, ffi_type
+          *RTYPE, ffi_type **ARGTYPES)
      This initializes CIF according to the given parameters for a call
      to a variadic function.  In general it's operation is the same as
-     for `ffi_prep_cif' except that:
+     for 'ffi_prep_cif' except that:
 
      NFIXEDARGS is the number of fixed arguments, prior to any variadic
      arguments.  It must be greater than zero.
@@ -146,27 +143,26 @@ To prepare a call interface object, use the function `ffi_prep_cif'.
      Note that, different cif's must be prepped for calls to the same
      function when different numbers of arguments are passed.
 
-     Also note that a call to `ffi_prep_cif_var' with
+     Also note that a call to 'ffi_prep_cif_var' with
      NFIXEDARGS=NOTOTALARGS is NOT equivalent to a call to
-     `ffi_prep_cif'.
-
+     'ffi_prep_cif'.
 
-   To call a function using an initialized `ffi_cif', use the
-`ffi_call' function:
+   To call a function using an initialized 'ffi_cif', use the 'ffi_call'
+function:
 
  -- Function: void ffi_call (ffi_cif *CIF, void *FN, void *RVALUE, void
           **AVALUES)
      This calls the function FN according to the description given in
-     CIF.  CIF must have already been prepared using `ffi_prep_cif'.
+     CIF.  CIF must have already been prepared using 'ffi_prep_cif'.
 
      RVALUE is a pointer to a chunk of memory that will hold the result
-     of the function call.  This must be large enough to hold the
-     result and must be suitably aligned; it is the caller's
-     responsibility to ensure this.  If CIF declares that the function
-     returns `void' (using `ffi_type_void'), then RVALUE is ignored.
-     If RVALUE is `NULL', then the return value is discarded.
+     of the function call.  This must be large enough to hold the result
+     and must be suitably aligned; it is the caller's responsibility to
+     ensure this.  If CIF declares that the function returns 'void'
+     (using 'ffi_type_void'), then RVALUE is ignored.  If RVALUE is
+     'NULL', then the return value is discarded.
 
-     AVALUES is a vector of `void *' pointers that point to the memory
+     AVALUES is a vector of 'void *' pointers that point to the memory
      locations holding the argument values for a call.  If CIF declares
      that the function has no arguments (i.e., NARGS was 0), then
      AVALUES is ignored.  Note that argument values may be modified by
@@ -179,7 +175,7 @@ File: libffi.info,  Node: Simple Example,  Next: Types,  Prev: The Basics,  Up:
 2.2 Simple Example
 ==================
 
-Here is a trivial example that calls `puts' a few times.
+Here is a trivial example that calls 'puts' a few times.
 
      #include <stdio.h>
      #include <ffi.h>
@@ -232,80 +228,80 @@ File: libffi.info,  Node: Primitive Types,  Next: Structures,  Up: Types
 2.3.1 Primitive Types
 ---------------------
 
-`Libffi' provides a number of built-in type descriptors that can be
-used to describe argument and return types:
+'Libffi' provides a number of built-in type descriptors that can be used
+to describe argument and return types:
 
-`ffi_type_void'
-     The type `void'.  This cannot be used for argument types, only for
+'ffi_type_void'
+     The type 'void'.  This cannot be used for argument types, only for
      return values.
 
-`ffi_type_uint8'
+'ffi_type_uint8'
      An unsigned, 8-bit integer type.
 
-`ffi_type_sint8'
+'ffi_type_sint8'
      A signed, 8-bit integer type.
 
-`ffi_type_uint16'
+'ffi_type_uint16'
      An unsigned, 16-bit integer type.
 
-`ffi_type_sint16'
+'ffi_type_sint16'
      A signed, 16-bit integer type.
 
-`ffi_type_uint32'
+'ffi_type_uint32'
      An unsigned, 32-bit integer type.
 
-`ffi_type_sint32'
+'ffi_type_sint32'
      A signed, 32-bit integer type.
 
-`ffi_type_uint64'
+'ffi_type_uint64'
      An unsigned, 64-bit integer type.
 
-`ffi_type_sint64'
+'ffi_type_sint64'
      A signed, 64-bit integer type.
 
-`ffi_type_float'
-     The C `float' type.
+'ffi_type_float'
+     The C 'float' type.
 
-`ffi_type_double'
-     The C `double' type.
+'ffi_type_double'
+     The C 'double' type.
 
-`ffi_type_uchar'
-     The C `unsigned char' type.
+'ffi_type_uchar'
+     The C 'unsigned char' type.
 
-`ffi_type_schar'
-     The C `signed char' type.  (Note that there is not an exact
-     equivalent to the C `char' type in `libffi'; ordinarily you should
-     either use `ffi_type_schar' or `ffi_type_uchar' depending on
-     whether `char' is signed.)
+'ffi_type_schar'
+     The C 'signed char' type.  (Note that there is not an exact
+     equivalent to the C 'char' type in 'libffi'; ordinarily you should
+     either use 'ffi_type_schar' or 'ffi_type_uchar' depending on
+     whether 'char' is signed.)
 
-`ffi_type_ushort'
-     The C `unsigned short' type.
+'ffi_type_ushort'
+     The C 'unsigned short' type.
 
-`ffi_type_sshort'
-     The C `short' type.
+'ffi_type_sshort'
+     The C 'short' type.
 
-`ffi_type_uint'
-     The C `unsigned int' type.
+'ffi_type_uint'
+     The C 'unsigned int' type.
 
-`ffi_type_sint'
-     The C `int' type.
+'ffi_type_sint'
+     The C 'int' type.
 
-`ffi_type_ulong'
-     The C `unsigned long' type.
+'ffi_type_ulong'
+     The C 'unsigned long' type.
 
-`ffi_type_slong'
-     The C `long' type.
+'ffi_type_slong'
+     The C 'long' type.
 
-`ffi_type_longdouble'
-     On platforms that have a C `long double' type, this is defined.
-     On other platforms, it is not.
+'ffi_type_longdouble'
+     On platforms that have a C 'long double' type, this is defined.  On
+     other platforms, it is not.
 
-`ffi_type_pointer'
-     A generic `void *' pointer.  You should use this for all pointers,
+'ffi_type_pointer'
+     A generic 'void *' pointer.  You should use this for all pointers,
      regardless of their real type.
 
-   Each of these is of type `ffi_type', so you must take the address
-when passing to `ffi_prep_cif'.
+   Each of these is of type 'ffi_type', so you must take the address
+when passing to 'ffi_prep_cif'.
 
 \1f
 File: libffi.info,  Node: Structures,  Next: Type Example,  Prev: Primitive Types,  Up: Types
@@ -313,24 +309,24 @@ File: libffi.info,  Node: Structures,  Next: Type Example,  Prev: Primitive Type
 2.3.2 Structures
 ----------------
 
-Although `libffi' has no special support for unions or bit-fields, it
-is perfectly happy passing structures back and forth.  You must first
-describe the structure to `libffi' by creating a new `ffi_type' object
+Although 'libffi' has no special support for unions or bit-fields, it is
+perfectly happy passing structures back and forth.  You must first
+describe the structure to 'libffi' by creating a new 'ffi_type' object
 for it.
 
  -- Data type: ffi_type
-     The `ffi_type' has the following members:
-    `size_t size'
-          This is set by `libffi'; you should initialize it to zero.
+     The 'ffi_type' has the following members:
+     'size_t size'
+          This is set by 'libffi'; you should initialize it to zero.
 
-    `unsigned short alignment'
-          This is set by `libffi'; you should initialize it to zero.
+     'unsigned short alignment'
+          This is set by 'libffi'; you should initialize it to zero.
 
-    `unsigned short type'
-          For a structure, this should be set to `FFI_TYPE_STRUCT'.
+     'unsigned short type'
+          For a structure, this should be set to 'FFI_TYPE_STRUCT'.
 
-    `ffi_type **elements'
-          This is a `NULL'-terminated array of pointers to `ffi_type'
+     'ffi_type **elements'
+          This is a 'NULL'-terminated array of pointers to 'ffi_type'
           objects.  There is one element per field of the struct.
 
 \1f
@@ -339,8 +335,8 @@ File: libffi.info,  Node: Type Example,  Prev: Structures,  Up: Types
 2.3.3 Type Example
 ------------------
 
-The following example initializes a `ffi_type' object representing the
-`tm' struct from Linux's `time.h'.
+The following example initializes a 'ffi_type' object representing the
+'tm' struct from Linux's 'time.h'.
 
    Here is how the struct is defined:
 
@@ -359,7 +355,7 @@ The following example initializes a `ffi_type' object representing the
          __const char *__tm_zone__;
      };
 
-   Here is the corresponding code to describe this struct to `libffi':
+   Here is the corresponding code to describe this struct to 'libffi':
 
          {
            ffi_type tm_type;
@@ -387,9 +383,9 @@ File: libffi.info,  Node: Multiple ABIs,  Next: The Closure API,  Prev: Types,
 =================
 
 A given platform may provide multiple different ABIs at once.  For
-instance, the x86 platform has both `stdcall' and `fastcall' functions.
+instance, the x86 platform has both 'stdcall' and 'fastcall' functions.
 
-   `libffi' provides some support for this.  However, this is
+   'libffi' provides some support for this.  However, this is
 necessarily platform-specific.
 
 \1f
@@ -398,32 +394,32 @@ File: libffi.info,  Node: The Closure API,  Next: Closure Example,  Prev: Multip
 2.5 The Closure API
 ===================
 
-`libffi' also provides a way to write a generic function - a function
+'libffi' also provides a way to write a generic function - a function
 that can accept and decode any combination of arguments.  This can be
-useful when writing an interpreter, or to provide wrappers for
-arbitrary functions.
+useful when writing an interpreter, or to provide wrappers for arbitrary
+functions.
 
-   This facility is called the "closure API".  Closures are not
-supported on all platforms; you can check the `FFI_CLOSURES' define to
-determine whether they are supported on the current platform.  
+   This facility is called the "closure API". Closures are not supported
+on all platforms; you can check the 'FFI_CLOSURES' define to determine
+whether they are supported on the current platform.
 
    Because closures work by assembling a tiny function at runtime, they
-require special allocation on platforms that have a non-executable
-heap.  Memory management for closures is handled by a pair of functions:
+require special allocation on platforms that have a non-executable heap.
+Memory management for closures is handled by a pair of functions:
 
  -- Function: void *ffi_closure_alloc (size_t SIZE, void **CODE)
      Allocate a chunk of memory holding SIZE bytes.  This returns a
      pointer to the writable address, and sets *CODE to the
      corresponding executable address.
 
-     SIZE should be sufficient to hold a `ffi_closure' object.
+     SIZE should be sufficient to hold a 'ffi_closure' object.
 
  -- Function: void ffi_closure_free (void *WRITABLE)
-     Free memory allocated using `ffi_closure_alloc'.  The argument is
+     Free memory allocated using 'ffi_closure_alloc'.  The argument is
      the writable address that was returned.
 
    Once you have allocated the memory for a closure, you must construct
-a `ffi_cif' describing the function call.  Finally you can prepare the
+a 'ffi_cif' describing the function call.  Finally you can prepare the
 closure function:
 
  -- Function: ffi_status ffi_prep_closure_loc (ffi_closure *CLOSURE,
@@ -431,40 +427,40 @@ closure function:
           **ARGS, void *USER_DATA), void *USER_DATA, void *CODELOC)
      Prepare a closure function.
 
-     CLOSURE is the address of a `ffi_closure' object; this is the
-     writable address returned by `ffi_closure_alloc'.
+     CLOSURE is the address of a 'ffi_closure' object; this is the
+     writable address returned by 'ffi_closure_alloc'.
 
-     CIF is the `ffi_cif' describing the function parameters.
+     CIF is the 'ffi_cif' describing the function parameters.
 
      USER_DATA is an arbitrary datum that is passed, uninterpreted, to
      your closure function.
 
-     CODELOC is the executable address returned by `ffi_closure_alloc'.
+     CODELOC is the executable address returned by 'ffi_closure_alloc'.
 
      FUN is the function which will be called when the closure is
      invoked.  It is called with the arguments:
-    CIF
-          The `ffi_cif' passed to `ffi_prep_closure_loc'.
+     CIF
+          The 'ffi_cif' passed to 'ffi_prep_closure_loc'.
 
-    RET
+     RET
           A pointer to the memory used for the function's return value.
           FUN must fill this, unless the function is declared as
-          returning `void'.
+          returning 'void'.
 
-    ARGS
+     ARGS
           A vector of pointers to memory holding the arguments to the
           function.
 
-    USER_DATA
-          The same USER_DATA that was passed to `ffi_prep_closure_loc'.
+     USER_DATA
+          The same USER_DATA that was passed to 'ffi_prep_closure_loc'.
 
-     `ffi_prep_closure_loc' will return `FFI_OK' if everything went ok,
+     'ffi_prep_closure_loc' will return 'FFI_OK' if everything went ok,
      and something else on error.
 
-     After calling `ffi_prep_closure_loc', you can cast CODELOC to the
+     After calling 'ffi_prep_closure_loc', you can cast CODELOC to the
      appropriate pointer-to-function type.
 
-   You may see old code referring to `ffi_prep_closure'.  This function
+   You may see old code referring to 'ffi_prep_closure'.  This function
 is deprecated, as it cannot handle the need for separate writable and
 executable addresses.
 
@@ -474,8 +470,8 @@ File: libffi.info,  Node: Closure Example,  Prev: The Closure API,  Up: Using li
 2.6 Closure Example
 ===================
 
-A trivial example that creates a new `puts' by binding `fputs' with
-`stdin'.
+A trivial example that creates a new 'puts' by binding 'fputs' with
+'stdin'.
 
      #include <stdio.h>
      #include <ffi.h>
@@ -530,7 +526,7 @@ File: libffi.info,  Node: Missing Features,  Next: Index,  Prev: Using libffi,
 3 Missing Features
 ******************
 
-`libffi' is missing a few features.  We welcome patches to add support
+'libffi' is missing a few features.  We welcome patches to add support
 for these.
 
    * Variadic closures.
@@ -560,16 +556,18 @@ Index
 * closure API:                           The Closure API.      (line 13)
 * closures:                              The Closure API.      (line 13)
 * FFI:                                   Introduction.         (line 31)
-* ffi_call:                              The Basics.           (line 63)
+* ffi_call:                              The Basics.           (line 62)
+* FFI_CLOSURES:                          The Closure API.      (line 13)
 * ffi_closure_alloc:                     The Closure API.      (line 19)
 * ffi_closure_free:                      The Closure API.      (line 26)
-* FFI_CLOSURES:                          The Closure API.      (line 13)
 * ffi_prep_cif:                          The Basics.           (line 16)
 * ffi_prep_cif_var:                      The Basics.           (line 39)
 * ffi_prep_closure_loc:                  The Closure API.      (line 34)
-* ffi_status <1>:                        The Closure API.      (line 37)
-* ffi_status:                            The Basics.           (line 18)
+* ffi_status:                            The Basics.           (line 16)
+* ffi_status <1>:                        The Basics.           (line 39)
+* ffi_status <2>:                        The Closure API.      (line 34)
 * ffi_type:                              Structures.           (line 11)
+* ffi_type <1>:                          Structures.           (line 11)
 * ffi_type_double:                       Primitive Types.      (line 41)
 * ffi_type_float:                        Primitive Types.      (line 38)
 * ffi_type_longdouble:                   Primitive Types.      (line 71)
@@ -592,25 +590,26 @@ Index
 * ffi_type_ushort:                       Primitive Types.      (line 53)
 * ffi_type_void:                         Primitive Types.      (line 10)
 * Foreign Function Interface:            Introduction.         (line 31)
-* void <1>:                              The Closure API.      (line 20)
-* void:                                  The Basics.           (line 65)
+* void:                                  The Basics.           (line 62)
+* void <1>:                              The Closure API.      (line 19)
+* void <2>:                              The Closure API.      (line 26)
 
 
 \1f
 Tag Table:
-Node: Top\7f712
-Node: Introduction\7f1460
-Node: Using libffi\7f3096
-Node: The Basics\7f3582
-Node: Simple Example\7f7224
-Node: Types\7f8251
-Node: Primitive Types\7f8534
-Node: Structures\7f10354
-Node: Type Example\7f11224
-Node: Multiple ABIs\7f12447
-Node: The Closure API\7f12818
-Node: Closure Example\7f15762
-Node: Missing Features\7f17321
-Node: Index\7f17774
+Node: Top\7f682
+Node: Introduction\7f1429
+Node: Using libffi\7f3061
+Node: The Basics\7f3547
+Node: Simple Example\7f7187
+Node: Types\7f8214
+Node: Primitive Types\7f8497
+Node: Structures\7f10318
+Node: Type Example\7f11192
+Node: Multiple ABIs\7f12415
+Node: The Closure API\7f12786
+Node: Closure Example\7f15730
+Node: Missing Features\7f17289
+Node: Index\7f17742
 \1f
 End Tag Table
index 54255ba..fbdde9b 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 16 March 2013
-@set UPDATED-MONTH March 2013
-@set EDITION 3.0.13
-@set VERSION 3.0.13
+@set UPDATED 2 July 2013
+@set UPDATED-MONTH July 2013
+@set EDITION 3.0.14-rc0
+@set VERSION 3.0.14-rc0
index 54255ba..fbdde9b 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 16 March 2013
-@set UPDATED-MONTH March 2013
-@set EDITION 3.0.13
-@set VERSION 3.0.13
+@set UPDATED 2 July 2013
+@set UPDATED-MONTH July 2013
+@set EDITION 3.0.14-rc0
+@set VERSION 3.0.14-rc0
index 2c36e36..ddd28fa 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -52,7 +80,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 subdir = include
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(srcdir)/ffi.h.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
@@ -75,6 +103,18 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/fficonfig.h
 CONFIG_CLEAN_FILES = ffi.h ffitarget.h
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -111,12 +151,30 @@ am__uninstall_files_from_dir = { \
   }
 am__installdirs = "$(DESTDIR)$(includesdir)"
 HEADERS = $(nodist_includes_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AM_LTLDFLAGS = @AM_LTLDFLAGS@
 AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
 AR = @AR@
@@ -315,26 +373,15 @@ uninstall-nodist_includesHEADERS:
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        dir='$(DESTDIR)$(includesdir)'; $(am__uninstall_files_from_dir)
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
-       mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+       $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
        set x; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       $(am__define_uniq_tagged_files); \
        shift; \
        if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
@@ -346,15 +393,11 @@ TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
              $$unique; \
          fi; \
        fi
-ctags: CTAGS
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
-       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-             END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+       $(am__define_uniq_tagged_files); \
        test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
             $$unique
@@ -363,9 +406,10 @@ GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
 
-cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
-       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+cscopelist-am: $(am__tagged_files)
+       list='$(am__tagged_files)'; \
        case "$(srcdir)" in \
          [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
          *) sdir=$(subdir)/$(srcdir) ;; \
@@ -517,18 +561,19 @@ uninstall-am: uninstall-nodist_includesHEADERS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-       clean-libtool cscopelist ctags distclean distclean-generic \
-       distclean-libtool distclean-tags distdir dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-dvi install-dvi-am install-exec \
-       install-exec-am install-html install-html-am install-info \
-       install-info-am install-man install-nodist_includesHEADERS \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags uninstall uninstall-am uninstall-nodist_includesHEADERS
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+       clean-libtool cscopelist-am ctags ctags-am distclean \
+       distclean-generic distclean-libtool distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man \
+       install-nodist_includesHEADERS install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+       uninstall-am uninstall-nodist_includesHEADERS
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
index 6781b98..377bb86 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-11-20.07; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2009-04-28.21; # UTC
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
+       # Protect names problematic for 'test' and other utilities.
+       case $dst_arg in
+         -* | [=\(\)!]) dst_arg=./$dst_arg;;
+       esac
        shift;;
 
     -T) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -194,13 +202,17 @@ if test $# -eq 0; then
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
 
 if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
 
   # Set umask so as not to create temps with too-generous modes.
   # However, 'strip' requires both read and write access to temps.
@@ -228,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -252,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
@@ -347,7 +354,7 @@ do
              if test -z "$dir_arg" || {
                   # Check for POSIX incompatibilities with -m.
                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                  # other-writeable bit of parent directory when it shouldn't.
+                  # other-writable bit of parent directory when it shouldn't.
                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
                   case $ls_ld_tmpdir in
@@ -385,7 +392,7 @@ do
 
       case $dstdir in
        /*) prefix='/';;
-       -*) prefix='./';;
+       [-=\(\)!]*) prefix='./';;
        *)  prefix='';;
       esac
 
@@ -403,7 +410,7 @@ do
 
       for d
       do
-       test -z "$d" && continue
+       test X"$d" = X && continue
 
        prefix=$prefix$d
        if test -d "$prefix"; then
index c02e1f2..8e786d3 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,7 +79,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 subdir = man
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
        $(top_srcdir)/m4/ax_append_flag.m4 \
@@ -73,6 +101,18 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/fficonfig.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -111,10 +151,12 @@ man3dir = $(mandir)/man3
 am__installdirs = "$(DESTDIR)$(man3dir)"
 NROFF = nroff
 MANS = $(man_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AM_LTLDFLAGS = @AM_LTLDFLAGS@
 AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
 AR = @AR@
@@ -330,29 +372,14 @@ uninstall-man3:
        } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
              -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
        dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
 
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
 
 cscope cscopelist:
 
 
 distdir: $(DISTFILES)
-       @list='$(MANS)'; if test -n "$$list"; then \
-         list=`for p in $$list; do \
-           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
-         if test -n "$$list" && \
-           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-           echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
-           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
-           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-           echo "       typically 'make maintainer-clean' will remove them" >&2; \
-           exit 1; \
-         else :; fi; \
-       else :; fi
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
@@ -490,16 +517,17 @@ uninstall-man: uninstall-man3
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man install-man3 \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am uninstall-man uninstall-man3
+       cscopelist-am ctags-am distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man3 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+       ps ps-am tags-am uninstall uninstall-am uninstall-man \
+       uninstall-man3
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
old mode 100644 (file)
new mode 100755 (executable)
index cd916c0..b3719cf
--- a/mdate-sh
+++ b/mdate-sh
@@ -1,10 +1,9 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2005-06-29.22
+scriptversion=2010-08-21.06; # UTC
 
-# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software
-# Foundation, Inc.
+# Copyright (C) 1995-2013 Free Software Foundation, Inc.
 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
 #
 # This program is free software; you can redistribute it and/or modify
@@ -18,8 +17,7 @@ scriptversion=2005-06-29.22
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -30,16 +28,26 @@ scriptversion=2005-06-29.22
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+fi
+
 case $1 in
   '')
-     echo "$0: No file.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No file.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
     cat <<\EOF
 Usage: mdate-sh [--help] [--version] FILE
 
-Pretty-print the modification time of FILE.
+Pretty-print the modification day of FILE, in the format:
+1 January 1970
 
 Report bugs to <bug-automake@gnu.org>.
 EOF
@@ -51,6 +59,13 @@ EOF
     ;;
 esac
 
+error ()
+{
+  echo "$0: $1" >&2
+  exit 1
+}
+
+
 # Prevent date giving response in another language.
 LANG=C
 export LANG
@@ -60,7 +75,7 @@ LC_TIME=C
 export LC_TIME
 
 # GNU ls changes its time format in response to the TIME_STYLE
-# variable.  Since we cannot assume `unset' works, revert this
+# variable.  Since we cannot assume 'unset' works, revert this
 # variable to its documented default.
 if test "${TIME_STYLE+set}" = set; then
   TIME_STYLE=posix-long-iso
@@ -75,27 +90,32 @@ if ls -L /dev/null 1>/dev/null 2>&1; then
 else
   ls_command='ls -l -d'
 fi
+# Avoid user/group names that might have spaces, when possible.
+if ls -n /dev/null 1>/dev/null 2>&1; then
+  ls_command="$ls_command -n"
+fi
 
-# A `ls -l' line looks as follows on OS/2.
+# A 'ls -l' line looks as follows on OS/2.
 #  drwxrwx---        0 Aug 11  2001 foo
 # This differs from Unix, which adds ownership information.
 #  drwxrwx---   2 root  root      4096 Aug 11  2001 foo
 #
 # To find the date, we split the line on spaces and iterate on words
 # until we find a month.  This cannot work with files whose owner is a
-# user named `Jan', or `Feb', etc.  However, it's unlikely that `/'
+# user named "Jan", or "Feb", etc.  However, it's unlikely that '/'
 # will be owned by a user whose name is a month.  So we first look at
 # the extended ls output of the root directory to decide how many
 # words should be skipped to get the date.
 
 # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
-set x`ls -l -d /`
+set x`$ls_command /`
 
 # Find which argument is the month.
 month=
 command=
 until test $month
 do
+  test $# -gt 0 || error "failed parsing '$ls_command /' output"
   shift
   # Add another shift to the command.
   command="$command shift;"
@@ -115,8 +135,10 @@ do
   esac
 done
 
+test -n "$month" || error "failed parsing '$ls_command /' output"
+
 # Get the extended ls output of the file or directory.
-set dummy x`eval "$ls_command \"\$save_arg1\""`
+set dummy x`eval "$ls_command \"\\\$save_arg1\""`
 
 # Remove all preceding arguments
 eval $command
@@ -197,5 +219,6 @@ echo $day $month $year
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/missing b/missing
index 28055d2..cdea514 100755 (executable)
--- a/missing
+++ b/missing
@@ -1,11 +1,10 @@
 #! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-06-26.16; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
+case $1 in
 
-msg="missing on your system"
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
 
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
 
   -h|--h|--he|--hel|--help)
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
 
 Options:
   -h, --help      display this help and exit
   -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
 
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
 
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
@@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
 esac
 
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).  This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
-  lex*|yacc*)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te*)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison*|yacc*)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-       case $LASTARG in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f y.tab.h; then
-       echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex*|flex*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-       case $LASTARG in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f lex.yy.c; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit $?
-    fi
-    ;;
-
-  makeinfo*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-       /^@setfilename/{
-         s/.* \([^ ]*\) *$/\1/
-         p
-         q
-       }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case $firstarg in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case $firstarg in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
 
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'automa4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
index 1405665..f1a063d 100644 (file)
@@ -447,7 +447,7 @@ allocate_to_stack (struct arg_state *state, void *stack, unsigned alignment,
 static void
 copy_basic_type (void *dest, void *source, unsigned short type)
 {
-  /* This is neccessary to ensure that basic types are copied
+  /* This is necessary to ensure that basic types are copied
      sign extended to 64-bits as libffi expects.  */
   switch (type)
     {
@@ -857,10 +857,10 @@ ffi_prep_closure_loc (ffi_closure* closure,
    the stack at the point ffi_closure_SYSV() was invoked.
 
    On the return path the assembler wrapper will reload call context
-   regsiters.
+   registers.
 
    ffi_closure_SYSV_inner() marshalls the call context into ffi value
-   desriptors, invokes the wrapped function, then marshalls the return
+   descriptors, invokes the wrapped function, then marshalls the return
    value back into the call context.  */
 
 void
@@ -924,7 +924,7 @@ ffi_closure_SYSV_inner (ffi_closure *closure, struct call_context *context,
                           therefore the structure is not represented as
                           a contiguous sequence of bytes in our saved
                           register context. We need to fake up a copy
-                          of the structure layed out in memory
+                          of the structure laid out in memory
                           correctly. The fake can be tossed once the
                           closure function has returned hence alloca()
                           is sufficient. */
@@ -945,7 +945,7 @@ ffi_closure_SYSV_inner (ffi_closure *closure, struct call_context *context,
                           therefore the structure is not represented as
                           a contiguous sequence of bytes in our saved
                           register context. We need to fake up a copy
-                          of the structure layed out in memory
+                          of the structure laid out in memory
                           correctly. The fake can be tossed once the
                           closure function has returned hence alloca()
                           is sufficient. */
index b8cd421..1022454 100644 (file)
@@ -287,7 +287,7 @@ ffi_closure_SYSV:
         ldp     x2, x3, [x21, #16]
         ldp     x4, x5, [x21, #32]
         ldp     x6, x7, [x21, #48]
-        /* Note nothing usefull is returned in x8.  */
+        /* Note nothing useful is returned in x8.  */
 
         /* We are done, unwind our frame.  */
         ldp     x21, x22, [x29,  #-16]
index 4c3b146..14e9d55 100644 (file)
@@ -537,7 +537,7 @@ typedef struct ffi_trampoline_table ffi_trampoline_table;
 typedef struct ffi_trampoline_table_entry ffi_trampoline_table_entry;
 
 struct ffi_trampoline_table {
-  /* contigious writable and executable pages */
+  /* contiguous writable and executable pages */
   vm_address_t config_page;
   vm_address_t trampoline_page;
 
@@ -577,7 +577,7 @@ ffi_trampoline_table_alloc ()
 {
   ffi_trampoline_table *table = NULL;
 
-  /* Loop until we can allocate two contigious pages */
+  /* Loop until we can allocate two contiguous pages */
   while (table == NULL) {
     vm_address_t config_page = 0x0;
     kern_return_t kt;
index 74f0b86..05c43a3 100755 (executable)
@@ -84,7 +84,7 @@ EOF
 }
 
 
-# WARNING - Don't modify the trampoline code size without also updating the relevent libffi code
+# WARNING - Don't modify the trampoline code size without also updating the relevant libffi code
 trampoline () {
     cat << END
 
index ae7a152..f1f8762 100644 (file)
@@ -32,7 +32,7 @@
 .align 4
 
        /*
-        There is a "feature" in the bfin toolchain that it puts a _ before funcion names
+        There is a "feature" in the bfin toolchain that it puts a _ before function names
         that's why the function here it's called _ffi_call_SYSV and not ffi_call_SYSV
         */
        .global _ffi_call_SYSV;
index 6298d6f..4d0a0b6 100644 (file)
@@ -382,7 +382,7 @@ open_temp_exec_file_opts_next (void)
 }
 
 /* Return a file descriptor of a temporary zero-sized file in a
-   writable and exexutable filesystem.  */
+   writable and executable filesystem.  */
 static int
 open_temp_exec_file (void)
 {
index 5c9f9c2..3e2ea6f 100644 (file)
@@ -1255,7 +1255,7 @@ extern void*     sbrk(ptrdiff_t);
 #define SIZE_T_BITSIZE      (sizeof(size_t) << 3)
 
 /* Some constants coerced to size_t */
-/* Annoying but necessary to avoid errors on some plaftorms */
+/* Annoying but necessary to avoid errors on some platforms */
 #define SIZE_T_ZERO         ((size_t)0)
 #define SIZE_T_ONE          ((size_t)1)
 #define SIZE_T_TWO          ((size_t)2)
@@ -1409,7 +1409,7 @@ static int win32munmap(void* ptr, size_t size) {
 #define CALL_MORECORE(S)     MFAIL
 #endif /* HAVE_MORECORE */
 
-/* mstate bit set if continguous morecore disabled or failed */
+/* mstate bit set if contiguous morecore disabled or failed */
 #define USE_NONCONTIGUOUS_BIT (4U)
 
 /* segment bit set in create_mspace_with_base */
@@ -3090,8 +3090,8 @@ static void internal_malloc_stats(mstate m) {
      and choose its bk node as its replacement.
   2. If x was the last node of its size, but not a leaf node, it must
      be replaced with a leaf node (not merely one with an open left or
-     right), to make sure that lefts and rights of descendents
-     correspond properly to bit masks.  We use the rightmost descendent
+     right), to make sure that lefts and rights of descendants
+     correspond properly to bit masks.  We use the rightmost descendant
      of x.  We could use any other leaf, but this is easy to locate and
      tends to counteract removal of leftmosts elsewhere, and so keeps
      paths shorter than minimally guaranteed.  This doesn't loop much
@@ -5091,10 +5091,10 @@ History:
         Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
       * Use last_remainder in more cases.
       * Pack bins using idea from  colin@nyx10.cs.du.edu
-      * Use ordered bins instead of best-fit threshhold
+      * Use ordered bins instead of best-fit threshold
       * Eliminate block-local decls to simplify tracing and debugging.
       * Support another case of realloc via move into top
-      * Fix error occuring when initial sbrk_base not word-aligned.
+      * Fix error occurring when initial sbrk_base not word-aligned.
       * Rely on page size for units instead of SBRK_UNIT to
         avoid surprises about sbrk alignment conventions.
       * Add mallinfo, mallopt. Thanks to Raymond Nijssen
index 9533ef6..b77a836 100644 (file)
@@ -401,7 +401,7 @@ ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
    the closure (in the "trampoline" area), but we replace the gp
    pointer with a pointer to the closure itself.  We also add the real
    gp pointer to the closure.  This allows the function entry code to
-   both retrieve the user data, and to restire the correct gp pointer.  */
+   both retrieve the user data, and to restore the correct gp pointer.  */
 
 extern void ffi_closure_unix ();
 
diff --git a/src/m88k/ffi.c b/src/m88k/ffi.c
new file mode 100644 (file)
index 0000000..68df494
--- /dev/null
@@ -0,0 +1,400 @@
+/*
+ * Copyright (c) 2013 Miodrag Vallat.  <miod@openbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * ``Software''), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * m88k Foreign Function Interface
+ *
+ * This file attempts to provide all the FFI entry points which can reliably
+ * be implemented in C.
+ *
+ * Only OpenBSD/m88k is currently supported; other platforms (such as
+ * Motorola's SysV/m88k) could be supported with the following tweaks:
+ *
+ * - non-OpenBSD systems use an `outgoing parameter area' as part of the
+ *   88BCS calling convention, which is not supported under OpenBSD from
+ *   release 3.6 onwards.  Supporting it should be as easy as taking it
+ *   into account when adjusting the stack, in the assembly code.
+ *
+ * - the logic deciding whether a function argument gets passed through
+ *   registers, or on the stack, has changed several times in OpenBSD in
+ *   edge cases (especially for structs larger than 32 bytes being passed
+ *   by value). The code below attemps to match the logic used by the
+ *   system compiler of OpenBSD 5.3, i.e. gcc 3.3.6 with many m88k backend
+ *   fixes.
+ */
+
+#include <ffi.h>
+#include <ffi_common.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+void ffi_call_OBSD (unsigned int, extended_cif *, unsigned int, void *,
+                   void (*fn) ());
+void *ffi_prep_args (void *, extended_cif *);
+void ffi_closure_OBSD (ffi_closure *);
+void ffi_closure_struct_OBSD (ffi_closure *);
+unsigned int ffi_closure_OBSD_inner (ffi_closure *, void *, unsigned int *,
+                                    char *);
+void ffi_cacheflush_OBSD (unsigned int, unsigned int);
+
+#define CIF_FLAGS_INT          (1 << 0)
+#define CIF_FLAGS_DINT         (1 << 1)
+
+/*
+ * Foreign Function Interface API
+ */
+
+/* ffi_prep_args is called by the assembly routine once stack space has
+   been allocated for the function's arguments.  */
+
+void *
+ffi_prep_args (void *stack, extended_cif *ecif)
+{
+  unsigned int i;
+  void **p_argv;
+  char *argp, *stackp;
+  unsigned int *regp;
+  unsigned int regused;
+  ffi_type **p_arg;
+  void *struct_value_ptr;
+
+  regp = (unsigned int *)stack;
+  stackp = (char *)(regp + 8);
+  regused = 0;
+
+  if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
+      && !ecif->cif->flags)
+    struct_value_ptr = ecif->rvalue;
+  else
+    struct_value_ptr = NULL;
+
+  p_argv = ecif->avalue;
+
+  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i != 0; i--, p_arg++)
+    {
+      size_t z;
+      unsigned short t, a;
+
+      z = (*p_arg)->size;
+      t = (*p_arg)->type;
+      a = (*p_arg)->alignment;
+
+      /*
+       * Figure out whether the argument can be passed through registers
+       * or on the stack.
+       * The rule is that registers can only receive simple types not larger
+       * than 64 bits, or structs the exact size of a register and aligned to
+       * the size of a register.
+       */
+      if (t == FFI_TYPE_STRUCT)
+       {
+         if (z == sizeof (int) && a == sizeof (int) && regused < 8)
+           argp = (char *)regp;
+         else
+           argp = stackp;
+       }
+      else
+       {
+         if (z > sizeof (int) && regused < 8 - 1)
+           {
+             /* align to an even register pair */
+             if (regused & 1)
+               {
+                 regp++;
+                 regused++;
+               }
+           }
+         if (regused < 8)
+           argp = (char *)regp;
+         else
+           argp = stackp;
+       }
+
+      /* Enforce proper stack alignment of 64-bit types */
+      if (argp == stackp && a > sizeof (int))
+       {
+         stackp = (char *) ALIGN(stackp, a);
+         argp = stackp;
+       }
+
+      switch (t)
+       {
+       case FFI_TYPE_SINT8:
+         *(signed int *) argp = (signed int) *(SINT8 *) *p_argv;
+         break;
+
+       case FFI_TYPE_UINT8:
+         *(unsigned int *) argp = (unsigned int) *(UINT8 *) *p_argv;
+         break;
+
+       case FFI_TYPE_SINT16:
+         *(signed int *) argp = (signed int) *(SINT16 *) *p_argv;
+         break;
+
+       case FFI_TYPE_UINT16:
+         *(unsigned int *) argp = (unsigned int) *(UINT16 *) *p_argv;
+         break;
+
+       case FFI_TYPE_INT:
+       case FFI_TYPE_FLOAT:
+       case FFI_TYPE_UINT32:
+       case FFI_TYPE_SINT32:
+       case FFI_TYPE_POINTER:
+         *(unsigned int *) argp = *(unsigned int *) *p_argv;
+         break;
+
+       case FFI_TYPE_DOUBLE:
+       case FFI_TYPE_UINT64:
+       case FFI_TYPE_SINT64:
+       case FFI_TYPE_STRUCT:
+         memcpy (argp, *p_argv, z);
+         break;
+
+       default:
+         FFI_ASSERT (0);
+       }
+
+      /* Align if necessary.  */
+      if ((sizeof (int) - 1) & z)
+       z = ALIGN(z, sizeof (int));
+
+      p_argv++;
+
+      /* Be careful, once all registers are filled, and about to continue
+         on stack, regp == stackp.  Therefore the check for regused as well. */
+      if (argp == (char *)regp && regused < 8)
+       {
+         regp += z / sizeof (int);
+         regused += z / sizeof (int);
+       }
+      else
+       stackp += z;
+    }
+
+  return struct_value_ptr;
+}
+
+/* Perform machine dependent cif processing */
+ffi_status
+ffi_prep_cif_machdep (ffi_cif *cif)
+{
+  /* Set the return type flag */
+  switch (cif->rtype->type)
+    {
+    case FFI_TYPE_VOID:
+      cif->flags = 0;
+      break;
+
+    case FFI_TYPE_STRUCT:
+      if (cif->rtype->size == sizeof (int) &&
+         cif->rtype->alignment == sizeof (int))
+       cif->flags = CIF_FLAGS_INT;
+      else
+       cif->flags = 0;
+      break;
+
+    case FFI_TYPE_DOUBLE:
+    case FFI_TYPE_SINT64:
+    case FFI_TYPE_UINT64:
+      cif->flags = CIF_FLAGS_DINT;
+      break;
+
+    default:
+      cif->flags = CIF_FLAGS_INT;
+      break;
+    }
+
+  return FFI_OK;
+}
+
+void
+ffi_call (ffi_cif *cif, void (*fn) (), void *rvalue, void **avalue)
+{
+  extended_cif ecif;
+
+  ecif.cif = cif;
+  ecif.avalue = avalue;
+
+  /* If the return value is a struct and we don't have a return value
+     address then we need to make one.  */
+
+  if (rvalue == NULL
+      && cif->rtype->type == FFI_TYPE_STRUCT
+      && (cif->rtype->size != sizeof (int)
+         || cif->rtype->alignment != sizeof (int)))
+    ecif.rvalue = alloca (cif->rtype->size);
+  else
+    ecif.rvalue = rvalue;
+
+  switch (cif->abi)
+    {
+    case FFI_OBSD:
+      ffi_call_OBSD (cif->bytes, &ecif, cif->flags, ecif.rvalue, fn);
+      break;
+
+    default:
+      FFI_ASSERT (0);
+      break;
+    }
+}
+
+/*
+ * Closure API
+ */
+
+static void
+ffi_prep_closure_args_OBSD (ffi_cif *cif, void **avalue, unsigned int *regp,
+                           char *stackp)
+{
+  unsigned int i;
+  void **p_argv;
+  char *argp;
+  unsigned int regused;
+  ffi_type **p_arg;
+
+  regused = 0;
+
+  p_argv = avalue;
+
+  for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)
+    {
+      size_t z;
+      unsigned short t, a;
+
+      z = (*p_arg)->size;
+      t = (*p_arg)->type;
+      a = (*p_arg)->alignment;
+
+      /*
+       * Figure out whether the argument has been passed through registers
+       * or on the stack.
+       * The rule is that registers can only receive simple types not larger
+       * than 64 bits, or structs the exact size of a register and aligned to
+       * the size of a register.
+       */
+      if (t == FFI_TYPE_STRUCT)
+       {
+         if (z == sizeof (int) && a == sizeof (int) && regused < 8)
+           argp = (char *)regp;
+         else
+           argp = stackp;
+       }
+      else
+       {
+         if (z > sizeof (int) && regused < 8 - 1)
+           {
+             /* align to an even register pair */
+             if (regused & 1)
+               {
+                 regp++;
+                 regused++;
+               }
+           }
+         if (regused < 8)
+           argp = (char *)regp;
+         else
+           argp = stackp;
+       }
+
+      /* Enforce proper stack alignment of 64-bit types */
+      if (argp == stackp && a > sizeof (int))
+       {
+         stackp = (char *) ALIGN(stackp, a);
+         argp = stackp;
+       }
+
+      if (z < sizeof (int) && t != FFI_TYPE_STRUCT)
+       *p_argv = (void *) (argp + sizeof (int) - z);
+      else
+       *p_argv = (void *) argp;
+
+      /* Align if necessary */
+      if ((sizeof (int) - 1) & z)
+       z = ALIGN(z, sizeof (int));
+
+      p_argv++;
+
+      /* Be careful, once all registers are exhausted, and about to fetch from
+        stack, regp == stackp.  Therefore the check for regused as well. */
+      if (argp == (char *)regp && regused < 8)
+       {
+         regp += z / sizeof (int);
+         regused += z / sizeof (int);
+       }
+      else
+       stackp += z;
+    }
+}
+
+unsigned int
+ffi_closure_OBSD_inner (ffi_closure *closure, void *resp, unsigned int *regp,
+                       char *stackp)
+{
+  ffi_cif *cif;
+  void **arg_area;
+
+  cif = closure->cif;
+  arg_area = (void**) alloca (cif->nargs * sizeof (void *));
+
+  ffi_prep_closure_args_OBSD(cif, arg_area, regp, stackp);
+
+  (closure->fun) (cif, resp, arg_area, closure->user_data);
+
+  return cif->flags;
+}
+
+ffi_status
+ffi_prep_closure_loc (ffi_closure* closure, ffi_cif* cif,
+                     void (*fun)(ffi_cif*,void*,void**,void*),
+                     void *user_data, void *codeloc)
+{
+  unsigned int *tramp = (unsigned int *) codeloc;
+  void *fn;
+
+  FFI_ASSERT (cif->abi == FFI_OBSD);
+
+  if (cif->rtype->type == FFI_TYPE_STRUCT && !cif->flags)
+    fn = &ffi_closure_struct_OBSD;
+  else
+    fn = &ffi_closure_OBSD;
+
+  /* or.u %r10, %r0, %hi16(fn) */
+  tramp[0] = 0x5d400000 | (((unsigned int)fn) >> 16);
+  /* or.u %r13, %r0, %hi16(closure) */
+  tramp[1] = 0x5da00000 | ((unsigned int)closure >> 16);
+  /* or %r10, %r10, %lo16(fn) */
+  tramp[2] = 0x594a0000 | (((unsigned int)fn) & 0xffff);
+  /* jmp.n %r10 */
+  tramp[3] = 0xf400c40a;
+  /* or %r13, %r13, %lo16(closure) */
+  tramp[4] = 0x59ad0000 | ((unsigned int)closure & 0xffff);
+
+  ffi_cacheflush_OBSD((unsigned int)codeloc, FFI_TRAMPOLINE_SIZE);
+
+  closure->cif  = cif;
+  closure->user_data = user_data;
+  closure->fun  = fun;
+
+  return FFI_OK;
+}
diff --git a/src/m88k/ffitarget.h b/src/m88k/ffitarget.h
new file mode 100644 (file)
index 0000000..e52bf9f
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013 Miodrag Vallat.  <miod@openbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * ``Software''), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * m88k Foreign Function Interface
+ */
+
+#ifndef LIBFFI_TARGET_H
+#define LIBFFI_TARGET_H
+
+#ifndef LIBFFI_ASM
+typedef unsigned long ffi_arg;
+typedef signed long ffi_sarg;
+
+typedef enum ffi_abi {
+  FFI_FIRST_ABI = 0,
+  FFI_OBSD,
+  FFI_DEFAULT_ABI = FFI_OBSD,
+  FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
+} ffi_abi;
+#endif
+
+/* ---- Definitions for closures ----------------------------------------- */
+
+#define FFI_CLOSURES 1
+#define FFI_TRAMPOLINE_SIZE 0x14
+#define FFI_NATIVE_RAW_API 0
+
+#endif
diff --git a/src/m88k/obsd.S b/src/m88k/obsd.S
new file mode 100644 (file)
index 0000000..1944a23
--- /dev/null
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2013 Miodrag Vallat.  <miod@openbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * ``Software''), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * m88k Foreign Function Interface
+ */
+
+#define LIBFFI_ASM     
+#include <fficonfig.h>
+#include <ffi.h>
+
+       .text
+
+/*
+ * ffi_cacheflush_OBSD(unsigned int addr,      %r2
+ *                    unsigned int size);      %r3
+ */
+       .align  4
+       .globl  ffi_cacheflush_OBSD
+       .type   ffi_cacheflush_OBSD,@function
+ffi_cacheflush_OBSD:
+       tb0     0,   %r0, 451
+       or      %r0, %r0, %r0
+       jmp     %r1
+       .size   ffi_cacheflush_OBSD, . - ffi_cacheflush_OBSD
+
+/*
+ * ffi_call_OBSD(unsigned bytes,               %r2
+ *              extended_cif *ecif,            %r3
+ *              unsigned flags,                %r4
+ *              void *rvalue,                  %r5
+ *              void (*fn)());                 %r6
+ */
+       .align  4
+       .globl  ffi_call_OBSD
+       .type   ffi_call_OBSD,@function
+ffi_call_OBSD:
+       subu    %r31, %r31, 32
+       st      %r30, %r31, 4
+       st      %r1,  %r31, 0
+       addu    %r30, %r31, 32
+
+       | Save the few arguments we'll need after ffi_prep_args()
+       st.d    %r4, %r31, 8
+       st      %r6, %r31, 16
+
+       | Allocate room for the image of r2-r9, and the stack space for
+       | the args (rounded to a 16-byte boundary)
+       addu    %r2,  %r2,  (8 * 4) + 15
+       clr     %r2,  %r2,  4<0>
+       subu    %r31, %r31, %r2
+
+       | Fill register and stack image
+       or      %r2, %r31, %r0
+#ifdef PIC
+       bsr     ffi_prep_args#plt
+#else
+       bsr     ffi_prep_args
+#endif
+
+       | Save pointer to return struct address, if any
+       or      %r12, %r2, %r0
+
+       | Get function pointer
+       subu    %r4,  %r30, 32
+       ld      %r1,  %r4,  16
+
+       | Fetch the register arguments
+       ld.d    %r2, %r31, (0 * 4)
+       ld.d    %r4, %r31, (2 * 4)
+       ld.d    %r6, %r31, (4 * 4)
+       ld.d    %r8, %r31, (6 * 4)
+       addu    %r31, %r31, (8 * 4)
+
+       | Invoke the function
+       jsr     %r1
+
+       | Restore stack now that we don't need the args anymore
+       subu    %r31, %r30, 32
+
+       | Figure out what to return as the function's return value
+       ld      %r5, %r31, 12           | rvalue
+       ld      %r4, %r31, 8            | flags
+
+       bcnd    eq0, %r5, 9f
+
+       bb0     0, %r4, 1f              | CIF_FLAGS_INT
+       st      %r2, %r5, 0
+       br      9f
+
+1:
+       bb0     1, %r4, 1f              | CIF_FLAGS_DINT
+       st.d    %r2, %r5, 0
+       br      9f
+
+1:
+9:
+       ld      %r1,  %r31, 0
+       ld      %r30, %r31, 4
+       jmp.n   %r1
+        addu   %r31, %r31, 32
+       .size   ffi_call_OBSD, . - ffi_call_OBSD
+
+/*
+ * ffi_closure_OBSD(ffi_closure *closure);     %r13
+ */
+       .align  4
+       .globl  ffi_closure_OBSD
+       .type   ffi_closure_OBSD, @function
+ffi_closure_OBSD:
+       subu    %r31, %r31, 16
+       st      %r30, %r31, 4
+       st      %r1,  %r31, 0
+       addu    %r30, %r31, 16
+
+       | Make room on the stack for saved register arguments and return
+       | value
+       subu    %r31, %r31, (8 * 4) + (2 * 4)
+       st.d    %r2,  %r31, (0 * 4)
+       st.d    %r4,  %r31, (2 * 4)
+       st.d    %r6,  %r31, (4 * 4)
+       st.d    %r8,  %r31, (6 * 4)
+
+       | Invoke the closure function
+       or      %r5,  %r30, 0                   | calling stack
+       addu    %r4,  %r31, 0                   | saved registers
+       addu    %r3,  %r31, (8 * 4)             | return value
+       or      %r2,  %r13, %r0                 | closure
+#ifdef PIC
+       bsr     ffi_closure_OBSD_inner#plt
+#else
+       bsr     ffi_closure_OBSD_inner
+#endif
+
+       | Figure out what to return as the function's return value
+       bb0     0, %r2, 1f              | CIF_FLAGS_INT
+       ld      %r2, %r31, (8 * 4)
+       br      9f
+
+1:
+       bb0     1, %r2, 1f              | CIF_FLAGS_DINT
+       ld.d    %r2, %r31, (8 * 4)
+       br      9f
+
+1:
+9:
+       subu    %r31, %r30, 16
+       ld      %r1,  %r31, 0
+       ld      %r30, %r31, 4
+       jmp.n   %r1
+        addu   %r31, %r31, 16
+       .size   ffi_closure_OBSD,.-ffi_closure_OBSD
+
+/*
+ * ffi_closure_struct_OBSD(ffi_closure *closure);      %r13
+ */
+       .align  4
+       .globl  ffi_closure_struct_OBSD
+       .type   ffi_closure_struct_OBSD, @function
+ffi_closure_struct_OBSD:
+       subu    %r31, %r31, 16
+       st      %r30, %r31, 4
+       st      %r1,  %r31, 0
+       addu    %r30, %r31, 16
+
+       | Make room on the stack for saved register arguments
+       subu    %r31, %r31, (8 * 4)
+       st.d    %r2,  %r31, (0 * 4)
+       st.d    %r4,  %r31, (2 * 4)
+       st.d    %r6,  %r31, (4 * 4)
+       st.d    %r8,  %r31, (6 * 4)
+
+       | Invoke the closure function
+       or      %r5,  %r30, 0                   | calling stack
+       addu    %r4,  %r31, 0                   | saved registers
+       or      %r3,  %r12, 0                   | return value
+       or      %r2,  %r13, %r0                 | closure
+#ifdef PIC
+       bsr     ffi_closure_OBSD_inner#plt
+#else
+       bsr     ffi_closure_OBSD_inner
+#endif
+
+       subu    %r31, %r30, 16
+       ld      %r1,  %r31, 0
+       ld      %r30, %r31, 4
+       jmp.n   %r1
+        addu   %r31, %r31, 16
+       .size   ffi_closure_struct_OBSD,.-ffi_closure_struct_OBSD
index 5c155c5..ea962ea 100644 (file)
@@ -183,7 +183,7 @@ void ffi_closure_call_SYSV(void* register_args, void* stack_args,
        ffi_type** arg_types = cif->arg_types;
 
        /* re-allocate data for the args. This needs to be done in order to keep
-        * multi-word objects (e.g. structs) in contigious memory. Callers are not
+        * multi-word objects (e.g. structs) in contiguous memory. Callers are not
         * required to store the value of args in the lower 6 words in the stack
         * (although they are allocated in the stack).
         */
index 7a195a6..ea43e9d 100644 (file)
@@ -134,7 +134,7 @@ ffi_call_SYSV:
        rsubi r11, r23, 8
        beqi r11, ffi_call_SYSV_store64
 
-       /* Didnt match anything */
+       /* Didn't match anything */
        bri ffi_call_SYSV_end
 
 ffi_call_SYSV_store64:
@@ -210,7 +210,7 @@ ffi_closure_SYSV:
        addik r7, r12, 0 /* closure object */
        addik r1, r1, -8 /* allocate return value */
        addik r8, r1, 0 /* void* rvalue */
-       addik r1, r1, -8 /* allocate for reutrn type/size values */
+       addik r1, r1, -8 /* allocate for return type/size values */
        addik r9, r1, 0 /* void* rtype */
        addik r10, r1, 4 /* void* rsize */
 
@@ -247,7 +247,7 @@ ffi_closure_SYSV_prepare_return:
        rsubi r11, r10, 8
        beqi r11, ffi_closure_SYSV_store64
 
-       /* Didnt match anything */
+       /* Didn't match anything */
        bri ffi_closure_SYSV_end
 
 ffi_closure_SYSV_store64:
index 03121e3..5d0dd70 100644 (file)
@@ -170,7 +170,14 @@ static void ffi_prep_args(char *stack,
                break;
                  
              case FFI_TYPE_UINT32:
+#ifdef FFI_MIPS_N32
+               /* The N32 ABI requires that 32-bit integers
+                  be sign-extended to 64-bits, regardless of
+                  whether they are signed or unsigned. */
+               *(ffi_arg *)argp = *(SINT32 *)(* p_argv);
+#else
                *(ffi_arg *)argp = *(UINT32 *)(* p_argv);
+#endif
                break;
 
              /* This can only happen with 64bit slots.  */
diff --git a/src/nios2/ffi.c b/src/nios2/ffi.c
new file mode 100644 (file)
index 0000000..2efa033
--- /dev/null
@@ -0,0 +1,304 @@
+/* libffi support for Altera Nios II.
+
+   Copyright (c) 2013 Mentor Graphics.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   ``Software''), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+   
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+   
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+
+
+#include <ffi.h>
+#include <ffi_common.h>
+
+#include <stdlib.h>
+
+/* The Nios II Processor Reference Handbook defines the procedure call
+   ABI as follows.
+
+   Arguments are passed as if a structure containing the types of
+   the arguments were constructed.  The first 16 bytes are passed in r4
+   through r7, the remainder on the stack.  The first 16 bytes of a function
+   taking variable arguments are passed in r4-r7 in the same way.
+
+   Return values of types up to 8 bytes are returned in r2 and r3.  For
+   return values greater than 8 bytes, the caller must allocate memory for
+   the result and pass the address as if it were argument 0.  
+
+   While this isn't specified explicitly in the ABI documentation, GCC
+   promotes integral arguments smaller than int size to 32 bits.
+
+   Also of note, the ABI specifies that all structure objects are
+   aligned to 32 bits even if all their fields have a smaller natural
+   alignment.  See FFI_AGGREGATE_ALIGNMENT.  */
+
+
+/* Declare the assembly language hooks.  */
+
+extern UINT64 ffi_call_sysv (void (*) (char *, extended_cif *),
+                            extended_cif *,
+                            unsigned, 
+                            void (*fn) (void));
+extern void ffi_closure_sysv (void);
+
+/* Perform machine-dependent cif processing.  */
+
+ffi_status ffi_prep_cif_machdep (ffi_cif *cif)
+{
+  /* We always want at least 16 bytes in the parameter block since it
+     simplifies the low-level call function.  Also round the parameter
+     block size up to a multiple of 4 bytes to preserve
+     32-bit alignment of the stack pointer.  */
+  if (cif->bytes < 16)
+    cif->bytes = 16;
+  else
+    cif->bytes = (cif->bytes + 3) & ~3;
+
+  return FFI_OK;
+}
+
+
+/* ffi_prep_args is called by the assembly routine to transfer arguments
+   to the stack using the pointers in the ecif array.
+   Note that the stack buffer is big enough to fit all the arguments,
+   but the first 16 bytes will be copied to registers for the actual
+   call.  */
+
+void ffi_prep_args (char *stack, extended_cif *ecif)
+{
+  char *argp = stack;
+  unsigned int i;
+
+  /* The implicit return value pointer is passed as if it were a hidden
+     first argument.  */
+  if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
+      && ecif->cif->rtype->size > 8)
+    {
+      (*(void **) argp) = ecif->rvalue;
+      argp += 4;
+    }
+
+  for (i = 0; i < ecif->cif->nargs; i++)
+    {
+      void *avalue = ecif->avalue[i];
+      ffi_type *atype = ecif->cif->arg_types[i];
+      size_t size = atype->size;
+      size_t alignment = atype->alignment;
+
+      /* Align argp as appropriate for the argument type.  */
+      if ((alignment - 1) & (unsigned) argp)
+       argp = (char *) ALIGN (argp, alignment);
+
+      /* Copy the argument, promoting integral types smaller than a
+        word to word size.  */
+      if (size < sizeof (int))
+       {
+         size = sizeof (int);
+         switch (atype->type)
+           {
+           case FFI_TYPE_SINT8:
+             *(signed int *) argp = (signed int) *(SINT8 *) avalue;
+             break;
+                 
+           case FFI_TYPE_UINT8:
+             *(unsigned int *) argp = (unsigned int) *(UINT8 *) avalue;
+             break;
+                 
+           case FFI_TYPE_SINT16:
+             *(signed int *) argp = (signed int) *(SINT16 *) avalue;
+             break;
+                 
+           case FFI_TYPE_UINT16:
+             *(unsigned int *) argp = (unsigned int) *(UINT16 *) avalue;
+             break;
+
+           case FFI_TYPE_STRUCT:
+             memcpy (argp, avalue, atype->size);
+             break;
+
+           default:
+             FFI_ASSERT(0);
+           }
+       }
+      else if (size == sizeof (int))
+       *(unsigned int *) argp = (unsigned int) *(UINT32 *) avalue;
+      else
+       memcpy (argp, avalue, size);
+      argp += size;
+    }
+}
+
+
+/* Call FN using the prepared CIF.  RVALUE points to space allocated by
+   the caller for the return value, and AVALUE is an array of argument
+   pointers.  */
+
+void ffi_call (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue)
+{
+
+  extended_cif ecif;
+  UINT64 result;
+
+  /* If bigret is true, this is the case where a return value of larger
+     than 8 bytes is handled by being passed by reference as an implicit
+     argument.  */
+  int bigret = (cif->rtype->type == FFI_TYPE_STRUCT
+               && cif->rtype->size > 8);
+
+  ecif.cif = cif;
+  ecif.avalue = avalue;
+
+  /* Allocate space for return value if this is the pass-by-reference case
+     and the caller did not provide a buffer.  */
+  if (rvalue == NULL && bigret)
+    ecif.rvalue = alloca (cif->rtype->size);
+  else
+    ecif.rvalue = rvalue;
+
+  result = ffi_call_sysv (ffi_prep_args, &ecif, cif->bytes, fn);
+
+  /* Now result contains the 64 bit contents returned from fn in
+     r2 and r3.  Copy the value of the appropriate size to the user-provided
+     rvalue buffer.  */
+  if (rvalue && !bigret)
+    switch (cif->rtype->size)
+      {
+      case 1:
+       *(UINT8 *)rvalue = (UINT8) result;
+       break;
+      case 2:
+       *(UINT16 *)rvalue = (UINT16) result;
+       break;
+      case 4:
+       *(UINT32 *)rvalue = (UINT32) result;
+       break;
+      case 8:
+       *(UINT64 *)rvalue = (UINT64) result;
+       break;
+      default:
+       memcpy (rvalue, (void *)&result, cif->rtype->size);
+       break;
+      }
+}
+
+/* This function is invoked from the closure trampoline to invoke
+   CLOSURE with argument block ARGS.  Parse ARGS according to
+   CLOSURE->cfi and invoke CLOSURE->fun.  */
+
+static UINT64
+ffi_closure_helper (unsigned char *args,
+                   ffi_closure *closure)
+{
+  ffi_cif *cif = closure->cif;
+  unsigned char *argp = args;
+  void **parsed_args = alloca (cif->nargs * sizeof (void *));
+  UINT64 result;
+  void *retptr;
+  unsigned int i;
+
+  /* First figure out what to do about the return type.  If this is the
+     big-structure-return case, the first arg is the hidden return buffer
+     allocated by the caller.  */
+  if (cif->rtype->type == FFI_TYPE_STRUCT
+      && cif->rtype->size > 8)
+    {
+      retptr = *((void **) argp);
+      argp += 4;
+    }
+  else
+    retptr = (void *) &result;
+
+  /* Fill in the array of argument pointers.  */
+  for (i = 0; i < cif->nargs; i++)
+    {
+      size_t size = cif->arg_types[i]->size;
+      size_t alignment = cif->arg_types[i]->alignment;
+
+      /* Align argp as appropriate for the argument type.  */
+      if ((alignment - 1) & (unsigned) argp)
+       argp = (char *) ALIGN (argp, alignment);
+
+      /* Arguments smaller than an int are promoted to int.  */
+      if (size < sizeof (int))
+       size = sizeof (int);
+
+      /* Store the pointer.  */
+      parsed_args[i] = argp;
+      argp += size;
+    }
+
+  /* Call the user-supplied function.  */
+  (closure->fun) (cif, retptr, parsed_args, closure->user_data);
+  return result;
+}
+
+
+/* Initialize CLOSURE with a trampoline to call FUN with
+   CIF and USER_DATA.  */
+ffi_status
+ffi_prep_closure_loc (ffi_closure* closure,
+                     ffi_cif* cif,
+                     void (*fun) (ffi_cif*, void*, void**, void*),
+                     void *user_data,
+                     void *codeloc)
+{
+  unsigned int *tramp = (unsigned int *) &closure->tramp[0];
+  int i;
+
+  if (cif->abi != FFI_SYSV)
+    return FFI_BAD_ABI;
+
+  /* The trampoline looks like:
+       movhi r8, %hi(ffi_closure_sysv)
+       ori r8, r8, %lo(ffi_closure_sysv)
+       movhi r9, %hi(ffi_closure_helper)
+       ori r0, r9, %lo(ffi_closure_helper)
+       movhi r10, %hi(closure)
+       ori r10, r10, %lo(closure)
+       jmp r8
+     and then ffi_closure_sysv retrieves the closure pointer out of r10
+     in addition to the arguments passed in the normal way for the call,
+     and invokes ffi_closure_helper.  We encode the pointer to
+     ffi_closure_helper in the trampoline because making a PIC call
+     to it in ffi_closure_sysv would be messy (it would have to indirect
+     through the GOT).  */
+
+#define HI(x) ((((unsigned int) (x)) >> 16) & 0xffff)
+#define LO(x) (((unsigned int) (x)) & 0xffff)
+  tramp[0] = (0 << 27) | (8 << 22) | (HI (ffi_closure_sysv) << 6) | 0x34;
+  tramp[1] = (8 << 27) | (8 << 22) | (LO (ffi_closure_sysv) << 6) | 0x14;
+  tramp[2] = (0 << 27) | (9 << 22) | (HI (ffi_closure_helper) << 6) | 0x34;
+  tramp[3] = (9 << 27) | (9 << 22) | (LO (ffi_closure_helper) << 6) | 0x14;
+  tramp[4] = (0 << 27) | (10 << 22) | (HI (closure) << 6) | 0x34;
+  tramp[5] = (10 << 27) | (10 << 22) | (LO (closure) << 6) | 0x14;
+  tramp[6] = (8 << 27) | (0x0d << 11) | 0x3a;
+#undef HI
+#undef LO
+
+  /* Flush the caches.
+     See Example 9-4 in the Nios II Software Developer's Handbook.  */
+  for (i = 0; i < 7; i++)
+    asm volatile ("flushd 0(%0); flushi %0" :: "r"(tramp + i) : "memory");
+  asm volatile ("flushp" ::: "memory");
+
+  closure->cif = cif;
+  closure->fun = fun;
+  closure->user_data = user_data;
+
+  return FFI_OK;
+}
+
diff --git a/src/nios2/ffitarget.h b/src/nios2/ffitarget.h
new file mode 100644 (file)
index 0000000..134d118
--- /dev/null
@@ -0,0 +1,52 @@
+/* libffi target includes for Altera Nios II.
+
+   Copyright (c) 2013 Mentor Graphics.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   ``Software''), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+   
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+   
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+
+
+#ifndef LIBFFI_TARGET_H
+#define LIBFFI_TARGET_H
+
+#ifndef LIBFFI_H
+#error "Please do not include ffitarget.h directly into your source.  Use ffi.h instead."
+#endif
+
+#ifndef LIBFFI_ASM
+typedef unsigned long          ffi_arg;
+typedef signed long            ffi_sarg;
+
+typedef enum ffi_abi {
+  FFI_FIRST_ABI = 0,
+  FFI_SYSV,
+  FFI_LAST_ABI,
+  FFI_DEFAULT_ABI = FFI_SYSV
+} ffi_abi;
+#endif
+
+/* Structures have a 4-byte alignment even if all the fields have lesser
+   alignment requirements.  */
+#define FFI_AGGREGATE_ALIGNMENT 4
+
+#define FFI_CLOSURES 1
+#define FFI_TRAMPOLINE_SIZE 28   /* 7 instructions */
+#define FFI_NATIVE_RAW_API 0
+
+#endif
diff --git a/src/nios2/sysv.S b/src/nios2/sysv.S
new file mode 100644 (file)
index 0000000..75f442b
--- /dev/null
@@ -0,0 +1,136 @@
+/* Low-level libffi support for Altera Nios II.
+
+   Copyright (c) 2013 Mentor Graphics.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   ``Software''), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+   
+   The above copyright notice and this permission notice shall be
+   included in all copies or substantial portions of the Software.
+   
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+
+/* This function is declared on the C side as 
+
+   extern UINT64 ffi_call_sysv (void (*arghook) (char *, extended_cif *),
+                               extended_cif *ecif,
+                               unsigned nbytes, 
+                               void (*fn) (void));
+       
+   On input, the arguments appear as
+       r4 = arghook
+       r5 = ecif
+       r6 = nbytes
+       r7 = fn
+*/
+
+       .section        .text
+       .align  2
+       .global ffi_call_sysv
+       .type   ffi_call_sysv, @function
+
+ffi_call_sysv:
+       .cfi_startproc
+
+       /* Create the stack frame, saving r16 so we can use it locally.  */
+       addi    sp, sp, -12
+       .cfi_def_cfa_offset 12
+       stw     ra, 8(sp)
+       stw     fp, 4(sp)
+       stw     r16, 0(sp)
+       .cfi_offset 31, -4
+       .cfi_offset 28, -8
+       .cfi_offset 16, -12
+       mov     fp, sp
+       .cfi_def_cfa_register 28
+       mov     r16, r7
+
+       /* Adjust the stack pointer to create the argument buffer
+          nbytes long.  */
+       sub     sp, sp, r6
+
+       /* Call the arghook function.  */
+       mov     r2, r4          /* fn */
+       mov     r4, sp          /* argbuffer */
+       callr   r2              /* r5 already contains ecif */
+
+       /* Pop off the first 16 bytes of the argument buffer on the stack,
+          transferring the contents to the argument registers.  */
+       ldw     r4, 0(sp)
+       ldw     r5, 4(sp)
+       ldw     r6, 8(sp)
+       ldw     r7, 12(sp)
+       addi    sp, sp, 16
+
+       /* Call the user function, which leaves its result in r2 and r3.  */
+       callr   r16
+
+       /* Pop off the stack frame.  */
+       mov     sp, fp
+       ldw     ra, 8(sp)
+       ldw     fp, 4(sp)
+       ldw     r16, 0(sp)
+       addi    sp, sp, 12
+       ret
+       .cfi_endproc
+       .size   ffi_call_sysv, .-ffi_call_sysv
+
+
+/* Closure trampolines jump here after putting the C helper address
+   in r9 and the closure pointer in r10.  The user-supplied arguments
+   to the closure are in the normal places, in r4-r7 and on the
+   stack.  Push the register arguments on the stack too and then call the
+   C helper function to deal with them.  */
+   
+       .section        .text
+       .align  2
+       .global ffi_closure_sysv
+       .type   ffi_closure_sysv, @function
+
+ffi_closure_sysv:
+       .cfi_startproc
+
+       /* Create the stack frame, pushing the register args on the stack
+          just below the stack args.  This is the same trick illustrated
+          in Figure 7-3 in the Nios II Processor Reference Handbook, used
+          for variable arguments and structures passed by value.  */
+       addi    sp, sp, -20
+       .cfi_def_cfa_offset 20
+       stw     ra, 0(sp)
+       .cfi_offset 31, -20
+       stw     r4, 4(sp)
+       .cfi_offset 4, -16
+       stw     r5, 8(sp)
+       .cfi_offset 5, -12
+       stw     r6, 12(sp)
+       .cfi_offset 6, -8
+       stw     r7, 16(sp)
+       .cfi_offset 7, -4
+
+       /* Call the helper.
+          r4 = pointer to arguments on stack
+          r5 = closure pointer (loaded in r10 by the trampoline)
+          r9 = address of helper function (loaded by trampoline) */
+       addi    r4, sp, 4
+       mov     r5, r10
+       callr   r9
+       
+       /* Pop the stack and return.  */
+       ldw     ra, 0(sp)
+       addi    sp, sp, 20
+       .cfi_def_cfa_offset -20
+       ret
+       .cfi_endproc
+       .size   ffi_closure_sysv, .-ffi_closure_sysv
+
index 3f6790f..86d8d6d 100644 (file)
@@ -192,7 +192,7 @@ LCFI1:
        lg      r0,0(r3)                ; size => r0
        lhz     r3,FFI_TYPE_TYPE(r3)    ; type => r3
 
-       /* The helper will have intercepted struture returns and inserted
+       /* The helper will have intercepted structure returns and inserted
           the caller`s destination address for structs returned by ref.  */
 
        /* r3 contains the return type  so use it to look up in a table
index 54f2731..f2c133b 100644 (file)
@@ -132,6 +132,9 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
 
   int i;
   ffi_type **ptr;
+#ifndef __NO_FPRS__
+  double double_tmp;
+#endif
   union {
     void **v;
     char **c;
@@ -151,7 +154,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
   gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS;
   intarg_count = 0;
 #ifndef __NO_FPRS__
-  double double_tmp;
   fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS;
   fparg_count = 0;
   copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c);
@@ -374,7 +376,7 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
   FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS);
   /* The assert below is testing that the number of integer arguments agrees
      with the number found in ffi_prep_cif_machdep().  However, intarg_count
-     is incremeneted whenever we place an FP arg on the stack, so account for
+     is incremented whenever we place an FP arg on the stack, so account for
      that before our assert test.  */
 #ifndef __NO_FPRS__
   if (fparg_count > NUM_FPR_ARG_REGISTERS)
@@ -553,11 +555,12 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
            {
              char *where = next_arg.c;
 
+#ifndef __LITTLE_ENDIAN__
              /* Structures with size less than eight bytes are passed
                 left-padded.  */
              if ((*ptr)->size < 8)
                where += 8 - (*ptr)->size;
-
+#endif
              memcpy (where, *p_argv.c, (*ptr)->size);
              next_arg.ul += words;
              if (next_arg.ul == gpr_end.ul)
@@ -1236,6 +1239,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
 
        case FFI_TYPE_SINT8:
        case FFI_TYPE_UINT8:
+#ifndef __LITTLE_ENDIAN__
          /* there are 8 gpr registers used to pass values */
          if (ng < 8)
            {
@@ -1249,9 +1253,11 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
              pst++;
            }
          break;
+#endif
 
        case FFI_TYPE_SINT16:
        case FFI_TYPE_UINT16:
+#ifndef __LITTLE_ENDIAN__
          /* there are 8 gpr registers used to pass values */
          if (ng < 8)
            {
@@ -1265,6 +1271,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
              pst++;
            }
          break;
+#endif
 
        case FFI_TYPE_SINT32:
        case FFI_TYPE_UINT32:
@@ -1395,21 +1402,27 @@ ffi_closure_helper_LINUX64 (ffi_closure *closure, void *rvalue,
        {
        case FFI_TYPE_SINT8:
        case FFI_TYPE_UINT8:
+#ifndef __LITTLE_ENDIAN__
          avalue[i] = (char *) pst + 7;
          pst++;
          break;
+#endif
 
        case FFI_TYPE_SINT16:
        case FFI_TYPE_UINT16:
+#ifndef __LITTLE_ENDIAN__
          avalue[i] = (char *) pst + 6;
          pst++;
          break;
+#endif
 
        case FFI_TYPE_SINT32:
        case FFI_TYPE_UINT32:
+#ifndef __LITTLE_ENDIAN__
          avalue[i] = (char *) pst + 4;
          pst++;
          break;
+#endif
 
        case FFI_TYPE_SINT64:
        case FFI_TYPE_UINT64:
@@ -1419,11 +1432,13 @@ ffi_closure_helper_LINUX64 (ffi_closure *closure, void *rvalue,
          break;
 
        case FFI_TYPE_STRUCT:
+#ifndef __LITTLE_ENDIAN__
          /* Structures with size less than eight bytes are passed
             left-padded.  */
          if (arg_types[i]->size < 8)
            avalue[i] = (char *) pst + 8 - arg_types[i]->size;
          else
+#endif
            avalue[i] = pst;
          pst += (arg_types[i]->size + 7) / 8;
          break;
index 1d1d48c..cf6fb6d 100644 (file)
@@ -593,7 +593,7 @@ darwin_adjust_aggregate_sizes (ffi_type *s)
       /* Natural alignment for all items.  */
       align = p->alignment;
 #else
-      /* Natrual alignment for the first item... */
+      /* Natural alignment for the first item... */
       if (i == 0)
        align = p->alignment;
       else if (p->alignment == 16 || p->alignment < 4)
index b1e1219..ac4a226 100644 (file)
@@ -132,7 +132,11 @@ ffi_closure_LINUX64:
        blr
        nop
 # case FFI_TYPE_INT
+#ifdef __LITTLE_ENDIAN__
+       lwa %r3, 112+0(%r1)
+#else
        lwa %r3, 112+4(%r1)
+#endif
        mtlr %r0
        addi %r1, %r1, 240
        blr
@@ -152,33 +156,57 @@ ffi_closure_LINUX64:
        lfd %f2, 112+8(%r1)
        b .Lfinish
 # case FFI_TYPE_UINT8
+#ifdef __LITTLE_ENDIAN__
+       lbz %r3, 112+0(%r1)
+#else
        lbz %r3, 112+7(%r1)
+#endif
        mtlr %r0
        addi %r1, %r1, 240
        blr
 # case FFI_TYPE_SINT8
+#ifdef __LITTLE_ENDIAN__
+       lbz %r3, 112+0(%r1)
+#else
        lbz %r3, 112+7(%r1)
+#endif
        extsb %r3,%r3
        mtlr %r0
        b .Lfinish
 # case FFI_TYPE_UINT16
+#ifdef __LITTLE_ENDIAN__
+       lhz %r3, 112+0(%r1)
+#else
        lhz %r3, 112+6(%r1)
+#endif
        mtlr %r0
 .Lfinish:
        addi %r1, %r1, 240
        blr
 # case FFI_TYPE_SINT16
+#ifdef __LITTLE_ENDIAN__
+       lha %r3, 112+0(%r1)
+#else
        lha %r3, 112+6(%r1)
+#endif
        mtlr %r0
        addi %r1, %r1, 240
        blr
 # case FFI_TYPE_UINT32
+#ifdef __LITTLE_ENDIAN__
+       lwz %r3, 112+0(%r1)
+#else
        lwz %r3, 112+4(%r1)
+#endif
        mtlr %r0
        addi %r1, %r1, 240
        blr
 # case FFI_TYPE_SINT32
+#ifdef __LITTLE_ENDIAN__
+       lwa %r3, 112+0(%r1)
+#else
        lwa %r3, 112+4(%r1)
+#endif
        mtlr %r0
        addi %r1, %r1, 240
        blr
index 41fb885..c3349df 100644 (file)
@@ -159,25 +159,41 @@ ENTRY(ffi_closure_SYSV)
 #endif
 
 # case FFI_TYPE_UINT8
+#ifdef __LITTLE_ENDIAN__
+       lbz %r3,112+0(%r1)
+#else
        lbz %r3,112+3(%r1)
+#endif
        mtlr %r0
        addi %r1,%r1,144
        blr
 
 # case FFI_TYPE_SINT8
+#ifdef __LITTLE_ENDIAN__
+       lbz %r3,112+0(%r1)
+#else
        lbz %r3,112+3(%r1)
+#endif
        extsb %r3,%r3
        mtlr %r0
        b .Lfinish
 
 # case FFI_TYPE_UINT16
+#ifdef __LITTLE_ENDIAN__
+       lhz %r3,112+0(%r1)
+#else
        lhz %r3,112+2(%r1)
+#endif
        mtlr %r0
        addi %r1,%r1,144
        blr
 
 # case FFI_TYPE_SINT16
+#ifdef __LITTLE_ENDIAN__
+       lha %r3,112+0(%r1)
+#else
        lha %r3,112+2(%r1)
+#endif
        mtlr %r0
        addi %r1,%r1,144
        blr
@@ -239,9 +255,15 @@ ENTRY(ffi_closure_SYSV)
 
 # case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct.
        lwz %r3,112+0(%r1)
+#ifdef __LITTLE_ENDIAN__
+       mtlr %r0
+       addi %r1,%r1,144
+       blr
+#else
        srwi %r3,%r3,8
        mtlr %r0
        b .Lfinish
+#endif
 
 # case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct.
        lwz %r3,112+0(%r1)
@@ -252,20 +274,35 @@ ENTRY(ffi_closure_SYSV)
 # case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct.
        lwz %r3,112+0(%r1)
        lwz %r4,112+4(%r1)
+#ifdef __LITTLE_ENDIAN__
+       mtlr %r0
+       b .Lfinish
+#else
        li %r5,24
        b .Lstruct567
+#endif
 
 # case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct.
        lwz %r3,112+0(%r1)
        lwz %r4,112+4(%r1)
+#ifdef __LITTLE_ENDIAN__
+       mtlr %r0
+       b .Lfinish
++#else
        li %r5,16
        b .Lstruct567
+#endif
 
 # case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct.
        lwz %r3,112+0(%r1)
        lwz %r4,112+4(%r1)
+#ifdef __LITTLE_ENDIAN__
+       mtlr %r0
+       b .Lfinish
+#else
        li %r5,8
        b .Lstruct567
+#endif
 
 # case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct.
        lwz %r3,112+0(%r1)
@@ -273,6 +310,7 @@ ENTRY(ffi_closure_SYSV)
        mtlr %r0
        b .Lfinish
 
+#ifndef __LITTLE_ENDIAN__
 .Lstruct567:
        subfic %r6,%r5,32
        srw %r4,%r4,%r5
@@ -288,7 +326,8 @@ ENTRY(ffi_closure_SYSV)
        mtlr %r0
        addi %r1,%r1,144
        blr
-
+#endif
+       
 END(ffi_closure_SYSV)
 
        .section        ".eh_frame",EH_FRAME_FLAGS,@progbits
index e8ec5cf..e373cbd 100644 (file)
@@ -76,6 +76,13 @@ static ffi_status initialize_aggregate(ffi_type *arg)
      total size of 3*sizeof(long).  */
   arg->size = ALIGN (arg->size, arg->alignment);
 
+  /* On some targets, the ABI defines that structures have an additional
+     alignment beyond the "natural" one based on their elements.  */
+#ifdef FFI_AGGREGATE_ALIGNMENT
+  if (FFI_AGGREGATE_ALIGNMENT > arg->alignment)
+    arg->alignment = FFI_AGGREGATE_ALIGNMENT;
+#endif
+
   if (arg->size == 0)
     return FFI_BAD_TYPEDEF;
   else
@@ -146,7 +153,9 @@ ffi_status FFI_HIDDEN ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi,
 #ifdef XTENSA
       && (cif->rtype->size > 16)
 #endif
-
+#ifdef NIOS2
+      && (cif->rtype->size > 8)
+#endif
      )
     bytes = STACK_ARG_SIZE(sizeof(void*));
 #endif
index 3515b91..9ec86bf 100644 (file)
@@ -41,7 +41,7 @@
 #define STRUCT_VALUE_ADDRESS_WITH_ARG 0
 #endif
 
-/* If the structure has essentialy an unique element, return its type.  */
+/* If the structure has essentially an unique element, return its type.  */
 static int
 simple_type (ffi_type *arg)
 {
index a186e1f..d1f82cb 100644 (file)
@@ -60,7 +60,7 @@
                        void (*fnaddr)(void));
 
         On entry, REG_ARGS contain the outgoing register values,
-        and STACK_ARGS containts STACK_ARG_BYTES of additional values
+        and STACK_ARGS contains STACK_ARG_BYTES of additional values
         to be passed on the stack. If STACK_ARG_BYTES is zero, then
         STACK_ARGS is ignored.
 
diff --git a/src/vax/elfbsd.S b/src/vax/elfbsd.S
new file mode 100644 (file)
index 0000000..01ca313
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2013 Miodrag Vallat.  <miod@openbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * ``Software''), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * vax Foreign Function Interface
+ */
+
+#define LIBFFI_ASM     
+#include <fficonfig.h>
+#include <ffi.h>
+
+       .text
+
+/*
+ * void *                                      %r0
+ * ffi_call_elfbsd(extended_cif *ecif,         4(%ap)
+ *                unsigned bytes,              8(%ap)
+ *                unsigned flags,              12(%ap)
+ *                void *rvalue,                16(%ap)
+ *                void (*fn)());               20(%ap)
+ */
+       .globl  ffi_call_elfbsd
+       .type   ffi_call_elfbsd,@function
+       .align  2
+ffi_call_elfbsd:
+       .word   0x00c           # save R2 and R3
+
+       # Allocate stack space for the args
+       subl2   8(%ap), %sp
+
+       # Call ffi_prep_args
+       pushl   %sp
+       pushl   4(%ap)
+       calls   $2, ffi_prep_args
+
+       # Get function pointer
+       movl    20(%ap), %r1
+
+       # Build a CALLS frame
+       ashl    $-2, 8(%ap), %r0
+       pushl   %r0             # argument stack usage
+       movl    %sp, %r0        # future %ap
+       # saved registers
+       bbc     $11, 0(%r1), 1f
+       pushl   %r11
+1:     bbc     $10, 0(%r1), 1f
+       pushl   %r10
+1:     bbc     $9, 0(%r1), 1f
+       pushl   %r9
+1:     bbc     $8, 0(%r1), 1f
+       pushl   %r8
+1:     bbc     $7, 0(%r1), 1f
+       pushl   %r7
+1:     bbc     $6, 0(%r1), 1f
+       pushl   %r6
+1:     bbc     $5, 0(%r1), 1f
+       pushl   %r5
+1:     bbc     $4, 0(%r1), 1f
+       pushl   %r4
+1:     bbc     $3, 0(%r1), 1f
+       pushl   %r3
+1:     bbc     $2, 0(%r1), 1f
+       pushl   %r2
+1:     
+       pushal  9f
+       pushl   %fp
+       pushl   %ap
+       movl    16(%ap), %r3    # struct return address, if needed
+       movl    %r0, %ap
+       movzwl  4(%fp), %r0     # previous PSW, without the saved registers mask
+       bisl2   $0x20000000, %r0 # calls frame
+       movzwl  0(%r1), %r2
+       bicw2   $0xf003, %r2    # only keep R11-R2
+       ashl    $16, %r2, %r2
+       bisl2   %r2, %r0        # saved register mask of the called function
+       pushl   %r0     
+       pushl   $0
+       movl    %sp, %fp
+
+       # Invoke the function
+       pushal  2(%r1)          # skip procedure entry mask
+       movl    %r3, %r1
+       bicpsw  $0x000f
+       rsb
+
+9:
+       # Copy return value if necessary
+       tstl    16(%ap)
+       jeql    9f
+       movl    16(%ap), %r2
+
+       bbc     $0, 12(%ap), 1f # CIF_FLAGS_CHAR
+       movb    %r0, 0(%r2)
+       brb     9f
+1:
+       bbc     $1, 12(%ap), 1f # CIF_FLAGS_SHORT
+       movw    %r0, 0(%r2)
+       brb     9f
+1:
+       bbc     $2, 12(%ap), 1f # CIF_FLAGS_INT
+       movl    %r0, 0(%r2)
+       brb     9f
+1:
+       bbc     $3, 12(%ap), 1f # CIF_FLAGS_DINT
+       movq    %r0, 0(%r2)
+       brb     9f
+1:
+       movl    %r1, %r0        # might have been a struct
+       #brb    9f
+
+9:
+       ret
+
+/*
+ * ffi_closure_elfbsd(void);
+ * invoked with        %r0: ffi_closure *closure
+ */
+       .globl  ffi_closure_elfbsd
+       .type   ffi_closure_elfbsd, @function
+       .align  2
+ffi_closure_elfbsd:
+       .word   0
+
+       # Allocate room on stack for return value
+       subl2   $8, %sp
+
+       # Invoke the closure function
+       pushal  4(%ap)          # calling stack
+       pushal  4(%sp)          # return value
+       pushl   %r0             # closure
+       calls   $3, ffi_closure_elfbsd_inner
+
+       # Copy return value if necessary
+       bitb    $1, %r0         # CIF_FLAGS_CHAR
+       beql    1f
+       movb    0(%sp), %r0
+       brb     9f
+1:
+       bitb    $2, %r0         # CIF_FLAGS_SHORT
+       beql    1f
+       movw    0(%sp), %r0
+       brb     9f
+1:
+       bitb    $4, %r0         # CIF_FLAGS_INT
+       beql    1f
+       movl    0(%sp), %r0
+       brb     9f
+1:
+       bitb    $8, %r0         # CIF_FLAGS_DINT
+       beql    1f
+       movq    0(%sp), %r0
+       #brb    9f
+1:
+
+9:
+       ret
+
+/*
+ * ffi_closure_struct_elfbsd(void);
+ * invoked with        %r0: ffi_closure *closure
+ *             %r1: struct return address
+ */
+       .globl  ffi_closure_struct_elfbsd
+       .type   ffi_closure_struct_elfbsd, @function
+       .align  2
+ffi_closure_struct_elfbsd:
+       .word   0
+
+       # Invoke the closure function
+       pushal  4(%ap)          # calling stack
+       pushl   %r1             # return value
+       pushl   %r0             # closure
+       calls   $3, ffi_closure_elfbsd_inner
+
+       ret
diff --git a/src/vax/ffi.c b/src/vax/ffi.c
new file mode 100644 (file)
index 0000000..f4d6bbb
--- /dev/null
@@ -0,0 +1,276 @@
+/*
+ * Copyright (c) 2013 Miodrag Vallat.  <miod@openbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * ``Software''), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * vax Foreign Function Interface
+ *
+ * This file attempts to provide all the FFI entry points which can reliably
+ * be implemented in C.
+ */
+
+#include <ffi.h>
+#include <ffi_common.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#define CIF_FLAGS_CHAR         1       /* for struct only */
+#define CIF_FLAGS_SHORT                2       /* for struct only */
+#define CIF_FLAGS_INT          4
+#define CIF_FLAGS_DINT         8
+
+/*
+ * Foreign Function Interface API
+ */
+
+void ffi_call_elfbsd (extended_cif *, unsigned, unsigned, void *,
+                      void (*) ());
+void *ffi_prep_args (extended_cif *ecif, void *stack);
+
+void *
+ffi_prep_args (extended_cif *ecif, void *stack)
+{
+  unsigned int i;
+  void **p_argv;
+  char *argp;
+  ffi_type **p_arg;
+  void *struct_value_ptr;
+
+  argp = stack;
+
+  if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
+      && !ecif->cif->flags)
+    struct_value_ptr = ecif->rvalue;
+  else
+    struct_value_ptr = NULL;
+
+  p_argv = ecif->avalue;
+
+  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
+       i != 0;
+       i--, p_arg++)
+    {
+      size_t z;
+
+      z = (*p_arg)->size;
+      if (z < sizeof (int))
+       {
+         switch ((*p_arg)->type)
+           {
+           case FFI_TYPE_SINT8:
+             *(signed int *) argp = (signed int) *(SINT8 *) *p_argv;
+             break;
+
+           case FFI_TYPE_UINT8:
+             *(unsigned int *) argp = (unsigned int) *(UINT8 *) *p_argv;
+             break;
+
+           case FFI_TYPE_SINT16:
+             *(signed int *) argp = (signed int) *(SINT16 *) *p_argv;
+             break;
+
+           case FFI_TYPE_UINT16:
+             *(unsigned int *) argp = (unsigned int) *(UINT16 *) *p_argv;
+             break;
+
+           case FFI_TYPE_STRUCT:
+             memcpy (argp, *p_argv, z);
+             break;
+
+           default:
+             FFI_ASSERT (0);
+           }
+         z = sizeof (int);
+       }
+      else
+       {
+         memcpy (argp, *p_argv, z);
+
+         /* Align if necessary.  */
+         if ((sizeof(int) - 1) & z)
+           z = ALIGN(z, sizeof(int));
+       }
+
+      p_argv++;
+      argp += z;
+    }
+
+  return struct_value_ptr;
+}
+
+ffi_status
+ffi_prep_cif_machdep (ffi_cif *cif)
+{
+  /* Set the return type flag */
+  switch (cif->rtype->type)
+    {
+    case FFI_TYPE_VOID:
+      cif->flags = 0;
+      break;
+
+    case FFI_TYPE_STRUCT:
+      if (cif->rtype->elements[0]->type == FFI_TYPE_STRUCT &&
+         cif->rtype->elements[1])
+       {
+         cif->flags = 0;
+         break;
+       }
+
+      if (cif->rtype->size == sizeof (char))
+       cif->flags = CIF_FLAGS_CHAR;
+      else if (cif->rtype->size == sizeof (short))
+       cif->flags = CIF_FLAGS_SHORT;
+      else if (cif->rtype->size == sizeof (int))
+       cif->flags = CIF_FLAGS_INT;
+      else if (cif->rtype->size == 2 * sizeof (int))
+       cif->flags = CIF_FLAGS_DINT;
+      else
+       cif->flags = 0;
+      break;
+
+    default:
+      if (cif->rtype->size <= sizeof (int))
+       cif->flags = CIF_FLAGS_INT;
+      else
+       cif->flags = CIF_FLAGS_DINT;
+      break;
+    }
+
+  return FFI_OK;
+}
+
+void
+ffi_call (ffi_cif *cif, void (*fn) (), void *rvalue, void **avalue)
+{
+  extended_cif ecif;
+
+  ecif.cif = cif;
+  ecif.avalue = avalue;
+
+  /* If the return value is a struct and we don't have a return value
+     address then we need to make one.  */
+
+  if (rvalue == NULL
+      && cif->rtype->type == FFI_TYPE_STRUCT
+      && cif->flags == 0)
+    ecif.rvalue = alloca (cif->rtype->size);
+  else
+    ecif.rvalue = rvalue;
+
+  switch (cif->abi)
+    {
+    case FFI_ELFBSD:
+      ffi_call_elfbsd (&ecif, cif->bytes, cif->flags, ecif.rvalue, fn);
+      break;
+
+    default:
+      FFI_ASSERT (0);
+      break;
+    }
+}
+
+/*
+ * Closure API
+ */
+
+void ffi_closure_elfbsd (void);
+void ffi_closure_struct_elfbsd (void);
+unsigned int ffi_closure_elfbsd_inner (ffi_closure *, void *, char *);
+
+static void
+ffi_prep_closure_elfbsd (ffi_cif *cif, void **avalue, char *stackp)
+{
+  unsigned int i;
+  void **p_argv;
+  ffi_type **p_arg;
+
+  p_argv = avalue;
+
+  for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)
+    {
+      size_t z;
+
+      z = (*p_arg)->size;
+      *p_argv = stackp;
+
+      /* Align if necessary */
+      if ((sizeof (int) - 1) & z)
+       z = ALIGN(z, sizeof (int));
+
+      p_argv++;
+      stackp += z;
+    }
+}
+
+unsigned int
+ffi_closure_elfbsd_inner (ffi_closure *closure, void *resp, char *stack)
+{
+  ffi_cif *cif;
+  void **arg_area;
+
+  cif = closure->cif;
+  arg_area = (void **) alloca (cif->nargs * sizeof (void *));
+
+  ffi_prep_closure_elfbsd (cif, arg_area, stack);
+
+  (closure->fun) (cif, resp, arg_area, closure->user_data);
+
+  return cif->flags;
+}
+
+ffi_status
+ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif,
+                     void (*fun)(ffi_cif *, void *, void **, void *),
+                     void *user_data, void *codeloc)
+{
+  char *tramp = (char *) codeloc;
+  void *fn;
+
+  FFI_ASSERT (cif->abi == FFI_ELFBSD);
+
+  /* entry mask */
+  *(unsigned short *)(tramp + 0) = 0x0000;
+  /* movl #closure, r0 */
+  tramp[2] = 0xd0;
+  tramp[3] = 0x8f;
+  *(unsigned int *)(tramp + 4) = (unsigned int) closure;
+  tramp[8] = 0x50;
+
+  if (cif->rtype->type == FFI_TYPE_STRUCT
+      && !cif->flags)
+    fn = &ffi_closure_struct_elfbsd;
+  else
+    fn = &ffi_closure_elfbsd;
+
+  /* jmpl #fn */
+  tramp[9] = 0x17;
+  tramp[10] = 0xef;
+  *(unsigned int *)(tramp + 11) = (unsigned int)fn + 2 -
+                                 (unsigned int)tramp - 9 - 6;
+
+  closure->cif = cif;
+  closure->user_data = user_data;
+  closure->fun = fun;
+
+  return FFI_OK;
+}
diff --git a/src/vax/ffitarget.h b/src/vax/ffitarget.h
new file mode 100644 (file)
index 0000000..2fc9488
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2013 Miodrag Vallat.  <miod@openbsd.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * ``Software''), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * vax Foreign Function Interface
+ */
+
+#ifndef LIBFFI_TARGET_H
+#define LIBFFI_TARGET_H
+
+#ifndef LIBFFI_ASM
+typedef unsigned long ffi_arg;
+typedef signed long ffi_sarg;
+
+typedef enum ffi_abi {
+  FFI_FIRST_ABI = 0,
+  FFI_ELFBSD,
+  FFI_DEFAULT_ABI = FFI_ELFBSD,
+  FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
+} ffi_abi;
+#endif
+
+/* ---- Definitions for closures ----------------------------------------- */
+
+#define FFI_CLOSURES 1
+#define FFI_TRAMPOLINE_SIZE 15
+#define FFI_NATIVE_RAW_API 0
+
+#endif
index 0600414..307cd19 100644 (file)
@@ -315,7 +315,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
   cif->bytes += 4 * sizeof(ffi_arg);
 #endif
 
+#ifndef X86_WIN32
   cif->bytes = (cif->bytes + 15) & ~0xF;
+#endif
 
   return FFI_OK;
 }
index a3ba066..3afacd2 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__make_dryrun = \
-  { \
-    am__dry=no; \
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
     case $$MAKEFLAGS in \
       *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
     esac; \
-    test $$am__dry = yes; \
-  }
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -51,7 +79,7 @@ build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
 subdir = testsuite
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
        $(top_srcdir)/m4/ax_append_flag.m4 \
@@ -73,6 +101,18 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/fficonfig.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
 SOURCES =
 DIST_SOURCES =
 am__can_run_installinfo = \
@@ -80,12 +120,14 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DEJATOOL = $(PACKAGE)
 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AM_LTLDFLAGS = @AM_LTLDFLAGS@
 AM_RUNTESTFLAGS = 
 AR = @AR@
@@ -343,11 +385,9 @@ mostlyclean-libtool:
 
 clean-libtool:
        -rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
 
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
 
 cscope cscopelist:
 
@@ -355,13 +395,12 @@ cscope cscopelist:
 check-DEJAGNU: site.exp
        srcdir='$(srcdir)'; export srcdir; \
        EXPECT=$(EXPECT); export EXPECT; \
-       runtest=$(RUNTEST); \
-       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+       if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
          exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
-           if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+           if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
            then :; else exit_status=1; fi; \
          done; \
-       else echo "WARNING: could not find 'runtest'" 1>&2; :;\
+       else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
        fi; \
        exit $$exit_status
 site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
@@ -532,16 +571,17 @@ uninstall-am:
 .MAKE: check-am install-am install-strip
 
 .PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
-       clean-libtool distclean distclean-DEJAGNU distclean-generic \
-       distclean-libtool distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       uninstall uninstall-am
+       clean-libtool cscopelist-am ctags-am distclean \
+       distclean-DEJAGNU distclean-generic distclean-libtool distdir \
+       dvi dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+       uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
index fc75b1d..18cdfcc 100644 (file)
@@ -15,7 +15,7 @@ static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
                              void* userdata __UNUSED__)
 {
   int i;
-  double r;
+  double r = 0;
   double t;
   for(i = 0; i < NARGS; i++)
     {
index 67a367f..11818e6 100644 (file)
@@ -32,7 +32,7 @@ static float many(float f1,
         (double) f11, (double) f12, (double) f13);
 #endif
 
-  return ((f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12) * f13);
+  return f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12+f13;
 }
 
 int main (void)
index fce6948..3510493 100644 (file)
@@ -1,7 +1,7 @@
 /* Area:       ffi_call, closure_call
    Purpose:    Check parameter passing with nested structs
                of a single type.  This tests the special cases
-               for homogenous floating-point aggregates in the
+               for homogeneous floating-point aggregates in the
                AArch64 PCS.
    Limitations:        none.
    PR:         none.
index a5a7b2b..85f184c 100644 (file)
@@ -3,11 +3,11 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2012-06-05.14}
+\def\texinfoversion{2013-02-01.11}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -24,7 +24,8 @@
 %
 % As a special exception, when this file is read by TeX when processing
 % a Texinfo source document, you may use the result without
-% restriction.  (This has been our intent since Texinfo was invented.)
+% restriction. This Exception is an additional permission under section 7
+% of the GNU General Public License, version 3 ("GPLv3").
 %
 % Please try the latest version of texinfo.tex before submitting bug
 % reports; you can get the latest version from:
 \def\:{\spacefactor=1000 }
 
 % @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
+\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
 
 % @/ allows a line break.
 \let\/=\allowbreak
@@ -2272,8 +2273,6 @@ end
 
 \gdef\markupsetcodequoteleft{\let`\codequoteleft}
 \gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
 }
 
 \let\markupsetuplqcode \markupsetcodequoteleft
@@ -2282,6 +2281,9 @@ end
 \let\markupsetuplqexample \markupsetcodequoteleft
 \let\markupsetuprqexample \markupsetcodequoteright
 %
+\let\markupsetuplqkbd     \markupsetcodequoteleft
+\let\markupsetuprqkbd     \markupsetcodequoteright
+%
 \let\markupsetuplqsamp \markupsetcodequoteleft
 \let\markupsetuprqsamp \markupsetcodequoteright
 %
@@ -2291,8 +2293,6 @@ end
 \let\markupsetuplqverbatim \markupsetcodequoteleft
 \let\markupsetuprqverbatim \markupsetcodequoteright
 
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
 % Allow an option to not use regular directed right quote/apostrophe
 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
 % The undirected quote is ugly, so don't make it the default, but it
@@ -2382,8 +2382,7 @@ end
   \aftersmartic
 }
 
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
-% @var is set to this for defun arguments.
+% Unconditional use \ttsl, and no ic.  @var is set to this for defuns.
 \def\ttslanted#1{{\ttsl #1}}
 
 % @cite is like \smartslanted except unconditionally use \sl.  We never want
@@ -2448,34 +2447,12 @@ end
 % @samp.
 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
 
-% definition of @key that produces a lozenge.  Doesn't adjust to text size.
-%\setfont\keyrm\rmshape{8}{1000}{OT1}
-%\font\keysy=cmsy9
-%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-%    \vbox{\hrule\kern-0.4pt
-%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-%    \kern-0.4pt\hrule}%
-%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-
-% definition of @key with no lozenge.  If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle.  But
-% if it isn't monospace, then use \tt.
-%
-\def\key#1{{\setupmarkupstyle{key}%
-  \nohyphenation
-  \ifmonospace\else\tt\fi
-  #1}\null}
-
-% ctrl is no longer a Texinfo command.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
 
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
 \def\tclose#1{%
   {%
     % Change normal interword space to be same as for the current font.
@@ -2500,7 +2477,7 @@ end
 % We *must* turn on hyphenation at `-' and `_' in @code.
 % Otherwise, it is too hard to avoid overfull hboxes
 % in the Emacs manual, the Library manual, etc.
-
+%
 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
 % both hyphenation at - and hyphenation within words.
 % We must therefore turn them both off (\tclose does that)
@@ -2519,7 +2496,7 @@ end
      \let-\codedash
      \let_\codeunder
     \else
-     \let-\realdash
+     \let-\normaldash
      \let_\realunder
     \fi
     \codex
@@ -2528,7 +2505,7 @@ end
 
 \def\codex #1{\tclose{#1}\endgroup}
 
-\def\realdash{-}
+\def\normaldash{-}
 \def\codedash{-\discretionary{}{}{}}
 \def\codeunder{%
   % this is all so @math{@code{var_name}+1} can work.  In math mode, _
@@ -2543,9 +2520,9 @@ end
 }
 
 % An additional complication: the above will allow breaks after, e.g.,
-% each of the four underscores in __typeof__.  This is undesirable in
-% some manuals, especially if they don't have long identifiers in
-% general.  @allowcodebreaks provides a way to control this.
+% each of the four underscores in __typeof__.  This is bad.
+% @allowcodebreaks provides a document-level way to turn breaking at -
+% and _ on and off.
 %
 \newif\ifallowcodebreaks  \allowcodebreakstrue
 
@@ -2564,6 +2541,13 @@ end
   \fi\fi
 }
 
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
+\let\command=\code
+\let\env=\code
+\let\file=\code
+\let\option=\code
+
 % @uref (abbreviation for `urlref') takes an optional (comma-separated)
 % second argument specifying the text to display and an optional third
 % arg as text to display instead of (rather than in addition to) the url
@@ -2710,10 +2694,6 @@ end
   \let\email=\uref
 \fi
 
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
 %   `example' (@kbd uses ttsl only inside of @example and friends),
 %   or `code' (@kbd uses normal tty font always).
@@ -2737,16 +2717,36 @@ end
 % Default is `distinct'.
 \kbdinputstyle distinct
 
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
 \def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+\def\kbdsub#1#2#3\par{%
+  \def\one{#1}\def\three{#3}\def\threex{??}%
+  \ifx\one\xkey\ifx\threex\three \key{#2}%
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
 
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
+% definition of @key that produces a lozenge.  Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+%    \vbox{\hrule\kern-0.4pt
+%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+%    \kern-0.4pt\hrule}%
+%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge.  If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle.  But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+  \nohyphenation
+  \ifmonospace\else\tt\fi
+  #1}\null}
 
 % @clicksequence{File @click{} Open ...}
 \def\clicksequence#1{\begingroup #1\endgroup}
@@ -2854,6 +2854,9 @@ end
   }
 }
 
+% ctrl is no longer a Texinfo command, but leave this definition for fun.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
 % except specified as a normal braced arg, so no newlines to worry about.
@@ -3144,12 +3147,17 @@ end
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifx\curfontstyle\bfstylename
-    % bold:
-    \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+  \ifmonospace
+    % typewriter:
+    \font\thisecfont = ectt\ecsize \space at \nominalsize
   \else
-    % regular:
-    \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \ifx\curfontstyle\bfstylename
+      % bold:
+      \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+    \else
+      % regular:
+      \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \fi
   \fi
   \thisecfont
 }
@@ -3262,6 +3270,20 @@ end
   \finishedtitlepagetrue
 }
 
+% Settings used for typesetting titles: no hyphenation, no indentation,
+% don't worry much about spacing, ragged right.  This should be used
+% inside a \vbox, and fonts need to be set appropriately first.  Because
+% it is always used for titles, nothing else, we call \rmisbold.  \par
+% should be specified before the end of the \vbox, since a vbox is a group.
+% 
+\def\raggedtitlesettings{%
+  \rmisbold
+  \hyphenpenalty=10000
+  \parindent=0pt
+  \tolerance=5000
+  \ptexraggedright
+}
+
 % Macros to be used within @titlepage:
 
 \let\subtitlerm=\tenrm
@@ -3269,7 +3291,7 @@ end
 
 \parseargdef\title{%
   \checkenv\titlepage
-  \leftline{\titlefonts\rmisbold #1}
+  \vbox{\titlefonts \raggedtitlesettings #1\par}%
   % print a rule at the page bottom also.
   \finishedtitlepagefalse
   \vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -4166,7 +4188,7 @@ end
     % ..., but we might end up with active ones in the argument if
     % we're called from @code, as @code{@value{foo-bar_}}, though.
     % So \let them to their normal equivalents.
-    \let-\realdash \let_\normalunderscore
+    \let-\normaldash \let_\normalunderscore
   }
 }
 
@@ -4206,7 +4228,7 @@ end
 }
 \def\ifsetfail{\doignore{ifset}}
 
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% @ifclear VAR ... @end executes the `...' iff VAR has never been
 % defined with @set, or has been undefined with @clear.
 %
 % The `\else' inside the `\doifset' parameter is a trick to reuse the
@@ -4217,6 +4239,35 @@ end
 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
 \def\ifclearfail{\doignore{ifclear}}
 
+% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
+% without the @) is in fact defined.  We can only feasibly check at the
+% TeX level, so something like `mathcode' is going to considered
+% defined even though it is not a Texinfo command.
+% 
+\makecond{ifcommanddefined}
+\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
+%
+\def\doifcmddefined#1#2{{%
+    \makevalueexpandable
+    \let\next=\empty
+    \expandafter\ifx\csname #2\endcsname\relax
+      #1% If not defined, \let\next as above.
+    \fi
+    \expandafter
+  }\next
+}
+\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
+
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
+\makecond{ifcommandnotdefined}
+\def\ifcommandnotdefined{%
+  \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
+\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
+
+% Set the `txicommandconditionals' variable, so documents have a way to
+% test if the @ifcommand...defined conditionals are available.
+\set txicommandconditionals
+
 % @dircategory CATEGORY  -- specify a category of the dir file
 % which this file should belong to.  Ignore this in TeX.
 \let\dircategory=\comment
@@ -5543,14 +5594,6 @@ end
 
 % Define @majorheading, @heading and @subheading
 
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-%       1) We use \vbox rather than the earlier \line to permit
-%          overlong headings to fold.
-%       2) \hyphenpenalty is set to 10000 because hyphenation in a
-%          heading is obnoxious; this forbids it.
-%       3) Likewise, headings look best if no \parindent is used, and
-%          if justification is not attempted.  Hence \raggedright.
-
 \def\majorheading{%
   {\advance\chapheadingskip by 10pt \chapbreak }%
   \parsearg\chapheadingzzz
@@ -5558,10 +5601,8 @@ end
 
 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
 \def\chapheadingzzz#1{%
-  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                    \parindent=0pt\ptexraggedright
-                    \rmisbold #1\hfill}}%
-  \bigskip \par\penalty 200\relax
+  \vbox{\chapfonts \raggedtitlesettings #1\par}%
+  \nobreak\bigskip \nobreak
   \suppressfirstparagraphindent
 }
 
@@ -5720,8 +5761,7 @@ end
     %
     % Typeset the actual heading.
     \nobreak % Avoid page breaks at the interline glue.
-    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
-          \hangindent=\wd0 \centerparametersmaybe
+    \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
           \unhbox0 #1\par}%
   }%
   \nobreak\bigskip % no page break after a chapter title
@@ -5743,18 +5783,18 @@ end
 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
 %
 \def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt\ptexraggedright
-                       \rmisbold #1\hfill}}\bigskip \par\nobreak
+  \chapoddpage
+  \vbox{\chapfonts \raggedtitlesettings #1\par}%
+  \nobreak\bigskip\nobreak
 }
 \def\chfopen #1#2{\chapoddpage {\chapfonts
 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
 \par\penalty 5000 %
 }
 \def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt
-                       \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
+  \chapoddpage
+  \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
+  \nobreak\bigskip \nobreak
 }
 \def\CHAPFopen{%
   \global\let\chapmacro=\chfopen
@@ -6520,16 +6560,9 @@ end
 \makedispenvdef{quotation}{\quotationstart}
 %
 \def\quotationstart{%
-  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
-  \parindent=0pt
-  %
-  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \indentedblockstart % same as \indentedblock, but increase right margin too.
   \ifx\nonarrowing\relax
-    \advance\leftskip by \lispnarrowing
     \advance\rightskip by \lispnarrowing
-    \exdentamount = \lispnarrowing
-  \else
-    \let\nonarrowing = \relax
   \fi
   \parsearg\quotationlabel
 }
@@ -6555,6 +6588,32 @@ end
   \fi
 }
 
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+% 
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+  {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+  \parindent=0pt
+  %
+  % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+  \ifx\nonarrowing\relax
+    \advance\leftskip by \lispnarrowing
+    \exdentamount = \lispnarrowing
+  \else
+    \let\nonarrowing = \relax
+  \fi
+}
+
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+  \par
+  {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallindentedblock{\Eindentedblock}
+
 
 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
 % If we want to allow any <char> as delimiter,
@@ -7033,7 +7092,10 @@ end
   \df \sl \hyphenchar\font=0
   %
   % On the other hand, if an argument has two dashes (for instance), we
-  % want a way to get ttsl.  Let's try @var for that.
+  % want a way to get ttsl.  We used to recommend @var for that, so
+  % leave the code in, but it's strange for @var to lead to typewriter.
+  % Nowadays we recommend @code, since the difference between a ttsl hyphen
+  % and a tt hyphen is pretty tiny.  @code also disables ?` !`.
   \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
@@ -9931,22 +9993,26 @@ directory should work if nowhere else does.}
 @gdef@otherbackslash{@let\=@realbackslash}
 
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-%
-@def@normalturnoffactive{%
-  @let"=@normaldoublequote
-  @let$=@normaldollar %$ font-lock fix
-  @let+=@normalplus
-  @let<=@normalless
-  @let>=@normalgreater
-  @let\=@normalbackslash
-  @let^=@normalcaret
-  @let_=@normalunderscore
-  @let|=@normalverticalbar
-  @let~=@normaltilde
-  @markupsetuplqdefault
-  @markupsetuprqdefault
-  @unsepspaces
+% the literal character `\'.  Also revert - to its normal character, in
+% case the active - from code has slipped in.
+%
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+   @let-=@normaldash
+   @let"=@normaldoublequote
+   @let$=@normaldollar %$ font-lock fix
+   @let+=@normalplus
+   @let<=@normalless
+   @let>=@normalgreater
+   @let\=@normalbackslash
+   @let^=@normalcaret
+   @let_=@normalunderscore
+   @let|=@normalverticalbar
+   @let~=@normaltilde
+   @markupsetuplqdefault
+   @markupsetuprqdefault
+   @unsepspaces
+ }
 }
 
 % Make _ and + \other characters, temporarily.