Apply mozilla patch to libffi 3.0.9. b=537962, r=bsmedberg
authorDan Witte <dwitte@mozilla.com>
Fri, 08 Jan 2010 11:01:27 -0800
changeset 36956 2de1596d841318181bdf0e9ad1e12e5221f32a0c
parent 36955 1b205e684e065ba98042eb2e9063fede1709cb5f
child 36957 314597526cbfc0d534c1dd283afcdf0e8b91d4ec
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbsmedberg
bugs537962
milestone1.9.3a1pre
Apply mozilla patch to libffi 3.0.9. b=537962, r=bsmedberg
js/ctypes/Function.h
js/ctypes/libffi.patch
js/ctypes/libffi/Makefile.in
--- a/js/ctypes/Function.h
+++ b/js/ctypes/Function.h
@@ -38,16 +38,28 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef FUNCTION_H
 #define FUNCTION_H
 
 #include "Module.h"
 #include "nsTArray.h"
 #include "prlink.h"
+
+// Define __i386__ and __x86_64__ as appropriate for the Sun Pro compiler,
+// before #including ffi.h. (libffi itself is built with gcc on Solaris.)
+#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#ifdef __i386
+#define __i386__
+#endif
+#ifdef __x86_64
+#define __x86_64__
+#endif
+#endif
+
 #include "ffi.h"
 
 namespace mozilla {
 namespace ctypes {
 
 // for JS error reporting
 enum ErrorNum {
 #define MSG_DEF(name, number, count, exception, format) \
new file mode 100644
--- /dev/null
+++ b/js/ctypes/libffi.patch
@@ -0,0 +1,25 @@
+Patch libffi 3.0.9 to fix bug 528129.
+
+diff --git a/js/ctypes/libffi/Makefile.in b/js/ctypes/libffi/Makefile.in
+--- a/js/ctypes/libffi/Makefile.in
++++ b/js/ctypes/libffi/Makefile.in
+@@ -192,17 +192,17 @@ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIB
+ CCLD = $(CC)
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ 	$(LDFLAGS) -o $@
+ SOURCES = $(libffi_la_SOURCES) $(nodist_libffi_la_SOURCES) \
+ 	$(libffi_convenience_la_SOURCES) \
+ 	$(nodist_libffi_convenience_la_SOURCES)
+ DIST_SOURCES = $(libffi_la_SOURCES) $(libffi_convenience_la_SOURCES)
+-INFO_DEPS = $(srcdir)/doc/libffi.info
++INFO_DEPS =
+ am__TEXINFO_TEX_DIR = $(srcdir)
+ DVIS = doc/libffi.dvi
+ PDFS = doc/libffi.pdf
+ PSS = doc/libffi.ps
+ HTMLS = doc/libffi.html
+ TEXINFOS = doc/libffi.texi
+ TEXI2DVI = texi2dvi
+ TEXI2PDF = $(TEXI2DVI) --pdf --batch
+
--- a/js/ctypes/libffi/Makefile.in
+++ b/js/ctypes/libffi/Makefile.in
@@ -192,17 +192,17 @@ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIB
 CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 SOURCES = $(libffi_la_SOURCES) $(nodist_libffi_la_SOURCES) \
 	$(libffi_convenience_la_SOURCES) \
 	$(nodist_libffi_convenience_la_SOURCES)
 DIST_SOURCES = $(libffi_la_SOURCES) $(libffi_convenience_la_SOURCES)
-INFO_DEPS = $(srcdir)/doc/libffi.info
+INFO_DEPS =
 am__TEXINFO_TEX_DIR = $(srcdir)
 DVIS = doc/libffi.dvi
 PDFS = doc/libffi.pdf
 PSS = doc/libffi.ps
 HTMLS = doc/libffi.html
 TEXINFOS = doc/libffi.texi
 TEXI2DVI = texi2dvi
 TEXI2PDF = $(TEXI2DVI) --pdf --batch