diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 0d5b2a14cbd..1df6596f392 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2007-10-14 John David Anglin + + PR target/33700 + * inclhack.def (hpux11_pthread_const): New. + * fixincl.x: Regenerate. + * tests/base/sys/pthread.h: Update. + 2007-10-12 Kai Tietz * configure.ac: x86_64 mingw target uses twoprocess. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 599bb21d8a3..a0daa2a6a4f 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Monday October 8, 2007 at 12:36:37 PM PDT + * It has been AutoGen-ed Sunday October 14, 2007 at 06:17:05 PM EDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Oct 8 12:36:37 PDT 2007 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Oct 14 18:17:05 EDT 2007 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 209 fixup descriptions. + * This file contains 210 fixup descriptions. * * See README for more information. * @@ -26,7 +26,8 @@ * * You may redistribute it and/or modify it under the terms of the * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. + * Foundation; either version 2 of the License, or (at your option) + * any later version. * * inclhack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,10 +35,10 @@ * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with inclhack. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * along with inclhack. If not, write to: + * The Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor + * Boston, MA 02110-1301, USA. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -3417,6 +3418,43 @@ extern \"C\" {\n\ #endif", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux11_Pthread_Const fix + */ +tSCC zHpux11_Pthread_ConstName[] = + "hpux11_pthread_const"; + +/* + * File name selection pattern + */ +tSCC zHpux11_Pthread_ConstList[] = + "sys/pthread.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux11_Pthread_ConstMachs[] = { + "*-hp-hpux11.[0-3]*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux11_Pthread_ConstSelect0[] = + "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)"; + +#define HPUX11_PTHREAD_CONST_TEST_CT 1 +static tTestDesc aHpux11_Pthread_ConstTests[] = { + { TT_EGREP, zHpux11_Pthread_ConstSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux11_Pthread_Const + */ +static const char* apzHpux11_Pthread_ConstPatch[] = { + "format", + "#define __POINTER_SET\t\t((void *) 1L)", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Hpux_Pthread_Initializers fix @@ -8501,9 +8539,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 252 +#define REGEX_COUNT 253 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 209 +#define FIX_COUNT 210 /* * Enumerate the fixes @@ -8589,6 +8627,7 @@ typedef enum { HPUX11_EXTERN_SENDFILE_FIXIDX, HPUX11_EXTERN_SENDPATH_FIXIDX, HPUX_EXTERN_ERRNO_FIXIDX, + HPUX11_PTHREAD_CONST_FIXIDX, HPUX_PTHREAD_INITIALIZERS_FIXIDX, HUGE_VAL_HEX_FIXIDX, HUGE_VALF_HEX_FIXIDX, @@ -9121,6 +9160,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX_EXTERN_ERRNO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux_Extern_ErrnoTests, apzHpux_Extern_ErrnoPatch, 0 }, + { zHpux11_Pthread_ConstName, zHpux11_Pthread_ConstList, + apzHpux11_Pthread_ConstMachs, + HPUX11_PTHREAD_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux11_Pthread_ConstTests, apzHpux11_Pthread_ConstPatch, 0 }, + { zHpux_Pthread_InitializersName, zHpux_Pthread_InitializersList, apzHpux_Pthread_InitializersMachs, HPUX_PTHREAD_INITIALIZERS_TEST_CT, FD_MACH_ONLY, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 08989c9e750..75f83478f21 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1951,6 +1951,20 @@ fix = { test_text = " extern int errno;\n"; }; +/* + * Fix C99 constant in __POINTER_SET define. + */ +fix = { + hackname = hpux11_pthread_const; + mach = "*-hp-hpux11.[0-3]*"; + files = sys/pthread.h; + select = "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)"; + + c_fix = format; + c_fix_arg = "#define __POINTER_SET\t\t((void *) 1L)"; + test_text = "#define __POINTER_SET\t\t((void *) 1LL)"; +}; + /* * Add missing braces to pthread initializer defines. */ diff --git a/fixincludes/tests/base/sys/pthread.h b/fixincludes/tests/base/sys/pthread.h index 9948288d92a..8b893cfe55f 100644 --- a/fixincludes/tests/base/sys/pthread.h +++ b/fixincludes/tests/base/sys/pthread.h @@ -9,6 +9,11 @@ +#if defined( HPUX11_PTHREAD_CONST_CHECK ) +#define __POINTER_SET ((void *) 1L) +#endif /* HPUX11_PTHREAD_CONST_CHECK */ + + #if defined( HPUX_PTHREAD_INITIALIZERS_CHECK ) #define PTHREAD_MUTEX_INITIALIZER { \ { __PTHREAD_MUTEX_VALID, 0 }, \