inclhack.def (hpux11_snprintf): New edit.
* fixinc/inclhack.def (hpux11_snprintf): New edit. * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/stdio.h: Add test for hpux11_snprintf. From-SVN: r72719
This commit is contained in:
parent
97ae108d14
commit
ce01559bb7
|
@ -1,3 +1,9 @@
|
|||
2003-10-20 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* fixinc/inclhack.def (hpux11_snprintf): New edit.
|
||||
* fixinc/fixincl.x: Regenerate.
|
||||
* fixinc/tests/base/stdio.h: Add test for hpux11_snprintf.
|
||||
|
||||
2003-10-20 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* Makefile.in (install-info): Simplify.
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Tuesday October 14, 2003 at 02:19:40 AM MEST
|
||||
* It has been AutoGen-ed Monday October 20, 2003 at 01:29:54 PM PDT
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Oct 14 02:19:40 MEST 2003
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Mon Oct 20 13:29:54 PDT 2003
|
||||
*
|
||||
* 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 159 fixup descriptions.
|
||||
* This file contains 160 fixup descriptions.
|
||||
*
|
||||
* See README for more information.
|
||||
*
|
||||
|
@ -2138,6 +2138,41 @@ static const char* apzHpux11_VsnprintfPatch[] = {
|
|||
"%1 __va_list);",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* 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
|
||||
|
@ -6309,9 +6344,9 @@ static const char* apzX11_SprintfPatch[] = {
|
|||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
#define REGEX_COUNT 179
|
||||
#define REGEX_COUNT 180
|
||||
#define MACH_LIST_SIZE_LIMIT 261
|
||||
#define FIX_COUNT 159
|
||||
#define FIX_COUNT 160
|
||||
|
||||
/*
|
||||
* Enumerate the fixes
|
||||
|
@ -6367,6 +6402,7 @@ typedef enum {
|
|||
HPUX11_SIZE_T_FIXIDX,
|
||||
HPUX11_UINT32_C_FIXIDX,
|
||||
HPUX11_VSNPRINTF_FIXIDX,
|
||||
HPUX11_SNPRINTF_FIXIDX,
|
||||
HPUX8_BOGUS_INLINES_FIXIDX,
|
||||
HPUX_CTYPE_MACROS_FIXIDX,
|
||||
HPUX_LONG_DOUBLE_FIXIDX,
|
||||
|
@ -6729,6 +6765,11 @@ 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,
|
||||
|
|
|
@ -1254,6 +1254,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 *, ...);";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* get rid of bogus inline definitions in HP-UX 8.0
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,13 @@ extern int vsnprintf(char *, _hpux_size_t, const char *, __gnuc_va_list);
|
|||
#endif /* HPUX11_VSNPRINTF_CHECK */
|
||||
|
||||
|
||||
#if defined( HPUX11_SNPRINTF_CHECK )
|
||||
extern int snprintf(char *, size_t, const char *, ...);
|
||||
extern int snprintf(char *, _hpux_size_t, const char *, ...);
|
||||
extern int snprintf(char *, _hpux_size_t, const char *, ...);
|
||||
#endif /* HPUX11_SNPRINTF_CHECK */
|
||||
|
||||
|
||||
#if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK )
|
||||
extern int printf( const char *, __gnuc_va_list );
|
||||
#endif /* IRIX_STDIO_DUMMY_VA_LIST_CHECK */
|
||||
|
|
Loading…
Reference in New Issue