From 75dc2242498e76ec3dd6ee5cf3ace47a94f4d365 Mon Sep 17 00:00:00 2001 From: korbb Date: Sat, 25 Oct 2003 17:43:13 +0000 Subject: [PATCH 1/1] snprintf alphabetically precedes uint git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72928 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fixinc/fixincl.x | 86 ++++++++++++++++++++++++------------------------- gcc/fixinc/inclhack.def | 38 +++++++++++----------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 5aa85b2a310..08e29593334 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Wednesday October 22, 2003 at 10:23:00 PM UTC + * It has been AutoGen-ed Saturday October 25, 2003 at 10:36:26 AM PDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Oct 22 22:23:00 UTC 2003 +/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Oct 25 10:36:26 PDT 2003 * * You must regenerate it. Use the ./genfixes script. * @@ -2070,6 +2070,41 @@ static const char* apzHpux11_Size_TPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Hpux11_Snprintf fix + */ +tSCC zHpux11_SnprintfName[] = + "hpux11_snprintf"; + +/* + * File name selection pattern + */ +tSCC zHpux11_SnprintfList[] = + "|stdio.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzHpux11_SnprintfMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux11_SnprintfSelect0[] = + "(extern int snprintf *\\(char *\\*, *(|__|_hpux_)size_t,) *(char *\\*, *\\.\\.\\.\\);)"; + +#define HPUX11_SNPRINTF_TEST_CT 1 +static tTestDesc aHpux11_SnprintfTests[] = { + { TT_EGREP, zHpux11_SnprintfSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux11_Snprintf + */ +static const char* apzHpux11_SnprintfPatch[] = { + "format", + "%1 const %3", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Hpux11_Uint32_C fix */ tSCC zHpux11_Uint32_CName[] = @@ -2140,41 +2175,6 @@ static const char* apzHpux11_VsnprintfPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux11_Snprintf fix - */ -tSCC zHpux11_SnprintfName[] = - "hpux11_snprintf"; - -/* - * File name selection pattern - */ -tSCC zHpux11_SnprintfList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux11_SnprintfMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_SnprintfSelect0[] = - "(extern int snprintf *\\(char *\\*, *(|__|_hpux_)size_t,) *(char *\\*, *\\.\\.\\.\\);)"; - -#define HPUX11_SNPRINTF_TEST_CT 1 -static tTestDesc aHpux11_SnprintfTests[] = { - { TT_EGREP, zHpux11_SnprintfSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Snprintf - */ -static const char* apzHpux11_SnprintfPatch[] = { - "format", - "%1 const %3", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Hpux8_Bogus_Inlines fix */ tSCC zHpux8_Bogus_InlinesName[] = @@ -6435,9 +6435,9 @@ typedef enum { HPUX11_ABS_FIXIDX, HPUX11_FABSF_FIXIDX, HPUX11_SIZE_T_FIXIDX, + HPUX11_SNPRINTF_FIXIDX, HPUX11_UINT32_C_FIXIDX, HPUX11_VSNPRINTF_FIXIDX, - HPUX11_SNPRINTF_FIXIDX, HPUX8_BOGUS_INLINES_FIXIDX, HPUX_CTYPE_MACROS_FIXIDX, HPUX_LONG_DOUBLE_FIXIDX, @@ -6791,6 +6791,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX11_SIZE_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux11_Size_TTests, apzHpux11_Size_TPatch, 0 }, + { zHpux11_SnprintfName, zHpux11_SnprintfList, + apzHpux11_SnprintfMachs, + HPUX11_SNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux11_SnprintfTests, apzHpux11_SnprintfPatch, 0 }, + { zHpux11_Uint32_CName, zHpux11_Uint32_CList, apzHpux11_Uint32_CMachs, HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -6801,11 +6806,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX11_VSNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux11_VsnprintfTests, apzHpux11_VsnprintfPatch, 0 }, - { zHpux11_SnprintfName, zHpux11_SnprintfList, - apzHpux11_SnprintfMachs, - HPUX11_SNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_SnprintfTests, apzHpux11_SnprintfPatch, 0 }, - { zHpux8_Bogus_InlinesName, zHpux8_Bogus_InlinesList, apzHpux8_Bogus_InlinesMachs, HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 2f285f5205e..432d0166512 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1211,6 +1211,25 @@ fix = { /* + * Fix hpux 11.00 broken snprintf declaration + * (third argument is char *, needs to be const char * to prevent + * spurious warnings with -Wwrite-strings or in C++). + */ +fix = { + hackname = hpux11_snprintf; + files = stdio.h; + select = '(extern int snprintf *\(char *\*, *(|__|_hpux_)size_t,)' + ' *(char *\*, *\.\.\.\);)'; + c_fix = format; + c_fix_arg = '%1 const %3'; + + test_text = "extern int snprintf(char *, size_t, char *, ...);\n" + "extern int snprintf(char *, __size_t, char *, ...);\n" + "extern int snprintf(char *, _hpux_size_t, char *, ...);"; +}; + + +/* * In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition * of UINT32_C has undefined behavior according to ISO/ANSI: * the arguments to __CONCAT__ are not macro expanded before the @@ -1255,25 +1274,6 @@ fix = { /* - * Fix hpux 11.00 broken snprintf declaration - * (third argument is char *, needs to be const char * to prevent - * spurious warnings with -Wwrite-strings or in C++). - */ -fix = { - hackname = hpux11_snprintf; - files = stdio.h; - select = '(extern int snprintf *\(char *\*, *(|__|_hpux_)size_t,)' - ' *(char *\*, *\.\.\.\);)'; - c_fix = format; - c_fix_arg = '%1 const %3'; - - test_text = "extern int snprintf(char *, size_t, char *, ...);\n" - "extern int snprintf(char *, __size_t, char *, ...);\n" - "extern int snprintf(char *, _hpux_size_t, char *, ...);"; -}; - - -/* * get rid of bogus inline definitions in HP-UX 8.0 */ fix = { -- 2.11.0