This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] win64 support for libffi (2/2)


Timothy Wall wrote:
> This patch adds support for win64 builds under mingw64 for libffi. 
> Diffs are against current libffi CVS (5/12/2009).  The build works with
> mingw or free MSVC cross compiler, although MSVC needs special scripts
> to wrap the compiler, assembler, and linker (available in the JNA
> project's build tree at http://jna.dev.java.net).
> 
> All libffi testsuite tests pass, excluding long double tests, which are
> unsupported at this time.
> 
> Configury changes have been tested on x86-darwin for inadvertent side
> effects.

Richard Guenther is right: libffi upstream and gcc have drifted horribly.
With green's permission I'll merge the changes.

Some of your patch seems odd to me, and perhaps changes are needed.

For example, why this change?

@@ -62,41 +71,59 @@
       size_t z;

       /* Align if necessary */
-      if ((sizeof(int) - 1) & (unsigned) argp)
-       argp = (char *) ALIGN(argp, sizeof(int));
+      if ((sizeof(void*) - 1) & (size_t) argp)
+        argp = (char *) ALIGN(argp, sizeof(void*));

Or this?

Index: src/x86/win32.S
===================================================================
RCS file: /cvs/libffi/libffi/src/x86/win32.S,v
retrieving revision 1.5
diff -u -b -w -r1.5 win32.S
--- src/x86/win32.S     15 Feb 2008 01:24:06 -0000      1.5
+++ src/x86/win32.S     12 May 2009 13:51:21 -0000
@@ -20,7 +20,7 @@
    THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS LIABLE FOR
        ANY CLAIM, DAMAGES OR


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]