[PATCH] fixincludes: Patch another extern inline in pthread.h
Andreas Krebbel
Andreas.Krebbel@de.ibm.com
Thu Jul 31 18:21:00 GMT 2008
Hello,
I re-ran into a problem I tried to fix quite some time ago with:
http://gcc.gnu.org/ml/gcc-patches/2006-11/msg01030.html
But I obviously forgot to track this any further.
The __pthread_cleanup_routine function in pthread.h still has an
extern inline which isn't covered by the existing fixincludes.
This leads to a bootstrap failure when bootstrapping GCC with
-fexceptions since only then this part of pthread.h gets compiled
while building libgfortran.
I've updated the fix to latest mainline and have regenerated fixincl.x.
Bootstrapped on x86_64, s390 and s390x with -fexceptions.
No regressions.
2008-07-31 Andreas Krebbel <krebbel1@de.ibm.com>
* fixincl.x: Refreshed.
* inclhack.def: Add fix for __pthread_cleanup_routine in pthread.h.
Index: fixincludes/fixincl.x
===================================================================
*** fixincludes/fixincl.x.orig 2008-07-09 22:13:05.000000000 +0200
--- fixincludes/fixincl.x 2008-07-31 13:47:32.000000000 +0200
***************
*** 2,12 ****
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
! * It has been AutoGen-ed Sunday June 8, 2008 at 09:19:13 AM PDT
* From the definitions inclhack.def
* and the template file fixincl
*/
! /* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jun 8 09:19:13 PDT 2008
*
* You must regenerate it. Use the ./genfixes script.
*
--- 2,12 ----
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
! * It has been AutoGen-ed Thursday July 31, 2008 at 01:47:32 PM CEST
* From the definitions inclhack.def
* and the template file fixincl
*/
! /* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jul 31 13:47:32 CEST 2008
*
* You must regenerate it. Use the ./genfixes script.
*
*************** tSCC zGlibc_C99_Inline_2Name[] =
*** 2098,2104 ****
* File name selection pattern
*/
tSCC zGlibc_C99_Inline_2List[] =
! "sys/stat.h\0*/sys/stat.h\0";
/*
* Machine/OS name selection pattern
*/
--- 2098,2104 ----
* File name selection pattern
*/
tSCC zGlibc_C99_Inline_2List[] =
! "sys/stat.h\0*/sys/stat.h\0pthread.h\0";
/*
* Machine/OS name selection pattern
*/
*************** tSCC zGlibc_C99_Inline_2List[] =
*** 2108,2114 ****
* content selection pattern - do fix if pattern found
*/
tSCC zGlibc_C99_Inline_2Select0[] =
! "extern __inline__ int";
#define GLIBC_C99_INLINE_2_TEST_CT 1
static tTestDesc aGlibc_C99_Inline_2Tests[] = {
--- 2108,2114 ----
* content selection pattern - do fix if pattern found
*/
tSCC zGlibc_C99_Inline_2Select0[] =
! "extern __inline";
#define GLIBC_C99_INLINE_2_TEST_CT 1
static tTestDesc aGlibc_C99_Inline_2Tests[] = {
*************** __inline__ int __REDIRECT\\1 (\\2/",
*** 2130,2135 ****
--- 2130,2139 ----
extern\\\n\
#endif\\\n\
__inline__ int/",
+ "-e", "s/^extern __inline void/#ifdef __GNUC_GNU_INLINE__\\\n\
+ extern\\\n\
+ #endif\\\n\
+ __inline void/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
Index: fixincludes/inclhack.def
===================================================================
*** fixincludes/inclhack.def.orig 2008-07-09 22:13:05.000000000 +0200
--- fixincludes/inclhack.def 2008-07-31 13:47:21.000000000 +0200
*************** fix = {
*** 1168,1175 ****
*/
fix = {
hackname = glibc_c99_inline_2;
! files = sys/stat.h, '*/sys/stat.h';
! select = "extern __inline__ int";
sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int \\1/";
--- 1168,1175 ----
*/
fix = {
hackname = glibc_c99_inline_2;
! files = sys/stat.h, '*/sys/stat.h', pthread.h;
! select = "extern __inline";
sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int \\1/";
*************** fix = {
*** 1179,1184 ****
--- 1179,1188 ----
sed = "s/^extern __inline__ int/"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int/";
+ sed = "s/^extern __inline void/"
+ "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
+ "__inline void/";
+
test_text = <<-EOT
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
extern __inline__ int
More information about the Gcc-patches
mailing list