* aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt.
* mdate-sh, texinfo.tex: New files. * Makefile.am (info_TEXINFOS): New variable. * doc/libffi.texi: New file. * doc/version.texi: Likewise.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2008-02-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt.
|
||||
* mdate-sh, texinfo.tex: New files.
|
||||
* Makefile.am (info_TEXINFOS): New variable.
|
||||
* doc/libffi.texi: New file.
|
||||
* doc/version.texi: Likewise.
|
||||
|
||||
2008-01-24 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
@@ -31,6 +31,8 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \
|
||||
libtool-version ChangeLog.libffi
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
## ################################################################
|
||||
|
||||
##
|
||||
|
||||
@@ -58,11 +58,12 @@ target_triplet = @target@
|
||||
@PA_HPUX_TRUE@am__append_22 = src/pa/hpux32.S src/pa/ffi.c
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/fficonfig.h.in \
|
||||
$(srcdir)/libffi.pc.in $(top_srcdir)/configure ChangeLog TODO \
|
||||
$(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 ltcf-c.sh \
|
||||
ltcf-cxx.sh ltcf-gcj.sh ltconfig ltmain.sh missing \
|
||||
mkinstalldirs
|
||||
ltcf-cxx.sh ltcf-gcj.sh ltconfig ltmain.sh mdate-sh missing \
|
||||
mkinstalldirs texinfo.tex
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
@@ -79,7 +80,8 @@ am__vpath_adj = case $$p in \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(infodir)" \
|
||||
"$(DESTDIR)$(pkgconfigdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
|
||||
libffi_la_LIBADD =
|
||||
@@ -170,6 +172,18 @@ 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)
|
||||
INFO_DEPS = $(srcdir)/doc/libffi.info
|
||||
am__TEXINFO_TEX_DIR = $(srcdir)
|
||||
DVIS = doc/libffi.dvi
|
||||
PDFS = doc/libffi.pdf
|
||||
PSS = doc/libffi.ps
|
||||
HTMLS = doc/libffi.html
|
||||
TEXINFOS = doc/libffi.texi
|
||||
TEXI2DVI = texi2dvi
|
||||
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 \
|
||||
@@ -345,6 +359,7 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
|
||||
src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \
|
||||
libtool-version ChangeLog.libffi
|
||||
|
||||
info_TEXINFOS = doc/libffi.texi
|
||||
|
||||
# Work around what appears to be a GNU make bug handling MAKEFLAGS
|
||||
# values defined in terms of make variables, as is the case for CC and
|
||||
@@ -409,7 +424,7 @@ all: fficonfig.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .obj
|
||||
.SUFFIXES: .S .c .dvi .lo .o .obj .ps
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@@ -930,6 +945,163 @@ clean-libtool:
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
doc/$(am__dirstamp):
|
||||
@$(MKDIR_P) doc
|
||||
@: > doc/$(am__dirstamp)
|
||||
|
||||
$(srcdir)/doc/libffi.info: doc/libffi.texi $(srcdir)/doc/version.texi
|
||||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
am__cwd=`pwd` && cd $(srcdir) && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||
done; \
|
||||
else :; fi && \
|
||||
cd "$$am__cwd"; \
|
||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
|
||||
-o $@ $(srcdir)/doc/libffi.texi; \
|
||||
then \
|
||||
rc=0; \
|
||||
cd $(srcdir); \
|
||||
else \
|
||||
rc=$$?; \
|
||||
cd $(srcdir) && \
|
||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||
fi; \
|
||||
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" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
|
||||
$(TEXI2DVI) -o $@ `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" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \
|
||||
$(TEXI2PDF) -o $@ `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 \
|
||||
-o $(@:.html=.htp) `test -f 'doc/libffi.texi' || echo '$(srcdir)/'`doc/libffi.texi; \
|
||||
then \
|
||||
rm -rf $@; \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||
else \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(srcdir)/doc/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/doc/stamp-vti
|
||||
$(srcdir)/doc/stamp-vti: doc/libffi.texi $(top_srcdir)/configure
|
||||
test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
|
||||
@(dir=.; test -f ./doc/libffi.texi || dir=$(srcdir); \
|
||||
set `$(SHELL) $(srcdir)/mdate-sh $$dir/doc/libffi.texi`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
echo "@set VERSION $(VERSION)") > vti.tmp
|
||||
@cmp -s vti.tmp $(srcdir)/doc/version.texi \
|
||||
|| (echo "Updating $(srcdir)/doc/version.texi"; \
|
||||
cp vti.tmp $(srcdir)/doc/version.texi)
|
||||
-@rm -f vti.tmp
|
||||
@cp $(srcdir)/doc/version.texi $@
|
||||
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp
|
||||
|
||||
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 $@ $<
|
||||
|
||||
uninstall-dvi-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(DVIS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-html-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(HTMLS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-info-am:
|
||||
@$(PRE_UNINSTALL)
|
||||
@if test -d '$(DESTDIR)$(infodir)' && \
|
||||
(install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
|
||||
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
uninstall-pdf-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-ps-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PSS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(psdir)/$$f"; \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
case $$base in \
|
||||
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
|
||||
if test -f $$file; then \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f $(distdir)/$$relfile || \
|
||||
cp -p $$file $(distdir)/$$relfile; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
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 \
|
||||
doc/libffi.dvi doc/libffi.pdf doc/libffi.ps doc/libffi.html
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
|
||||
@@ -1124,6 +1296,9 @@ distdir: $(DISTFILES)
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
@@ -1223,10 +1398,10 @@ distcleancheck: distclean
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(LTLIBRARIES) $(DATA) fficonfig.h
|
||||
all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(DATA) fficonfig.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
@@ -1249,6 +1424,7 @@ clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-rm -f doc/$(am__dirstamp)
|
||||
-rm -f src/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f src/$(am__dirstamp)
|
||||
-rm -f src/alpha/$(DEPDIR)/$(am__dirstamp)
|
||||
@@ -1299,26 +1475,101 @@ distclean-am: clean-am distclean-compile distclean-generic \
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-pkgconfigDATA
|
||||
install-data-am: install-info-am install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am: $(DVIS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
|
||||
@list='$(DVIS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
|
||||
done
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html-am: $(HTMLS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
|
||||
@list='$(HTMLS)'; for p in $$list; do \
|
||||
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
if test -d "$$d$$p"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
|
||||
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
else \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
fi; \
|
||||
done
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||
if test -f $$ifile; then \
|
||||
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
|
||||
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man:
|
||||
|
||||
install-pdf-am: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am: $(PSS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
|
||||
@list='$(PSS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \
|
||||
done
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
@@ -1326,22 +1577,25 @@ maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf src/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/x86/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-vti
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
|
||||
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES uninstall-pdf-am \
|
||||
uninstall-pkgconfigDATA uninstall-ps-am
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
@@ -1350,7 +1604,7 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
dist-info dist-shar dist-tarZ 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 \
|
||||
@@ -1360,10 +1614,13 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
|
||||
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
|
||||
install-pkgconfigDATA install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
|
||||
maintainer-clean maintainer-clean-aminfo \
|
||||
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 \
|
||||
uninstall-html-am uninstall-info-am uninstall-libLTLIBRARIES \
|
||||
uninstall-pdf-am uninstall-pkgconfigDATA uninstall-ps-am
|
||||
|
||||
|
||||
# No install-html or install-pdf support in automake yet
|
||||
|
||||
541
libffi/doc/libffi.texi
Normal file
541
libffi/doc/libffi.texi
Normal file
@@ -0,0 +1,541 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename libffi.info
|
||||
@settitle libffi
|
||||
@setchapternewpage off
|
||||
@c %**end of header
|
||||
|
||||
@c Merge the standard indexes into a single one.
|
||||
@syncodeindex fn cp
|
||||
@syncodeindex vr cp
|
||||
@syncodeindex ky cp
|
||||
@syncodeindex pg cp
|
||||
@syncodeindex tp cp
|
||||
|
||||
@include version.texi
|
||||
|
||||
@copying
|
||||
|
||||
This manual is for Libffi, a portable foreign-function interface
|
||||
library.
|
||||
|
||||
Copyright @copyright{} 2008 Red Hat, Inc.
|
||||
|
||||
@quotation
|
||||
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''.
|
||||
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory
|
||||
@direntry
|
||||
* libffi: (libffi). Portable foreign-function interface library.
|
||||
@end direntry
|
||||
|
||||
@titlepage
|
||||
@title Libffi
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
|
||||
@ifnottex
|
||||
@node Top
|
||||
@top libffi
|
||||
|
||||
@insertcopying
|
||||
|
||||
@menu
|
||||
* Introduction:: What is libffi?
|
||||
* Using libffi:: How to use libffi.
|
||||
* Missing Features:: Things libffi can't do.
|
||||
* Index:: Index.
|
||||
@end menu
|
||||
|
||||
@end ifnottex
|
||||
|
||||
|
||||
@node Introduction
|
||||
@chapter What is libffi?
|
||||
|
||||
Compilers for high level languages generate code that follow certain
|
||||
conventions. These conventions are necessary, in part, for separate
|
||||
compilation to work. One such convention is the @dfn{calling
|
||||
convention}. 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 @dfn{ABI} or @dfn{Application Binary Interface}.
|
||||
@cindex calling convention
|
||||
@cindex ABI
|
||||
@cindex 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. @samp{Libffi} can be used in such programs to
|
||||
provide a bridge from the interpreter program to compiled code.
|
||||
|
||||
The @samp{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.
|
||||
|
||||
@acronym{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 @samp{libffi} library really only provides the lowest, machine
|
||||
dependent layer of a fully featured foreign function interface. A
|
||||
layer must exist above @samp{libffi} that handles type conversions for
|
||||
values passed between the two languages.
|
||||
@cindex FFI
|
||||
@cindex Foreign Function Interface
|
||||
|
||||
|
||||
@node Using libffi
|
||||
@chapter Using libffi
|
||||
|
||||
@menu
|
||||
* The Basics:: The basic libffi API.
|
||||
* Simple Example:: A simple example.
|
||||
* Types:: libffi type descriptions.
|
||||
* Multiple ABIs:: Different passing styles on one platform.
|
||||
* The Closure API:: Writing a generic function.
|
||||
@end menu
|
||||
|
||||
|
||||
@node The Basics
|
||||
@section The Basics
|
||||
|
||||
@samp{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 @code{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 @code{ffi_cif}. The @dfn{cif} in @code{ffi_cif} stands for
|
||||
Call InterFace. To prepare a call interface object, use the function
|
||||
@code{ffi_prep_cif}.
|
||||
@cindex cif
|
||||
|
||||
@findex ffi_prep_cif
|
||||
@defun ffi_status ffi_prep_cif (ffi_cif *@var{cif}, ffi_abi @var{abi}, unsigned int @var{nargs}, ffi_type *@var{rtype}, ffi_type **@var{argtypes})
|
||||
This initializes @var{cif} according to the given parameters.
|
||||
|
||||
@var{abi} is the ABI to use; normally @code{FFI_DEFAULT_ABI} is what
|
||||
you want. @ref{Multiple ABIs} for more information.
|
||||
|
||||
@var{nargs} is the number of arguments that this function accepts.
|
||||
@samp{libffi} does not yet handle varargs functions; see @ref{Missing
|
||||
Features} for more information.
|
||||
|
||||
@var{rtype} is a pointer to an @code{ffi_type} structure that
|
||||
describes the return type of the function. @xref{Types}.
|
||||
|
||||
@var{argtypes} is a vector of @code{ffi_type} pointers.
|
||||
@var{argtypes} must have @var{nargs} elements. If @var{nargs} is 0,
|
||||
this argument is ignored.
|
||||
|
||||
@code{ffi_prep_cif} returns a @code{libffi} status code, of type
|
||||
@code{ffi_status}. This will be either @code{FFI_OK} if everything
|
||||
worked properly; @code{FFI_BAD_TYPEDEF} if one of the @code{ffi_type}
|
||||
objects is incorrect; or @code{FFI_BAD_ABI} if the @var{abi} parameter
|
||||
is invalid.
|
||||
@end defun
|
||||
|
||||
|
||||
To call a function using an initialized @code{ffi_cif}, use the
|
||||
@code{ffi_call} function:
|
||||
|
||||
@findex ffi_call
|
||||
@defun void ffi_call (ffi_cif *@var{cif}, void *@var{fn}, void *@var{rvalue}, void **@var{avalues})
|
||||
This calls the function @var{fn} according to the description given in
|
||||
@var{cif}. @var{cif} must have already been prepared using
|
||||
@code{ffi_prep_cif}.
|
||||
|
||||
@var{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 @var{cif} declares that the function returns
|
||||
@code{void} (using @code{ffi_type_void}), then @var{rvalue} is
|
||||
ignored. If @var{rvalue} is @samp{NULL}, then the return value is
|
||||
discarded.
|
||||
|
||||
@var{avalues} is a vector of @code{void *} pointers that point to the
|
||||
memory locations holding the argument values for a call. If @var{cif}
|
||||
declares that the function has no arguments (i.e., @var{nargs} was 0),
|
||||
then @var{avalues} is ignored.
|
||||
@end defun
|
||||
|
||||
|
||||
@node Simple Example
|
||||
@section Simple Example
|
||||
|
||||
Here is a trivial example that calls @code{puts} a few times.
|
||||
|
||||
@example
|
||||
#include <stdio.h>
|
||||
#include <ffi.h>
|
||||
|
||||
int main()
|
||||
@{
|
||||
ffi_cif cif;
|
||||
ffi_type *args[1];
|
||||
void *values[1];
|
||||
char *s;
|
||||
int rc;
|
||||
|
||||
/* Initialize the argument info vectors */
|
||||
args[0] = &ffi_type_pointer;
|
||||
values[0] = &s;
|
||||
|
||||
/* Initialize the cif */
|
||||
if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
|
||||
&ffi_type_uint, args) == FFI_OK)
|
||||
@{
|
||||
s = "Hello World!";
|
||||
ffi_call(&cif, puts, &rc, values);
|
||||
/* rc now holds the result of the call to puts */
|
||||
|
||||
/* values holds a pointer to the function's arg, so to
|
||||
call puts() again all we need to do is change the
|
||||
value of s */
|
||||
s = "This is cool!";
|
||||
ffi_call(&cif, puts, &rc, values);
|
||||
@}
|
||||
|
||||
return 0;
|
||||
@}
|
||||
@end example
|
||||
|
||||
|
||||
@node Types
|
||||
@section Types
|
||||
|
||||
@menu
|
||||
* Primitive Types:: Built-in types.
|
||||
* Structures:: Structure types.
|
||||
* Type Example:: Structure type example.
|
||||
@end menu
|
||||
|
||||
@node Primitive Types
|
||||
@subsection Primitive Types
|
||||
|
||||
@code{Libffi} provides a number of built-in type descriptors that can
|
||||
be used to describe argument and return types:
|
||||
|
||||
@table @code
|
||||
@item ffi_type_void
|
||||
@tindex ffi_type_void
|
||||
The type @code{void}. This cannot be used for argument types, only
|
||||
for return values.
|
||||
|
||||
@item ffi_type_uint8
|
||||
@tindex ffi_type_uint8
|
||||
An unsigned, 8-bit integer type.
|
||||
|
||||
@item ffi_type_sint8
|
||||
@tindex ffi_type_sint8
|
||||
A signed, 8-bit integer type.
|
||||
|
||||
@item ffi_type_uint16
|
||||
@tindex ffi_type_uint16
|
||||
An unsigned, 16-bit integer type.
|
||||
|
||||
@item ffi_type_sint16
|
||||
@tindex ffi_type_sint16
|
||||
A signed, 16-bit integer type.
|
||||
|
||||
@item ffi_type_uint32
|
||||
@tindex ffi_type_uint32
|
||||
An unsigned, 32-bit integer type.
|
||||
|
||||
@item ffi_type_sint32
|
||||
@tindex ffi_type_sint32
|
||||
A signed, 32-bit integer type.
|
||||
|
||||
@item ffi_type_uint64
|
||||
@tindex ffi_type_uint64
|
||||
An unsigned, 64-bit integer type.
|
||||
|
||||
@item ffi_type_sint64
|
||||
@tindex ffi_type_sint64
|
||||
A signed, 64-bit integer type.
|
||||
|
||||
@item ffi_type_float
|
||||
@tindex ffi_type_float
|
||||
The C @code{float} type.
|
||||
|
||||
@item ffi_type_double
|
||||
@tindex ffi_type_double
|
||||
The C @code{double} type.
|
||||
|
||||
@item ffi_type_uchar
|
||||
@tindex ffi_type_uchar
|
||||
The C @code{unsigned char} type.
|
||||
|
||||
@item ffi_type_schar
|
||||
@tindex ffi_type_schar
|
||||
The C @code{signed char} type. (Note that there is not an exact
|
||||
equivalent to the C @code{char} type in @code{libffi}; ordinarily you
|
||||
should either use @code{ffi_type_schar} or @code{ffi_type_uchar}
|
||||
depending on whether @code{char} is signed.)
|
||||
|
||||
@item ffi_type_ushort
|
||||
@tindex ffi_type_ushort
|
||||
The C @code{unsigned short} type.
|
||||
|
||||
@item ffi_type_sshort
|
||||
@tindex ffi_type_sshort
|
||||
The C @code{short} type.
|
||||
|
||||
@item ffi_type_uint
|
||||
@tindex ffi_type_uint
|
||||
The C @code{unsigned int} type.
|
||||
|
||||
@item ffi_type_sint
|
||||
@tindex ffi_type_sint
|
||||
The C @code{int} type.
|
||||
|
||||
@item ffi_type_ulong
|
||||
@tindex ffi_type_ulong
|
||||
The C @code{unsigned long} type.
|
||||
|
||||
@item ffi_type_slong
|
||||
@tindex ffi_type_slong
|
||||
The C @code{long} type.
|
||||
|
||||
@item ffi_type_longdouble
|
||||
@tindex ffi_type_longdouble
|
||||
On platforms that have a C @code{long double} type, this is defined.
|
||||
On other platforms, it is not.
|
||||
|
||||
@item ffi_type_pointer
|
||||
@tindex ffi_type_pointer
|
||||
A generic @code{void *} pointer. You should use this for all
|
||||
pointers, regardless of their real type.
|
||||
@end table
|
||||
|
||||
Each of these is of type @code{ffi_type}, so you must take the address
|
||||
when passing to @code{ffi_prep_cif}.
|
||||
|
||||
|
||||
@node Structures
|
||||
@subsection Structures
|
||||
|
||||
Although @samp{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 @samp{libffi} by creating a
|
||||
new @code{ffi_type} object for it.
|
||||
|
||||
@tindex ffi_type
|
||||
@deftp ffi_type
|
||||
The @code{ffi_type} has the following members:
|
||||
@table @code
|
||||
@item size_t size
|
||||
This is set by @code{libffi}; you should initialize it to zero.
|
||||
|
||||
@item unsigned short alignment
|
||||
This is set by @code{libffi}; you should initialize it to zero.
|
||||
|
||||
@item unsigned short type
|
||||
For a structure, this should be set to @code{FFI_TYPE_STRUCT}.
|
||||
|
||||
@item ffi_type **elements
|
||||
This is a @samp{NULL}-terminated array of pointers to @code{ffi_type}
|
||||
objects. There is one element per field of the struct.
|
||||
@end table
|
||||
@end deftp
|
||||
|
||||
|
||||
@node Type Example
|
||||
@subsection Type Example
|
||||
|
||||
The following example initializes a @code{ffi_type} object
|
||||
representing the @code{tm} struct from Linux's @file{time.h}.
|
||||
|
||||
Here is how the struct is defined:
|
||||
|
||||
@example
|
||||
struct tm @{
|
||||
int tm_sec;
|
||||
int tm_min;
|
||||
int tm_hour;
|
||||
int tm_mday;
|
||||
int tm_mon;
|
||||
int tm_year;
|
||||
int tm_wday;
|
||||
int tm_yday;
|
||||
int tm_isdst;
|
||||
/* Those are for future use. */
|
||||
long int __tm_gmtoff__;
|
||||
__const char *__tm_zone__;
|
||||
@};
|
||||
@end example
|
||||
|
||||
Here is the corresponding code to describe this struct to
|
||||
@code{libffi}:
|
||||
|
||||
@example
|
||||
@{
|
||||
ffi_type tm_type;
|
||||
ffi_type *tm_type_elements[12];
|
||||
int i;
|
||||
|
||||
tm_type.size = tm_type.alignment = 0;
|
||||
tm_type.elements = &tm_type_elements;
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
tm_type_elements[i] = &ffi_type_sint;
|
||||
|
||||
tm_type_elements[9] = &ffi_type_slong;
|
||||
tm_type_elements[10] = &ffi_type_pointer;
|
||||
tm_type_elements[11] = NULL;
|
||||
|
||||
/* tm_type can now be used to represent tm argument types and
|
||||
return types for ffi_prep_cif() */
|
||||
@}
|
||||
@end example
|
||||
|
||||
|
||||
@node Multiple ABIs
|
||||
@section Multiple ABIs
|
||||
|
||||
A given platform may provide multiple different ABIs at once. For
|
||||
instance, the x86 platform has both @samp{stdcall} and @samp{fastcall}
|
||||
functions.
|
||||
|
||||
@code{libffi} provides some support for this. However, this is
|
||||
necessarily platform-specific.
|
||||
|
||||
@c FIXME: document the platforms
|
||||
|
||||
@node The Closure API
|
||||
@section The Closure API
|
||||
|
||||
@code{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.
|
||||
|
||||
This facility is called the @dfn{closure API}. Closures are not
|
||||
supported on all platforms; you can check the @code{FFI_CLOSURES}
|
||||
define to determine whether they are supported on the current
|
||||
platform.
|
||||
@cindex closures
|
||||
@cindex closure API
|
||||
@findex FFI_CLOSURES
|
||||
|
||||
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:
|
||||
|
||||
@findex ffi_closure_alloca
|
||||
@defun void *ffi_closure_alloc (size_t @var{size}, void **@var{code})
|
||||
Allocate a chunk of memory holding @var{size} bytes. This returns a
|
||||
pointer to the writable address, and sets *@var{code} to the
|
||||
corresponding executable address.
|
||||
|
||||
@var{size} should be sufficient to hold a @code{ffi_closure} object.
|
||||
@end defun
|
||||
|
||||
@findex ffi_closure_free
|
||||
@defun void ffi_closure_free (void *@var{writable})
|
||||
Free memory allocated using @code{ffi_closure_alloc}. The argument is
|
||||
the writable address that was returned.
|
||||
@end defun
|
||||
|
||||
|
||||
Once you have allocated the memory for a closure, you must construct a
|
||||
@code{ffi_cif} describing the function call. Finally you can prepare
|
||||
the closure function:
|
||||
|
||||
@findex ffi_prep_closure_loc
|
||||
@defun ffi_status ffi_prep_closure_loc (ffi_closure *@var{closure}, ffi_cif *@var{cif}, void (*@var{fun}) (ffi_cif *@var{cif}, void *@var{ret}, void **@var{args}, void *@var{user_data}), void *@var{user_data}, void *@var{codeloc})
|
||||
Prepare a closure function.
|
||||
|
||||
@var{closure} is the address of a @code{ffi_closure} object; this is
|
||||
the writable address returned by @code{ffi_closure_alloc}.
|
||||
|
||||
@var{cif} is the @code{ffi_cif} describing the function parameters.
|
||||
|
||||
@var{user_data} is an arbitrary datum that is passed, uninterpreted,
|
||||
to your closure function.
|
||||
|
||||
@var{codeloc} is the executable address returned by
|
||||
@code{ffi_closure_alloc}.
|
||||
|
||||
@var{fun} is the function which will be called when the closure is
|
||||
invoked. It is called with the arguments:
|
||||
@table @var
|
||||
@item cif
|
||||
The @code{ffi_cif} passed to @code{ffi_prep_closure_loc}.
|
||||
|
||||
@item ret
|
||||
A pointer to the memory used for the function's return value.
|
||||
@var{fun} must fill this, unless the function is declared as returning
|
||||
@code{void}.
|
||||
@c FIXME: is this NULL for void-returning functions?
|
||||
|
||||
@item args
|
||||
A vector of pointers to memory holding the arguments to the function.
|
||||
|
||||
@item user_data
|
||||
The same @var{user_data} that was passed to
|
||||
@code{ffi_prep_closure_loc}.
|
||||
@end table
|
||||
|
||||
@code{ffi_prep_closure_loc} will return @code{FFI_OK} if everything
|
||||
went ok, and something else on error.
|
||||
@c FIXME: what?
|
||||
|
||||
After calling @code{ffi_prep_closure_loc}, you can cast @var{codeloc}
|
||||
to the appropriate pointer-to-function type.
|
||||
@end defun
|
||||
|
||||
@c FIXME: example
|
||||
|
||||
You may see old code referring to @code{ffi_prep_closure}. This
|
||||
function is deprecated, as it cannot handle the need for separate
|
||||
writable and executable addresses.
|
||||
|
||||
|
||||
@node Missing Features
|
||||
@chapter Missing Features
|
||||
|
||||
@code{libffi} is missing a few features. We welcome patches to add
|
||||
support for these.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
There is no support for calling varargs functions. This may work on
|
||||
some platforms, depending on how the ABI is defined, but it is not
|
||||
reliable.
|
||||
|
||||
@item
|
||||
There is no support for bit fields in structures.
|
||||
|
||||
@item
|
||||
The closure API is
|
||||
|
||||
@item
|
||||
The ``raw'' API is undocumented.
|
||||
@c argument promotion?
|
||||
@c unions?
|
||||
@c anything else?
|
||||
@end itemize
|
||||
|
||||
|
||||
@node Index
|
||||
@unnumbered Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@bye
|
||||
4
libffi/doc/version.texi
Normal file
4
libffi/doc/version.texi
Normal file
@@ -0,0 +1,4 @@
|
||||
@set UPDATED 14 February 2008
|
||||
@set UPDATED-MONTH February 2008
|
||||
@set EDITION 2.99.2
|
||||
@set VERSION 2.99.2
|
||||
@@ -94,10 +94,6 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
@@ -119,15 +115,15 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of a `double', as computed by sizeof. */
|
||||
/* The size of `double', as computed by sizeof. */
|
||||
#undef SIZEOF_DOUBLE
|
||||
|
||||
/* The size of a `long double', as computed by sizeof. */
|
||||
/* The size of `long double', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_DOUBLE
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
|
||||
201
libffi/mdate-sh
Executable file
201
libffi/mdate-sh
Executable file
@@ -0,0 +1,201 @@
|
||||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
|
||||
scriptversion=2005-06-29.22
|
||||
|
||||
# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 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
|
||||
# it 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.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
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.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "mdate-sh $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
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 to its documented default.
|
||||
if test "${TIME_STYLE+set}" = set; then
|
||||
TIME_STYLE=posix-long-iso
|
||||
export TIME_STYLE
|
||||
fi
|
||||
|
||||
save_arg1=$1
|
||||
|
||||
# Find out how to get the extended ls output of a file or directory.
|
||||
if ls -L /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command='ls -L -l -d'
|
||||
else
|
||||
ls_command='ls -l -d'
|
||||
fi
|
||||
|
||||
# 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 `/'
|
||||
# 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 /`
|
||||
|
||||
# Find which argument is the month.
|
||||
month=
|
||||
command=
|
||||
until test $month
|
||||
do
|
||||
shift
|
||||
# Add another shift to the command.
|
||||
command="$command shift;"
|
||||
case $1 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get the extended ls output of the file or directory.
|
||||
set dummy x`eval "$ls_command \"\$save_arg1\""`
|
||||
|
||||
# Remove all preceding arguments
|
||||
eval $command
|
||||
|
||||
# Because of the dummy argument above, month is in $2.
|
||||
#
|
||||
# On a POSIX system, we should have
|
||||
#
|
||||
# $# = 5
|
||||
# $1 = file size
|
||||
# $2 = month
|
||||
# $3 = day
|
||||
# $4 = year or time
|
||||
# $5 = filename
|
||||
#
|
||||
# On Darwin 7.7.0 and 7.6.0, we have
|
||||
#
|
||||
# $# = 4
|
||||
# $1 = day
|
||||
# $2 = month
|
||||
# $3 = year or time
|
||||
# $4 = filename
|
||||
|
||||
# Get the month.
|
||||
case $2 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
|
||||
case $3 in
|
||||
???*) day=$1;;
|
||||
*) day=$3; shift;;
|
||||
esac
|
||||
|
||||
# Here we have to deal with the problem that the ls output gives either
|
||||
# the time of day or the year.
|
||||
case $3 in
|
||||
*:*) set `date`; eval year=\$$#
|
||||
case $2 in
|
||||
Jan) nummonthtod=1;;
|
||||
Feb) nummonthtod=2;;
|
||||
Mar) nummonthtod=3;;
|
||||
Apr) nummonthtod=4;;
|
||||
May) nummonthtod=5;;
|
||||
Jun) nummonthtod=6;;
|
||||
Jul) nummonthtod=7;;
|
||||
Aug) nummonthtod=8;;
|
||||
Sep) nummonthtod=9;;
|
||||
Oct) nummonthtod=10;;
|
||||
Nov) nummonthtod=11;;
|
||||
Dec) nummonthtod=12;;
|
||||
esac
|
||||
# For the first six month of the year the time notation can also
|
||||
# be used for files modified in the last year.
|
||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||
then
|
||||
year=`expr $year - 1`
|
||||
fi;;
|
||||
*) year=$3;;
|
||||
esac
|
||||
|
||||
# The result.
|
||||
echo $day $month $year
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
7482
libffi/texinfo.tex
Normal file
7482
libffi/texinfo.tex
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user