From: green Date: Fri, 15 Feb 2008 15:12:43 +0000 (+0000) Subject: * man/ffi_prep_closure.3: Delete. X-Git-Tag: v3.0.9~26^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b30dfb3146ee26ad956d00ee05eb835ca1a95b4;p=platform%2Fupstream%2Flibffi.git * man/ffi_prep_closure.3: Delete. * man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3. (man_MANS): Ditto. * man/Makefile.in: Rebuilt. * configure.ac: Bump version to 2.99.8. * configure, doc/stamp-vti, doc/version.texi: Rebuilt. --- diff --git a/libffi/ChangeLog.libffi b/libffi/ChangeLog.libffi index 14ea5a1..a9027f7 100644 --- a/libffi/ChangeLog.libffi +++ b/libffi/ChangeLog.libffi @@ -1,3 +1,12 @@ +2008-02-15 Anthony Green + + * man/ffi_prep_closure.3: Delete. + * man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3. + (man_MANS): Ditto. + * man/Makefile.in: Rebuilt. + * configure.ac: Bump version to 2.99.8. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + 2008-02-14 Anthony Green * configure.ac: Bump version to 2.99.7. diff --git a/libffi/README b/libffi/README index 1f46e6d..372dfcf 100644 --- a/libffi/README +++ b/libffi/README @@ -1,7 +1,7 @@ Status ====== -libffi-2.99.6 was released on February 14, 2008. Check the libffi web +libffi-2.99.7 was released on February 14, 2008. Check the libffi web page for updates: . @@ -151,7 +151,7 @@ arguments' test). History ======= -3.00 Feb-XX-08 +2.99.7 Feb-XX-08 Many changes, mostly thanks to the GCC project. Cygnus Solutions is now Red Hat. diff --git a/libffi/configure b/libffi/configure index 527387b..f41a878 100755 --- a/libffi/configure +++ b/libffi/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for libffi 2.99.7. +# Generated by GNU Autoconf 2.61 for libffi 2.99.8. # # Report bugs to . # @@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libffi' PACKAGE_TARNAME='libffi' -PACKAGE_VERSION='2.99.7' -PACKAGE_STRING='libffi 2.99.7' +PACKAGE_VERSION='2.99.8' +PACKAGE_STRING='libffi 2.99.8' PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html' # Factoring default headers for most tests. @@ -1457,7 +1457,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 2.99.7 to adapt to many kinds of systems. +\`configure' configures libffi 2.99.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1528,7 +1528,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libffi 2.99.7:";; + short | recursive ) echo "Configuration of libffi 2.99.8:";; esac cat <<\_ACEOF @@ -1638,7 +1638,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libffi configure 2.99.7 +libffi configure 2.99.8 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1652,7 +1652,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 2.99.7, which was +It was created by libffi $as_me 2.99.8, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2475,7 +2475,7 @@ fi # Define the identity of the package. PACKAGE='libffi' - VERSION='2.99.7' + VERSION='2.99.8' cat >>confdefs.h <<_ACEOF @@ -23297,7 +23297,7 @@ exec 6>&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 2.99.7, which was +This file was extended by libffi $as_me 2.99.8, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23354,7 +23354,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libffi config.status 2.99.7 +libffi config.status 2.99.8 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/libffi/configure.ac b/libffi/configure.ac index ed362a4..0ac9b28 100644 --- a/libffi/configure.ac +++ b/libffi/configure.ac @@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure AC_PREREQ(2.59) -AC_INIT([libffi], [2.99.7], [http://gcc.gnu.org/bugs.html]) +AC_INIT([libffi], [2.99.8], [http://gcc.gnu.org/bugs.html]) AC_CONFIG_HEADERS([fficonfig.h]) AC_CANONICAL_SYSTEM diff --git a/libffi/doc/stamp-vti b/libffi/doc/stamp-vti index 531877c..fcb6996 100644 --- a/libffi/doc/stamp-vti +++ b/libffi/doc/stamp-vti @@ -1,4 +1,4 @@ @set UPDATED 14 February 2008 @set UPDATED-MONTH February 2008 -@set EDITION 2.99.7 -@set VERSION 2.99.7 +@set EDITION 2.99.8 +@set VERSION 2.99.8 diff --git a/libffi/doc/version.texi b/libffi/doc/version.texi index 531877c..fcb6996 100644 --- a/libffi/doc/version.texi +++ b/libffi/doc/version.texi @@ -1,4 +1,4 @@ @set UPDATED 14 February 2008 @set UPDATED-MONTH February 2008 -@set EDITION 2.99.7 -@set VERSION 2.99.7 +@set EDITION 2.99.8 +@set VERSION 2.99.8 diff --git a/libffi/man/Makefile.am b/libffi/man/Makefile.am index cd9e984..2519277 100644 --- a/libffi/man/Makefile.am +++ b/libffi/man/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS=foreign -EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_closure.3 +EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3 -man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_closure.3 +man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3 diff --git a/libffi/man/Makefile.in b/libffi/man/Makefile.in index 66a6fa8..ab672a3 100644 --- a/libffi/man/Makefile.in +++ b/libffi/man/Makefile.in @@ -171,8 +171,8 @@ toolexeclibdir = @toolexeclibdir@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign -EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_closure.3 -man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_closure.3 +EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3 +man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3 all: all-am .SUFFIXES: diff --git a/libffi/man/ffi_prep_closure.3 b/libffi/man/ffi_prep_closure.3 deleted file mode 100644 index 186a8d7..0000000 --- a/libffi/man/ffi_prep_closure.3 +++ /dev/null @@ -1,159 +0,0 @@ -.Dd July 20, 2007 -.Dt ffi_prep_closure 3 -.Sh NAME -.Nm ffi_prep_closure -.Nd Prepare a -.Nm ffi_closure -for execution. -.Sh SYNOPSIS -.In ffi.h -.Ft ffi_status -.Fo ffi_prep_closure -.Fa "ffi_closure *closure" -.Fa "ffi_cif *cif" -.Fa "void (*fun)(ffi_cif*,void*,void**,void*)" -.Fa "void *user_data" -.Fc -.Sh DESCRIPTION -.Fa closure -is prepared to execute -.Fa fun . -.Fa cif -contains information describing the data types, sizes and alignments of the -arguments to and return value from the function that will be called from -.Fa fun , -and must be initialized with -.Nm ffi_prep_cif -before it is used with -.Nm ffi_prep_closure . -.Fa user_data -may point to additional data to be used in -.Fa fun . -If no additional data is needed, -.Fa user_data -may be -.Nm NULL . -When -.Fa closure -is invoked, -.Fa fun -is called with -.Fa cif , -an array of pointers to arguments, a pointer to a return value, and -.Fa user_data . -.Pp -Some architectures do not allow the execution of data by default. In such cases, -it is necessary to manually alter the permissions of the page that contains -.Fa closure -prior to its execution. -.Sh RETURN VALUES -Upon successful completion, -.Nm ffi_prep_closure -returns -.Nm FFI_OK . -If the ABI specified in -.Fa cif -does not refer to a valid ABI, -.Nm FFI_BAD_ABI -will be returned. Available ABIs are -defined in -.Nm -and -.Nm . -.Sh EXAMPLES -.Bd -literal -#include -#include // for mmap() - -unsigned char -foo(unsigned int, float); - -static void -foo_closure(ffi_cif*, void*, void**, void*); - -int -main(int argc, const char **argv) -{ - ffi_cif cif; - ffi_closure *closure; - ffi_type *arg_types[2]; - ffi_arg result; - ffi_status status; - - // Specify the data type of each argument. Available types are defined - // in . - arg_types[0] = &ffi_type_uint; - arg_types[1] = &ffi_type_float; - - // Allocate a page to hold the closure with read and write permissions. - if ((closure = mmap(NULL, sizeof(ffi_closure), PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0)) == (void*)-1) - { - // Check errno and handle the error. - } - - // Prepare the ffi_cif structure. - if ((status = ffi_prep_cif(&cif, FFI_DEFAULT_ABI, - 2, &ffi_type_uint8, arg_types)) != FFI_OK) - { - // Handle the ffi_status error. - } - - // Prepare the ffi_closure structure. - if ((status = ffi_prep_closure(closure, &cif, foo_closure, NULL)) != FFI_OK) - { - // Handle the ffi_status error. - } - - // Ensure that the closure will execute on all architectures. - if (mprotect(closure, sizeof(closure), PROT_READ | PROT_EXEC) == -1) - { - // Check errno and handle the error. - } - - // The closure is now ready to be executed, and can be saved for later - // execution if desired. - - // Invoke the closure. - result = ((unsigned char(*)(float, unsigned int))closure)(42, 5.1); - - // Free the memory associated with the closure. - if (munmap(closure, sizeof(closure)) == -1) - { - // Check errno and handle the error. - } - - return 0; -} - -// Invoking the closure transfers control to this function. -static void -foo_closure(ffi_cif* cif, void* result, void** args, void* userdata) -{ - // Access the arguments to be sent to foo(). - float arg1 = *(float*)args[0]; - unsigned int arg2 = *(unsigned int*)args[1]; - - // Call foo() and save its return value. - unsigned char ret_val = foo(arg1, arg2); - - // Copy the returned value into result. Because the return value of foo() - // is smaller than sizeof(long), typecast it to ffi_arg. Use ffi_sarg - // instead for signed types. - *(ffi_arg*)result = (ffi_arg)ret_val; -} - -// The closed-over function. -unsigned char -foo(unsigned int x, float y) -{ - unsigned char result = x - y; - return result; -} -.Ed -.Sh SEE ALSO -.Xr ffi 3 , -.Xr ffi_prep_cif 3 , -.Xr mmap 2 , -.Xr munmap 2 , -.Xr mprotect 2