components/libffi/patches/1_raw_api.patch
changeset 7500 38effcff0d5d
equal deleted inserted replaced
7499:21e40dad7dd3 7500:38effcff0d5d
       
     1 Raw API calls are not supported, since they are disabled in the Makefile 
       
     2 for a fix to bug 22535919 which requires API calls to be disabled.
       
     3 Removes the raw API functions if RAW API is not allowed.
       
     4 Will attempt to send upstream.
       
     5 
       
     6 --- libffi-3.2.1/libffi.pc.in_orig	2016-11-30 13:27:54.465013600 +0000
       
     7 +++ libffi-3.2.1/libffi.pc.in	2016-11-30 13:28:43.661349542 +0000
       
     8 @@ -8,4 +8,4 @@
       
     9  Description: Library supporting Foreign Function Interfaces
       
    10  Version: @PACKAGE_VERSION@
       
    11  Libs: -L${toolexeclibdir} -lffi
       
    12 -Cflags: -I${includedir}
       
    13 +Cflags: -I${includedir} -DFFI_NO_RAW_API
       
    14 --- libffi-3.2.1/include/ffi.h.in.~1~	2014-11-08 04:47:24.000000000 +0000
       
    15 +++ libffi-3.2.1/include/ffi.h.in	2016-11-30 17:29:52.630907951 +0000
       
    16 @@ -282,14 +282,16 @@
       
    17  #endif
       
    18  
       
    19  
       
    20 -void ffi_raw_call (ffi_cif *cif,
       
    21 +#if !FFI_NO_RAW_API
       
    22 +  void ffi_raw_call (ffi_cif *cif,
       
    23  		   void (*fn)(void),
       
    24  		   void *rvalue,
       
    25  		   ffi_raw *avalue);
       
    26  
       
    27 -void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
       
    28 -void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
       
    29 -size_t ffi_raw_size (ffi_cif *cif);
       
    30 +  void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
       
    31 +  void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
       
    32 +  size_t ffi_raw_size (ffi_cif *cif);
       
    33 +#endif
       
    34  
       
    35  /* This is analogous to the raw API, except it uses Java parameter	*/
       
    36  /* packing, even on 64-bit machines.  I.e. on 64-bit machines		*/