From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29611 invoked by alias); 20 Feb 2010 21:54:31 -0000 Received: (qmail 29601 invoked by uid 22791); 20 Feb 2010 21:54:31 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Feb 2010 21:54:27 +0000 Received: from [192.168.1.3] (pool-72-86-43-250.clppva.fios.verizon.net [72.86.43.250]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 2F4841B41A3; Sat, 20 Feb 2010 21:54:25 +0000 (UTC) Message-ID: <4B805A0F.9090902@gentoo.org> Date: Sat, 20 Feb 2010 21:54:00 -0000 From: Jonathan Callen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100215 Thunderbird/3.0.1 MIME-Version: 1.0 To: libffi-discuss@sourceware.org CC: Stuart Shelton Subject: [PATCH] Fix IRIX support Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0D3D78192ED4DE609C51B934" X-IsSubscribed: yes Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org X-SW-Source: 2010/txt/msg00032.txt.bz2 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0D3D78192ED4DE609C51B934 Content-Type: multipart/mixed; boundary="------------030601080209010109060100" This is a multi-part message in MIME format. --------------030601080209010109060100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 312 Attached is a patch to fix IRIX support in libffi. This patch comes from the Gentoo bug tracker (rebased against current trunk), and looks correct, although I did not write it. The original bug may be viewed at . I have CCed the original author of the patch. --------------030601080209010109060100 Content-Type: text/plain; name="irix.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="irix.patch" Content-length: 1659 diff --git a/include/ffi.h.in b/include/ffi.h.in index df7d2cd..6b6de14 100644 --- a/include/ffi.h.in +++ b/include/ffi.h.in @@ -254,6 +254,9 @@ size_t ffi_java_raw_size (ffi_cif *cif); #ifdef _MSC_VER __declspec(align(8)) #endif +#ifdef __sgi +# pragma pack 8 +#endif typedef struct { char tramp[FFI_TRAMPOLINE_SIZE]; ffi_cif *cif; @@ -263,6 +266,9 @@ typedef struct { } ffi_closure __attribute__((aligned (8))); #else } ffi_closure; +# ifdef __sgi +# pragma pack 0 +# endif #endif =20 void *ffi_closure_alloc (size_t size, void **code); diff --git a/src/java_raw_api.c b/src/java_raw_api.c index 9c5383e..522c8bf 100644 --- a/src/java_raw_api.c +++ b/src/java_raw_api.c @@ -311,7 +311,7 @@ ffi_java_translate_args (ffi_cif *cif, void *rvalue, ffi_raw_closure *cl =3D (ffi_raw_closure*)user_data; =20 ffi_java_ptrarray_to_raw (cif, avalue, raw); - (*cl->fun) (cif, rvalue, raw, cl->user_data); + (*cl->fun) (cif, rvalue, (ffi_raw*)raw, cl->user_data); ffi_java_raw_to_rvalue (cif, rvalue); } =20 diff --git a/src/mips/ffitarget.h b/src/mips/ffitarget.h index c5f4e05..3ea9de4 100644 --- a/src/mips/ffitarget.h +++ b/src/mips/ffitarget.h @@ -43,7 +43,7 @@ # endif =20 #if !defined(_MIPS_SIM) --- something is very wrong -- +# error -- something is very wrong -- #else # if (_MIPS_SIM=3D=3D_ABIN32 && defined(_ABIN32)) || (_MIPS_SIM=3D=3D_ABI= 64 && defined(_ABI64)) # define FFI_MIPS_N32 @@ -51,7 +51,7 @@ # if (_MIPS_SIM=3D=3D_ABIO32 && defined(_ABIO32)) # define FFI_MIPS_O32 # else --- this is an unsupported platform -- +# error -- this is an unsupported platform -- # endif # endif #endif --------------030601080209010109060100-- --------------enig0D3D78192ED4DE609C51B934 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 262 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuAWg8ACgkQOypDUo0oQOpEdQCfSkRPQ2lxTA3c7RDvGXJEmp9L mhsAn2v98FZOzDVWWpFvfclmrX2tuVC4 =XZJM -----END PGP SIGNATURE----- --------------enig0D3D78192ED4DE609C51B934--