fix glibc_mutex_init fix

From-SVN: r140071
This commit is contained in:
Bruce Korb 2008-09-06 19:57:26 +00:00 committed by Bruce Korb
parent 1b1f56cf4d
commit 6aa1f8c190
9 changed files with 254 additions and 198 deletions

View File

@ -1,3 +1,15 @@
2008-09-06 Bruce Korb <bkorb@gnu.org>
* fixincl.tpl (sed): make the program executable configurable.
Some platforms have some rather oddball defaults.
* config.h.in (SED_PROGRAM): define the default sed.
* fixincl.x: regenerated
* tests/base/internal/wchar_core.h: fix bad sample text
* tests/base/math.h: fix bad sample text
* configure.ac: search for working sed
* inclhack.def (glibc_mutex_init): fix non-portable construct
and re-order a few misordered entries.
2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.

View File

@ -38,6 +38,8 @@
you don't. */
#undef HAVE_DECL_FFLUSH_UNLOCKED
#define SED_PROGRAM "/usr/bin/sed"
/* Define to 1 if you have the declaration of `fgetc_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FGETC_UNLOCKED

View File

@ -5,6 +5,7 @@ AC_CONFIG_SRCDIR(inclhack.def)
AC_CONFIG_AUX_DIR(..)
AC_CANONICAL_SYSTEM
AC_PROG_CC
AC_PROG_SED
# Figure out what compiler warnings we can enable.
# See config/warnings.m4 for details.
@ -106,6 +107,8 @@ else
MAINT='#'
fi
AC_SUBST(MAINT)
AC_DEFINE_UNQUITED([SED_PROGRAM], "${SED}",
[Defined to the best working sed program on the host system])
AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in)

View File

@ -35,6 +35,10 @@ x=fixincl.x =]
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SED_PROGRAM
#define SED_PROGRAM "/usr/bin/sed"
#endif
static char const sed_cmd_z[] = SED_PROGRAM;
[=
FOR fix =]
@ -165,7 +169,7 @@ static tTestDesc a[=(. Hack)=]Tests[] = {[=
* Fix Command Arguments for [=(. Hack)=]
*/
static const char* apz[=(. Hack)=]Patch[] = {[=
IF (exist? "sed")=] "sed"[=
IF (exist? "sed")=] sed_cmd_z[=
FOR sed=],
"-e", [=(kr-string (get "sed"))=][=
ENDFOR sed=],[=

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Sunday June 8, 2008 at 09:19:13 AM PDT
* It has been AutoGen-ed Saturday September 6, 2008 at 11:42:15 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
/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Sep 6 11:42:15 PDT 2008
*
* You must regenerate it. Use the ./genfixes script.
*
@ -36,6 +36,10 @@
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SED_PROGRAM
#define SED_PROGRAM "/usr/bin/sed"
#endif
static char const sed_cmd_z[] = SED_PROGRAM;
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
@ -873,7 +877,7 @@ static tTestDesc aAlpha_Bad_LvalTests[] = {
/*
* Fix Command Arguments for Alpha_Bad_Lval
*/
static const char* apzAlpha_Bad_LvalPatch[] = { "sed",
static const char* apzAlpha_Bad_LvalPatch[] = { sed_cmd_z,
"-e", "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/",
(char*)NULL };
@ -1058,7 +1062,7 @@ static tTestDesc aAlpha_Pthread_InitTests[] = {
/*
* Fix Command Arguments for Alpha_Pthread_Init
*/
static const char* apzAlpha_Pthread_InitPatch[] = { "sed",
static const char* apzAlpha_Pthread_InitPatch[] = { sed_cmd_z,
"-e", "s@MVALID\\(.*\\)A}@MVALID\\1A, 0, 0, 0, 0, 0, 0 }@\n\
s@MVALID\\(.*\\)_}@MVALID\\1_, 0, 0, 0, 0 }@\n\
s@CVALID\\(.*\\)A}@CVALID\\1A, 0, 0, 0, 0 }@\n\
@ -1134,7 +1138,7 @@ static tTestDesc aAlpha_WcharTests[] = {
/*
* Fix Command Arguments for Alpha_Wchar
*/
static const char* apzAlpha_WcharPatch[] = { "sed",
static const char* apzAlpha_WcharPatch[] = { sed_cmd_z,
"-e", "s@#define wcstok wcstok_r@extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__(\"wcstok_r\");@",
"-e", "s@#define wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@",
(char*)NULL };
@ -1463,7 +1467,7 @@ static tTestDesc aBroken_CabsTests[] = {
/*
* Fix Command Arguments for Broken_Cabs
*/
static const char* apzBroken_CabsPatch[] = { "sed",
static const char* apzBroken_CabsPatch[] = { sed_cmd_z,
"-e", "s/^extern[ \t]*double[ \t]*cabs[ \t]*([^\\)]*);//",
"-e", "s/^extern[ \t]*long[ \t]*double[ \t]*cabsl[ \t]*([^\\)]*);//",
(char*)NULL };
@ -1807,7 +1811,7 @@ tSCC zDec_Intern_AsmList[] =
/*
* Fix Command Arguments for Dec_Intern_Asm
*/
static const char* apzDec_Intern_AsmPatch[] = { "sed",
static const char* apzDec_Intern_AsmPatch[] = { sed_cmd_z,
"-e", "/^[ \t]*float[ \t]*fasm/i\\\n\
#ifdef __DECC\n",
"-e", "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n\
@ -2117,7 +2121,7 @@ static tTestDesc aGlibc_C99_Inline_2Tests[] = {
/*
* Fix Command Arguments for Glibc_C99_Inline_2
*/
static const char* apzGlibc_C99_Inline_2Patch[] = { "sed",
static const char* apzGlibc_C99_Inline_2Patch[] = { sed_cmd_z,
"-e", "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
@ -2247,8 +2251,11 @@ static tTestDesc aGlibc_Mutex_InitTests[] = {
/*
* Fix Command Arguments for Glibc_Mutex_Init
*/
static const char* apzGlibc_Mutex_InitPatch[] = { "sed",
"-e", "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/,+1s/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/",
static const char* apzGlibc_Mutex_InitPatch[] = { sed_cmd_z,
"-e", "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n\
N\n\
s/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n\
}",
"-e", "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/",
"-e", "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/",
"-e", "/define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/N;s/^[ \t]*#[ \t]*\\(define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\n# \\1\\n { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\n# else\\n# \\1\\n { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\n# endif/",
@ -2371,6 +2378,51 @@ static const char* apzHp_SysfilePatch[] = {
"\\(\\.\\.\\.\\)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hppa_Hpux_Fp_Macros fix
*/
tSCC zHppa_Hpux_Fp_MacrosName[] =
"hppa_hpux_fp_macros";
/*
* File name selection pattern
*/
tSCC zHppa_Hpux_Fp_MacrosList[] =
"math.h\0";
/*
* Machine/OS name selection pattern
*/
tSCC* apzHppa_Hpux_Fp_MacrosMachs[] = {
"hppa*-hp-hpux11*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHppa_Hpux_Fp_MacrosSelect0[] =
"#[ \t]*define[ \t]*FP_NORMAL.*\n\
#[ \t]*define[ \t]*FP_ZERO.*\n\
#[ \t]*define[ \t]*FP_INFINITE.*\n\
#[ \t]*define[ \t]*FP_SUBNORMAL.*\n\
#[ \t]*define[ \t]*FP_NAN.*\n";
#define HPPA_HPUX_FP_MACROS_TEST_CT 1
static tTestDesc aHppa_Hpux_Fp_MacrosTests[] = {
{ TT_EGREP, zHppa_Hpux_Fp_MacrosSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hppa_Hpux_Fp_Macros
*/
static const char* apzHppa_Hpux_Fp_MacrosPatch[] = {
"format",
"#endif /* _INCLUDE_HPUX_SOURCE */\n\n\
#if defined(_INCLUDE_HPUX_SOURCE) || \\\n\
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))\n\
%0#endif\n\n\
#ifdef _INCLUDE_HPUX_SOURCE\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux10_Cpp_Pow_Inline fix
@ -2450,50 +2502,6 @@ static const char* apzHpux11_Cpp_Pow_InlinePatch[] = {
"",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hppa_Hpux_Fp_Macros fix
*/
tSCC zHppa_Hpux_Fp_MacrosName[] =
"hppa_hpux_fp_macros";
/*
* File name selection pattern
*/
tSCC zHppa_Hpux_Fp_MacrosList[] =
"math.h\0";
/*
* Machine/OS name selection pattern
*/
tSCC* apzHppa_Hpux_Fp_MacrosMachs[] = {
"hppa*-hp-hpux11*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHppa_Hpux_Fp_MacrosSelect0[] =
"#[ \t]*define[ \t]*FP_NORMAL.*\n\
#[ \t]*define[ \t]*FP_ZERO.*\n\
#[ \t]*define[ \t]*FP_INFINITE.*\n\
#[ \t]*define[ \t]*FP_SUBNORMAL.*\n\
#[ \t]*define[ \t]*FP_NAN.*\n";
#define HPPA_HPUX_FP_MACROS_TEST_CT 1
static tTestDesc aHppa_Hpux_Fp_MacrosTests[] = {
{ TT_EGREP, zHppa_Hpux_Fp_MacrosSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hppa_Hpux_Fp_Macros
*/
static const char* apzHppa_Hpux_Fp_MacrosPatch[] = {
"format",
"#endif /* _INCLUDE_HPUX_SOURCE */\n\n\
#if defined(_INCLUDE_HPUX_SOURCE) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))\n\
%0#endif\n\n\
#ifdef _INCLUDE_HPUX_SOURCE\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux10_Ctype_Declarations1 fix
@ -2740,6 +2748,43 @@ static const char* apzHpux11_FabsfPatch[] = {
#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 Hpux11_Size_T fix
@ -2918,7 +2963,7 @@ static tTestDesc aHpux8_Bogus_InlinesTests[] = {
/*
* Fix Command Arguments for Hpux8_Bogus_Inlines
*/
static const char* apzHpux8_Bogus_InlinesPatch[] = { "sed",
static const char* apzHpux8_Bogus_InlinesPatch[] = { sed_cmd_z,
"-e", "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@",
"-e", "s@inline double abs(double [a-z][a-z]*) {.*}@@",
"-e", "s@inline int sqr(int [a-z][a-z]*) {.*}@@",
@ -3037,7 +3082,7 @@ static tTestDesc aHpux_Long_DoubleTests[] = {
/*
* Fix Command Arguments for Hpux_Long_Double
*/
static const char* apzHpux_Long_DoublePatch[] = { "sed",
static const char* apzHpux_Long_DoublePatch[] = { sed_cmd_z,
"-e", "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D",
"-e", "s/long_double/long double/g",
(char*)NULL };
@ -3238,43 +3283,6 @@ 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
@ -3299,7 +3307,7 @@ tSCC* apzHpux_Pthread_InitializersMachs[] = {
/*
* Fix Command Arguments for Hpux_Pthread_Initializers
*/
static const char* apzHpux_Pthread_InitializersPatch[] = { "sed",
static const char* apzHpux_Pthread_InitializersPatch[] = { sed_cmd_z,
"-e", "s@^[ \t]*1, 1, 1, 1,[ \t]*\\\\@\t{ 1, 1, 1, 1 },\t\t\t\t\t\t\t\\\\@",
"-e", "s@^[ \t]*1,[ \t]*\\\\@\t{ 1, 0 }@",
"-e", "/^[ \t]*0$/d",
@ -3581,7 +3589,7 @@ static tTestDesc aIp_Missing_SemiTests[] = {
/*
* Fix Command Arguments for Ip_Missing_Semi
*/
static const char* apzIp_Missing_SemiPatch[] = { "sed",
static const char* apzIp_Missing_SemiPatch[] = { sed_cmd_z,
"-e", "/^struct/,/^};/s/}$/};/",
(char*)NULL };
@ -4387,7 +4395,7 @@ static tTestDesc aNested_Sys_LimitsTests[] = {
/*
* Fix Command Arguments for Nested_Sys_Limits
*/
static const char* apzNested_Sys_LimitsPatch[] = { "sed",
static const char* apzNested_Sys_LimitsPatch[] = { sed_cmd_z,
"-e", "/CHILD_MAX/s,/\\* Max, Max,",
"-e", "/OPEN_MAX/s,/\\* Max, Max,",
(char*)NULL };
@ -5148,7 +5156,7 @@ static tTestDesc aSco_MathTests[] = {
/*
* Fix Command Arguments for Sco_Math
*/
static const char* apzSco_MathPatch[] = { "sed",
static const char* apzSco_MathPatch[] = { sed_cmd_z,
"-e", "/#define.*__fp_class(a) \\\\/i\\\n\
#ifndef __GNUC__\n",
"-e", "/.*__builtin_generic/a\\\n\
@ -5671,7 +5679,7 @@ static tTestDesc aSolaris_Stdio_TagTests[] = {
/*
* Fix Command Arguments for Solaris_Stdio_Tag
*/
static const char* apzSolaris_Stdio_TagPatch[] = { "sed",
static const char* apzSolaris_Stdio_TagPatch[] = { sed_cmd_z,
"-e", "s/defined(__cplusplus) && (__cplusplus < 54321L)/0/",
(char*)NULL };
@ -5780,7 +5788,7 @@ static tTestDesc aStdio_Va_ListTests[] = {
/*
* Fix Command Arguments for Stdio_Va_List
*/
static const char* apzStdio_Va_ListPatch[] = { "sed",
static const char* apzStdio_Va_ListPatch[] = { sed_cmd_z,
"-e", "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n\
s@(va_list)&@(__gnuc_va_list)\\&@\n\
s@ _VA_LIST_));@ __gnuc_va_list));@\n\
@ -5830,7 +5838,7 @@ static tTestDesc aStdio_Va_List_ClientsTests[] = {
/*
* Fix Command Arguments for Stdio_Va_List_Clients
*/
static const char* apzStdio_Va_List_ClientsPatch[] = { "sed",
static const char* apzStdio_Va_List_ClientsPatch[] = { sed_cmd_z,
"-e", "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n\
s@(va_list)&@(__gnuc_va_list)\\&@\n\
s@ _VA_LIST_));@ __gnuc_va_list));@\n\
@ -6211,7 +6219,7 @@ static tTestDesc aSun_MallocTests[] = {
/*
* Fix Command Arguments for Sun_Malloc
*/
static const char* apzSun_MallocPatch[] = { "sed",
static const char* apzSun_MallocPatch[] = { sed_cmd_z,
"-e", "s/typedef[ \t]char \\*\tmalloc_t/typedef void \\*\tmalloc_t/g",
"-e", "s/int[ \t][ \t]*free/void\tfree/g",
"-e", "s/char\\([ \t]*\\*[ \t]*malloc\\)/void\\1/g",
@ -6249,7 +6257,7 @@ static tTestDesc aSun_Rusers_SemiTests[] = {
/*
* Fix Command Arguments for Sun_Rusers_Semi
*/
static const char* apzSun_Rusers_SemiPatch[] = { "sed",
static const char* apzSun_Rusers_SemiPatch[] = { sed_cmd_z,
"-e", "/^struct/,/^};/s/_cnt$/_cnt;/",
(char*)NULL };
@ -6357,7 +6365,7 @@ static tTestDesc aSvr4_Disable_OptTests[] = {
/*
* Fix Command Arguments for Svr4_Disable_Opt
*/
static const char* apzSvr4_Disable_OptPatch[] = { "sed",
static const char* apzSvr4_Disable_OptPatch[] = { sed_cmd_z,
"-e", "/#define.*__std_hdr_/d",
(char*)NULL };
@ -6547,7 +6555,7 @@ static tTestDesc aSysv68_StringTests[] = {
/*
* Fix Command Arguments for Sysv68_String
*/
static const char* apzSysv68_StringPatch[] = { "sed",
static const char* apzSysv68_StringPatch[] = { sed_cmd_z,
"-e", "s/extern[ \t]*int[ \t]*strlen();/extern unsigned int strlen();/",
"-e", "s/extern[ \t]*int[ \t]*ffs[ \t]*(long);/extern int ffs(int);/",
"-e", "s/strdup(char \\*s1);/strdup(const char *s1);/",
@ -6852,7 +6860,7 @@ static tTestDesc aVxworks_Gcc_ProblemTests[] = {
/*
* Fix Command Arguments for Vxworks_Gcc_Problem
*/
static const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
static const char* apzVxworks_Gcc_ProblemPatch[] = { sed_cmd_z,
"-e", "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/",
"-e", "/[ \t]size_t/i\\\n\
#ifndef _GCC_SIZE_T\\\n\
@ -6949,7 +6957,7 @@ static tTestDesc aVxworks_Needs_VxworksTests[] = {
/*
* Fix Command Arguments for Vxworks_Needs_Vxworks
*/
static const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
static const char* apzVxworks_Needs_VxworksPatch[] = { sed_cmd_z,
"-e", "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n\
#include <types/vxTypesOld.h>\n",
(char*)NULL };
@ -7122,7 +7130,7 @@ static tTestDesc aX11_NewTests[] = {
/*
* Fix Command Arguments for X11_New
*/
static const char* apzX11_NewPatch[] = { "sed",
static const char* apzX11_NewPatch[] = { sed_cmd_z,
"-e", "/Widget\told, new;/i\\\n\
#ifdef __cplusplus\\\n\
\tWidget\told, c_new;\\\n\
@ -7239,14 +7247,15 @@ typedef enum {
GNU_TYPES_FIXIDX,
HP_INLINE_FIXIDX,
HP_SYSFILE_FIXIDX,
HPPA_HPUX_FP_MACROS_FIXIDX,
HPUX10_CPP_POW_INLINE_FIXIDX,
HPUX11_CPP_POW_INLINE_FIXIDX,
HPPA_HPUX_FP_MACROS_FIXIDX,
HPUX10_CTYPE_DECLARATIONS1_FIXIDX,
HPUX10_CTYPE_DECLARATIONS2_FIXIDX,
HPUX10_STDIO_DECLARATIONS_FIXIDX,
HPUX11_ABS_FIXIDX,
HPUX11_FABSF_FIXIDX,
HPUX11_PTHREAD_CONST_FIXIDX,
HPUX11_SIZE_T_FIXIDX,
HPUX11_SNPRINTF_FIXIDX,
HPUX11_UINT32_C_FIXIDX,
@ -7260,7 +7269,6 @@ 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,
@ -7647,6 +7655,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HP_SYSFILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHp_SysfileTests, apzHp_SysfilePatch, 0 },
{ zHppa_Hpux_Fp_MacrosName, zHppa_Hpux_Fp_MacrosList,
apzHppa_Hpux_Fp_MacrosMachs,
HPPA_HPUX_FP_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHppa_Hpux_Fp_MacrosTests, apzHppa_Hpux_Fp_MacrosPatch, 0 },
{ zHpux10_Cpp_Pow_InlineName, zHpux10_Cpp_Pow_InlineList,
apzHpux10_Cpp_Pow_InlineMachs,
HPUX10_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@ -7657,11 +7670,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX11_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux11_Cpp_Pow_InlineTests, apzHpux11_Cpp_Pow_InlinePatch, 0 },
{ zHppa_Hpux_Fp_MacrosName, zHppa_Hpux_Fp_MacrosList,
apzHppa_Hpux_Fp_MacrosMachs,
HPPA_HPUX_FP_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHppa_Hpux_Fp_MacrosTests, apzHppa_Hpux_Fp_MacrosPatch, 0 },
{ zHpux10_Ctype_Declarations1Name, zHpux10_Ctype_Declarations1List,
apzHpux10_Ctype_Declarations1Machs,
HPUX10_CTYPE_DECLARATIONS1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@ -7687,6 +7695,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX11_FABSF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux11_FabsfTests, apzHpux11_FabsfPatch, 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 },
{ zHpux11_Size_TName, zHpux11_Size_TList,
apzHpux11_Size_TMachs,
HPUX11_SIZE_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@ -7752,11 +7765,6 @@ 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,

View File

@ -620,6 +620,7 @@ fix = {
"#endif";
};
/*
* Compaq Tru64 v5.1 defines all of its PTHREAD_*_INITIALIZER macros
* incorrectly, specifying less fields in the initializers than are
@ -639,32 +640,34 @@ fix = {
"s@CVALID\\(.*\\)_}@CVALID\\1_, 0, 0 }@\n"
"s@WVALID\\(.*\\)A}@WVALID\\1A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }@\n"
"s@WVALID\\(.*\\)_}@WVALID\\1_, 0, 0, 0, 0, 0, 0, 0 }@\n";
test_text = "/*\n"
" * @(#)_RCSfile: pthread.h,v \\$ "
"_Revision: 1.1.33.21 \\$ (DEC) "
"_Date: 2000/08/15 15:30:13 \\$\n"
" */\n"
"#ifndef _PTHREAD_NOMETER_STATIC\n"
"# define PTHREAD_MUTEX_INITIALIZER \\\n"
" {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA}\n"
"# define PTHREAD_COND_INITIALIZER \\\n"
" {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA}\n"
"# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \\\n"
" {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}\n"
"# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \\\n"
" {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}\n"
"#else\n"
"# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA}\n"
"# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \\\n"
" {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}\n"
"# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \\\n"
" {0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}\n"
"#endif\n\n"
"#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA}\n"
"#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) \\\n"
" {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_}\n";
test_text = <<- _EOText_
/*
* @(#)_RCSfile: pthread.h,v $ _Revision: 1.1.33.21 $ (DEC) _Date: 2000/08/15 15:30:13 $
*/
#ifndef _PTHREAD_NOMETER_STATIC
# define PTHREAD_MUTEX_INITIALIZER \
{_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA}
# define PTHREAD_COND_INITIALIZER \
{_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA}
# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \
{_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}
# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \
{_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}
#else
# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA}
# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \
{0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}
# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \
{0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}
#endif
#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA}
#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) \
{_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_}
_EOText_;
};
/*
* Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
* And OpenBSD.
@ -852,10 +855,10 @@ fix = {
"extern long double cabsl( struct __cabsl_s );";
};
/*
* Fixup Darwin's broken check for __builtin_nanf.
*/
*/
fix = {
hackname = broken_nan;
/*
@ -871,7 +874,7 @@ fix = {
c_fix = format;
c_fix_arg = "#if 1";
test_text = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
};
};
/*
@ -1228,10 +1231,12 @@ fix = {
hackname = glibc_mutex_init;
files = pthread.h;
select = '\{ *\{ *0, *\} *\}';
sed = "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/,+1"
"s/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/";
sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
sed = "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n"
"N\ns/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n}";
sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
"\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
"\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
sed = "/define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/"
"N;s/^[ \t]*#[ \t]*"
"\\(define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n"
@ -1242,7 +1247,8 @@ fix = {
"# \\1\\n"
" { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\n"
"# endif/";
sed = "s/{ \\(0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/";
sed = "s/{ \\(0, 0, 0, 0, 0, 0, "
"PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/";
sed = "/define[ \t]\\+PTHREAD_COND_INITIALIZER/"
"s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/";
@ -1348,6 +1354,40 @@ fix = {
};
/*
* Un-Hide a series of five FP defines from post-1999 compliance GCC:
* FP_NORMAL, FP_ZERO, FP_INFINITE, FP_SUBNORMAL and FP_NAN
*/
fix = {
hackname = hppa_hpux_fp_macros;
mach = "hppa*-hp-hpux11*";
files = math.h;
select = "#[ \t]*define[ \t]*FP_NORMAL.*\n"
"#[ \t]*define[ \t]*FP_ZERO.*\n"
"#[ \t]*define[ \t]*FP_INFINITE.*\n"
"#[ \t]*define[ \t]*FP_SUBNORMAL.*\n"
"#[ \t]*define[ \t]*FP_NAN.*\n";
c_fix = format;
c_fix_arg = <<- _EOFix_
#endif /* _INCLUDE_HPUX_SOURCE */
#if defined(_INCLUDE_HPUX_SOURCE) || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
%0#endif
#ifdef _INCLUDE_HPUX_SOURCE
_EOFix_;
test_text =
"# define FP_NORMAL 0\n"
"# define FP_ZERO 1\n"
"# define FP_INFINITE 2\n"
"# define FP_SUBNORMAL 3\n"
"# define FP_NAN 4\n";
};
/*
* Delete C++ double pow (double, int) inline function from HP-UX 10 & 11
* math.h to prevent clash with define in c_std/bits/std_cmath.h.
@ -1396,27 +1436,6 @@ fix = {
};
fix = {
hackname = hppa_hpux_fp_macros;
mach = "hppa*-hp-hpux11*";
files = math.h;
select = "#[ \t]*define[ \t]*FP_NORMAL.*\n"
"#[ \t]*define[ \t]*FP_ZERO.*\n"
"#[ \t]*define[ \t]*FP_INFINITE.*\n"
"#[ \t]*define[ \t]*FP_SUBNORMAL.*\n"
"#[ \t]*define[ \t]*FP_NAN.*\n";
c_fix = format;
c_fix_arg = "#endif /* _INCLUDE_HPUX_SOURCE */\n\n#if defined(_INCLUDE_HPUX_SOURCE) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))\n%0#endif\n\n#ifdef _INCLUDE_HPUX_SOURCE\n";
test_text =
"# define FP_NORMAL 0\n"
"# define FP_ZERO 1\n"
"# define FP_INFINITE 2\n"
"# define FP_SUBNORMAL 3\n"
"# define FP_NAN 4\n";
};
/*
* Fix hpux 10.X missing ctype declarations 1
*/
@ -1512,7 +1531,6 @@ fix = {
select = "ifndef _MATH_INCLUDED";
c_fix = format;
c_fix_arg = "if !defined(_MATH_INCLUDED) || defined(__GNUG__)";
// sed = "s/ifndef _MATH_INCLUDED/if !defined(_MATH_INCLUDED) || defined(__GNUG__)/";
test_text = "#ifndef _MATH_INCLUDED";
};
@ -1537,6 +1555,21 @@ fix = {
};
/*
* 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)";
};
/*
* Prevent HP-UX 11 from defining __size_t and preventing size_t from
* being defined by having it define _hpux_size_t instead.
@ -1763,19 +1796,6 @@ 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.
@ -2112,7 +2132,9 @@ fix = {
c_fix_arg = "#if _NO_XOPEN5 && !defined(__c99)\n%1";
test_text = "#if _NO_XOPEN5\n"
"extern size_t wcsftime(wchar_t *, __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, const struct tm *);";
"extern size_t wcsftime(wchar_t *, "
"__SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, "
"const struct tm *);";
};
/*
@ -2278,7 +2300,8 @@ fix = {
* exception either. So currently we bypass only for glibc, based on a
* comment in the fixed glibc header. Ick.
*/
bypass = 'We have a problem when using C\+\+|for C\+\+, _[a-z0-9A-Z_]+_exception; for C, exception';
bypass = 'We have a problem when using C\+\+|for C\+\+, '
'_[a-z0-9A-Z_]+_exception; for C, exception';
c_fix = wrap;
c_fix_arg = "#ifdef __cplusplus\n"
@ -2368,7 +2391,11 @@ fix = {
select = "extern __inline int";
c_fix = format;
c_fix_arg = "extern\n#ifdef __GNUC_STDC_INLINE__\n__attribute__((__gnu_inline__))\n#endif\n__inline int";
c_fix_arg = "extern\n"
"#ifdef __GNUC_STDC_INLINE__\n"
"__attribute__((__gnu_inline__))\n"
"#endif\n"
"__inline int";
test_text = "extern __inline int\nsigaddset(sigset_t *set, int signo)\n{}";
};

View File

@ -11,5 +11,5 @@
#if defined( IRIX_WCSFTIME_CHECK )
#if _NO_XOPEN5 && !defined(__c99)
extern size_t wcsftime(wchar_t *, __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, const struct tm *);
extern size_t wcsftime(wchar_t *, __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, const struct tm *);
#endif /* IRIX_WCSFTIME_CHECK */

View File

@ -43,15 +43,11 @@ extern int matherr();
#endif /* EXCEPTION_STRUCTURE_CHECK */
#if defined( HPUX11_CPP_POW_INLINE_CHECK )
#endif /* HPUX11_CPP_POW_INLINE_CHECK */
#if defined( HPPA_HPUX_FP_MACROS_CHECK )
#endif /* _INCLUDE_HPUX_SOURCE */
#if defined(_INCLUDE_HPUX_SOURCE) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
#if defined(_INCLUDE_HPUX_SOURCE) || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
# define FP_NORMAL 0
# define FP_ZERO 1
# define FP_INFINITE 2
@ -64,6 +60,11 @@ extern int matherr();
#endif /* HPPA_HPUX_FP_MACROS_CHECK */
#if defined( HPUX11_CPP_POW_INLINE_CHECK )
#endif /* HPUX11_CPP_POW_INLINE_CHECK */
#if defined( HPUX11_FABSF_CHECK )
#ifdef _PA_RISC
#ifndef __cplusplus

View File

@ -52,7 +52,6 @@
#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_, 0, 0, 0, 0, 0, 0, 0 }
#endif /* ALPHA_PTHREAD_INIT_CHECK */