[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] Fix build of some tests on MIPS



I've applied (to trunk and 2.8 branch) this patch to fix the build of the 
tests debug/tst-{chk,lfschk}-{4,5,6}.o on MIPS.

The error is of the form "../include/setjmp.h:8: error: non-local function 
'void __longjmp(<anonymous struct>*, int)' uses anonymous type" - these 
tests are C++ tests.  Arguably the tests should not be using the internal 
headers anyway, and arguably the internal header should use extern "C" (I 
don't know if that stops this error), but making MIPS more like other 
targets by giving the structure type a name avoids this problem, so I've 
done that.

Index: sysdeps/mips/bits/setjmp.h
===================================================================
--- sysdeps/mips/bits/setjmp.h	(revision 6567)
+++ sysdeps/mips/bits/setjmp.h	(working copy)
@@ -27,7 +27,7 @@
 
 #include <sgidefs.h>
 
-typedef struct
+typedef struct __jmp_buf_internal_tag
   {
 #if _MIPS_SIM == _ABIO32
     /* Program counter.  */
Index: ChangeLog.eglibc
===================================================================
--- ChangeLog.eglibc	(revision 6567)
+++ ChangeLog.eglibc	(working copy)
@@ -1,3 +1,8 @@
+2008-07-16  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/mips/bits/setjmp.h (__jmp_buf): Give name to structure
+	type.
+
 2008-07-09  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/shlib-versions:

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx