This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

[PATCH][SH] Fix setjmp.h for C++


This patch fixes the following glibc tests for SH4:

FAIL: build debug/tst-chk4.o
FAIL: build debug/tst-chk5.o
FAIL: build debug/tst-chk6.o
FAIL: build debug/tst-lfschk4.o
FAIL: build debug/tst-lfschk5.o
FAIL: build debug/tst-lfschk6.o

The problem is that they are compiled with the C++ compiler, and that objects 
to unnamed types.

This patch simply gives the struct a name. It is much the same as (part of) 
this patch for m68k: 
http://sourceware.org/ml/libc-ports/2008-08/msg00005.html

OK?

Andrew
2009-03-25  Andrew Stubbs  <ams@codesourcery.com>

	* sysdeps/sh/bits/setjmp.h (__jmp_buf): Give name to structure
	type.

---
 libc/sysdeps/sh/bits/setjmp.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: libc/sysdeps/sh/bits/setjmp.h
===================================================================
--- libc/sysdeps/sh/bits/setjmp.h.orig
+++ libc/sysdeps/sh/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1999,2000,2003,2005,2006,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@
 #endif
 
 #ifndef _ASM
-typedef struct
+typedef struct __jmp_buf_internal_tag
   {
     /* Callee-saved registers r8 through r15.  */
     int __regs[8];

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