[Lsb-messages] /var/www/bzr/lsb/devel/build_env r2001: more ffi fixes (bug 3548)

Mats Wichmann mats at linuxfoundation.org
Mon Oct 29 17:21:23 UTC 2012


------------------------------------------------------------
revno: 2001
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: build_env
timestamp: Mon 2012-10-29 11:21:23 -0600
message:
  more ffi fixes (bug 3548)
modified:
  headers/All/5.0/ffi.h.defs
  headers/ffi.h
  package/Makefile
-------------- next part --------------
=== modified file 'headers/All/5.0/ffi.h.defs'
--- a/headers/All/5.0/ffi.h.defs	2012-10-25 21:20:29 +0000
+++ b/headers/All/5.0/ffi.h.defs	2012-10-29 17:21:23 +0000
@@ -7,122 +7,106 @@
 #endif
 #define FFI_SIZEOF_JAVA_RAW	FFI_SIZEOF_ARG
 
-typedef struct _ffi_type {
+typedef struct {
     size_t size;
     unsigned short alignment;
     unsigned short type;
-    struct _ffi_type **elements;
-} ffi_type;
+    _ffi_type **elements;
+} _ffi_type;
+typedef _ffi_type ffi_type;
 typedef enum {
     FFI_OK,
     FFI_BAD_TYPEDEF,
     FFI_BAD_ABI
 } ffi_status;
-struct ffi_cif {
+typedef struct {
     ffi_abi abi;
     unsigned int nargs;
     ffi_type **arg_types;
     ffi_type *rtype;
     unsigned int bytes;
     unsigned int flags;
-};
-union ffi_raw {
-    ffi_sarg sint;
-    ffi_arg uint;
-    float flt;
-    char data[FFI_SIZEOF_ARG];
-    void *ptr;
-};
-typedef union ffi_raw {
-    ffi_sarg sint;
-    ffi_arg uint;
-    float flt;
-    char data[FFI_SIZEOF_ARG];
-    void *ptr;
-} ffi_java_raw;
-struct ffi_closure {
-    char tramp[FFI_TRAMPOLINE_SIZE];
-    struct ffi_cif *cif;
-    void (*fun) (struct ffi_cif *, void *, void **, void *);
-    void *user_data;
-};
-struct ffi_raw_closure {
-    char tramp[FFI_TRAMPOLINE_SIZE];
-    struct ffi_cif *cif;
-    void (*translate_args) (struct ffi_cif *, void *, void **, void *);
-    void *this_closure;
-    void (*fun) (struct ffi_cif *, void *, union ffi_raw *, void *);
-    void *user_data;
-};
-struct ffi_java_raw_closure {
-    char tramp[FFI_TRAMPOLINE_SIZE];
-    struct ffi_cif *cif;
-    void (*translate_args) (struct ffi_cif *, void *, void **, void *);
-    void *this_closure;
-    void (*fun) (struct ffi_cif *, void *, ffi_java_raw *, void *);
-    void *user_data;
-};
-extern void ffi_call(struct ffi_cif *cif, void (*fn) (void), void *rvalue,
+} ffi_cif;
+typedef union {
+    ffi_sarg sint;
+    ffi_arg uint;
+    float flt;
+    char data[FFI_SIZEOF_ARG];
+    void *ptr;
+} ffi_raw;
+typedef ffi_raw ffi_java_raw;
+typedef struct {
+    char tramp[FFI_TRAMPOLINE_SIZE];
+    ffi_cif *cif;
+    void (*fun) (ffi_cif *, void *, void **, void *);
+    void *user_data;
+} ffi_closure;
+typedef struct {
+    char tramp[FFI_TRAMPOLINE_SIZE];
+    ffi_cif *cif;
+    void (*translate_args) (ffi_cif *, void *, void **, void *);
+    void *this_closure;
+    void (*fun) (ffi_cif *, void *, ffi_raw *, void *);
+    void *user_data;
+} ffi_raw_closure;
+typedef struct {
+    char tramp[FFI_TRAMPOLINE_SIZE];
+    ffi_cif *cif;
+    void (*translate_args) (ffi_cif *, void *, void **, void *);
+    void *this_closure;
+    void (*fun) (ffi_cif *, void *, ffi_java_raw *, void *);
+    void *user_data;
+} ffi_java_raw_closure;
+extern void ffi_call(ffi_cif * cif, void (*fn) (void), void *rvalue,
 		     void **avalue);
 extern void *ffi_closure_alloc(size_t size, void **code);
 extern void ffi_closure_free(void *);
-extern void ffi_java_ptrarray_to_raw(struct ffi_cif *cif, void **args,
+extern void ffi_java_ptrarray_to_raw(ffi_cif * cif, void **args,
 				     ffi_java_raw * raw);
-extern void ffi_java_raw_call(struct ffi_cif *cif, void (*fn) (void),
+extern void ffi_java_raw_call(ffi_cif * cif, void (*fn) (void),
 			      void *rvalue, ffi_java_raw * avalue);
-extern size_t ffi_java_raw_size(struct ffi_cif *cif);
-extern void ffi_java_raw_to_ptrarray(struct ffi_cif *cif,
-				     ffi_java_raw * raw, void **args);
-extern ffi_status ffi_prep_cif(struct ffi_cif *cif, ffi_abi abi,
+extern size_t ffi_java_raw_size(ffi_cif * cif);
+extern void ffi_java_raw_to_ptrarray(ffi_cif * cif, ffi_java_raw * raw,
+				     void **args);
+extern ffi_status ffi_prep_cif(ffi_cif * cif, ffi_abi abi,
 			       unsigned int nargs, ffi_type * rtype,
 			       ffi_type * *atypes);
-extern ffi_status ffi_prep_cif_var(struct ffi_cif *cif, ffi_abi abi,
+extern ffi_status ffi_prep_cif_var(ffi_cif * cif, ffi_abi abi,
 				   unsigned int nfixedargs,
 				   unsigned int ntotalargs,
 				   ffi_type * rtype, ffi_type * *atypes);
-extern ffi_status ffi_prep_closure(struct ffi_closure *, struct ffi_cif *,
-				   void (*fun) (struct ffi_cif *, void *,
-						void **, void *),
-				   void *user_data);
-extern ffi_status ffi_prep_closure_loc(struct ffi_closure *,
-				       struct ffi_cif *,
-				       void (*fun) (struct ffi_cif *,
-						    void *, void **,
-						    void *),
+extern ffi_status ffi_prep_closure(ffi_closure *, ffi_cif *,
+				   void (*fun) (ffi_cif *, void *, void **,
+						void *), void *user_data);
+extern ffi_status ffi_prep_closure_loc(ffi_closure *, ffi_cif *,
+				       void (*fun) (ffi_cif *, void *,
+						    void **, void *),
 				       void *user_data, void *codeloc);
-extern ffi_status ffi_prep_java_raw_closure(struct ffi_java_raw_closure *,
-					    struct ffi_cif *cif,
-					    void (*fun) (struct ffi_cif *,
-							 void *,
+extern ffi_status ffi_prep_java_raw_closure(ffi_java_raw_closure *,
+					    ffi_cif * cif,
+					    void (*fun) (ffi_cif *, void *,
 							 ffi_java_raw *,
 							 void *),
 					    void *user_data);
-extern ffi_status ffi_prep_java_raw_closure_loc(struct ffi_java_raw_closure
-						*, struct ffi_cif *cif,
-						void (*fun) (struct ffi_cif
-							     *, void *,
+extern ffi_status ffi_prep_java_raw_closure_loc(ffi_java_raw_closure *,
+						ffi_cif * cif,
+						void (*fun) (ffi_cif *,
+							     void *,
 							     ffi_java_raw
 							     *, void *),
 						void *user_data,
 						void *codeloc);
-extern ffi_status ffi_prep_raw_closure(struct ffi_raw_closure *,
-				       struct ffi_cif *cif,
-				       void (*fun) (struct ffi_cif *,
-						    void *,
-						    union ffi_raw *,
-						    void *),
+extern ffi_status ffi_prep_raw_closure(ffi_raw_closure *, ffi_cif * cif,
+				       void (*fun) (ffi_cif *, void *,
+						    ffi_raw *, void *),
 				       void *user_data);
-extern ffi_status ffi_prep_raw_closure_loc(struct ffi_raw_closure *,
-					   struct ffi_cif *cif,
-					   void (*fun) (struct ffi_cif *,
-							void *,
-							union ffi_raw *,
-							void *),
+extern ffi_status ffi_prep_raw_closure_loc(ffi_raw_closure *,
+					   ffi_cif * cif,
+					   void (*fun) (ffi_cif *, void *,
+							ffi_raw *, void *),
 					   void *user_data, void *codeloc);
-extern void ffi_ptrarray_to_raw(struct ffi_cif *cif, void **args,
-				union ffi_raw *raw);
-extern void ffi_raw_call(struct ffi_cif *cif, void (*fn) (void),
-			 void *rvalue, union ffi_raw *avalue);
-extern size_t ffi_raw_size(struct ffi_cif *cif);
-extern void ffi_raw_to_ptrarray(struct ffi_cif *cif, union ffi_raw *raw,
-				void **args);
+extern void ffi_ptrarray_to_raw(ffi_cif * cif, void **args, ffi_raw * raw);
+extern void ffi_raw_call(ffi_cif * cif, void (*fn) (void), void *rvalue,
+			 ffi_raw * avalue);
+extern size_t ffi_raw_size(ffi_cif * cif);
+extern void ffi_raw_to_ptrarray(ffi_cif * cif, ffi_raw * raw, void **args);

=== modified file 'headers/ffi.h'
--- a/headers/ffi.h	2012-10-25 21:20:29 +0000
+++ b/headers/ffi.h	2012-10-29 17:21:23 +0000
@@ -20,7 +20,14 @@
 #define FFI_SIZEOF_JAVA_RAW	FFI_SIZEOF_ARG
 
 
-    typedef struct _ffi_type ffi_type;
+    typedef struct {
+	size_t size;
+	unsigned short alignment;
+	unsigned short type;
+	_ffi_type **elements;
+    } _ffi_type;
+
+    typedef _ffi_type ffi_type;
 
     typedef enum {
 	FFI_OK,
@@ -28,131 +35,116 @@
 	FFI_BAD_ABI
     } ffi_status;
 
-    typedef union ffi_raw ffi_java_raw;
-
-    struct ffi_cif {
+    typedef struct {
 	ffi_abi abi;
 	unsigned int nargs;
 	ffi_type **arg_types;
 	ffi_type *rtype;
 	unsigned int bytes;
 	unsigned int flags;
-    };
+    } ffi_cif;
 
-    union ffi_raw {
+    typedef union {
 	ffi_sarg sint;
 	ffi_arg uint;
 	float flt;
 	char data[FFI_SIZEOF_ARG];
 	void *ptr;
-    };
-
-    struct ffi_closure {
-	char tramp[FFI_TRAMPOLINE_SIZE];
-	struct ffi_cif *cif;
-	void (*fun) (struct ffi_cif *, void *, void **, void *);
-	void *user_data;
-    };
-
-    struct ffi_raw_closure {
-	char tramp[FFI_TRAMPOLINE_SIZE];
-	struct ffi_cif *cif;
-	void (*translate_args) (struct ffi_cif *, void *, void **, void *);
-	void *this_closure;
-	void (*fun) (struct ffi_cif *, void *, union ffi_raw *, void *);
-	void *user_data;
-    };
-
-    struct ffi_java_raw_closure {
-	char tramp[FFI_TRAMPOLINE_SIZE];
-	struct ffi_cif *cif;
-	void (*translate_args) (struct ffi_cif *, void *, void **, void *);
-	void *this_closure;
-	void (*fun) (struct ffi_cif *, void *, ffi_java_raw *, void *);
-	void *user_data;
-    };
-
-    struct _ffi_type {
-	size_t size;
-	unsigned short alignment;
-	unsigned short type;
-	struct _ffi_type **elements;
-    };
+    } ffi_raw;
+
+    typedef ffi_raw ffi_java_raw;
+
+    typedef struct {
+	char tramp[FFI_TRAMPOLINE_SIZE];
+	ffi_cif *cif;
+	void (*fun) (ffi_cif *, void *, void **, void *);
+	void *user_data;
+    } ffi_closure;
+
+    typedef struct {
+	char tramp[FFI_TRAMPOLINE_SIZE];
+	ffi_cif *cif;
+	void (*translate_args) (ffi_cif *, void *, void **, void *);
+	void *this_closure;
+	void (*fun) (ffi_cif *, void *, ffi_raw *, void *);
+	void *user_data;
+    } ffi_raw_closure;
+
+    typedef struct {
+	char tramp[FFI_TRAMPOLINE_SIZE];
+	ffi_cif *cif;
+	void (*translate_args) (ffi_cif *, void *, void **, void *);
+	void *this_closure;
+	void (*fun) (ffi_cif *, void *, ffi_java_raw *, void *);
+	void *user_data;
+    } ffi_java_raw_closure;
 
 
 /* Function prototypes */
 
-    extern void ffi_call(struct ffi_cif *cif, void (*fn) (void),
-			 void *rvalue, void **avalue);
+    extern void ffi_call(ffi_cif * cif, void (*fn) (void), void *rvalue,
+			 void **avalue);
     extern void *ffi_closure_alloc(size_t size, void **code);
     extern void ffi_closure_free(void *);
-    extern void ffi_java_ptrarray_to_raw(struct ffi_cif *cif, void **args,
+    extern void ffi_java_ptrarray_to_raw(ffi_cif * cif, void **args,
 					 ffi_java_raw * raw);
-    extern void ffi_java_raw_call(struct ffi_cif *cif, void (*fn) (void),
+    extern void ffi_java_raw_call(ffi_cif * cif, void (*fn) (void),
 				  void *rvalue, ffi_java_raw * avalue);
-    extern size_t ffi_java_raw_size(struct ffi_cif *cif);
-    extern void ffi_java_raw_to_ptrarray(struct ffi_cif *cif,
-					 ffi_java_raw * raw, void **args);
-    extern ffi_status ffi_prep_cif(struct ffi_cif *cif, ffi_abi abi,
+    extern size_t ffi_java_raw_size(ffi_cif * cif);
+    extern void ffi_java_raw_to_ptrarray(ffi_cif * cif, ffi_java_raw * raw,
+					 void **args);
+    extern ffi_status ffi_prep_cif(ffi_cif * cif, ffi_abi abi,
 				   unsigned int nargs, ffi_type * rtype,
 				   ffi_type * *atypes);
-    extern ffi_status ffi_prep_cif_var(struct ffi_cif *cif, ffi_abi abi,
+    extern ffi_status ffi_prep_cif_var(ffi_cif * cif, ffi_abi abi,
 				       unsigned int nfixedargs,
 				       unsigned int ntotalargs,
 				       ffi_type * rtype,
 				       ffi_type * *atypes);
-    extern ffi_status ffi_prep_closure(struct ffi_closure *,
-				       struct ffi_cif *,
-				       void (*fun) (struct ffi_cif *,
-						    void *, void **,
-						    void *),
+    extern ffi_status ffi_prep_closure(ffi_closure *, ffi_cif *,
+				       void (*fun) (ffi_cif *, void *,
+						    void **, void *),
 				       void *user_data);
-    extern ffi_status ffi_prep_closure_loc(struct ffi_closure *,
-					   struct ffi_cif *,
-					   void (*fun) (struct ffi_cif *,
-							void *, void **,
-							void *),
+    extern ffi_status ffi_prep_closure_loc(ffi_closure *, ffi_cif *,
+					   void (*fun) (ffi_cif *, void *,
+							void **, void *),
 					   void *user_data, void *codeloc);
-    extern ffi_status ffi_prep_java_raw_closure(struct ffi_java_raw_closure
-						*, struct ffi_cif *cif,
-						void (*fun) (struct ffi_cif
-							     *, void *,
+    extern ffi_status ffi_prep_java_raw_closure(ffi_java_raw_closure *,
+						ffi_cif * cif,
+						void (*fun) (ffi_cif *,
+							     void *,
 							     ffi_java_raw
 							     *, void *),
 						void *user_data);
-    extern ffi_status ffi_prep_java_raw_closure_loc(struct
-						    ffi_java_raw_closure *,
-						    struct ffi_cif *cif,
-						    void (*fun) (struct
-								 ffi_cif *,
+    extern ffi_status ffi_prep_java_raw_closure_loc(ffi_java_raw_closure *,
+						    ffi_cif * cif,
+						    void (*fun) (ffi_cif *,
 								 void *,
 								 ffi_java_raw
 								 *,
 								 void *),
 						    void *user_data,
 						    void *codeloc);
-    extern ffi_status ffi_prep_raw_closure(struct ffi_raw_closure *,
-					   struct ffi_cif *cif,
-					   void (*fun) (struct ffi_cif *,
-							void *,
-							union ffi_raw *,
-							void *),
+    extern ffi_status ffi_prep_raw_closure(ffi_raw_closure *,
+					   ffi_cif * cif,
+					   void (*fun) (ffi_cif *, void *,
+							ffi_raw *, void *),
 					   void *user_data);
-    extern ffi_status ffi_prep_raw_closure_loc(struct ffi_raw_closure *,
-					       struct ffi_cif *cif,
-					       void (*fun) (struct ffi_cif
-							    *, void *,
-							    union ffi_raw
-							    *, void *),
+    extern ffi_status ffi_prep_raw_closure_loc(ffi_raw_closure *,
+					       ffi_cif * cif,
+					       void (*fun) (ffi_cif *,
+							    void *,
+							    ffi_raw *,
+							    void *),
 					       void *user_data,
 					       void *codeloc);
-    extern void ffi_ptrarray_to_raw(struct ffi_cif *cif, void **args,
-				    union ffi_raw *raw);
-    extern void ffi_raw_call(struct ffi_cif *cif, void (*fn) (void),
-			     void *rvalue, union ffi_raw *avalue);
-    extern size_t ffi_raw_size(struct ffi_cif *cif);
-    extern void ffi_raw_to_ptrarray(struct ffi_cif *cif,
-				    union ffi_raw *raw, void **args);
+    extern void ffi_ptrarray_to_raw(ffi_cif * cif, void **args,
+				    ffi_raw * raw);
+    extern void ffi_raw_call(ffi_cif * cif, void (*fn) (void),
+			     void *rvalue, ffi_raw * avalue);
+    extern size_t ffi_raw_size(ffi_cif * cif);
+    extern void ffi_raw_to_ptrarray(ffi_cif * cif, ffi_raw * raw,
+				    void **args);
 #ifdef __cplusplus
 }
 #endif

=== modified file 'package/Makefile'
--- a/package/Makefile	2012-10-25 21:30:52 +0000
+++ b/package/Makefile	2012-10-29 17:21:23 +0000
@@ -46,7 +46,7 @@
 
 # We define this here instead of directly in the spec file as
 # we need to be able to work out what the produced rpm files will be called
-RPM_PACKAGE_RELEASE=5
+RPM_PACKAGE_RELEASE=6
 
 # Initialize LIB64 to proper value for 64-bit architectures
 export LIB64:=$(shell case `uname -m` in (ppc64 | s390x | x86_64) echo 64 ;; esac)



More information about the lsb-messages mailing list