diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-10-30 09:35:42 +0000 |
---|---|---|
committer | <> | 2015-01-09 11:51:27 +0000 |
commit | c27a97d04853380f1e80525391b3f0d156ed4c84 (patch) | |
tree | 68ffaade7c605bc80cffa18360799c98a810976f /fixincludes | |
parent | 6af3fdec2262dd94954acc5e426ef71cbd4521d3 (diff) | |
download | gcc-tarball-c27a97d04853380f1e80525391b3f0d156ed4c84.tar.gz |
Imported from /home/lorry/working-area/delta_gcc-tarball/gcc-4.9.2.tar.bz2.gcc-4.9.2
Diffstat (limited to 'fixincludes')
44 files changed, 3587 insertions, 3032 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 8fae00387d..f1bb068a71 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,24 +1,229 @@ -2013-04-11 Release Manager +2014-10-30 Release Manager - * GCC 4.7.3 released. + * GCC 4.9.2 released. -2012-09-20 Release Manager +2014-07-16 Release Manager - * GCC 4.7.2 released. + * GCC 4.9.1 released. -2012-06-14 Release Manager +2014-04-22 Release Manager - * GCC 4.7.1 released. + * GCC 4.9.0 released. -2012-03-26 David Edelsohn <dje.gcc@gmail.com> +2013-12-20 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> + + Makefile.in: Use $(FI) instead of fixincl@EXEEXT@. + +2013-12-07 Bruce Korb <bkorb@gnu.org> + + * inclhack.def: many of the headers found under "bits/" are + often stashed under architecture directories. Apply fixes + to those, too. Also, re-ordered misordered fixes. + * tests/base/linux/vt.h: 80 columns in .def file limitation + * tests/base/iso/math_c99.h: adjust ordering + * tests/base/rtldef/string.h: likewise + * tests/base/bits/fenv.h: likewise + * tests/base/pthread.h: likewise + +2013-12-06 Richard Biener <rguenther@suse.de> + + * inclhack.def (suse_linux_vt_cxx): New fix for linux/vt.h + being not compatible with C++. + * fixincl.x: Regenerate. + * tests/base/linux/vt.h: New test. + +2013-09-20 Alan Modra <amodra@gmail.com> + + * configure: Regenerate. + +2013-09-02 David Edelsohn <dje.gcc@gmail.com> + + * inclhack.def (aix_assert): New fix. + * fixincl.x: Regenerate. + * tests/base/assert.h [AIX_ASSERT_CHECK]: New check. + +2013-07-06 Bruce Korb <bkorb@gnu.org> + + * inclhack.def (cdef_cplusplus): removed, per Bug 51776 + * tests/base/sys/cdefs.h (CDEF_CPLUSPLUS_CHECK): obsolete + +2013-05-23 Alexander Ivchenko <alexander.ivchenko@intel.com> + + * inclhack.def (complier_h_tradcpp): New. + * fixincl.x: Rebuilt. + * tests/base/linux/compiler.h: New. + +2013-05-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * inclhack.def (solaris_pow_int_overload): Update comment. + Change guard to match <cmath>. + * fixincl.x: Regenerate. + * tests/base/iso/math_iso.h [SOLARIS_POW_INT_OVERLOAD_CHECK]: + Matching change. + +2013-05-04 David Edelsohn <dje.gcc@gmail.com> + + * inclhack.def (aix_null): New. + (void_null): Update replacement definition of NULL. + * fixincl.x: Regenerate. + * tests/base/curses.h: Update for new fix. + +2013-01-16 Alexandre Oliva <aoliva@redhat.com> + + * inclhack.def (feraiseexcept_nosse_invalid): New. + (feraiseexcept_nosse_divbyzero): Likewise. + * fixincl.x: Rebuilt. + * tests/base/bits/fenv.h: New. + +2013-01-14 Richard Biener <rguenther@suse.de> + + * fixlib.h (verbose_level, fixinc_mode): Mark extern. + +2012-10-29 Bruce Korb <bkorb@gnu.org> + + * README: testing wrap and replacement fixes is pointless. + * fixincl.c: export verbosity enumerations to fixlib.h + (run_compiles): mark replacement fixes to be skipped when + in testing mode + * fixlib.h: add a test mode and enumerations from fixincl.c + * check.tpl: set TEST_MODE in environment + * fixopts.c (initialize_opts): check for TEST_MODE in environment + * inclhack.def: move AAB_darwin7_9_long_double_funcs to + darwin_9_long_double_funcs_2. It is not a replacement fix. + * fixincl.x: regenerate + * tests/base/ioLib.h: the need for this is now exposed, so add it. + * tests/base/architecture/ppc/math.h: the correct result is now needed. + +2012-10-29 Robert Mason <rbmj@verizon.net> + + * fixinc.in: Omit machine name checks for vxworks + * fixincludes/inclhack.def (AAB_vxworks_assert) new replacement fix + (AAB_vxworks_regs_vxtypes): another + (AAB_vxworks_stdint): yet another + (AAB_vxworks_unistd): and another + (vxworks_ioctl_macro): reformatting fix + (vxworks_mkdir_macro): again + (vxworks_regs): and again + (vxworks_write_const): and again + * tests/base/ioLib.h: new test result + * tests/base/math.h: likewise + * tests/base/sys/stat.h: likewise + * tests/base/testing.h: and again + +2012-09-29 David Edelsohn <dje.gcc@gmail.com> + + * inclhack.def (AAB_aix_fcntl): New fix. + * fixincl.x: Regenerate. + +2012-06-19 David Edelsohn <dje.gcc@gmail.com> + + * inclhack.def (aix_mutex_initializer_1): New fix. + (aix_cond_initializer_1): New fix. + (aix_rwlock_initializer): New fix. + * fixincl.x: Regenerate. + * tests/base/pthread.h [AIX_MUTEX_INITIALIZER_1_CHECK]: New. + [AIX_COND_INITIALIZER_1_CHECK]: New. + [AIX_RWLOCK_INITIALIZER_1_CHECK]: New. + +2012-05-29 Thomas Schwinge <thomas@codesourcery.com> + + * configure.ac: Use GCC_AC_FUNC_MMAP_BLACKLIST instead of + gcc_AC_FUNC_MMAP_BLACKLIST. + * Makefile.in (ACLOCAL_AMFLAGS): Don't include ../gcc. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2012-04-24 Tristan Gingold <gingold@adacore.com> + + * fixincl.c (fix_with_system): Add missing specifier. + * configure.ac: Default to twoprocess on vms. + * configure: Regenerate. + +2012-03-23 David Edelsohn <dje.gcc@gmail.com> * inclhack.def (aix_malloc): New. * fixincl.x: Regenerate. * tests/base/malloc.h [AIX_MALLOC_CHECK]: New. -2012-03-22 Release Manager - - * GCC 4.7.0 released. +2012-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + PR other/52626 + * tests/base/pthread.h [SOLARIS_MUTEX_INIT_2_CHECK] + (PTHREAD_COND_INITIALIZER): Adapt for solaris_cond_init removal. + +2012-03-15 Tristan Gingold <gingold@adacore.com> + + * README (EXAMPLES OF FIXES): Update. + +2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * inclhack.def (math_exception): Remove duplicate. + (solaris_cond_init): Remove. + (solaris_sys_va_list): Remove Solaris 8 support. + * fixincl.x: Regenerate. + * tests/base/pthread.h [SOLARIS_COND_INIT_CHECK]: Remove. + +2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * inclhack.def (broken_cabs): Remove IRIX and SunOS 4 support. + (irix___restrict): Remove. + (irix___generic1): Remove. + (irix___generic2): Remove. + (irix_asm_apostrophe): Remove. + (irix_complex): Remove. + (irix_pthread_init): Remove. + (irix_socklen_t): Remove. + (irix_stdint_c99_mode): Remove. + (irix_stdint_c99_types): Remove. + (irix_stdint_c99_macros): Remove. + (irix_stdio_va_list): Remove IRIX 6.5 support. + (irix_wcsftime): Remove. + (stdio_va_list): Remove IRIX 6.5 support. + (svr4_profil): Remove IRIX bypass. + * fixincl.x: Regenerate. + + * tests/base/complex.h [IRIX_COMPLEX_CHECK]: Remove. + * tests/base/internal/math_core.h: Remove. + * tests/base/internal/sgimacros.h: Remove. + * tests/base/internal/wchar_core.h: Remove. + * tests/base/math.h [BROKEN_CABS_CHECK]: Remove IRIX and SunOS 4 + support. + * tests/base/pthread.h [IRIX_PTHREAD_INIT_CHECK]: Remove. + * tests/base/stdint-irix65.h: Remove. + * tests/base/stdint.h [IRIX_STDINT_C99_MODE_CHECK]: Remove. + * tests/base/sys/asm.h: Remove. + * tests/base/sys/socket.h [IRIX_SOCKLEN_T_CHECK]: Remove. + +2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * inclhack.def (alpha___extern_prefix): Remove. + (alpha___extern_prefix_standards): Remove. + (alpha___extern_prefix_sys_stat): Remove. + (alpha_bad_lval): Remove. + (alpha_pthread): Remove. + (alpha_pthread_gcc): Remove. + (alpha_pthread_init): Remove. + * fixincl.x: Regenerate. + * tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: Remove. + [ALPHA_PTHREAD_GCC_CHECK]: Remove. + [ALPHA_PTHREAD_INIT_CHECK]: Remove. + * tests/base/standards.h: Remove. + * tests/base/sys/stat.h [ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK]: + Remove. + * tests/base/testing.h [ALPHA___EXTERN_PREFIX_CHECK]: Remove. + [ALPHA_BAD_LVAL_CHECK]: Remove. + +2012-03-12 Tristan Gingold <gingold@adacore.com> + + * inclhack.def (vms_use_quoted_include,vms_add_missing_braces) + (vms_do_not_redeclare_hostalias, vms_decc_builtin) + (vms_no_64bit_getopt, vms_forward_declare_struct) + (vms_use_fast_setjmp): New fixes. + * fixincl.x: Regenerate. + * tests/base/rtldef/string.h: Update. + * tests/base/rtldef/if.h, tests/base/rtldef/resolv.h, + * tests/base/rtldef/setjmp.h, tests/base/rtldef/signal.h, + * tests/base/rtldef/stdio.h, tests/base/rtldef/wait.h: New files. 2012-01-11 Bruce Korb <bkorb@gnu.org> Steven G. Kargl <kargl@gcc.gnu.org> @@ -376,7 +581,7 @@ * inclhack.def (aix_complex): New fix. * fixincl.x: Regenerate. - + 2009-08-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> * inclhack.def (hpux_inttype_int_least8_t): Also apply on hpux10*. @@ -824,7 +1029,7 @@ * fixincludes/mkfixinc.sh: Add "*-*-vxworks*" to the list of targets for which a no-op fixer is appropriate. - + 2006-11-07 Richard Guenther <rguenther@suse.de> * inclhack.def (glibc_c99_inline_2): Adjust for glibc 2.3 @@ -910,7 +1115,7 @@ * inclhack.def (solaris_once_init_1): New. * tests/base/pthread.h: Adjust for new fix. - + * fixincl.x: Regenerate. 2006-07-17 Roger Sayle <roger@eyesopen.com> diff --git a/fixincludes/Makefile.in b/fixincludes/Makefile.in index b9857b9579..5dc1b23bc8 100644 --- a/fixincludes/Makefile.in +++ b/fixincludes/Makefile.in @@ -1,6 +1,6 @@ # Makefile for fixincludes. # -# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010 +# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2009, 2010, 2012 # Free Software Foundation, Inc. #This file is part of fixincludes. @@ -66,7 +66,7 @@ mkinstalldirs=$(SHELL) $(srcdir)/../mkinstalldirs AUTOCONF = autoconf AUTOHEADER = autoheader ACLOCAL = aclocal -ACLOCAL_AMFLAGS = -I ../gcc -I .. -I ../config +ACLOCAL_AMFLAGS = -I .. -I ../config default : all @@ -179,18 +179,16 @@ check : all install : all -rm -rf $(DESTDIR)$(itoolsdir) - $(mkinstalldirs) $(DESTDIR)$(itoolsdir) + $(mkinstalldirs) $(DESTDIR)$(itoolsdir) $(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include $(INSTALL_DATA) $(srcdir)/README-fixinc \ $(DESTDIR)$(itoolsdatadir)/include/README $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh - $(INSTALL_PROGRAM) fixincl@EXEEXT@ \ - $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@ + $(INSTALL_PROGRAM) $(FI) $(DESTDIR)$(itoolsdir)/$(FI) $(INSTALL_SCRIPT) mkheaders $(DESTDIR)$(itoolsdir)/mkheaders install-strip: install - test -z '$(STRIP)' \ - || $(STRIP) $(DESTDIR)$(itoolsdir)/fixincl@EXEEXT@ + test -z '$(STRIP)' || $(STRIP) $(DESTDIR)$(itoolsdir)/$(FI) .PHONY: all check install install-strip .PHONY: dvi pdf info html install-pdf install-info install-html diff --git a/fixincludes/README b/fixincludes/README index 07a3964a26..9b482102b2 100644 --- a/fixincludes/README +++ b/fixincludes/README @@ -44,6 +44,9 @@ To make your fix, you will need to do several things: Make sure it is now properly handled. Add tests to the "test_text" entry(ies) that validate your fix. This will help ensure that future fixes won't negate your work. + Do *NOT* specify test text for "wrap" or "replacement" fixes. + There is no real possibility that these fixes will fail. + If they do, you will surely know straight away. 5. Go into the fixincludes build directory and type, "make check". You are guaranteed to have issues printed out as a result. @@ -314,7 +317,7 @@ EXAMPLES OF FIXES: GCC. But you can also: cd ${top_builddir}/gcc - rm -rf fixinc.sh include/ stmp-fixinc + rm -rf include-fixed/ stmp-fixinc make stmp-fixinc I would really recommend, however: diff --git a/fixincludes/aclocal.m4 b/fixincludes/aclocal.m4 index b23541c34b..7237922aa9 100644 --- a/fixincludes/aclocal.m4 +++ b/fixincludes/aclocal.m4 @@ -12,6 +12,6 @@ # PARTICULAR PURPOSE. m4_include([../config/acx.m4]) +m4_include([../config/mmap.m4]) m4_include([../config/override.m4]) m4_include([../config/warnings.m4]) -m4_include([../gcc/acinclude.m4]) diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl index a9810e28a8..0d1f44431f 100644 --- a/fixincludes/check.tpl +++ b/fixincludes/check.tpl @@ -99,6 +99,7 @@ ENDFOR fix =] +export TEST_MODE=true find . -type f | sed 's;^\./;;' | sort | ../../fixincl cd ${DESTDIR} diff --git a/fixincludes/configure b/fixincludes/configure index 4a28cd1f3f..4836cd8865 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -4715,7 +4715,8 @@ else i?86-*-msdosdjgpp* | \ i?86-*-mingw32* | \ x86_64-*-mingw32* | \ - *-*-beos* ) + *-*-beos* | \ + *-*-*vms*) TARGET=twoprocess ;; @@ -5221,7 +5222,7 @@ else # read() to the same fd. The only system known to have a problem here # is VMS, where text files have record structure. case "$host_os" in - vms* | ultrix*) + *vms* | ultrix*) gcc_cv_func_mmap_file=no ;; *) gcc_cv_func_mmap_file=yes;; @@ -5245,7 +5246,7 @@ else # Systems known to be in this category are Windows (all variants), # VMS, and Darwin. case "$host_os" in - vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) + *vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) gcc_cv_func_mmap_dev_zero=no ;; *) gcc_cv_func_mmap_dev_zero=yes;; @@ -5302,7 +5303,7 @@ else # above for use of /dev/zero. # Systems known to be in this category are Windows, VMS, and SCO Unix. case "$host_os" in - vms* | cygwin* | pe | mingw* | sco* | udk* ) + *vms* | cygwin* | pe | mingw* | sco* | udk* ) gcc_cv_func_mmap_anon=no ;; *) gcc_cv_func_mmap_anon=yes;; diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index e7de791826..f8f352fb71 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -53,7 +53,8 @@ fi], i?86-*-msdosdjgpp* | \ i?86-*-mingw32* | \ x86_64-*-mingw32* | \ - *-*-beos* ) + *-*-beos* | \ + *-*-*vms*) TARGET=twoprocess ;; @@ -95,7 +96,7 @@ AC_CHECK_DECLS(m4_split(m4_normalize(fixincludes_UNLOCKED_FUNCS))) AC_C_CONST # Checks for library functions. -gcc_AC_FUNC_MMAP_BLACKLIST +GCC_AC_FUNC_MMAP_BLACKLIST AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) AC_ARG_ENABLE(maintainer-mode, diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in index e73aed99a1..f7b8d8f1ee 100755 --- a/fixincludes/fixinc.in +++ b/fixincludes/fixinc.in @@ -128,6 +128,22 @@ fi # # # # # # # # # # # # # # # # # # # # # # +# Check to see if the machine_name fix needs to be disabled. +# +# On some platforms, machine_name doesn't work properly and +# breaks some of the header files. Since everything works +# properly without it, just wipe the macro list to +# disable the fix. + +case "${target_canonical}" in + *-*-vxworks*) + test -f ${MACRO_LIST} && echo > ${MACRO_LIST} + ;; +esac + + +# # # # # # # # # # # # # # # # # # # # # +# # In the file macro_list are listed all the predefined # macros that are not in the C89 reserved namespace (the reserved # namespace is all identifiers beginnning with two underscores or one diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c index 9f399abdd8..5a113c65b3 100644 --- a/fixincludes/fixincl.c +++ b/fixincludes/fixincl.c @@ -2,7 +2,7 @@ files which are fixed to work correctly with ANSI C and placed in a directory that GCC will search. - Copyright (C) 1997, 1998, 1999, 2000, 2004, 2009 + Copyright (C) 1997, 1998, 1999, 2000, 2004, 2009, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -53,22 +53,8 @@ static const char z_std_preamble[] = original, manufacturer supplied header file. */\n\n"; int find_base_len = 0; - -typedef enum { - VERB_SILENT = 0, - VERB_FIXES, - VERB_APPLIES, - VERB_PROGRESS, - VERB_TESTS, - VERB_EVERYTHING -} te_verbose; - -te_verbose verbose_level = VERB_PROGRESS; int have_tty = 0; -#define VLEVEL(l) ((unsigned int) verbose_level >= (unsigned int) l) -#define NOT_SILENT VLEVEL(VERB_FIXES) - pid_t process_chain_head = (pid_t) -1; char* pz_curr_file; /* name of the current file under test/fix */ @@ -412,8 +398,17 @@ run_compiles (void) /* FOR every fixup, ... */ do { - tTestDesc *p_test = p_fixd->p_test_desc; - int test_ct = p_fixd->test_ct; + tTestDesc *p_test; + int test_ct; + + if (fixinc_mode && (p_fixd->fd_flags & FD_REPLACEMENT)) + { + p_fixd->fd_flags |= FD_SKIP_TEST; + continue; + } + + p_test = p_fixd->p_test_desc; + test_ct = p_fixd->test_ct; /* IF the machine type pointer is not NULL (we are not in test mode) AND this test is for or not done on particular machines @@ -829,7 +824,7 @@ fix_with_system (tFixDesc* p_fixd, /* * Now add the fix number and file names that may be needed */ - sprintf (pz_scan, " %ld '%s' '%s'", (long) (p_fixd - fixDescList), + sprintf (pz_scan, " %ld '%s' '%s' '%s'", (long) (p_fixd - fixDescList), pz_fix_file, pz_file_source, pz_temp_file); } else /* NOT an "internal" fix: */ diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index e6d07d8c19..10b4061f30 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -1,12 +1,12 @@ /* -*- buffer-read-only: t -*- vi: set ro: - * + * * DO NOT EDIT THIS FILE (fixincl.x) - * - * It has been AutoGen-ed March 26, 2012 at 10:53:21 AM by AutoGen 5.10 + * + * It has been AutoGen-ed December 8, 2013 at 12:24:14 PM by AutoGen 5.18.2 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Mar 26 10:53:21 EDT 2012 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Dec 8 12:24:14 PST 2013 * * 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 224 fixup descriptions. + * This file contains 229 fixup descriptions. * * See README for more information. * @@ -101,6 +101,60 @@ extern off64_t ftello(FILE *) __asm__(\"ftello64\");\n\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Aab_Aix_Fcntl fix + */ +tSCC zAab_Aix_FcntlName[] = + "AAB_aix_fcntl"; + +/* + * File name selection pattern + */ +tSCC zAab_Aix_FcntlList[] = + "fcntl.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAab_Aix_FcntlMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAab_Aix_FcntlSelect0[] = + "define open[ \t]open64"; + +#define AAB_AIX_FCNTL_TEST_CT 1 +static tTestDesc aAab_Aix_FcntlTests[] = { + { TT_EGREP, zAab_Aix_FcntlSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aab_Aix_Fcntl + */ +static const char* apzAab_Aix_FcntlPatch[] = { + "wrap", + "", + "\n\ +#if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus\n\ +#define __need__aix_fcntl_h_fix\n\ +#ifdef __need__aix_fcntl_h_fix\n\ +#undef open\n\ +#undef creat\n\ +#undef openat\n\ +/* Alias the symbols using asm */\n\ +extern \"C\" {\n\ +extern int open(const char *, int, ...) __asm__(\"open64\");\n\ +extern int creat(const char *, mode_t) __asm__(\"creat64\");\n\ +#if (_XOPEN_SOURCE >= 700)\n\ +extern int openat(int, const char *, int, ...) __asm__(\"open64at\");\n\ +#endif\n\ +}\n\ +#endif\n\ +#endif\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Aab_Darwin7_9_Long_Double_Funcs fix */ tSCC zAab_Darwin7_9_Long_Double_FuncsName[] = @@ -215,44 +269,6 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Aab_Darwin7_9_Long_Double_Funcs_2 fix - */ -tSCC zAab_Darwin7_9_Long_Double_Funcs_2Name[] = - "AAB_darwin7_9_long_double_funcs_2"; - -/* - * File name selection pattern - */ -tSCC zAab_Darwin7_9_Long_Double_Funcs_2List[] = - "math.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Darwin7_9_Long_Double_Funcs_2Machs[] = { - "*-*-darwin7.9*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAab_Darwin7_9_Long_Double_Funcs_2Select0[] = - "#include[ \\t]+\\\""; - -#define AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_TEST_CT 1 -static tTestDesc aAab_Darwin7_9_Long_Double_Funcs_2Tests[] = { - { TT_EGREP, zAab_Darwin7_9_Long_Double_Funcs_2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aab_Darwin7_9_Long_Double_Funcs_2 - */ -static const char* apzAab_Darwin7_9_Long_Double_Funcs_2Patch[] = { - "format", - "%1<%2.h>", - "([ \\t]*#[ \\t]*include[ \\t]+)\"([a-z0-9/]+)\\.h\"", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix */ tSCC zAab_Fd_Zero_Asm_Posix_Types_HName[] = @@ -485,6 +501,280 @@ static const char* apzAab_Sun_MemcpyPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Aab_Vxworks_Assert fix + */ +tSCC zAab_Vxworks_AssertName[] = + "AAB_vxworks_assert"; + +/* + * File name selection pattern + */ +tSCC zAab_Vxworks_AssertList[] = + "assert.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAab_Vxworks_AssertMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; +#define AAB_VXWORKS_ASSERT_TEST_CT 0 +#define aAab_Vxworks_AssertTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Aab_Vxworks_Assert + */ +static const char* apzAab_Vxworks_AssertPatch[] = { +"#ifndef _ASSERT_H\n\ +#define _ASSERT_H\n\n\ +#ifdef assert\n\ +#undef assert\n\ +#endif\n\n\ +#if defined(__STDC__) || defined(__cplusplus)\n\ +extern void __assert (const char*);\n\ +#else\n\ +extern void __assert ();\n\ +#endif\n\n\ +#ifdef NDEBUG\n\ +#define assert(ign) ((void)0)\n\ +#else\n\n\ +#define ASSERT_STRINGIFY(str) ASSERT_STRINGIFY_HELPER(str)\n\ +#define ASSERT_STRINGIFY_HELPER(str) #str\n\n\ +#define assert(test) ((void) \\\n\ + ((test) ? ((void)0) : \\\n\ + __assert(\"Assertion failed: \" ASSERT_STRINGIFY(test) \", file \" \\\n\ + __FILE__ \", line \" ASSERT_STRINGIFY(__LINE__) \"\\n\")))\n\n\ +#endif\n\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Vxworks_Regs_Vxtypes fix + */ +tSCC zAab_Vxworks_Regs_VxtypesName[] = + "AAB_vxworks_regs_vxtypes"; + +/* + * File name selection pattern + */ +tSCC zAab_Vxworks_Regs_VxtypesList[] = + "regs.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAab_Vxworks_Regs_VxtypesMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; +#define AAB_VXWORKS_REGS_VXTYPES_TEST_CT 0 +#define aAab_Vxworks_Regs_VxtypesTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Aab_Vxworks_Regs_Vxtypes + */ +static const char* apzAab_Vxworks_Regs_VxtypesPatch[] = { +"#ifndef _REGS_H\n\ +#define _REGS_H\n\ +#include <types/vxTypesOld.h>\n\ +#include_next <arch/../regs.h>\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Vxworks_Stdint fix + */ +tSCC zAab_Vxworks_StdintName[] = + "AAB_vxworks_stdint"; + +/* + * File name selection pattern + */ +tSCC zAab_Vxworks_StdintList[] = + "stdint.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAab_Vxworks_StdintMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; +#define AAB_VXWORKS_STDINT_TEST_CT 0 +#define aAab_Vxworks_StdintTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Aab_Vxworks_Stdint + */ +static const char* apzAab_Vxworks_StdintPatch[] = { +"#ifndef _STDINT_H\n\ +#define _STDINT_H\n\ +/* get int*_t, uint*_t */\n\ +#include <types/vxTypes.h>\n\n\ +/* get legacy vxworks types for compatibility */\n\ +#include <types/vxTypesOld.h>\n\n\ +typedef long intptr_t;\n\ +typedef unsigned long uintptr_t;\n\n\ +typedef int64_t intmax_t;\n\ +typedef uint64_t uintmax_t;\n\n\ +typedef int8_t int_least8_t;\n\ +typedef int16_t int_least16_t;\n\ +typedef int32_t int_least32_t;\n\ +typedef int64_t int_least64_t;\n\n\ +typedef uint8_t uint_least8_t;\n\ +typedef uint16_t uint_least16_t;\n\ +typedef uint32_t uint_least32_t;\n\ +typedef uint64_t uint_least64_t;\n\n\ +typedef int8_t int_fast8_t;\n\ +typedef int int_fast16_t;\n\ +typedef int32_t int_fast32_t;\n\ +typedef int64_t int_fast64_t;\n\n\ +typedef uint8_t uint_fast8_t;\n\ +typedef unsigned int uint_fast16_t;\n\ +typedef uint32_t uint_fast32_t;\n\ +typedef uint64_t uint_fast64_t;\n\n\ +/* Ranges */\n\ +#define UINT8_MAX (~(uint8_t)0)\n\ +#define UINT8_MIN 0\n\ +#define UINT16_MAX (~(uint16_t)0)\n\ +#define UINT16_MIN 0\n\ +#define UINT32_MAX (~(uint32_t)0)\n\ +#define UINT32_MIN 0\n\ +#define UINT64_MAX (~(uint64_t)0)\n\ +#define UINT64_MIN 0\n\n\ +#define UINTPTR_MAX (~(uintptr_t)0)\n\ +#define UINTPTR_MIN 0\n\n\ +/* Need to do int_fast16_t as well, as type\n\ + size may be architecture dependent */\n\ +#define UINT_FAST16_MAX (~(uint_fast16_t)0)\n\ +#define UINT_FAST16_MAX 0\n\n\ +#define INT8_MAX (UINT8_MAX>>1)\n\ +#define INT8_MIN (INT8_MAX+1)\n\ +#define INT16_MAX (UINT16_MAX>>1)\n\ +#define INT16_MIN (INT16_MAX+1)\n\ +#define INT32_MAX (UINT32_MAX>>1)\n\ +#define INT32_MIN (INT32_MAX+1)\n\ +#define INT64_MAX (UINT64_MAX>>1)\n\ +#define INT64_MIN (INT64_MAX+1)\n\n\ +#define INTPTR_MAX (UINTPTR_MAX>>1)\n\ +#define INTPTR_MIN (INTPTR_MAX+1)\t\n\n\ +#define INT_FAST16_MAX (UINT_FAST16_MAX>>1)\n\ +#define INT_FAST16_MIN (INT_FAST16_MAX+1)\n\n\ +/* now define equiv. constants */\n\ +#define UINT_FAST8_MAX UINT8_MAX\n\ +#define UINT_FAST8_MIN UINT_FAST8_MIN\n\ +#define INT_FAST8_MAX INT8_MAX\n\ +#define INT_FAST8_MIN INT8_MIN\n\ +#define UINT_FAST32_MAX UINT32_MAX\n\ +#define UINT_FAST32_MIN UINT32_MIN\n\ +#define INT_FAST32_MAX INT32_MAX\n\ +#define INT_FAST32_MIN INT32_MIN\n\ +#define UINT_FAST64_MAX UINT64_MAX\n\ +#define UINT_FAST64_MIN UINT64_MIN\n\ +#define INT_FAST64_MAX INT64_MAX\n\ +#define INT_FAST64_MIN INT64_MIN\n\n\ +#define UINT_LEAST8_MAX UINT8_MAX\n\ +#define UINT_LEAST8_MIN UINT8_MIN\n\ +#define INT_LEAST8_MAX INT8_MAX\n\ +#define INT_LEAST8_MIN INT8_MIN\n\ +#define UINT_LEAST16_MAX UINT16_MAX\n\ +#define UINT_LEAST16_MIN UINT16_MIN\n\ +#define INT_LEAST16_MAX INT16_MAX\n\ +#define INT_LEAST16_MIN INT16_MIN\n\ +#define UINT_LEAST32_MAX UINT32_MAX\n\ +#define UINT_LEAST32_MIN UINT32_MIN\n\ +#define INT_LEAST32_MAX INT32_MAX\n\ +#define INT_LEAST32_MIN INT32_MIN\n\ +#define UINT_LEAST64_MAX UINT64_MAX\n\ +#define UINT_LEAST64_MIN UINT64_MIN\n\ +#define INT_LEAST64_MAX INT64_MAX\n\ +#define INT_LEAST64_MIN INT64_MIN\n\n\ +#define UINTMAX_MAX UINT64_MAX\n\ +#define UINTMAX_MIN UINT64_MIN\n\ +#define INTMAX_MAX INT64_MAX\n\ +#define INTMAX_MIN INT64_MIN\n\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aab_Vxworks_Unistd fix + */ +tSCC zAab_Vxworks_UnistdName[] = + "AAB_vxworks_unistd"; + +/* + * File name selection pattern + */ +tSCC zAab_Vxworks_UnistdList[] = + "unistd.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAab_Vxworks_UnistdMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; +#define AAB_VXWORKS_UNISTD_TEST_CT 0 +#define aAab_Vxworks_UnistdTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Aab_Vxworks_Unistd + */ +static const char* apzAab_Vxworks_UnistdPatch[] = { +"#ifndef _UNISTD_H\n\ +#define _UNISTD_H\n\ +#include_next <unistd.h>\n\ +#include <ioLib.h>\n\ +#ifndef STDIN_FILENO\n\ +#define STDIN_FILENO 0\n\ +#endif\n\ +#ifndef STDOUT_FILENO\n\ +#define STDOUT_FILENO 1\n\ +#endif\n\ +#ifndef STDERR_FILENO\n\ +#define STDERR_FILENO 2\n\ +#endif\n\ +#endif /* _UNISTD_H */", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Assert fix + */ +tSCC zAix_AssertName[] = + "aix_assert"; + +/* + * File name selection pattern + */ +tSCC zAix_AssertList[] = + "assert.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_AssertMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_AssertSelect0[] = + "#define[ \t]static_assert[ \t]_Static_assert"; + +#define AIX_ASSERT_TEST_CT 1 +static tTestDesc aAix_AssertTests[] = { + { TT_EGREP, zAix_AssertSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Assert + */ +static const char* apzAix_AssertPatch[] = { + "format", + "#ifndef __cplusplus\n\ +%0\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Aix_Complex fix */ tSCC zAix_ComplexName[] = @@ -596,6 +886,60 @@ static const char* apzAix_Net_If_ArpPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Aix_Null fix + */ +tSCC zAix_NullName[] = + "aix_null"; + +/* + * File name selection pattern + */ +tSCC zAix_NullList[] = + "curses.h\0dbm.h\0locale.h\0stdio.h\0stdlib.h\0string.h\0time.h\0unistd.h\0wchar.h\0sys/dir.h\0sys/param.h\0sys/types.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_NullMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_NullSelect0[] = + "#define[ \t]+NULL[ \t]+\\(*0L*\\)*"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zAix_NullBypass0[] = + "__null"; + +#define AIX_NULL_TEST_CT 2 +static tTestDesc aAix_NullTests[] = { + { TT_NEGREP, zAix_NullBypass0, (regex_t*)NULL }, + { TT_EGREP, zAix_NullSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Null + */ +static const char* apzAix_NullPatch[] = { + "format", + "#ifndef NULL\n\ +#ifdef __cplusplus\n\ +#ifdef __GNUG__\n\ +#define NULL __null\n\ +#else /* ! __GNUG__ */\n\ +#define NULL 0L\n\ +#endif /* __GNUG__ */\n\ +#else /* ! __cplusplus */\n\ +#define NULL ((void *)0)\n\ +#endif /* __cplusplus */\n\ +#endif /* !NULL */", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Aix_Once_Init_1 fix */ tSCC zAix_Once_Init_1Name[] = @@ -674,6 +1018,123 @@ static const char* apzAix_Once_Init_2Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Aix_Mutex_Initializer_1 fix + */ +tSCC zAix_Mutex_Initializer_1Name[] = + "aix_mutex_initializer_1"; + +/* + * File name selection pattern + */ +tSCC zAix_Mutex_Initializer_1List[] = + "pthread.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Mutex_Initializer_1Machs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Mutex_Initializer_1Select0[] = + "#define[ \t]PTHREAD_MUTEX_INITIALIZER \\\\\n\ +\\{ \\\\\n"; + +#define AIX_MUTEX_INITIALIZER_1_TEST_CT 1 +static tTestDesc aAix_Mutex_Initializer_1Tests[] = { + { TT_EGREP, zAix_Mutex_Initializer_1Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Mutex_Initializer_1 + */ +static const char* apzAix_Mutex_Initializer_1Patch[] = { + "format", + "#define PTHREAD_MUTEX_INITIALIZER \\\n\ +{{ \\\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Cond_Initializer_1 fix + */ +tSCC zAix_Cond_Initializer_1Name[] = + "aix_cond_initializer_1"; + +/* + * File name selection pattern + */ +tSCC zAix_Cond_Initializer_1List[] = + "pthread.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Cond_Initializer_1Machs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Cond_Initializer_1Select0[] = + "#define[ \t]PTHREAD_COND_INITIALIZER \\\\\n\ +\\{ \\\\\n"; + +#define AIX_COND_INITIALIZER_1_TEST_CT 1 +static tTestDesc aAix_Cond_Initializer_1Tests[] = { + { TT_EGREP, zAix_Cond_Initializer_1Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Cond_Initializer_1 + */ +static const char* apzAix_Cond_Initializer_1Patch[] = { + "format", + "#define PTHREAD_COND_INITIALIZER \\\n\ +{{ \\\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Rwlock_Initializer_1 fix + */ +tSCC zAix_Rwlock_Initializer_1Name[] = + "aix_rwlock_initializer_1"; + +/* + * File name selection pattern + */ +tSCC zAix_Rwlock_Initializer_1List[] = + "pthread.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Rwlock_Initializer_1Machs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Rwlock_Initializer_1Select0[] = + "#define[ \t]PTHREAD_RWLOCK_INITIALIZER \\\\\n\ +\\{ \\\\\n"; + +#define AIX_RWLOCK_INITIALIZER_1_TEST_CT 1 +static tTestDesc aAix_Rwlock_Initializer_1Tests[] = { + { TT_EGREP, zAix_Rwlock_Initializer_1Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Rwlock_Initializer_1 + */ +static const char* apzAix_Rwlock_Initializer_1Patch[] = { + "format", + "#define PTHREAD_RWLOCK_INITIALIZER \\\n\ +{{ \\\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Aix_Pthread fix */ tSCC zAix_PthreadName[] = @@ -1064,118 +1525,6 @@ static const char* apzAlpha___AssertPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Alpha___Extern_Prefix fix - */ -tSCC zAlpha___Extern_PrefixName[] = - "alpha___extern_prefix"; - -/* - * File name selection pattern - */ -#define zAlpha___Extern_PrefixList (char*)NULL -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha___Extern_PrefixMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha___Extern_PrefixSelect0[] = - "(.*)(defined\\(__DECC\\)|def[ \t]*__DECC)[ \t]*\n\ -(#[ \t]*pragma[ \t]*extern_prefix.*)"; - -#define ALPHA___EXTERN_PREFIX_TEST_CT 1 -static tTestDesc aAlpha___Extern_PrefixTests[] = { - { TT_EGREP, zAlpha___Extern_PrefixSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha___Extern_Prefix - */ -static const char* apzAlpha___Extern_PrefixPatch[] = { - "format", - "%1 (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX))\n\ -%3", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha___Extern_Prefix_Standards fix - */ -tSCC zAlpha___Extern_Prefix_StandardsName[] = - "alpha___extern_prefix_standards"; - -/* - * File name selection pattern - */ -tSCC zAlpha___Extern_Prefix_StandardsList[] = - "standards.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha___Extern_Prefix_StandardsMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha___Extern_Prefix_StandardsSelect0[] = - ".*!defined\\(_LIBC_POLLUTION_H_\\) && !defined\\(__DECC\\)"; - -#define ALPHA___EXTERN_PREFIX_STANDARDS_TEST_CT 1 -static tTestDesc aAlpha___Extern_Prefix_StandardsTests[] = { - { TT_EGREP, zAlpha___Extern_Prefix_StandardsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha___Extern_Prefix_Standards - */ -static const char* apzAlpha___Extern_Prefix_StandardsPatch[] = { - "format", - "%0 && !defined(__PRAGMA_EXTERN_PREFIX)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha___Extern_Prefix_Sys_Stat fix - */ -tSCC zAlpha___Extern_Prefix_Sys_StatName[] = - "alpha___extern_prefix_sys_stat"; - -/* - * File name selection pattern - */ -tSCC zAlpha___Extern_Prefix_Sys_StatList[] = - "sys/stat.h\0sys/mount.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha___Extern_Prefix_Sys_StatMachs[] = { - "alpha*-dec-osf5*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha___Extern_Prefix_Sys_StatSelect0[] = - "#[ \t]*if[ \t]*defined\\(__DECC\\)"; - -#define ALPHA___EXTERN_PREFIX_SYS_STAT_TEST_CT 1 -static tTestDesc aAlpha___Extern_Prefix_Sys_StatTests[] = { - { TT_EGREP, zAlpha___Extern_Prefix_Sys_StatSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha___Extern_Prefix_Sys_Stat - */ -static const char* apzAlpha___Extern_Prefix_Sys_StatPatch[] = { - "format", - "%0 || defined(__PRAGMA_EXTERN_PREFIX)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Alpha_Assert fix */ tSCC zAlpha_AssertName[] = @@ -1211,41 +1560,6 @@ static const char* apzAlpha_AssertPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Alpha_Bad_Lval fix - */ -tSCC zAlpha_Bad_LvalName[] = - "alpha_bad_lval"; - -/* - * File name selection pattern - */ -#define zAlpha_Bad_LvalList (char*)NULL -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_Bad_LvalMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_Bad_LvalSelect0[] = - "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix"; - -#define ALPHA_BAD_LVAL_TEST_CT 1 -static tTestDesc aAlpha_Bad_LvalTests[] = { - { TT_EGREP, zAlpha_Bad_LvalSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Bad_Lval - */ -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 }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Alpha_Getopt fix */ tSCC zAlpha_GetoptName[] = @@ -1351,126 +1665,6 @@ static const char* apzAlpha_ParensPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Alpha_Pthread fix - */ -tSCC zAlpha_PthreadName[] = - "alpha_pthread"; - -/* - * File name selection pattern - */ -tSCC zAlpha_PthreadList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_PthreadMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_PthreadSelect0[] = - "((#[ \t]*if)([ \t]*defined[ \t]*\\(_PTHREAD_ENV_DECC\\)|def _PTHREAD_ENV_DECC)(.*))\n\ -(#[ \t]*define _PTHREAD_USE_PTDNAM_)"; - -#define ALPHA_PTHREAD_TEST_CT 1 -static tTestDesc aAlpha_PthreadTests[] = { - { TT_EGREP, zAlpha_PthreadSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Pthread - */ -static const char* apzAlpha_PthreadPatch[] = { - "format", - "%2 defined (_PTHREAD_ENV_DECC)%4 || defined (__PRAGMA_EXTERN_PREFIX)\n\ -%5", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Pthread_Gcc fix - */ -tSCC zAlpha_Pthread_GccName[] = - "alpha_pthread_gcc"; - -/* - * File name selection pattern - */ -tSCC zAlpha_Pthread_GccList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_Pthread_GccMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_Pthread_GccSelect0[] = - "#else\n\ -# error <pthread.h>: unrecognized compiler."; - -#define ALPHA_PTHREAD_GCC_TEST_CT 1 -static tTestDesc aAlpha_Pthread_GccTests[] = { - { TT_EGREP, zAlpha_Pthread_GccSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Pthread_Gcc - */ -static const char* apzAlpha_Pthread_GccPatch[] = { - "format", - "#elif defined (__GNUC__)\n\ -# define _PTHREAD_ENV_GCC\n\ -%0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Pthread_Init fix - */ -tSCC zAlpha_Pthread_InitName[] = - "alpha_pthread_init"; - -/* - * File name selection pattern - */ -tSCC zAlpha_Pthread_InitList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_Pthread_InitMachs[] = { - "alpha*-dec-osf*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_Pthread_InitSelect0[] = - " \\* @\\(#\\).RCSfile: pthread\\.h,v \\$ .Revision: 1\\.1\\.33\\.21 \\$ \\(DEC\\) .Date: 2000/08/15 15:30:13 \\$"; - -#define ALPHA_PTHREAD_INIT_TEST_CT 1 -static tTestDesc aAlpha_Pthread_InitTests[] = { - { TT_EGREP, zAlpha_Pthread_InitSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Pthread_Init - */ -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\ -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", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Alpha_Sbrk fix */ tSCC zAlpha_SbrkName[] = @@ -1854,7 +2048,7 @@ tSCC zBroken_NanList[] = * content selection pattern - do fix if pattern found */ tSCC zBroken_NanSelect0[] = - "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)"; + "#if defined\\(__APPLE_CC__\\) && \\(__APPLE_CC__ >= 1345\\)"; /* * content bypass pattern - skip fix if pattern found @@ -1917,37 +2111,37 @@ int vfscanf(FILE *, const char *, __builtin_va_list) __asm__ (_BSD_STRING(__USER /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Cdef_Cplusplus fix + * Description of Complier_H_Tradcpp fix */ -tSCC zCdef_CplusplusName[] = - "cdef_cplusplus"; +tSCC zComplier_H_TradcppName[] = + "complier_h_tradcpp"; /* * File name selection pattern */ -tSCC zCdef_CplusplusList[] = - "sys/cdefs.h\0"; +tSCC zComplier_H_TradcppList[] = + "linux/compiler.h\0"; /* * Machine/OS name selection pattern */ -#define apzCdef_CplusplusMachs (const char**)NULL +#define apzComplier_H_TradcppMachs (const char**)NULL /* * content selection pattern - do fix if pattern found */ -tSCC zCdef_CplusplusSelect0[] = - "\\[\\[noreturn\\]\\]"; +tSCC zComplier_H_TradcppSelect0[] = + "#define __builtin_warning\\(x, y\\.\\.\\.\\) \\(1\\)"; -#define CDEF_CPLUSPLUS_TEST_CT 1 -static tTestDesc aCdef_CplusplusTests[] = { - { TT_EGREP, zCdef_CplusplusSelect0, (regex_t*)NULL }, }; +#define COMPLIER_H_TRADCPP_TEST_CT 1 +static tTestDesc aComplier_H_TradcppTests[] = { + { TT_EGREP, zComplier_H_TradcppSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Cdef_Cplusplus + * Fix Command Arguments for Complier_H_Tradcpp */ -static const char* apzCdef_CplusplusPatch[] = { +static const char* apzComplier_H_TradcppPatch[] = { "format", - "__attribute__((__noreturn__))", + "/* __builtin_warning(x, y...) is obsolete */", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2067,6 +2261,44 @@ extern \"C\" {\n\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Darwin_9_Long_Double_Funcs_2 fix + */ +tSCC zDarwin_9_Long_Double_Funcs_2Name[] = + "darwin_9_long_double_funcs_2"; + +/* + * File name selection pattern + */ +tSCC zDarwin_9_Long_Double_Funcs_2List[] = + "math.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_9_Long_Double_Funcs_2Machs[] = { + "*-*-darwin7.9*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_9_Long_Double_Funcs_2Select0[] = + "#include[ \\t]+\\\""; + +#define DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT 1 +static tTestDesc aDarwin_9_Long_Double_Funcs_2Tests[] = { + { TT_EGREP, zDarwin_9_Long_Double_Funcs_2Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_9_Long_Double_Funcs_2 + */ +static const char* apzDarwin_9_Long_Double_Funcs_2Patch[] = { + "format", + "%1<%2.h>", + "([ \\t]*#[ \\t]*include[ \\t]+)\"([a-z0-9/]+)\\.h\"", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Darwin_Externc fix */ tSCC zDarwin_ExterncName[] = @@ -2612,6 +2844,108 @@ static const char* apzEcd_CursorPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Feraiseexcept_Nosse_Divbyzero fix + */ +tSCC zFeraiseexcept_Nosse_DivbyzeroName[] = + "feraiseexcept_nosse_divbyzero"; + +/* + * File name selection pattern + */ +tSCC zFeraiseexcept_Nosse_DivbyzeroList[] = + "bits/fenv.h\0*/bits/fenv.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzFeraiseexcept_Nosse_DivbyzeroMachs[] = { + "i[34567]86-*-linux*", + "x86*-linux*", + "amd64-*-linux*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zFeraiseexcept_Nosse_DivbyzeroSelect0[] = + "^([\t ]*)__asm__ __volatile__ \\(\"divss %1, %0 *\" : : \"x\" \\(__f\\), \"x\" \\(__g\\)\\);$"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zFeraiseexcept_Nosse_DivbyzeroBypass0[] = + "\"fdivp .*; fwait\""; + +#define FERAISEEXCEPT_NOSSE_DIVBYZERO_TEST_CT 2 +static tTestDesc aFeraiseexcept_Nosse_DivbyzeroTests[] = { + { TT_NEGREP, zFeraiseexcept_Nosse_DivbyzeroBypass0, (regex_t*)NULL }, + { TT_EGREP, zFeraiseexcept_Nosse_DivbyzeroSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Feraiseexcept_Nosse_Divbyzero + */ +static const char* apzFeraiseexcept_Nosse_DivbyzeroPatch[] = { + "format", + "# ifdef __SSE_MATH__\n\ +%0\n\ +# else\n\ +%1__asm__ __volatile__ (\"fdivp %%%%st, %%%%st(1); fwait\"\n\ +%1\t\t\t: \"=t\" (__f) : \"0\" (__f), \"u\" (__g) : \"st(1)\");\n\ +# endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Feraiseexcept_Nosse_Invalid fix + */ +tSCC zFeraiseexcept_Nosse_InvalidName[] = + "feraiseexcept_nosse_invalid"; + +/* + * File name selection pattern + */ +tSCC zFeraiseexcept_Nosse_InvalidList[] = + "bits/fenv.h\0*/bits/fenv.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzFeraiseexcept_Nosse_InvalidMachs[] = { + "i[34567]86-*-linux*", + "x86*-linux*", + "amd64-*-linux*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zFeraiseexcept_Nosse_InvalidSelect0[] = + "^([\t ]*)__asm__ __volatile__ \\(\"divss %0, %0 *\" : : \"x\" \\(__f\\)\\);$"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zFeraiseexcept_Nosse_InvalidBypass0[] = + "\"fdiv .*; fwait\""; + +#define FERAISEEXCEPT_NOSSE_INVALID_TEST_CT 2 +static tTestDesc aFeraiseexcept_Nosse_InvalidTests[] = { + { TT_NEGREP, zFeraiseexcept_Nosse_InvalidBypass0, (regex_t*)NULL }, + { TT_EGREP, zFeraiseexcept_Nosse_InvalidSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Feraiseexcept_Nosse_Invalid + */ +static const char* apzFeraiseexcept_Nosse_InvalidPatch[] = { + "format", + "# ifdef __SSE_MATH__\n\ +%0\n\ +# else\n\ +%1__asm__ __volatile__ (\"fdiv %%%%st, %%%%st(0); fwait\"\n\ +%1\t\t\t: \"=t\" (__f) : \"0\" (__f));\n\ +# endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Freebsd_Gcc3_Breakage fix */ tSCC zFreebsd_Gcc3_BreakageName[] = @@ -3006,7 +3340,7 @@ tSCC zGlibc_StrncpyName[] = * File name selection pattern */ tSCC zGlibc_StrncpyList[] = - "bits/string2.h\0"; + "bits/string2.h\0*/bits/string2.h\0"; /* * Machine/OS name selection pattern */ @@ -3520,6 +3854,84 @@ static const char* apzHpux11_AbsPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Hpux11_Extern_Sendfile fix + */ +tSCC zHpux11_Extern_SendfileName[] = + "hpux11_extern_sendfile"; + +/* + * File name selection pattern + */ +tSCC zHpux11_Extern_SendfileList[] = + "sys/socket.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux11_Extern_SendfileMachs[] = { + "*-hp-hpux11.[12]*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux11_Extern_SendfileSelect0[] = + "^[ \t]*extern sbsize_t sendfile.*\n\ +.*, int\\)\\);\n"; + +#define HPUX11_EXTERN_SENDFILE_TEST_CT 1 +static tTestDesc aHpux11_Extern_SendfileTests[] = { + { TT_EGREP, zHpux11_Extern_SendfileSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux11_Extern_Sendfile + */ +static const char* apzHpux11_Extern_SendfilePatch[] = { + "format", + "#ifndef _APP32_64BIT_OFF_T\n\ +%0#endif\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux11_Extern_Sendpath fix + */ +tSCC zHpux11_Extern_SendpathName[] = + "hpux11_extern_sendpath"; + +/* + * File name selection pattern + */ +tSCC zHpux11_Extern_SendpathList[] = + "sys/socket.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux11_Extern_SendpathMachs[] = { + "*-hp-hpux11.[12]*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux11_Extern_SendpathSelect0[] = + "^[ \t]*extern sbsize_t sendpath.*\n\ +.*, int\\)\\);\n"; + +#define HPUX11_EXTERN_SENDPATH_TEST_CT 1 +static tTestDesc aHpux11_Extern_SendpathTests[] = { + { TT_EGREP, zHpux11_Extern_SendpathSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux11_Extern_Sendpath + */ +static const char* apzHpux11_Extern_SendpathPatch[] = { + "format", + "#ifndef _APP32_64BIT_OFF_T\n\ +%0#endif\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Hpux11_Fabsf fix */ tSCC zHpux11_FabsfName[] = @@ -3751,355 +4163,372 @@ static const char* apzHpux8_Bogus_InlinesPatch[] = { sed_cmd_z, /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Ctype_Macros fix + * Description of Hpux_C99_Intptr fix */ -tSCC zHpux_Ctype_MacrosName[] = - "hpux_ctype_macros"; +tSCC zHpux_C99_IntptrName[] = + "hpux_c99_intptr"; /* * File name selection pattern */ -tSCC zHpux_Ctype_MacrosList[] = - "ctype.h\0"; +tSCC zHpux_C99_IntptrList[] = + "stdint-hpux11.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ -#define apzHpux_Ctype_MacrosMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux_Ctype_MacrosSelect0[] = - "((: |\\()__SB_masks \\? )(__SB_masks\\[__(alnum|c)\\] & _IS)"; - -#define HPUX_CTYPE_MACROS_TEST_CT 1 -static tTestDesc aHpux_Ctype_MacrosTests[] = { - { TT_EGREP, zHpux_Ctype_MacrosSelect0, (regex_t*)NULL }, }; +tSCC* apzHpux_C99_IntptrMachs[] = { + "*-hp-hpux11.3*", + (const char*)NULL }; +#define HPUX_C99_INTPTR_TEST_CT 0 +#define aHpux_C99_IntptrTests (tTestDesc*)NULL /* - * Fix Command Arguments for Hpux_Ctype_Macros + * Fix Command Arguments for Hpux_C99_Intptr */ -static const char* apzHpux_Ctype_MacrosPatch[] = { - "format", - "%1(int)%3", +static const char* apzHpux_C99_IntptrPatch[] = { sed_cmd_z, + "-e", "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Htonl fix + * Description of Hpux_C99_Inttypes fix */ -tSCC zHpux_HtonlName[] = - "hpux_htonl"; +tSCC zHpux_C99_InttypesName[] = + "hpux_c99_inttypes"; /* * File name selection pattern */ -tSCC zHpux_HtonlList[] = - "netinet/in.h\0"; +tSCC zHpux_C99_InttypesList[] = + "inttypes.h\0stdint-hpux11.h\0stdint.h\0"; /* * Machine/OS name selection pattern */ -#define apzHpux_HtonlMachs (const char**)NULL +tSCC* apzHpux_C99_InttypesMachs[] = { + "*-hp-hpux11.[23]*", + (const char*)NULL }; +#define HPUX_C99_INTTYPES_TEST_CT 0 +#define aHpux_C99_InttypesTests (tTestDesc*)NULL /* - * content selection pattern - do fix if pattern found + * Fix Command Arguments for Hpux_C99_Inttypes */ -tSCC zHpux_HtonlSelect0[] = - "#ifndef _XOPEN_SOURCE_EXTENDED[ \t]*\n\ -(/\\*\n\ - \\* Macros for number representation conversion\\.\n\ - \\*/\n\ -#ifndef ntohl)"; +static const char* apzHpux_C99_InttypesPatch[] = { sed_cmd_z, + "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@#define UINT32_C(__c) __CONCAT__(__c,u)@", + (char*)NULL }; -#define HPUX_HTONL_TEST_CT 1 -static tTestDesc aHpux_HtonlTests[] = { - { TT_EGREP, zHpux_HtonlSelect0, (regex_t*)NULL }, }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux_C99_Inttypes2 fix + */ +tSCC zHpux_C99_Inttypes2Name[] = + "hpux_c99_inttypes2"; /* - * Fix Command Arguments for Hpux_Htonl + * File name selection pattern */ -static const char* apzHpux_HtonlPatch[] = { - "format", - "#if 1\n\ -%1", +tSCC zHpux_C99_Inttypes2List[] = + "stdint-hpux11.h\0stdint.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux_C99_Inttypes2Machs[] = { + "*-hp-hpux11.2*", + (const char*)NULL }; +#define HPUX_C99_INTTYPES2_TEST_CT 0 +#define aHpux_C99_Inttypes2Tests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Hpux_C99_Inttypes2 + */ +static const char* apzHpux_C99_Inttypes2Patch[] = { sed_cmd_z, + "-e", "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@", + "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Long_Double fix + * Description of Hpux_Ctype_Macros fix */ -tSCC zHpux_Long_DoubleName[] = - "hpux_long_double"; +tSCC zHpux_Ctype_MacrosName[] = + "hpux_ctype_macros"; /* * File name selection pattern */ -tSCC zHpux_Long_DoubleList[] = - "stdlib.h\0"; +tSCC zHpux_Ctype_MacrosList[] = + "ctype.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux_Long_DoubleMachs[] = { - "*-*-hpux10*", - "*-*-hpux11.[012]*", - (const char*)NULL }; +#define apzHpux_Ctype_MacrosMachs (const char**)NULL /* * content selection pattern - do fix if pattern found */ -tSCC zHpux_Long_DoubleSelect0[] = - "extern[ \t]long_double[ \t]strtold"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zHpux_Long_DoubleBypass0[] = - "long_double_t"; +tSCC zHpux_Ctype_MacrosSelect0[] = + "((: |\\()__SB_masks \\? )(__SB_masks\\[__(alnum|c)\\] & _IS)"; -#define HPUX_LONG_DOUBLE_TEST_CT 2 -static tTestDesc aHpux_Long_DoubleTests[] = { - { TT_NEGREP, zHpux_Long_DoubleBypass0, (regex_t*)NULL }, - { TT_EGREP, zHpux_Long_DoubleSelect0, (regex_t*)NULL }, }; +#define HPUX_CTYPE_MACROS_TEST_CT 1 +static tTestDesc aHpux_Ctype_MacrosTests[] = { + { TT_EGREP, zHpux_Ctype_MacrosSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_Long_Double + * Fix Command Arguments for Hpux_Ctype_Macros */ -static const char* apzHpux_Long_DoublePatch[] = { sed_cmd_z, - "-e", "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D", - "-e", "s/long_double/long double/g", +static const char* apzHpux_Ctype_MacrosPatch[] = { + "format", + "%1(int)%3", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Long_Double_2 fix + * Description of Hpux_Extern_Errno fix */ -tSCC zHpux_Long_Double_2Name[] = - "hpux_long_double_2"; +tSCC zHpux_Extern_ErrnoName[] = + "hpux_extern_errno"; /* * File name selection pattern */ -tSCC zHpux_Long_Double_2List[] = - "stdlib.h\0"; +tSCC zHpux_Extern_ErrnoList[] = + "errno.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux_Long_Double_2Machs[] = { - "hppa*-*-hpux11.3*", +tSCC* apzHpux_Extern_ErrnoMachs[] = { + "*-hp-hpux10.*", + "*-hp-hpux11.[0-2]*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zHpux_Long_Double_2Select0[] = - "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| defined\\(_PROTOTYPES\\) \\|\\| defined\\(_LONG_DOUBLE_STRUCT\\)"; +tSCC zHpux_Extern_ErrnoSelect0[] = + "^[ \t]*extern int errno;$"; -#define HPUX_LONG_DOUBLE_2_TEST_CT 1 -static tTestDesc aHpux_Long_Double_2Tests[] = { - { TT_EGREP, zHpux_Long_Double_2Select0, (regex_t*)NULL }, }; +#define HPUX_EXTERN_ERRNO_TEST_CT 1 +static tTestDesc aHpux_Extern_ErrnoTests[] = { + { TT_EGREP, zHpux_Extern_ErrnoSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_Long_Double_2 + * Fix Command Arguments for Hpux_Extern_Errno */ -static const char* apzHpux_Long_Double_2Patch[] = { +static const char* apzHpux_Extern_ErrnoPatch[] = { "format", - "# if !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)", + "#ifdef __cplusplus\n\ +extern \"C\" {\n\ +#endif\n\ +%0\n\ +#ifdef __cplusplus\n\ +}\n\ +#endif", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Systime fix + * Description of Hpux_Htonl fix */ -tSCC zHpux_SystimeName[] = - "hpux_systime"; +tSCC zHpux_HtonlName[] = + "hpux_htonl"; /* * File name selection pattern */ -tSCC zHpux_SystimeList[] = - "sys/time.h\0"; +tSCC zHpux_HtonlList[] = + "netinet/in.h\0"; /* * Machine/OS name selection pattern */ -#define apzHpux_SystimeMachs (const char**)NULL +#define apzHpux_HtonlMachs (const char**)NULL /* * content selection pattern - do fix if pattern found */ -tSCC zHpux_SystimeSelect0[] = - "^extern struct sigevent;"; +tSCC zHpux_HtonlSelect0[] = + "#ifndef _XOPEN_SOURCE_EXTENDED[ \t]*\n\ +(/\\*\n\ + \\* Macros for number representation conversion\\.\n\ + \\*/\n\ +#ifndef ntohl)"; -#define HPUX_SYSTIME_TEST_CT 1 -static tTestDesc aHpux_SystimeTests[] = { - { TT_EGREP, zHpux_SystimeSelect0, (regex_t*)NULL }, }; +#define HPUX_HTONL_TEST_CT 1 +static tTestDesc aHpux_HtonlTests[] = { + { TT_EGREP, zHpux_HtonlSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_Systime + * Fix Command Arguments for Hpux_Htonl */ -static const char* apzHpux_SystimePatch[] = { +static const char* apzHpux_HtonlPatch[] = { "format", - "struct sigevent;", + "#if 1\n\ +%1", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Spu_Info fix + * Description of Hpux_Imaginary_I fix */ -tSCC zHpux_Spu_InfoName[] = - "hpux_spu_info"; +tSCC zHpux_Imaginary_IName[] = + "hpux_imaginary_i"; /* * File name selection pattern */ -tSCC zHpux_Spu_InfoList[] = - "ia64/sys/getppdp.h\0*/sys/getppdp.h\0"; +tSCC zHpux_Imaginary_IList[] = + "complex.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux_Spu_InfoMachs[] = { - "*-hp-hpux*", +tSCC* apzHpux_Imaginary_IMachs[] = { + "ia64-hp-hpux11.*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zHpux_Spu_InfoSelect0[] = - "^.*extern.*spu_info.*"; +tSCC zHpux_Imaginary_ISelect0[] = + "^[ \t]*#[ \t]*define[ \t]*_Complex_I.*"; -#define HPUX_SPU_INFO_TEST_CT 1 -static tTestDesc aHpux_Spu_InfoTests[] = { - { TT_EGREP, zHpux_Spu_InfoSelect0, (regex_t*)NULL }, }; +#define HPUX_IMAGINARY_I_TEST_CT 1 +static tTestDesc aHpux_Imaginary_ITests[] = { + { TT_EGREP, zHpux_Imaginary_ISelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_Spu_Info + * Fix Command Arguments for Hpux_Imaginary_I */ -static const char* apzHpux_Spu_InfoPatch[] = { +static const char* apzHpux_Imaginary_IPatch[] = { "format", - "#ifdef _KERNEL\n\ -%0\n\ -#endif", + "#define _Complex_I (__extension__ 1.0iF)", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux11_Extern_Sendfile fix + * Description of Hpux_Inttype_Int8_T fix */ -tSCC zHpux11_Extern_SendfileName[] = - "hpux11_extern_sendfile"; +tSCC zHpux_Inttype_Int8_TName[] = + "hpux_inttype_int8_t"; /* * File name selection pattern */ -tSCC zHpux11_Extern_SendfileList[] = - "sys/socket.h\0"; +tSCC zHpux_Inttype_Int8_TList[] = + "sys/_inttypes.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux11_Extern_SendfileMachs[] = { - "*-hp-hpux11.[12]*", +tSCC* apzHpux_Inttype_Int8_TMachs[] = { + "*-hp-hpux1[01].*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zHpux11_Extern_SendfileSelect0[] = - "^[ \t]*extern sbsize_t sendfile.*\n\ -.*, int\\)\\);\n"; +tSCC zHpux_Inttype_Int8_TSelect0[] = + "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*"; -#define HPUX11_EXTERN_SENDFILE_TEST_CT 1 -static tTestDesc aHpux11_Extern_SendfileTests[] = { - { TT_EGREP, zHpux11_Extern_SendfileSelect0, (regex_t*)NULL }, }; +#define HPUX_INTTYPE_INT8_T_TEST_CT 1 +static tTestDesc aHpux_Inttype_Int8_TTests[] = { + { TT_EGREP, zHpux_Inttype_Int8_TSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux11_Extern_Sendfile + * Fix Command Arguments for Hpux_Inttype_Int8_T */ -static const char* apzHpux11_Extern_SendfilePatch[] = { +static const char* apzHpux_Inttype_Int8_TPatch[] = { "format", - "#ifndef _APP32_64BIT_OFF_T\n\ -%0#endif\n", + "typedef signed char int%18_t;", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux11_Extern_Sendpath fix + * Description of Hpux_Long_Double fix */ -tSCC zHpux11_Extern_SendpathName[] = - "hpux11_extern_sendpath"; +tSCC zHpux_Long_DoubleName[] = + "hpux_long_double"; /* * File name selection pattern */ -tSCC zHpux11_Extern_SendpathList[] = - "sys/socket.h\0"; +tSCC zHpux_Long_DoubleList[] = + "stdlib.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux11_Extern_SendpathMachs[] = { - "*-hp-hpux11.[12]*", +tSCC* apzHpux_Long_DoubleMachs[] = { + "*-*-hpux10*", + "*-*-hpux11.[012]*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zHpux11_Extern_SendpathSelect0[] = - "^[ \t]*extern sbsize_t sendpath.*\n\ -.*, int\\)\\);\n"; +tSCC zHpux_Long_DoubleSelect0[] = + "extern[ \t]long_double[ \t]strtold"; -#define HPUX11_EXTERN_SENDPATH_TEST_CT 1 -static tTestDesc aHpux11_Extern_SendpathTests[] = { - { TT_EGREP, zHpux11_Extern_SendpathSelect0, (regex_t*)NULL }, }; +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zHpux_Long_DoubleBypass0[] = + "long_double_t"; + +#define HPUX_LONG_DOUBLE_TEST_CT 2 +static tTestDesc aHpux_Long_DoubleTests[] = { + { TT_NEGREP, zHpux_Long_DoubleBypass0, (regex_t*)NULL }, + { TT_EGREP, zHpux_Long_DoubleSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux11_Extern_Sendpath + * Fix Command Arguments for Hpux_Long_Double */ -static const char* apzHpux11_Extern_SendpathPatch[] = { - "format", - "#ifndef _APP32_64BIT_OFF_T\n\ -%0#endif\n", +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 }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Extern_Errno fix + * Description of Hpux_Long_Double_2 fix */ -tSCC zHpux_Extern_ErrnoName[] = - "hpux_extern_errno"; +tSCC zHpux_Long_Double_2Name[] = + "hpux_long_double_2"; /* * File name selection pattern */ -tSCC zHpux_Extern_ErrnoList[] = - "errno.h\0"; +tSCC zHpux_Long_Double_2List[] = + "stdlib.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux_Extern_ErrnoMachs[] = { - "*-hp-hpux10.*", - "*-hp-hpux11.[0-2]*", +tSCC* apzHpux_Long_Double_2Machs[] = { + "hppa*-*-hpux11.3*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zHpux_Extern_ErrnoSelect0[] = - "^[ \t]*extern int errno;$"; +tSCC zHpux_Long_Double_2Select0[] = + "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| defined\\(_PROTOTYPES\\) \\|\\| defined\\(_LONG_DOUBLE_STRUCT\\)"; -#define HPUX_EXTERN_ERRNO_TEST_CT 1 -static tTestDesc aHpux_Extern_ErrnoTests[] = { - { TT_EGREP, zHpux_Extern_ErrnoSelect0, (regex_t*)NULL }, }; +#define HPUX_LONG_DOUBLE_2_TEST_CT 1 +static tTestDesc aHpux_Long_Double_2Tests[] = { + { TT_EGREP, zHpux_Long_Double_2Select0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_Extern_Errno + * Fix Command Arguments for Hpux_Long_Double_2 */ -static const char* apzHpux_Extern_ErrnoPatch[] = { +static const char* apzHpux_Long_Double_2Patch[] = { "format", - "#ifdef __cplusplus\n\ -extern \"C\" {\n\ -#endif\n\ -%0\n\ -#ifdef __cplusplus\n\ -}\n\ -#endif", + "# if !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -4144,97 +4573,41 @@ static const char* apzHpux_Pthread_InitializersPatch[] = { sed_cmd_z, /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_C99_Intptr fix - */ -tSCC zHpux_C99_IntptrName[] = - "hpux_c99_intptr"; - -/* - * File name selection pattern - */ -tSCC zHpux_C99_IntptrList[] = - "stdint-hpux11.h\0stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzHpux_C99_IntptrMachs[] = { - "*-hp-hpux11.3*", - (const char*)NULL }; -#define HPUX_C99_INTPTR_TEST_CT 0 -#define aHpux_C99_IntptrTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Hpux_C99_Intptr - */ -static const char* apzHpux_C99_IntptrPatch[] = { sed_cmd_z, - "-e", "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux_C99_Inttypes fix + * Description of Hpux_Spu_Info fix */ -tSCC zHpux_C99_InttypesName[] = - "hpux_c99_inttypes"; +tSCC zHpux_Spu_InfoName[] = + "hpux_spu_info"; /* * File name selection pattern */ -tSCC zHpux_C99_InttypesList[] = - "inttypes.h\0stdint-hpux11.h\0stdint.h\0"; +tSCC zHpux_Spu_InfoList[] = + "ia64/sys/getppdp.h\0*/sys/getppdp.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux_C99_InttypesMachs[] = { - "*-hp-hpux11.[23]*", +tSCC* apzHpux_Spu_InfoMachs[] = { + "*-hp-hpux*", (const char*)NULL }; -#define HPUX_C99_INTTYPES_TEST_CT 0 -#define aHpux_C99_InttypesTests (tTestDesc*)NULL /* - * Fix Command Arguments for Hpux_C99_Inttypes - */ -static const char* apzHpux_C99_InttypesPatch[] = { sed_cmd_z, - "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@#define UINT32_C(__c) __CONCAT__(__c,u)@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux_C99_Inttypes2 fix + * content selection pattern - do fix if pattern found */ -tSCC zHpux_C99_Inttypes2Name[] = - "hpux_c99_inttypes2"; +tSCC zHpux_Spu_InfoSelect0[] = + "^.*extern.*spu_info.*"; -/* - * File name selection pattern - */ -tSCC zHpux_C99_Inttypes2List[] = - "stdint-hpux11.h\0stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzHpux_C99_Inttypes2Machs[] = { - "*-hp-hpux11.2*", - (const char*)NULL }; -#define HPUX_C99_INTTYPES2_TEST_CT 0 -#define aHpux_C99_Inttypes2Tests (tTestDesc*)NULL +#define HPUX_SPU_INFO_TEST_CT 1 +static tTestDesc aHpux_Spu_InfoTests[] = { + { TT_EGREP, zHpux_Spu_InfoSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_C99_Inttypes2 + * Fix Command Arguments for Hpux_Spu_Info */ -static const char* apzHpux_C99_Inttypes2Patch[] = { sed_cmd_z, - "-e", "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@", - "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@", +static const char* apzHpux_Spu_InfoPatch[] = { + "format", + "#ifdef _KERNEL\n\ +%0\n\ +#endif", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -4276,76 +4649,37 @@ static const char* apzHpux_Stdint_Least_FastPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Hpux_Inttype_Int8_T fix - */ -tSCC zHpux_Inttype_Int8_TName[] = - "hpux_inttype_int8_t"; - -/* - * File name selection pattern - */ -tSCC zHpux_Inttype_Int8_TList[] = - "sys/_inttypes.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzHpux_Inttype_Int8_TMachs[] = { - "*-hp-hpux1[01].*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux_Inttype_Int8_TSelect0[] = - "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*"; - -#define HPUX_INTTYPE_INT8_T_TEST_CT 1 -static tTestDesc aHpux_Inttype_Int8_TTests[] = { - { TT_EGREP, zHpux_Inttype_Int8_TSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux_Inttype_Int8_T - */ -static const char* apzHpux_Inttype_Int8_TPatch[] = { - "format", - "typedef signed char int%18_t;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux_Imaginary_I fix + * Description of Hpux_Systime fix */ -tSCC zHpux_Imaginary_IName[] = - "hpux_imaginary_i"; +tSCC zHpux_SystimeName[] = + "hpux_systime"; /* * File name selection pattern */ -tSCC zHpux_Imaginary_IList[] = - "complex.h\0"; +tSCC zHpux_SystimeList[] = + "sys/time.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzHpux_Imaginary_IMachs[] = { - "ia64-hp-hpux11.*", - (const char*)NULL }; +#define apzHpux_SystimeMachs (const char**)NULL /* * content selection pattern - do fix if pattern found */ -tSCC zHpux_Imaginary_ISelect0[] = - "^[ \t]*#[ \t]*define[ \t]*_Complex_I.*"; +tSCC zHpux_SystimeSelect0[] = + "^extern struct sigevent;"; -#define HPUX_IMAGINARY_I_TEST_CT 1 -static tTestDesc aHpux_Imaginary_ITests[] = { - { TT_EGREP, zHpux_Imaginary_ISelect0, (regex_t*)NULL }, }; +#define HPUX_SYSTIME_TEST_CT 1 +static tTestDesc aHpux_SystimeTests[] = { + { TT_EGREP, zHpux_SystimeSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_Imaginary_I + * Fix Command Arguments for Hpux_Systime */ -static const char* apzHpux_Imaginary_IPatch[] = { +static const char* apzHpux_SystimePatch[] = { "format", - "#define _Complex_I (__extension__ 1.0iF)", + "struct sigevent;", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -4359,7 +4693,7 @@ tSCC zHuge_Val_HexName[] = * File name selection pattern */ tSCC zHuge_Val_HexList[] = - "bits/huge_val.h\0"; + "bits/huge_val.h\0*/bits/huge_val.h\0"; /* * Machine/OS name selection pattern */ @@ -4401,7 +4735,7 @@ tSCC zHuge_Valf_HexName[] = * File name selection pattern */ tSCC zHuge_Valf_HexList[] = - "bits/huge_val.h\0"; + "bits/huge_val.h\0*/bits/huge_val.h\0"; /* * Machine/OS name selection pattern */ @@ -4443,7 +4777,7 @@ tSCC zHuge_Vall_HexName[] = * File name selection pattern */ tSCC zHuge_Vall_HexList[] = - "bits/huge_val.h\0"; + "bits/huge_val.h\0*/bits/huge_val.h\0"; /* * Machine/OS name selection pattern */ @@ -4620,203 +4954,6 @@ static const char* apzIp_Missing_SemiPatch[] = { sed_cmd_z, /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Irix___Restrict fix - */ -tSCC zIrix___RestrictName[] = - "irix___restrict"; - -/* - * File name selection pattern - */ -tSCC zIrix___RestrictList[] = - "internal/sgimacros.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix___RestrictMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix___RestrictSelect0[] = - "(#ifdef __c99\n\ -)(#[ \t]*define __restrict restrict)"; - -#define IRIX___RESTRICT_TEST_CT 1 -static tTestDesc aIrix___RestrictTests[] = { - { TT_EGREP, zIrix___RestrictSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix___Restrict - */ -static const char* apzIrix___RestrictPatch[] = { - "format", - "%1# ifndef __cplusplus\n\ -%2\n\ -# endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix___Generic1 fix - */ -tSCC zIrix___Generic1Name[] = - "irix___generic1"; - -/* - * File name selection pattern - */ -tSCC zIrix___Generic1List[] = - "internal/math_core.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix___Generic1Machs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix___Generic1Select0[] = - "#define ([a-z]+)\\(x\\) *__generic.*"; - -#define IRIX___GENERIC1_TEST_CT 1 -static tTestDesc aIrix___Generic1Tests[] = { - { TT_EGREP, zIrix___Generic1Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix___Generic1 - */ -static const char* apzIrix___Generic1Patch[] = { - "format", - "extern int %1(double);\n\ -extern int %1f(float);\n\ -extern int %1l(long double);\n\ -#define %1(x) (sizeof(x) == sizeof(double) ? _%1(x) \\\n\ - : sizeof(x) == sizeof(float) ? _%1f(x) \\\n\ - : _%1l(x))\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix___Generic2 fix - */ -tSCC zIrix___Generic2Name[] = - "irix___generic2"; - -/* - * File name selection pattern - */ -tSCC zIrix___Generic2List[] = - "internal/math_core.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix___Generic2Machs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix___Generic2Select0[] = - "#define ([a-z]+)\\(x,y\\) *__generic.*"; - -#define IRIX___GENERIC2_TEST_CT 1 -static tTestDesc aIrix___Generic2Tests[] = { - { TT_EGREP, zIrix___Generic2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix___Generic2 - */ -static const char* apzIrix___Generic2Patch[] = { - "format", - "#define %1(x,y) \\\n\ - ((sizeof(x)<=4 && sizeof(y)<=4) ? _%1f(x,y) \\\n\ - : (sizeof(x)<=8 && sizeof(y)<=8) ? _%1(x,y) \\\n\ - : _%1l(x,y))\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Asm_Apostrophe fix - */ -tSCC zIrix_Asm_ApostropheName[] = - "irix_asm_apostrophe"; - -/* - * File name selection pattern - */ -tSCC zIrix_Asm_ApostropheList[] = - "sys/asm.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzIrix_Asm_ApostropheMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Asm_ApostropheSelect0[] = - "^[ \t]*#.*[Ww]e're"; - -#define IRIX_ASM_APOSTROPHE_TEST_CT 1 -static tTestDesc aIrix_Asm_ApostropheTests[] = { - { TT_EGREP, zIrix_Asm_ApostropheSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Asm_Apostrophe - */ -static const char* apzIrix_Asm_ApostrophePatch[] = { - "format", - "%1 are", - "^([ \t]*#.*[Ww]e)'re", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Complex fix - */ -tSCC zIrix_ComplexName[] = - "irix_complex"; - -/* - * File name selection pattern - */ -tSCC zIrix_ComplexList[] = - "complex.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_ComplexMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_ComplexSelect0[] = - "#define[ \t]_Complex_I[ \t]\\(\\(float[ \t]_Complex\\)[ \t]\\(__I__\\)\\)"; - -#define IRIX_COMPLEX_TEST_CT 1 -static tTestDesc aIrix_ComplexTests[] = { - { TT_EGREP, zIrix_ComplexSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Complex - */ -static const char* apzIrix_ComplexPatch[] = { sed_cmd_z, - "-e", "s/#define[ \t]_Complex_I[ \t]((float[ \t]_Complex)[ \t](__I__))/#define _Complex_I (__extension__ 1.0iF)/", - "-e", "/#define[ \t]imaginary[ \t]_Imaginary/d", - "-e", "/#define[ \t]_Imaginary_I/d", - "-e", "s/#define[ \t]I[ \t]_Imaginary_I/#define I _Complex_I/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Irix_Limits_Const fix */ tSCC zIrix_Limits_ConstName[] = @@ -4852,201 +4989,6 @@ static const char* apzIrix_Limits_ConstPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Irix_Pthread_Init fix - */ -tSCC zIrix_Pthread_InitName[] = - "irix_pthread_init"; - -/* - * File name selection pattern - */ -tSCC zIrix_Pthread_InitList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Pthread_InitMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Pthread_InitSelect0[] = - "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})"; - -#define IRIX_PTHREAD_INIT_TEST_CT 1 -static tTestDesc aIrix_Pthread_InitTests[] = { - { TT_EGREP, zIrix_Pthread_InitSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Pthread_Init - */ -static const char* apzIrix_Pthread_InitPatch[] = { - "format", - "%1{ %2 }", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Socklen_T fix - */ -tSCC zIrix_Socklen_TName[] = - "irix_socklen_t"; - -/* - * File name selection pattern - */ -tSCC zIrix_Socklen_TList[] = - "sys/socket.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Socklen_TMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Socklen_TSelect0[] = - "(#define _SOCKLEN_T\n\ -)(typedef u_int32_t socklen_t;)"; - -#define IRIX_SOCKLEN_T_TEST_CT 1 -static tTestDesc aIrix_Socklen_TTests[] = { - { TT_EGREP, zIrix_Socklen_TSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Socklen_T - */ -static const char* apzIrix_Socklen_TPatch[] = { - "format", - "%1#if _NO_XOPEN4 && _NO_XOPEN5\n\ -typedef int socklen_t;\n\ -#else\n\ -%2\n\ -#endif /* _NO_XOPEN4 && _NO_XOPEN5 */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Stdint_C99_Mode fix - */ -tSCC zIrix_Stdint_C99_ModeName[] = - "irix_stdint_c99_mode"; - -/* - * File name selection pattern - */ -tSCC zIrix_Stdint_C99_ModeList[] = - "stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Stdint_C99_ModeMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Stdint_C99_ModeSelect0[] = - "(#ifndef __c99\n\ -)(#error This header file is to be used only for c99 mode compilations)"; - -#define IRIX_STDINT_C99_MODE_TEST_CT 1 -static tTestDesc aIrix_Stdint_C99_ModeTests[] = { - { TT_EGREP, zIrix_Stdint_C99_ModeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Stdint_C99_Mode - */ -static const char* apzIrix_Stdint_C99_ModePatch[] = { - "format", - "#if 0\n\ -%2", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Stdint_C99_Types fix - */ -tSCC zIrix_Stdint_C99_TypesName[] = - "irix_stdint_c99_types"; - -/* - * File name selection pattern - */ -tSCC zIrix_Stdint_C99_TypesList[] = - "stdint-irix65.h\0stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Stdint_C99_TypesMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; -#define IRIX_STDINT_C99_TYPES_TEST_CT 0 -#define aIrix_Stdint_C99_TypesTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Irix_Stdint_C99_Types - */ -static const char* apzIrix_Stdint_C99_TypesPatch[] = { sed_cmd_z, - "-e", "s@^#define INT64_MIN.*(-0x7fffffffffffffff - 1)$@#define INT64_MIN (-0x7fffffffffffffffLL - 1)@", - "-e", "s@^#define INT64_MAX.*0x7fffffffffffffff$@#define INT64_MAX 0x7fffffffffffffffLL@", - "-e", "s@^#define UINT32_MAX.*0xffffffff$@#define UINT32_MAX 0xffffffffU@", - "-e", "s@^#define UINT64_MAX.*0xffffffffffffffff$@#define UINT64_MAX 0xffffffffffffffffULL@", - "-e", "s@^#define INTPTR_MIN.*INT32_MIN$@#define INTPTR_MIN (-0x7fffffffL - 1)@", - "-e", "s@^#define INTPTR_MAX.*INT32_MAX$@#define INTPTR_MAX 0x7fffffffL@", - "-e", "s@^#define UINTPTR_MAX.*UINT32_MAX$@#define UINTPTR_MAX 0xffffffffUL@", - "-e", "s@^#define INTPTR_MIN.*INT64_MIN@#define INTPTR_MIN (-0x7fffffffffffffffL - 1)@", - "-e", "s@^#define INTPTR_MAX.*INT64_MAX$@#define INTPTR_MAX 0x7fffffffffffffffL@", - "-e", "s@^#define UINTPTR_MAX.*UINT64_MAX$@#define UINTPTR_MAX 0xffffffffffffffffUL@", - "-e", "s@^#define PTRDIFF_MIN.*INT64_MIN$@#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1)@", - "-e", "s@^#define PTRDIFF_MAX.*INT64_MAX$@#define PTRDIFF_MAX 0x7fffffffffffffffL@", - "-e", "s@^#define SIZE_MAX.*UINT64_MAX$@#define SIZE_MAX 0xffffffffffffffffUL@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Stdint_C99_Macros fix - */ -tSCC zIrix_Stdint_C99_MacrosName[] = - "irix_stdint_c99_macros"; - -/* - * File name selection pattern - */ -tSCC zIrix_Stdint_C99_MacrosList[] = - "stdint-irix65.h\0stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_Stdint_C99_MacrosMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; -#define IRIX_STDINT_C99_MACROS_TEST_CT 0 -#define aIrix_Stdint_C99_MacrosTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Irix_Stdint_C99_Macros - */ -static const char* apzIrix_Stdint_C99_MacrosPatch[] = { sed_cmd_z, - "-e", "s@^#define INT8_C(x).*int.*_t.*$@#define INT8_C(x) (x)@", - "-e", "s@^#define INT16_C(x).*int.*_t.*$@#define INT16_C(x) (x)@", - "-e", "s@^#define INT32_C(x).*int.*_t.*$@#define INT32_C(x) (x)@", - "-e", "s@^#define INT64_C(x).*int.*_t.*$@#define INT64_C(x) (x ## LL)@", - "-e", "s@^#define UINT8_C(x).*int.*_t.*$@#define UINT8_C(x) (x)@", - "-e", "s@^#define UINT16_C(x).*int.*_t.*$@#define UINT16_C(x) (x)@", - "-e", "s@^#define UINT32_C(x).*int.*_t.*$@#define UINT32_C(x) (x ## U)@", - "-e", "s@^#define UINT64_C(x).*int.*_t.*$@#define UINT64_C(x) (x ## ULL)@", - "-e", "s@^#define INTMAX_C(x).*int.*_t.*$@#define INTMAX_C(x) (x ## LL)@", - "-e", "s@^#define UINTMAX_C(x).*int.*_t.*$@#define UINTMAX_C(x) (x ## ULL)@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Irix_Stdio_Va_List fix */ tSCC zIrix_Stdio_Va_ListName[] = @@ -5056,7 +4998,7 @@ tSCC zIrix_Stdio_Va_ListName[] = * File name selection pattern */ tSCC zIrix_Stdio_Va_ListList[] = - "stdio.h\0internal/stdio_core.h\0"; + "stdio.h\0"; /* * Machine/OS name selection pattern */ @@ -5082,45 +5024,6 @@ static const char* apzIrix_Stdio_Va_ListPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Irix_Wcsftime fix - */ -tSCC zIrix_WcsftimeName[] = - "irix_wcsftime"; - -/* - * File name selection pattern - */ -tSCC zIrix_WcsftimeList[] = - "internal/wchar_core.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzIrix_WcsftimeMachs[] = { - "mips-sgi-irix6.5", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_WcsftimeSelect0[] = - "#if _NO_XOPEN5\n\ -(extern size_t[ \t]+wcsftime.*const char *.*)"; - -#define IRIX_WCSFTIME_TEST_CT 1 -static tTestDesc aIrix_WcsftimeTests[] = { - { TT_EGREP, zIrix_WcsftimeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Wcsftime - */ -static const char* apzIrix_WcsftimePatch[] = { - "format", - "#if _NO_XOPEN5 && !defined(__c99)\n\ -%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Kandr_Concat fix */ tSCC zKandr_ConcatName[] = @@ -6455,44 +6358,6 @@ extern \"C\" {\\\n\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Solaris_Cond_Init fix - */ -tSCC zSolaris_Cond_InitName[] = - "solaris_cond_init"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Cond_InitList[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSolaris_Cond_InitMachs[] = { - "*-*-solaris2.8", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Cond_InitSelect0[] = - "@\\(#\\)pthread.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - -#define SOLARIS_COND_INIT_TEST_CT 1 -static tTestDesc aSolaris_Cond_InitTests[] = { - { TT_EGREP, zSolaris_Cond_InitSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Cond_Init - */ -static const char* apzSolaris_Cond_InitPatch[] = { - "format", - "%1, 0x4356%2", - "^(#define[ \t]+PTHREAD_COND_INITIALIZER[ \t]+\\{.*0)(\\},[ \t]*0\\}.*)$", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Solaris_Cxx_Linkage fix */ tSCC zSolaris_Cxx_LinkageName[] = @@ -6570,6 +6435,202 @@ static const char* apzSolaris_Getc_Strict_StdcPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Solaris_Int_Const fix + */ +tSCC zSolaris_Int_ConstName[] = + "solaris_int_const"; + +/* + * File name selection pattern + */ +tSCC zSolaris_Int_ConstList[] = + "sys/int_const.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzSolaris_Int_ConstMachs[] = { + "*-*-solaris2*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSolaris_Int_ConstSelect0[] = + "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n\ +(/*.**/)\n\ +#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*"; + +#define SOLARIS_INT_CONST_TEST_CT 1 +static tTestDesc aSolaris_Int_ConstTests[] = { + { TT_EGREP, zSolaris_Int_ConstSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Solaris_Int_Const + */ +static const char* apzSolaris_Int_ConstPatch[] = { + "format", + "#define\tUINT8_C(c)\t(c)\n\ +%1\n\ +#define\tUINT16_C(c)\t(c)", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Solaris_Int_Limits_1 fix + */ +tSCC zSolaris_Int_Limits_1Name[] = + "solaris_int_limits_1"; + +/* + * File name selection pattern + */ +tSCC zSolaris_Int_Limits_1List[] = + "sys/int_limits.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzSolaris_Int_Limits_1Machs[] = { + "*-*-solaris2*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSolaris_Int_Limits_1Select0[] = + "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n\ +#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)"; + +#define SOLARIS_INT_LIMITS_1_TEST_CT 1 +static tTestDesc aSolaris_Int_Limits_1Tests[] = { + { TT_EGREP, zSolaris_Int_Limits_1Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Solaris_Int_Limits_1 + */ +static const char* apzSolaris_Int_Limits_1Patch[] = { + "format", + "#define\tUINT8_MAX\t(255)\n\ +#define\tUINT16_MAX\t(65535)", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Solaris_Int_Limits_2 fix + */ +tSCC zSolaris_Int_Limits_2Name[] = + "solaris_int_limits_2"; + +/* + * File name selection pattern + */ +tSCC zSolaris_Int_Limits_2List[] = + "sys/int_limits.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzSolaris_Int_Limits_2Machs[] = { + "*-*-solaris2*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSolaris_Int_Limits_2Select0[] = + "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*"; + +#define SOLARIS_INT_LIMITS_2_TEST_CT 1 +static tTestDesc aSolaris_Int_Limits_2Tests[] = { + { TT_EGREP, zSolaris_Int_Limits_2Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Solaris_Int_Limits_2 + */ +static const char* apzSolaris_Int_Limits_2Patch[] = { + "format", + "#define\t%1_FAST16_%2 %132_%2", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Solaris_Int_Limits_3 fix + */ +tSCC zSolaris_Int_Limits_3Name[] = + "solaris_int_limits_3"; + +/* + * File name selection pattern + */ +tSCC zSolaris_Int_Limits_3List[] = + "sys/int_limits.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzSolaris_Int_Limits_3Machs[] = { + "*-*-solaris2*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSolaris_Int_Limits_3Select0[] = + "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL"; + +#define SOLARIS_INT_LIMITS_3_TEST_CT 1 +static tTestDesc aSolaris_Int_Limits_3Tests[] = { + { TT_EGREP, zSolaris_Int_Limits_3Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Solaris_Int_Limits_3 + */ +static const char* apzSolaris_Int_Limits_3Patch[] = { + "format", + "#define\tSIZE_MAX\t4294967295U", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Solaris_Int_Types fix + */ +tSCC zSolaris_Int_TypesName[] = + "solaris_int_types"; + +/* + * File name selection pattern + */ +tSCC zSolaris_Int_TypesList[] = + "sys/int_types.h\0"; +/* + * Machine/OS name selection pattern + */ +#define apzSolaris_Int_TypesMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSolaris_Int_TypesSelect0[] = + "__STDC__ - 0 == 0"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zSolaris_Int_TypesBypass0[] = + "_LONGLONG_TYPE"; + +#define SOLARIS_INT_TYPES_TEST_CT 2 +static tTestDesc aSolaris_Int_TypesTests[] = { + { TT_NEGREP, zSolaris_Int_TypesBypass0, (regex_t*)NULL }, + { TT_EGREP, zSolaris_Int_TypesSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Solaris_Int_Types + */ +static const char* apzSolaris_Int_TypesPatch[] = { + "format", + "(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Solaris_Longjmp_Noreturn fix */ tSCC zSolaris_Longjmp_NoreturnName[] = @@ -6657,6 +6718,45 @@ static const char* apzSolaris_Math_1Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Solaris_Math_10 fix + */ +tSCC zSolaris_Math_10Name[] = + "solaris_math_10"; + +/* + * File name selection pattern + */ +tSCC zSolaris_Math_10List[] = + "iso/math_c99.h\0"; +/* + * Machine/OS name selection pattern + */ +#define apzSolaris_Math_10Machs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSolaris_Math_10Select0[] = + "@\\(#\\)math_c99.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; + +#define SOLARIS_MATH_10_TEST_CT 1 +static tTestDesc aSolaris_Math_10Tests[] = { + { TT_EGREP, zSolaris_Math_10Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Solaris_Math_10 + */ +static const char* apzSolaris_Math_10Patch[] = { + "format", + "#define\tisinf(x) __builtin_isinf(x)", + "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n\ +[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);[ \t]*\\\\\n\ +[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*INFINITY[ \t]*\\|\\|[ \t]*\\\\\n\ +[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*\\(-INFINITY\\);[ \t]*\\}\\)", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Solaris_Math_2 fix */ tSCC zSolaris_Math_2Name[] = @@ -6877,45 +6977,6 @@ static const char* apzSolaris_Math_9Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Solaris_Math_10 fix - */ -tSCC zSolaris_Math_10Name[] = - "solaris_math_10"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Math_10List[] = - "iso/math_c99.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzSolaris_Math_10Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Math_10Select0[] = - "@\\(#\\)math_c99.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - -#define SOLARIS_MATH_10_TEST_CT 1 -static tTestDesc aSolaris_Math_10Tests[] = { - { TT_EGREP, zSolaris_Math_10Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Math_10 - */ -static const char* apzSolaris_Math_10Patch[] = { - "format", - "#define\tisinf(x) __builtin_isinf(x)", - "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n\ -[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);[ \t]*\\\\\n\ -[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*INFINITY[ \t]*\\|\\|[ \t]*\\\\\n\ -[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*\\(-INFINITY\\);[ \t]*\\}\\)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Solaris_Mutex_Init_2 fix */ tSCC zSolaris_Mutex_Init_2Name[] = @@ -6960,88 +7021,6 @@ static const char* apzSolaris_Mutex_Init_2Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Solaris_Pow_Int_Overload fix - */ -tSCC zSolaris_Pow_Int_OverloadName[] = - "solaris_pow_int_overload"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Pow_Int_OverloadList[] = - "iso/math_iso.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSolaris_Pow_Int_OverloadMachs[] = { - "*-*-solaris2*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Pow_Int_OverloadSelect0[] = - "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\) *\\{[^{}]*\n\ -[^{}]*\\}"; - -#define SOLARIS_POW_INT_OVERLOAD_TEST_CT 1 -static tTestDesc aSolaris_Pow_Int_OverloadTests[] = { - { TT_EGREP, zSolaris_Pow_Int_OverloadSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Pow_Int_Overload - */ -static const char* apzSolaris_Pow_Int_OverloadPatch[] = { - "format", - "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Rwlock_Init_1 fix - */ -tSCC zSolaris_Rwlock_Init_1Name[] = - "solaris_rwlock_init_1"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Rwlock_Init_1List[] = - "pthread.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSolaris_Rwlock_Init_1Machs[] = { - "*-*-solaris*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Rwlock_Init_1Select0[] = - "@\\(#\\)pthread.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - -#define SOLARIS_RWLOCK_INIT_1_TEST_CT 1 -static tTestDesc aSolaris_Rwlock_Init_1Tests[] = { - { TT_EGREP, zSolaris_Rwlock_Init_1Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Rwlock_Init_1 - */ -static const char* apzSolaris_Rwlock_Init_1Patch[] = { - "format", - "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n\ -%0\n\ -#else\n\ -%1{0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}}\n\ -#endif", - "(^#define[ \t]+PTHREAD_RWLOCK_INITIALIZER[ \t]+)\\{0, 0, 0, \\{0, 0, 0\\}, \\{0, 0\\}, \\{0, 0\\}\\}[ \t]*$", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * * Description of Solaris_Once_Init_1 fix */ tSCC zSolaris_Once_Init_1Name[] = @@ -7123,235 +7102,121 @@ static const char* apzSolaris_Once_Init_2Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Solaris_Int_Const fix - */ -tSCC zSolaris_Int_ConstName[] = - "solaris_int_const"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Int_ConstList[] = - "sys/int_const.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSolaris_Int_ConstMachs[] = { - "*-*-solaris2*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Int_ConstSelect0[] = - "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n\ -(/*.**/)\n\ -#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*"; - -#define SOLARIS_INT_CONST_TEST_CT 1 -static tTestDesc aSolaris_Int_ConstTests[] = { - { TT_EGREP, zSolaris_Int_ConstSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Int_Const - */ -static const char* apzSolaris_Int_ConstPatch[] = { - "format", - "#define\tUINT8_C(c)\t(c)\n\ -%1\n\ -#define\tUINT16_C(c)\t(c)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Int_Limits_1 fix - */ -tSCC zSolaris_Int_Limits_1Name[] = - "solaris_int_limits_1"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Int_Limits_1List[] = - "sys/int_limits.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSolaris_Int_Limits_1Machs[] = { - "*-*-solaris2*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Int_Limits_1Select0[] = - "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n\ -#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)"; - -#define SOLARIS_INT_LIMITS_1_TEST_CT 1 -static tTestDesc aSolaris_Int_Limits_1Tests[] = { - { TT_EGREP, zSolaris_Int_Limits_1Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Int_Limits_1 - */ -static const char* apzSolaris_Int_Limits_1Patch[] = { - "format", - "#define\tUINT8_MAX\t(255)\n\ -#define\tUINT16_MAX\t(65535)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Int_Limits_2 fix + * Description of Solaris_Posix_Spawn_Restrict fix */ -tSCC zSolaris_Int_Limits_2Name[] = - "solaris_int_limits_2"; +tSCC zSolaris_Posix_Spawn_RestrictName[] = + "solaris_posix_spawn_restrict"; /* * File name selection pattern */ -tSCC zSolaris_Int_Limits_2List[] = - "sys/int_limits.h\0"; +tSCC zSolaris_Posix_Spawn_RestrictList[] = + "spawn.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzSolaris_Int_Limits_2Machs[] = { +tSCC* apzSolaris_Posix_Spawn_RestrictMachs[] = { "*-*-solaris2*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zSolaris_Int_Limits_2Select0[] = - "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*"; +tSCC zSolaris_Posix_Spawn_RestrictSelect0[] = + "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; -#define SOLARIS_INT_LIMITS_2_TEST_CT 1 -static tTestDesc aSolaris_Int_Limits_2Tests[] = { - { TT_EGREP, zSolaris_Int_Limits_2Select0, (regex_t*)NULL }, }; +#define SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT 1 +static tTestDesc aSolaris_Posix_Spawn_RestrictTests[] = { + { TT_EGREP, zSolaris_Posix_Spawn_RestrictSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Solaris_Int_Limits_2 + * Fix Command Arguments for Solaris_Posix_Spawn_Restrict */ -static const char* apzSolaris_Int_Limits_2Patch[] = { +static const char* apzSolaris_Posix_Spawn_RestrictPatch[] = { "format", - "#define\t%1_FAST16_%2 %132_%2", + "%1*_RESTRICT_KYWD %2%3", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Solaris_Int_Limits_3 fix + * Description of Solaris_Pow_Int_Overload fix */ -tSCC zSolaris_Int_Limits_3Name[] = - "solaris_int_limits_3"; +tSCC zSolaris_Pow_Int_OverloadName[] = + "solaris_pow_int_overload"; /* * File name selection pattern */ -tSCC zSolaris_Int_Limits_3List[] = - "sys/int_limits.h\0"; +tSCC zSolaris_Pow_Int_OverloadList[] = + "iso/math_iso.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzSolaris_Int_Limits_3Machs[] = { +tSCC* apzSolaris_Pow_Int_OverloadMachs[] = { "*-*-solaris2*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zSolaris_Int_Limits_3Select0[] = - "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL"; - -#define SOLARIS_INT_LIMITS_3_TEST_CT 1 -static tTestDesc aSolaris_Int_Limits_3Tests[] = { - { TT_EGREP, zSolaris_Int_Limits_3Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Int_Limits_3 - */ -static const char* apzSolaris_Int_Limits_3Patch[] = { - "format", - "#define\tSIZE_MAX\t4294967295U", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Int_Types fix - */ -tSCC zSolaris_Int_TypesName[] = - "solaris_int_types"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Int_TypesList[] = - "sys/int_types.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzSolaris_Int_TypesMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Int_TypesSelect0[] = - "__STDC__ - 0 == 0"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSolaris_Int_TypesBypass0[] = - "_LONGLONG_TYPE"; +tSCC zSolaris_Pow_Int_OverloadSelect0[] = + "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\) *\\{[^{}]*\n\ +[^{}]*\\}"; -#define SOLARIS_INT_TYPES_TEST_CT 2 -static tTestDesc aSolaris_Int_TypesTests[] = { - { TT_NEGREP, zSolaris_Int_TypesBypass0, (regex_t*)NULL }, - { TT_EGREP, zSolaris_Int_TypesSelect0, (regex_t*)NULL }, }; +#define SOLARIS_POW_INT_OVERLOAD_TEST_CT 1 +static tTestDesc aSolaris_Pow_Int_OverloadTests[] = { + { TT_EGREP, zSolaris_Pow_Int_OverloadSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Solaris_Int_Types + * Fix Command Arguments for Solaris_Pow_Int_Overload */ -static const char* apzSolaris_Int_TypesPatch[] = { +static const char* apzSolaris_Pow_Int_OverloadPatch[] = { "format", - "(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))", + "#if __cplusplus < 201103L\n\ +%0\n\ +#endif", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Solaris_Posix_Spawn_Restrict fix + * Description of Solaris_Rwlock_Init_1 fix */ -tSCC zSolaris_Posix_Spawn_RestrictName[] = - "solaris_posix_spawn_restrict"; +tSCC zSolaris_Rwlock_Init_1Name[] = + "solaris_rwlock_init_1"; /* * File name selection pattern */ -tSCC zSolaris_Posix_Spawn_RestrictList[] = - "spawn.h\0"; +tSCC zSolaris_Rwlock_Init_1List[] = + "pthread.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzSolaris_Posix_Spawn_RestrictMachs[] = { - "*-*-solaris2*", +tSCC* apzSolaris_Rwlock_Init_1Machs[] = { + "*-*-solaris*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zSolaris_Posix_Spawn_RestrictSelect0[] = - "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; +tSCC zSolaris_Rwlock_Init_1Select0[] = + "@\\(#\\)pthread.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; -#define SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT 1 -static tTestDesc aSolaris_Posix_Spawn_RestrictTests[] = { - { TT_EGREP, zSolaris_Posix_Spawn_RestrictSelect0, (regex_t*)NULL }, }; +#define SOLARIS_RWLOCK_INIT_1_TEST_CT 1 +static tTestDesc aSolaris_Rwlock_Init_1Tests[] = { + { TT_EGREP, zSolaris_Rwlock_Init_1Select0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Solaris_Posix_Spawn_Restrict + * Fix Command Arguments for Solaris_Rwlock_Init_1 */ -static const char* apzSolaris_Posix_Spawn_RestrictPatch[] = { +static const char* apzSolaris_Rwlock_Init_1Patch[] = { "format", - "%1*_RESTRICT_KYWD %2%3", + "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n\ +%0\n\ +#else\n\ +%1{0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}}\n\ +#endif", + "(^#define[ \t]+PTHREAD_RWLOCK_INITIALIZER[ \t]+)\\{0, 0, 0, \\{0, 0, 0\\}, \\{0, 0\\}, \\{0, 0\\}\\}[ \t]*$", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -7460,7 +7325,7 @@ tSCC zSolaris_Sys_Va_ListList[] = * Machine/OS name selection pattern */ tSCC* apzSolaris_Sys_Va_ListMachs[] = { - "*-*-solaris2.[89]", + "*-*-solaris2.9", (const char*)NULL }; /* @@ -7573,7 +7438,7 @@ tSCC zStdio_Va_ListName[] = * File name selection pattern */ tSCC zStdio_Va_ListList[] = - "stdio.h\0internal/stdio_core.h\0internal/wchar_core.h\0"; + "stdio.h\0"; /* * Machine/OS name selection pattern */ @@ -8143,6 +8008,41 @@ static const char* apzSunos_StrlenPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Suse_Linux_Vt_Cxx fix + */ +tSCC zSuse_Linux_Vt_CxxName[] = + "suse_linux_vt_cxx"; + +/* + * File name selection pattern + */ +tSCC zSuse_Linux_Vt_CxxList[] = + "linux/vt.h\0"; +/* + * Machine/OS name selection pattern + */ +#define apzSuse_Linux_Vt_CxxMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSuse_Linux_Vt_CxxSelect0[] = + "^[ \t]*unsigned int new;"; + +#define SUSE_LINUX_VT_CXX_TEST_CT 1 +static tTestDesc aSuse_Linux_Vt_CxxTests[] = { + { TT_EGREP, zSuse_Linux_Vt_CxxSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Suse_Linux_Vt_Cxx + */ +static const char* apzSuse_Linux_Vt_CxxPatch[] = { + "format", + "unsigned int newev;", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Svr4_Disable_Opt fix */ tSCC zSvr4_Disable_OptName[] = @@ -8233,15 +8133,8 @@ tSCC zSvr4_ProfilList[] = tSCC zSvr4_ProfilSelect0[] = "profil\\(unsigned short \\*, unsigned int, unsigned int, unsigned int\\)"; -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSvr4_ProfilBypass0[] = - "Silicon Graphics"; - -#define SVR4_PROFIL_TEST_CT 2 +#define SVR4_PROFIL_TEST_CT 1 static tTestDesc aSvr4_ProfilTests[] = { - { TT_NEGREP, zSvr4_ProfilBypass0, (regex_t*)NULL }, { TT_EGREP, zSvr4_ProfilSelect0, (regex_t*)NULL }, }; /* @@ -8428,7 +8321,7 @@ tSCC zThread_KeywordName[] = * File name selection pattern */ tSCC zThread_KeywordList[] = - "pthread.h\0bits/sigthread.h\0"; + "pthread.h\0bits/sigthread.h\0*/bits/sigthread.h\0"; /* * Machine/OS name selection pattern */ @@ -8596,6 +8489,83 @@ static const char* apzVa_I960_MacroPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Vms_Add_Missing_Braces fix + */ +tSCC zVms_Add_Missing_BracesName[] = + "vms_add_missing_braces"; + +/* + * File name selection pattern + */ +tSCC zVms_Add_Missing_BracesList[] = + "rtldef/signal.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVms_Add_Missing_BracesMachs[] = { + "*-*-*vms*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVms_Add_Missing_BracesSelect0[] = + "(_SIG_[A-Z]+_SET[ \t]+= \\{)(0x[0F]+, 0x[0F]+)"; + +#define VMS_ADD_MISSING_BRACES_TEST_CT 1 +static tTestDesc aVms_Add_Missing_BracesTests[] = { + { TT_EGREP, zVms_Add_Missing_BracesSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vms_Add_Missing_Braces + */ +static const char* apzVms_Add_Missing_BracesPatch[] = { + "format", + "%1 {%2} ", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vms_Decc_Builtin fix + */ +tSCC zVms_Decc_BuiltinName[] = + "vms_decc_builtin"; + +/* + * File name selection pattern + */ +tSCC zVms_Decc_BuiltinList[] = + "rtldef/string.h\0rtldef/time.h\0rtldef/strings.h\0rtldef/socket.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVms_Decc_BuiltinMachs[] = { + "*-*-*vms*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVms_Decc_BuiltinSelect0[] = + "(__MEMSET|__MEMMOVE|__MEMCPY|__STRLEN|__STRCPY)"; + +#define VMS_DECC_BUILTIN_TEST_CT 1 +static tTestDesc aVms_Decc_BuiltinTests[] = { + { TT_EGREP, zVms_Decc_BuiltinSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vms_Decc_Builtin + */ +static const char* apzVms_Decc_BuiltinPatch[] = { sed_cmd_z, + "-e", "s@__MEMSET@memset@", + "-e", "s@__MEMMOVE@memmove@", + "-e", "s@__MEMCPY@memcpy@", + "-e", "s@__STRLEN@strlen@", + "-e", "s@__STRCPY@strcpy@", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Vms_Define_Can_Use_Extern_Prefix fix */ tSCC zVms_Define_Can_Use_Extern_PrefixName[] = @@ -8636,6 +8606,195 @@ static const char* apzVms_Define_Can_Use_Extern_PrefixPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Vms_Disable_Decc_String_Builtins fix + */ +tSCC zVms_Disable_Decc_String_BuiltinsName[] = + "vms_disable_decc_string_builtins"; + +/* + * File name selection pattern + */ +tSCC zVms_Disable_Decc_String_BuiltinsList[] = + "rtldef/string.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVms_Disable_Decc_String_BuiltinsMachs[] = { + "*-*-*vms*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVms_Disable_Decc_String_BuiltinsSelect0[] = + "#if !defined\\(__VAX\\)\n"; + +#define VMS_DISABLE_DECC_STRING_BUILTINS_TEST_CT 1 +static tTestDesc aVms_Disable_Decc_String_BuiltinsTests[] = { + { TT_EGREP, zVms_Disable_Decc_String_BuiltinsSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vms_Disable_Decc_String_Builtins + */ +static const char* apzVms_Disable_Decc_String_BuiltinsPatch[] = { + "format", + "#if !defined(__VAX) && !defined(__GNUC__)\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vms_Do_Not_Redeclare_Hostalias fix + */ +tSCC zVms_Do_Not_Redeclare_HostaliasName[] = + "vms_do_not_redeclare_hostalias"; + +/* + * File name selection pattern + */ +tSCC zVms_Do_Not_Redeclare_HostaliasList[] = + "rtldef/resolv.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVms_Do_Not_Redeclare_HostaliasMachs[] = { + "*-*-*vms*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVms_Do_Not_Redeclare_HostaliasSelect0[] = + "(void[ \t]+fp_nquery \\(const u_char \\*, int, FILE \\*\\);)\n\ +(__char_ptr32[ \t]+hostalias \\(const char \\*\\);)"; + +#define VMS_DO_NOT_REDECLARE_HOSTALIAS_TEST_CT 1 +static tTestDesc aVms_Do_Not_Redeclare_HostaliasTests[] = { + { TT_EGREP, zVms_Do_Not_Redeclare_HostaliasSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vms_Do_Not_Redeclare_Hostalias + */ +static const char* apzVms_Do_Not_Redeclare_HostaliasPatch[] = { + "format", + "%1\n\ +/* %2 */", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vms_Forward_Declare_Struct fix + */ +tSCC zVms_Forward_Declare_StructName[] = + "vms_forward_declare_struct"; + +/* + * File name selection pattern + */ +tSCC zVms_Forward_Declare_StructList[] = + "rtldef/if.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVms_Forward_Declare_StructMachs[] = { + "*-*-*vms*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVms_Forward_Declare_StructSelect0[] = + "(/\\* forward decls for C\\+\\+ \\*/\n\ +)#ifdef __cplusplus\n"; + +#define VMS_FORWARD_DECLARE_STRUCT_TEST_CT 1 +static tTestDesc aVms_Forward_Declare_StructTests[] = { + { TT_EGREP, zVms_Forward_Declare_StructSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vms_Forward_Declare_Struct + */ +static const char* apzVms_Forward_Declare_StructPatch[] = { + "format", + "%1#if defined (__cplusplus) || defined (__GNUC__)\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vms_No_64bit_Getopt fix + */ +tSCC zVms_No_64bit_GetoptName[] = + "vms_no_64bit_getopt"; + +/* + * File name selection pattern + */ +tSCC zVms_No_64bit_GetoptList[] = + "rtldef/stdio.h\0rtldef/unistd.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVms_No_64bit_GetoptMachs[] = { + "*-*-*vms*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVms_No_64bit_GetoptSelect0[] = + "^[ \t]*(extern[ \t]*)?(int[ \t]*(getopt|optind|opterr|optopt)|(char \\*optarg))([ \t]*\\(.*\\))?;\n"; + +#define VMS_NO_64BIT_GETOPT_TEST_CT 1 +static tTestDesc aVms_No_64bit_GetoptTests[] = { + { TT_EGREP, zVms_No_64bit_GetoptSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vms_No_64bit_Getopt + */ +static const char* apzVms_No_64bit_GetoptPatch[] = { + "format", + "#if __INITIAL_POINTER_SIZE != 64 /* getopt is short ptr only. */\n\ +%0#endif\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vms_Use_Fast_Setjmp fix + */ +tSCC zVms_Use_Fast_SetjmpName[] = + "vms_use_fast_setjmp"; + +/* + * File name selection pattern + */ +tSCC zVms_Use_Fast_SetjmpList[] = + "rtldef/setjmp.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVms_Use_Fast_SetjmpMachs[] = { + "*-*-*vms*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVms_Use_Fast_SetjmpSelect0[] = + "(#[ \t]*if[ \t]*defined\\(__FAST_SETJMP\\)[ \t]*\\|\\|)"; + +#define VMS_USE_FAST_SETJMP_TEST_CT 1 +static tTestDesc aVms_Use_Fast_SetjmpTests[] = { + { TT_EGREP, zVms_Use_Fast_SetjmpSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vms_Use_Fast_Setjmp + */ +static const char* apzVms_Use_Fast_SetjmpPatch[] = { + "format", + "%0 defined (__GNUC__) ||", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Vms_Use_Pragma_Extern_Model fix */ tSCC zVms_Use_Pragma_Extern_ModelName[] = @@ -8674,39 +8833,39 @@ static const char* apzVms_Use_Pragma_Extern_ModelPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Vms_Disable_Decc_String_Builtins fix + * Description of Vms_Use_Quoted_Include fix */ -tSCC zVms_Disable_Decc_String_BuiltinsName[] = - "vms_disable_decc_string_builtins"; +tSCC zVms_Use_Quoted_IncludeName[] = + "vms_use_quoted_include"; /* * File name selection pattern */ -tSCC zVms_Disable_Decc_String_BuiltinsList[] = - "rtldef/string.h\0"; +tSCC zVms_Use_Quoted_IncludeList[] = + "rtldef/wait.h\0starlet_c/pthread.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzVms_Disable_Decc_String_BuiltinsMachs[] = { +tSCC* apzVms_Use_Quoted_IncludeMachs[] = { "*-*-*vms*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zVms_Disable_Decc_String_BuiltinsSelect0[] = - "#if !defined\\(__VAX\\)\n"; +tSCC zVms_Use_Quoted_IncludeSelect0[] = + "(#[ \t]*include[ \t]+)<(resource|builtins)\\.h>"; -#define VMS_DISABLE_DECC_STRING_BUILTINS_TEST_CT 1 -static tTestDesc aVms_Disable_Decc_String_BuiltinsTests[] = { - { TT_EGREP, zVms_Disable_Decc_String_BuiltinsSelect0, (regex_t*)NULL }, }; +#define VMS_USE_QUOTED_INCLUDE_TEST_CT 1 +static tTestDesc aVms_Use_Quoted_IncludeTests[] = { + { TT_EGREP, zVms_Use_Quoted_IncludeSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Vms_Disable_Decc_String_Builtins + * Fix Command Arguments for Vms_Use_Quoted_Include */ -static const char* apzVms_Disable_Decc_String_BuiltinsPatch[] = { +static const char* apzVms_Use_Quoted_IncludePatch[] = { "format", - "#if !defined(__VAX) && !defined(__GNUC__)\n", + "%1<sys/%2.h>", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -8751,7 +8910,17 @@ static tTestDesc aVoid_NullTests[] = { */ static const char* apzVoid_NullPatch[] = { "format", - "#define NULL 0", + "#ifndef NULL\n\ +#ifdef __cplusplus\n\ +#ifdef __GNUG__\n\ +#define NULL __null\n\ +#else /* ! __GNUG__ */\n\ +#define NULL 0L\n\ +#endif /* __GNUG__ */\n\ +#else /* ! __cplusplus */\n\ +#define NULL ((void *)0)\n\ +#endif /* __cplusplus */\n\ +#endif /* !NULL */", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -8805,6 +8974,68 @@ static const char* apzVxworks_Gcc_ProblemPatch[] = { sed_cmd_z, /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Vxworks_Ioctl_Macro fix + */ +tSCC zVxworks_Ioctl_MacroName[] = + "vxworks_ioctl_macro"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Ioctl_MacroList[] = + "ioLib.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Ioctl_MacroMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; +#define VXWORKS_IOCTL_MACRO_TEST_CT 0 +#define aVxworks_Ioctl_MacroTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Vxworks_Ioctl_Macro + */ +static const char* apzVxworks_Ioctl_MacroPatch[] = { + "format", + "%0\n\ +#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n", + "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vxworks_Mkdir_Macro fix + */ +tSCC zVxworks_Mkdir_MacroName[] = + "vxworks_mkdir_macro"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Mkdir_MacroList[] = + "sys/stat.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Mkdir_MacroMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; +#define VXWORKS_MKDIR_MACRO_TEST_CT 0 +#define aVxworks_Mkdir_MacroTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Vxworks_Mkdir_Macro + */ +static const char* apzVxworks_Mkdir_MacroPatch[] = { + "format", + "%0\n\ +#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n", + "extern[\t ]+STATUS[\t ]+mkdir[\t ]*\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*(|[_[:alpha:]][_[:alnum:]]*)\\)[\t ]*;", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Vxworks_Needs_Vxtypes fix */ tSCC zVxworks_Needs_VxtypesName[] = @@ -8888,6 +9119,42 @@ static const char* apzVxworks_Needs_VxworksPatch[] = { sed_cmd_z, /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Vxworks_Regs fix + */ +tSCC zVxworks_RegsName[] = + "vxworks_regs"; + +/* + * File name selection pattern + */ +#define zVxworks_RegsList (char*)NULL +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_RegsMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVxworks_RegsSelect0[] = + "#[\t ]*include[\t ]+[<\"]regs.h[>\"]"; + +#define VXWORKS_REGS_TEST_CT 1 +static tTestDesc aVxworks_RegsTests[] = { + { TT_EGREP, zVxworks_RegsSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vxworks_Regs + */ +static const char* apzVxworks_RegsPatch[] = { + "format", + "#include <arch/../regs.h>", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Vxworks_Time fix */ tSCC zVxworks_TimeName[] = @@ -8938,6 +9205,36 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\n\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Vxworks_Write_Const fix + */ +tSCC zVxworks_Write_ConstName[] = + "vxworks_write_const"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Write_ConstList[] = + "ioLib.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Write_ConstMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; +#define VXWORKS_WRITE_CONST_TEST_CT 0 +#define aVxworks_Write_ConstTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Vxworks_Write_Const + */ +static const char* apzVxworks_Write_ConstPatch[] = { + "format", + "extern int write (int, const char*, size_t);", + "extern[\t ]+int[\t ]+write[\t ]*\\([\t ]*int[\t ]*,[\t ]*char[\t ]*\\*[\t ]*,[\t ]*size_t[\t ]*\\)[\t ]*;", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of X11_Class fix */ tSCC zX11_ClassName[] = @@ -9106,27 +9403,36 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 266 -#define MACH_LIST_SIZE_LIMIT 181 -#define FIX_COUNT 224 +#define REGEX_COUNT 268 +#define MACH_LIST_SIZE_LIMIT 187 +#define FIX_COUNT 229 /* * Enumerate the fixes */ typedef enum { AAB_AIX_STDIO_FIXIDX, + AAB_AIX_FCNTL_FIXIDX, AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, - AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_FIXIDX, AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, AAB_FD_ZERO_SELECTBITS_H_FIXIDX, AAB_SOLARIS_SYS_VARARGS_H_FIXIDX, AAB_SUN_MEMCPY_FIXIDX, + AAB_VXWORKS_ASSERT_FIXIDX, + AAB_VXWORKS_REGS_VXTYPES_FIXIDX, + AAB_VXWORKS_STDINT_FIXIDX, + AAB_VXWORKS_UNISTD_FIXIDX, + AIX_ASSERT_FIXIDX, AIX_COMPLEX_FIXIDX, AIX_MALLOC_FIXIDX, AIX_NET_IF_ARP_FIXIDX, + AIX_NULL_FIXIDX, AIX_ONCE_INIT_1_FIXIDX, AIX_ONCE_INIT_2_FIXIDX, + AIX_MUTEX_INITIALIZER_1_FIXIDX, + AIX_COND_INITIALIZER_1_FIXIDX, + AIX_RWLOCK_INITIALIZER_1_FIXIDX, AIX_PTHREAD_FIXIDX, AIX_STDINT_1_FIXIDX, AIX_STDINT_2_FIXIDX, @@ -9137,17 +9443,10 @@ typedef enum { AIX_SYSWAIT_2_FIXIDX, AIX_VOLATILE_FIXIDX, ALPHA___ASSERT_FIXIDX, - ALPHA___EXTERN_PREFIX_FIXIDX, - ALPHA___EXTERN_PREFIX_STANDARDS_FIXIDX, - ALPHA___EXTERN_PREFIX_SYS_STAT_FIXIDX, ALPHA_ASSERT_FIXIDX, - ALPHA_BAD_LVAL_FIXIDX, ALPHA_GETOPT_FIXIDX, ALPHA_IF_SEMICOLON_FIXIDX, ALPHA_PARENS_FIXIDX, - ALPHA_PTHREAD_FIXIDX, - ALPHA_PTHREAD_GCC_FIXIDX, - ALPHA_PTHREAD_INIT_FIXIDX, ALPHA_SBRK_FIXIDX, AVOID_BOOL_DEFINE_FIXIDX, AVOID_BOOL_TYPE_FIXIDX, @@ -9159,10 +9458,11 @@ typedef enum { BROKEN_CABS_FIXIDX, BROKEN_NAN_FIXIDX, BSD_STDIO_ATTRS_CONFLICT_FIXIDX, - CDEF_CPLUSPLUS_FIXIDX, + COMPLIER_H_TRADCPP_FIXIDX, CTRL_QUOTES_DEF_FIXIDX, CTRL_QUOTES_USE_FIXIDX, CXX_UNREADY_FIXIDX, + DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, DARWIN_EXTERNC_FIXIDX, DARWIN_GCC4_BREAKAGE_FIXIDX, DARWIN_PRIVATE_EXTERN_FIXIDX, @@ -9176,6 +9476,8 @@ typedef enum { DEC_INTERN_ASM_FIXIDX, DJGPP_WCHAR_H_FIXIDX, ECD_CURSOR_FIXIDX, + FERAISEEXCEPT_NOSSE_DIVBYZERO_FIXIDX, + FERAISEEXCEPT_NOSSE_INVALID_FIXIDX, FREEBSD_GCC3_BREAKAGE_FIXIDX, FREEBSD_GCC4_BREAKAGE_FIXIDX, GLIBC_C99_INLINE_1_FIXIDX, @@ -9197,28 +9499,28 @@ typedef enum { HPUX10_CTYPE_DECLARATIONS2_FIXIDX, HPUX10_STDIO_DECLARATIONS_FIXIDX, HPUX11_ABS_FIXIDX, + HPUX11_EXTERN_SENDFILE_FIXIDX, + HPUX11_EXTERN_SENDPATH_FIXIDX, HPUX11_FABSF_FIXIDX, HPUX11_PTHREAD_CONST_FIXIDX, HPUX11_SIZE_T_FIXIDX, HPUX11_SNPRINTF_FIXIDX, HPUX11_VSNPRINTF_FIXIDX, HPUX8_BOGUS_INLINES_FIXIDX, + HPUX_C99_INTPTR_FIXIDX, + HPUX_C99_INTTYPES_FIXIDX, + HPUX_C99_INTTYPES2_FIXIDX, HPUX_CTYPE_MACROS_FIXIDX, + HPUX_EXTERN_ERRNO_FIXIDX, HPUX_HTONL_FIXIDX, + HPUX_IMAGINARY_I_FIXIDX, + HPUX_INTTYPE_INT8_T_FIXIDX, HPUX_LONG_DOUBLE_FIXIDX, HPUX_LONG_DOUBLE_2_FIXIDX, - HPUX_SYSTIME_FIXIDX, - HPUX_SPU_INFO_FIXIDX, - HPUX11_EXTERN_SENDFILE_FIXIDX, - HPUX11_EXTERN_SENDPATH_FIXIDX, - HPUX_EXTERN_ERRNO_FIXIDX, HPUX_PTHREAD_INITIALIZERS_FIXIDX, - HPUX_C99_INTPTR_FIXIDX, - HPUX_C99_INTTYPES_FIXIDX, - HPUX_C99_INTTYPES2_FIXIDX, + HPUX_SPU_INFO_FIXIDX, HPUX_STDINT_LEAST_FAST_FIXIDX, - HPUX_INTTYPE_INT8_T_FIXIDX, - HPUX_IMAGINARY_I_FIXIDX, + HPUX_SYSTIME_FIXIDX, HUGE_VAL_HEX_FIXIDX, HUGE_VALF_HEX_FIXIDX, HUGE_VALL_HEX_FIXIDX, @@ -9226,19 +9528,8 @@ typedef enum { IO_QUOTES_DEF_FIXIDX, IO_QUOTES_USE_FIXIDX, IP_MISSING_SEMI_FIXIDX, - IRIX___RESTRICT_FIXIDX, - IRIX___GENERIC1_FIXIDX, - IRIX___GENERIC2_FIXIDX, - IRIX_ASM_APOSTROPHE_FIXIDX, - IRIX_COMPLEX_FIXIDX, IRIX_LIMITS_CONST_FIXIDX, - IRIX_PTHREAD_INIT_FIXIDX, - IRIX_SOCKLEN_T_FIXIDX, - IRIX_STDINT_C99_MODE_FIXIDX, - IRIX_STDINT_C99_TYPES_FIXIDX, - IRIX_STDINT_C99_MACROS_FIXIDX, IRIX_STDIO_VA_LIST_FIXIDX, - IRIX_WCSFTIME_FIXIDX, KANDR_CONCAT_FIXIDX, LINUX_IA64_UCONTEXT_FIXIDX, LYNXOS_NO_WARNING_IN_SYS_TIME_H_FIXIDX, @@ -9273,28 +9564,27 @@ typedef enum { SOLARIS___RESTRICT_FIXIDX, SOLARIS_COMPLEX_FIXIDX, SOLARIS_COMPLEX_CXX_FIXIDX, - SOLARIS_COND_INIT_FIXIDX, SOLARIS_CXX_LINKAGE_FIXIDX, SOLARIS_GETC_STRICT_STDC_FIXIDX, + SOLARIS_INT_CONST_FIXIDX, + SOLARIS_INT_LIMITS_1_FIXIDX, + SOLARIS_INT_LIMITS_2_FIXIDX, + SOLARIS_INT_LIMITS_3_FIXIDX, + SOLARIS_INT_TYPES_FIXIDX, SOLARIS_LONGJMP_NORETURN_FIXIDX, SOLARIS_MATH_1_FIXIDX, + SOLARIS_MATH_10_FIXIDX, SOLARIS_MATH_2_FIXIDX, SOLARIS_MATH_3_FIXIDX, SOLARIS_MATH_4_FIXIDX, SOLARIS_MATH_8_FIXIDX, SOLARIS_MATH_9_FIXIDX, - SOLARIS_MATH_10_FIXIDX, SOLARIS_MUTEX_INIT_2_FIXIDX, - SOLARIS_POW_INT_OVERLOAD_FIXIDX, - SOLARIS_RWLOCK_INIT_1_FIXIDX, SOLARIS_ONCE_INIT_1_FIXIDX, SOLARIS_ONCE_INIT_2_FIXIDX, - SOLARIS_INT_CONST_FIXIDX, - SOLARIS_INT_LIMITS_1_FIXIDX, - SOLARIS_INT_LIMITS_2_FIXIDX, - SOLARIS_INT_LIMITS_3_FIXIDX, - SOLARIS_INT_TYPES_FIXIDX, SOLARIS_POSIX_SPAWN_RESTRICT_FIXIDX, + SOLARIS_POW_INT_OVERLOAD_FIXIDX, + SOLARIS_RWLOCK_INIT_1_FIXIDX, SOLARIS_STD___FILBUF_FIXIDX, SOLARIS_STDIO_TAG_FIXIDX, SOLARIS_SYS_VA_LIST_FIXIDX, @@ -9314,6 +9604,7 @@ typedef enum { SUN_RUSERS_SEMI_FIXIDX, SUN_SIGNAL_FIXIDX, SUNOS_STRLEN_FIXIDX, + SUSE_LINUX_VT_CXX_FIXIDX, SVR4_DISABLE_OPT_FIXIDX, SVR4_GETCWD_FIXIDX, SVR4_PROFIL_FIXIDX, @@ -9326,14 +9617,25 @@ typedef enum { ULTRIX_CONST_FIXIDX, ULTRIX_CONST2_FIXIDX, VA_I960_MACRO_FIXIDX, + VMS_ADD_MISSING_BRACES_FIXIDX, + VMS_DECC_BUILTIN_FIXIDX, VMS_DEFINE_CAN_USE_EXTERN_PREFIX_FIXIDX, - VMS_USE_PRAGMA_EXTERN_MODEL_FIXIDX, VMS_DISABLE_DECC_STRING_BUILTINS_FIXIDX, + VMS_DO_NOT_REDECLARE_HOSTALIAS_FIXIDX, + VMS_FORWARD_DECLARE_STRUCT_FIXIDX, + VMS_NO_64BIT_GETOPT_FIXIDX, + VMS_USE_FAST_SETJMP_FIXIDX, + VMS_USE_PRAGMA_EXTERN_MODEL_FIXIDX, + VMS_USE_QUOTED_INCLUDE_FIXIDX, VOID_NULL_FIXIDX, VXWORKS_GCC_PROBLEM_FIXIDX, + VXWORKS_IOCTL_MACRO_FIXIDX, + VXWORKS_MKDIR_MACRO_FIXIDX, VXWORKS_NEEDS_VXTYPES_FIXIDX, VXWORKS_NEEDS_VXWORKS_FIXIDX, + VXWORKS_REGS_FIXIDX, VXWORKS_TIME_FIXIDX, + VXWORKS_WRITE_CONST_FIXIDX, X11_CLASS_FIXIDX, X11_CLASS_USAGE_FIXIDX, X11_NEW_FIXIDX, @@ -9346,16 +9648,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AAB_AIX_STDIO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAab_Aix_StdioTests, apzAab_Aix_StdioPatch, 0 }, + { zAab_Aix_FcntlName, zAab_Aix_FcntlList, + apzAab_Aix_FcntlMachs, + AAB_AIX_FCNTL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAab_Aix_FcntlTests, apzAab_Aix_FcntlPatch, 0 }, + { zAab_Darwin7_9_Long_Double_FuncsName, zAab_Darwin7_9_Long_Double_FuncsList, apzAab_Darwin7_9_Long_Double_FuncsMachs, AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, - { zAab_Darwin7_9_Long_Double_Funcs_2Name, zAab_Darwin7_9_Long_Double_Funcs_2List, - apzAab_Darwin7_9_Long_Double_Funcs_2Machs, - AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAab_Darwin7_9_Long_Double_Funcs_2Tests, apzAab_Darwin7_9_Long_Double_Funcs_2Patch, 0 }, - { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, apzAab_Fd_Zero_Asm_Posix_Types_HMachs, AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, @@ -9381,6 +9683,31 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AAB_SUN_MEMCPY_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, aAab_Sun_MemcpyTests, apzAab_Sun_MemcpyPatch, 0 }, + { zAab_Vxworks_AssertName, zAab_Vxworks_AssertList, + apzAab_Vxworks_AssertMachs, + AAB_VXWORKS_ASSERT_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Vxworks_AssertTests, apzAab_Vxworks_AssertPatch, 0 }, + + { zAab_Vxworks_Regs_VxtypesName, zAab_Vxworks_Regs_VxtypesList, + apzAab_Vxworks_Regs_VxtypesMachs, + AAB_VXWORKS_REGS_VXTYPES_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Vxworks_Regs_VxtypesTests, apzAab_Vxworks_Regs_VxtypesPatch, 0 }, + + { zAab_Vxworks_StdintName, zAab_Vxworks_StdintList, + apzAab_Vxworks_StdintMachs, + AAB_VXWORKS_STDINT_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Vxworks_StdintTests, apzAab_Vxworks_StdintPatch, 0 }, + + { zAab_Vxworks_UnistdName, zAab_Vxworks_UnistdList, + apzAab_Vxworks_UnistdMachs, + AAB_VXWORKS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, + aAab_Vxworks_UnistdTests, apzAab_Vxworks_UnistdPatch, 0 }, + + { zAix_AssertName, zAix_AssertList, + apzAix_AssertMachs, + AIX_ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_AssertTests, apzAix_AssertPatch, 0 }, + { zAix_ComplexName, zAix_ComplexList, apzAix_ComplexMachs, AIX_COMPLEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9396,6 +9723,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_NET_IF_ARP_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_Net_If_ArpTests, apzAix_Net_If_ArpPatch, 0 }, + { zAix_NullName, zAix_NullList, + apzAix_NullMachs, + AIX_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_NullTests, apzAix_NullPatch, 0 }, + { zAix_Once_Init_1Name, zAix_Once_Init_1List, apzAix_Once_Init_1Machs, AIX_ONCE_INIT_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9406,6 +9738,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_ONCE_INIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_Once_Init_2Tests, apzAix_Once_Init_2Patch, 0 }, + { zAix_Mutex_Initializer_1Name, zAix_Mutex_Initializer_1List, + apzAix_Mutex_Initializer_1Machs, + AIX_MUTEX_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Mutex_Initializer_1Tests, apzAix_Mutex_Initializer_1Patch, 0 }, + + { zAix_Cond_Initializer_1Name, zAix_Cond_Initializer_1List, + apzAix_Cond_Initializer_1Machs, + AIX_COND_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Cond_Initializer_1Tests, apzAix_Cond_Initializer_1Patch, 0 }, + + { zAix_Rwlock_Initializer_1Name, zAix_Rwlock_Initializer_1List, + apzAix_Rwlock_Initializer_1Machs, + AIX_RWLOCK_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Rwlock_Initializer_1Tests, apzAix_Rwlock_Initializer_1Patch, 0 }, + { zAix_PthreadName, zAix_PthreadList, apzAix_PthreadMachs, AIX_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9456,31 +9803,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ALPHA___ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha___AssertTests, apzAlpha___AssertPatch, 0 }, - { zAlpha___Extern_PrefixName, zAlpha___Extern_PrefixList, - apzAlpha___Extern_PrefixMachs, - ALPHA___EXTERN_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha___Extern_PrefixTests, apzAlpha___Extern_PrefixPatch, 0 }, - - { zAlpha___Extern_Prefix_StandardsName, zAlpha___Extern_Prefix_StandardsList, - apzAlpha___Extern_Prefix_StandardsMachs, - ALPHA___EXTERN_PREFIX_STANDARDS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha___Extern_Prefix_StandardsTests, apzAlpha___Extern_Prefix_StandardsPatch, 0 }, - - { zAlpha___Extern_Prefix_Sys_StatName, zAlpha___Extern_Prefix_Sys_StatList, - apzAlpha___Extern_Prefix_Sys_StatMachs, - ALPHA___EXTERN_PREFIX_SYS_STAT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha___Extern_Prefix_Sys_StatTests, apzAlpha___Extern_Prefix_Sys_StatPatch, 0 }, - { zAlpha_AssertName, zAlpha_AssertList, apzAlpha_AssertMachs, ALPHA_ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha_AssertTests, apzAlpha_AssertPatch, 0 }, - { zAlpha_Bad_LvalName, zAlpha_Bad_LvalList, - apzAlpha_Bad_LvalMachs, - ALPHA_BAD_LVAL_TEST_CT, FD_MACH_ONLY, - aAlpha_Bad_LvalTests, apzAlpha_Bad_LvalPatch, 0 }, - { zAlpha_GetoptName, zAlpha_GetoptList, apzAlpha_GetoptMachs, ALPHA_GETOPT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9496,21 +9823,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ALPHA_PARENS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha_ParensTests, apzAlpha_ParensPatch, 0 }, - { zAlpha_PthreadName, zAlpha_PthreadList, - apzAlpha_PthreadMachs, - ALPHA_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha_PthreadTests, apzAlpha_PthreadPatch, 0 }, - - { zAlpha_Pthread_GccName, zAlpha_Pthread_GccList, - apzAlpha_Pthread_GccMachs, - ALPHA_PTHREAD_GCC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha_Pthread_GccTests, apzAlpha_Pthread_GccPatch, 0 }, - - { zAlpha_Pthread_InitName, zAlpha_Pthread_InitList, - apzAlpha_Pthread_InitMachs, - ALPHA_PTHREAD_INIT_TEST_CT, FD_MACH_ONLY, - aAlpha_Pthread_InitTests, apzAlpha_Pthread_InitPatch, 0 }, - { zAlpha_SbrkName, zAlpha_SbrkList, apzAlpha_SbrkMachs, ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9566,10 +9878,10 @@ tFixDesc fixDescList[ FIX_COUNT ] = { BSD_STDIO_ATTRS_CONFLICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aBsd_Stdio_Attrs_ConflictTests, apzBsd_Stdio_Attrs_ConflictPatch, 0 }, - { zCdef_CplusplusName, zCdef_CplusplusList, - apzCdef_CplusplusMachs, - CDEF_CPLUSPLUS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aCdef_CplusplusTests, apzCdef_CplusplusPatch, 0 }, + { zComplier_H_TradcppName, zComplier_H_TradcppList, + apzComplier_H_TradcppMachs, + COMPLIER_H_TRADCPP_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aComplier_H_TradcppTests, apzComplier_H_TradcppPatch, 0 }, { zCtrl_Quotes_DefName, zCtrl_Quotes_DefList, apzCtrl_Quotes_DefMachs, @@ -9586,6 +9898,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 }, + { zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List, + apzDarwin_9_Long_Double_Funcs_2Machs, + DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_9_Long_Double_Funcs_2Tests, apzDarwin_9_Long_Double_Funcs_2Patch, 0 }, + { zDarwin_ExterncName, zDarwin_ExterncList, apzDarwin_ExterncMachs, DARWIN_EXTERNC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9651,6 +9968,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ECD_CURSOR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aEcd_CursorTests, apzEcd_CursorPatch, 0 }, + { zFeraiseexcept_Nosse_DivbyzeroName, zFeraiseexcept_Nosse_DivbyzeroList, + apzFeraiseexcept_Nosse_DivbyzeroMachs, + FERAISEEXCEPT_NOSSE_DIVBYZERO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aFeraiseexcept_Nosse_DivbyzeroTests, apzFeraiseexcept_Nosse_DivbyzeroPatch, 0 }, + + { zFeraiseexcept_Nosse_InvalidName, zFeraiseexcept_Nosse_InvalidList, + apzFeraiseexcept_Nosse_InvalidMachs, + FERAISEEXCEPT_NOSSE_INVALID_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aFeraiseexcept_Nosse_InvalidTests, apzFeraiseexcept_Nosse_InvalidPatch, 0 }, + { zFreebsd_Gcc3_BreakageName, zFreebsd_Gcc3_BreakageList, apzFreebsd_Gcc3_BreakageMachs, FREEBSD_GCC3_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9756,6 +10083,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX11_ABS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux11_AbsTests, apzHpux11_AbsPatch, 0 }, + { zHpux11_Extern_SendfileName, zHpux11_Extern_SendfileList, + apzHpux11_Extern_SendfileMachs, + HPUX11_EXTERN_SENDFILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux11_Extern_SendfileTests, apzHpux11_Extern_SendfilePatch, 0 }, + + { zHpux11_Extern_SendpathName, zHpux11_Extern_SendpathList, + apzHpux11_Extern_SendpathMachs, + HPUX11_EXTERN_SENDPATH_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux11_Extern_SendpathTests, apzHpux11_Extern_SendpathPatch, 0 }, + { zHpux11_FabsfName, zHpux11_FabsfList, apzHpux11_FabsfMachs, HPUX11_FABSF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -9786,16 +10123,46 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY, aHpux8_Bogus_InlinesTests, apzHpux8_Bogus_InlinesPatch, 0 }, + { zHpux_C99_IntptrName, zHpux_C99_IntptrList, + apzHpux_C99_IntptrMachs, + HPUX_C99_INTPTR_TEST_CT, FD_MACH_ONLY, + aHpux_C99_IntptrTests, apzHpux_C99_IntptrPatch, 0 }, + + { zHpux_C99_InttypesName, zHpux_C99_InttypesList, + apzHpux_C99_InttypesMachs, + HPUX_C99_INTTYPES_TEST_CT, FD_MACH_ONLY, + aHpux_C99_InttypesTests, apzHpux_C99_InttypesPatch, 0 }, + + { zHpux_C99_Inttypes2Name, zHpux_C99_Inttypes2List, + apzHpux_C99_Inttypes2Machs, + HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY, + aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 }, + { zHpux_Ctype_MacrosName, zHpux_Ctype_MacrosList, apzHpux_Ctype_MacrosMachs, HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux_Ctype_MacrosTests, apzHpux_Ctype_MacrosPatch, 0 }, + { zHpux_Extern_ErrnoName, zHpux_Extern_ErrnoList, + apzHpux_Extern_ErrnoMachs, + HPUX_EXTERN_ERRNO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_Extern_ErrnoTests, apzHpux_Extern_ErrnoPatch, 0 }, + { zHpux_HtonlName, zHpux_HtonlList, apzHpux_HtonlMachs, HPUX_HTONL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux_HtonlTests, apzHpux_HtonlPatch, 0 }, + { zHpux_Imaginary_IName, zHpux_Imaginary_IList, + apzHpux_Imaginary_IMachs, + HPUX_IMAGINARY_I_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_Imaginary_ITests, apzHpux_Imaginary_IPatch, 0 }, + + { zHpux_Inttype_Int8_TName, zHpux_Inttype_Int8_TList, + apzHpux_Inttype_Int8_TMachs, + HPUX_INTTYPE_INT8_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_Inttype_Int8_TTests, apzHpux_Inttype_Int8_TPatch, 0 }, + { zHpux_Long_DoubleName, zHpux_Long_DoubleList, apzHpux_Long_DoubleMachs, HPUX_LONG_DOUBLE_TEST_CT, FD_MACH_ONLY, @@ -9806,65 +10173,25 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX_LONG_DOUBLE_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux_Long_Double_2Tests, apzHpux_Long_Double_2Patch, 0 }, - { zHpux_SystimeName, zHpux_SystimeList, - apzHpux_SystimeMachs, - HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux_SystimeTests, apzHpux_SystimePatch, 0 }, - - { zHpux_Spu_InfoName, zHpux_Spu_InfoList, - apzHpux_Spu_InfoMachs, - HPUX_SPU_INFO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux_Spu_InfoTests, apzHpux_Spu_InfoPatch, 0 }, - - { zHpux11_Extern_SendfileName, zHpux11_Extern_SendfileList, - apzHpux11_Extern_SendfileMachs, - HPUX11_EXTERN_SENDFILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_Extern_SendfileTests, apzHpux11_Extern_SendfilePatch, 0 }, - - { zHpux11_Extern_SendpathName, zHpux11_Extern_SendpathList, - apzHpux11_Extern_SendpathMachs, - HPUX11_EXTERN_SENDPATH_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_Extern_SendpathTests, apzHpux11_Extern_SendpathPatch, 0 }, - - { zHpux_Extern_ErrnoName, zHpux_Extern_ErrnoList, - apzHpux_Extern_ErrnoMachs, - HPUX_EXTERN_ERRNO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux_Extern_ErrnoTests, apzHpux_Extern_ErrnoPatch, 0 }, - { zHpux_Pthread_InitializersName, zHpux_Pthread_InitializersList, apzHpux_Pthread_InitializersMachs, HPUX_PTHREAD_INITIALIZERS_TEST_CT, FD_MACH_ONLY, aHpux_Pthread_InitializersTests, apzHpux_Pthread_InitializersPatch, 0 }, - { zHpux_C99_IntptrName, zHpux_C99_IntptrList, - apzHpux_C99_IntptrMachs, - HPUX_C99_INTPTR_TEST_CT, FD_MACH_ONLY, - aHpux_C99_IntptrTests, apzHpux_C99_IntptrPatch, 0 }, - - { zHpux_C99_InttypesName, zHpux_C99_InttypesList, - apzHpux_C99_InttypesMachs, - HPUX_C99_INTTYPES_TEST_CT, FD_MACH_ONLY, - aHpux_C99_InttypesTests, apzHpux_C99_InttypesPatch, 0 }, - - { zHpux_C99_Inttypes2Name, zHpux_C99_Inttypes2List, - apzHpux_C99_Inttypes2Machs, - HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY, - aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 }, + { zHpux_Spu_InfoName, zHpux_Spu_InfoList, + apzHpux_Spu_InfoMachs, + HPUX_SPU_INFO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_Spu_InfoTests, apzHpux_Spu_InfoPatch, 0 }, { zHpux_Stdint_Least_FastName, zHpux_Stdint_Least_FastList, apzHpux_Stdint_Least_FastMachs, HPUX_STDINT_LEAST_FAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux_Stdint_Least_FastTests, apzHpux_Stdint_Least_FastPatch, 0 }, - { zHpux_Inttype_Int8_TName, zHpux_Inttype_Int8_TList, - apzHpux_Inttype_Int8_TMachs, - HPUX_INTTYPE_INT8_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux_Inttype_Int8_TTests, apzHpux_Inttype_Int8_TPatch, 0 }, - - { zHpux_Imaginary_IName, zHpux_Imaginary_IList, - apzHpux_Imaginary_IMachs, - HPUX_IMAGINARY_I_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux_Imaginary_ITests, apzHpux_Imaginary_IPatch, 0 }, + { zHpux_SystimeName, zHpux_SystimeList, + apzHpux_SystimeMachs, + HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_SystimeTests, apzHpux_SystimePatch, 0 }, { zHuge_Val_HexName, zHuge_Val_HexList, apzHuge_Val_HexMachs, @@ -9901,71 +10228,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { IP_MISSING_SEMI_TEST_CT, FD_MACH_ONLY, aIp_Missing_SemiTests, apzIp_Missing_SemiPatch, 0 }, - { zIrix___RestrictName, zIrix___RestrictList, - apzIrix___RestrictMachs, - IRIX___RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix___RestrictTests, apzIrix___RestrictPatch, 0 }, - - { zIrix___Generic1Name, zIrix___Generic1List, - apzIrix___Generic1Machs, - IRIX___GENERIC1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix___Generic1Tests, apzIrix___Generic1Patch, 0 }, - - { zIrix___Generic2Name, zIrix___Generic2List, - apzIrix___Generic2Machs, - IRIX___GENERIC2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix___Generic2Tests, apzIrix___Generic2Patch, 0 }, - - { zIrix_Asm_ApostropheName, zIrix_Asm_ApostropheList, - apzIrix_Asm_ApostropheMachs, - IRIX_ASM_APOSTROPHE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Asm_ApostropheTests, apzIrix_Asm_ApostrophePatch, 0 }, - - { zIrix_ComplexName, zIrix_ComplexList, - apzIrix_ComplexMachs, - IRIX_COMPLEX_TEST_CT, FD_MACH_ONLY, - aIrix_ComplexTests, apzIrix_ComplexPatch, 0 }, - { zIrix_Limits_ConstName, zIrix_Limits_ConstList, apzIrix_Limits_ConstMachs, IRIX_LIMITS_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aIrix_Limits_ConstTests, apzIrix_Limits_ConstPatch, 0 }, - { zIrix_Pthread_InitName, zIrix_Pthread_InitList, - apzIrix_Pthread_InitMachs, - IRIX_PTHREAD_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Pthread_InitTests, apzIrix_Pthread_InitPatch, 0 }, - - { zIrix_Socklen_TName, zIrix_Socklen_TList, - apzIrix_Socklen_TMachs, - IRIX_SOCKLEN_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Socklen_TTests, apzIrix_Socklen_TPatch, 0 }, - - { zIrix_Stdint_C99_ModeName, zIrix_Stdint_C99_ModeList, - apzIrix_Stdint_C99_ModeMachs, - IRIX_STDINT_C99_MODE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_Stdint_C99_ModeTests, apzIrix_Stdint_C99_ModePatch, 0 }, - - { zIrix_Stdint_C99_TypesName, zIrix_Stdint_C99_TypesList, - apzIrix_Stdint_C99_TypesMachs, - IRIX_STDINT_C99_TYPES_TEST_CT, FD_MACH_ONLY, - aIrix_Stdint_C99_TypesTests, apzIrix_Stdint_C99_TypesPatch, 0 }, - - { zIrix_Stdint_C99_MacrosName, zIrix_Stdint_C99_MacrosList, - apzIrix_Stdint_C99_MacrosMachs, - IRIX_STDINT_C99_MACROS_TEST_CT, FD_MACH_ONLY, - aIrix_Stdint_C99_MacrosTests, apzIrix_Stdint_C99_MacrosPatch, 0 }, - { zIrix_Stdio_Va_ListName, zIrix_Stdio_Va_ListList, apzIrix_Stdio_Va_ListMachs, IRIX_STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aIrix_Stdio_Va_ListTests, apzIrix_Stdio_Va_ListPatch, 0 }, - { zIrix_WcsftimeName, zIrix_WcsftimeList, - apzIrix_WcsftimeMachs, - IRIX_WCSFTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIrix_WcsftimeTests, apzIrix_WcsftimePatch, 0 }, - { zKandr_ConcatName, zKandr_ConcatList, apzKandr_ConcatMachs, KANDR_CONCAT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10136,11 +10408,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SOLARIS_COMPLEX_CXX_TEST_CT, FD_MACH_ONLY, aSolaris_Complex_CxxTests, apzSolaris_Complex_CxxPatch, 0 }, - { zSolaris_Cond_InitName, zSolaris_Cond_InitList, - apzSolaris_Cond_InitMachs, - SOLARIS_COND_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Cond_InitTests, apzSolaris_Cond_InitPatch, 0 }, - { zSolaris_Cxx_LinkageName, zSolaris_Cxx_LinkageList, apzSolaris_Cxx_LinkageMachs, SOLARIS_CXX_LINKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10151,6 +10418,31 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SOLARIS_GETC_STRICT_STDC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSolaris_Getc_Strict_StdcTests, apzSolaris_Getc_Strict_StdcPatch, 0 }, + { zSolaris_Int_ConstName, zSolaris_Int_ConstList, + apzSolaris_Int_ConstMachs, + SOLARIS_INT_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Int_ConstTests, apzSolaris_Int_ConstPatch, 0 }, + + { zSolaris_Int_Limits_1Name, zSolaris_Int_Limits_1List, + apzSolaris_Int_Limits_1Machs, + SOLARIS_INT_LIMITS_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Int_Limits_1Tests, apzSolaris_Int_Limits_1Patch, 0 }, + + { zSolaris_Int_Limits_2Name, zSolaris_Int_Limits_2List, + apzSolaris_Int_Limits_2Machs, + SOLARIS_INT_LIMITS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Int_Limits_2Tests, apzSolaris_Int_Limits_2Patch, 0 }, + + { zSolaris_Int_Limits_3Name, zSolaris_Int_Limits_3List, + apzSolaris_Int_Limits_3Machs, + SOLARIS_INT_LIMITS_3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Int_Limits_3Tests, apzSolaris_Int_Limits_3Patch, 0 }, + + { zSolaris_Int_TypesName, zSolaris_Int_TypesList, + apzSolaris_Int_TypesMachs, + SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 }, + { zSolaris_Longjmp_NoreturnName, zSolaris_Longjmp_NoreturnList, apzSolaris_Longjmp_NoreturnMachs, SOLARIS_LONGJMP_NORETURN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10161,6 +10453,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SOLARIS_MATH_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSolaris_Math_1Tests, apzSolaris_Math_1Patch, 0 }, + { zSolaris_Math_10Name, zSolaris_Math_10List, + apzSolaris_Math_10Machs, + SOLARIS_MATH_10_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Math_10Tests, apzSolaris_Math_10Patch, 0 }, + { zSolaris_Math_2Name, zSolaris_Math_2List, apzSolaris_Math_2Machs, SOLARIS_MATH_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10186,26 +10483,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SOLARIS_MATH_9_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSolaris_Math_9Tests, apzSolaris_Math_9Patch, 0 }, - { zSolaris_Math_10Name, zSolaris_Math_10List, - apzSolaris_Math_10Machs, - SOLARIS_MATH_10_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Math_10Tests, apzSolaris_Math_10Patch, 0 }, - { zSolaris_Mutex_Init_2Name, zSolaris_Mutex_Init_2List, apzSolaris_Mutex_Init_2Machs, SOLARIS_MUTEX_INIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSolaris_Mutex_Init_2Tests, apzSolaris_Mutex_Init_2Patch, 0 }, - { zSolaris_Pow_Int_OverloadName, zSolaris_Pow_Int_OverloadList, - apzSolaris_Pow_Int_OverloadMachs, - SOLARIS_POW_INT_OVERLOAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Pow_Int_OverloadTests, apzSolaris_Pow_Int_OverloadPatch, 0 }, - - { zSolaris_Rwlock_Init_1Name, zSolaris_Rwlock_Init_1List, - apzSolaris_Rwlock_Init_1Machs, - SOLARIS_RWLOCK_INIT_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Rwlock_Init_1Tests, apzSolaris_Rwlock_Init_1Patch, 0 }, - { zSolaris_Once_Init_1Name, zSolaris_Once_Init_1List, apzSolaris_Once_Init_1Machs, SOLARIS_ONCE_INIT_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10216,36 +10498,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SOLARIS_ONCE_INIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSolaris_Once_Init_2Tests, apzSolaris_Once_Init_2Patch, 0 }, - { zSolaris_Int_ConstName, zSolaris_Int_ConstList, - apzSolaris_Int_ConstMachs, - SOLARIS_INT_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Int_ConstTests, apzSolaris_Int_ConstPatch, 0 }, - - { zSolaris_Int_Limits_1Name, zSolaris_Int_Limits_1List, - apzSolaris_Int_Limits_1Machs, - SOLARIS_INT_LIMITS_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Int_Limits_1Tests, apzSolaris_Int_Limits_1Patch, 0 }, - - { zSolaris_Int_Limits_2Name, zSolaris_Int_Limits_2List, - apzSolaris_Int_Limits_2Machs, - SOLARIS_INT_LIMITS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Int_Limits_2Tests, apzSolaris_Int_Limits_2Patch, 0 }, - - { zSolaris_Int_Limits_3Name, zSolaris_Int_Limits_3List, - apzSolaris_Int_Limits_3Machs, - SOLARIS_INT_LIMITS_3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Int_Limits_3Tests, apzSolaris_Int_Limits_3Patch, 0 }, - - { zSolaris_Int_TypesName, zSolaris_Int_TypesList, - apzSolaris_Int_TypesMachs, - SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 }, - { zSolaris_Posix_Spawn_RestrictName, zSolaris_Posix_Spawn_RestrictList, apzSolaris_Posix_Spawn_RestrictMachs, SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSolaris_Posix_Spawn_RestrictTests, apzSolaris_Posix_Spawn_RestrictPatch, 0 }, + { zSolaris_Pow_Int_OverloadName, zSolaris_Pow_Int_OverloadList, + apzSolaris_Pow_Int_OverloadMachs, + SOLARIS_POW_INT_OVERLOAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Pow_Int_OverloadTests, apzSolaris_Pow_Int_OverloadPatch, 0 }, + + { zSolaris_Rwlock_Init_1Name, zSolaris_Rwlock_Init_1List, + apzSolaris_Rwlock_Init_1Machs, + SOLARIS_RWLOCK_INIT_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSolaris_Rwlock_Init_1Tests, apzSolaris_Rwlock_Init_1Patch, 0 }, + { zSolaris_Std___FilbufName, zSolaris_Std___FilbufList, apzSolaris_Std___FilbufMachs, SOLARIS_STD___FILBUF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10341,6 +10608,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSunos_StrlenTests, apzSunos_StrlenPatch, 0 }, + { zSuse_Linux_Vt_CxxName, zSuse_Linux_Vt_CxxList, + apzSuse_Linux_Vt_CxxMachs, + SUSE_LINUX_VT_CXX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSuse_Linux_Vt_CxxTests, apzSuse_Linux_Vt_CxxPatch, 0 }, + { zSvr4_Disable_OptName, zSvr4_Disable_OptList, apzSvr4_Disable_OptMachs, SVR4_DISABLE_OPT_TEST_CT, FD_MACH_ONLY, @@ -10401,20 +10673,55 @@ tFixDesc fixDescList[ FIX_COUNT ] = { VA_I960_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVa_I960_MacroTests, apzVa_I960_MacroPatch, 0 }, + { zVms_Add_Missing_BracesName, zVms_Add_Missing_BracesList, + apzVms_Add_Missing_BracesMachs, + VMS_ADD_MISSING_BRACES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVms_Add_Missing_BracesTests, apzVms_Add_Missing_BracesPatch, 0 }, + + { zVms_Decc_BuiltinName, zVms_Decc_BuiltinList, + apzVms_Decc_BuiltinMachs, + VMS_DECC_BUILTIN_TEST_CT, FD_MACH_ONLY, + aVms_Decc_BuiltinTests, apzVms_Decc_BuiltinPatch, 0 }, + { zVms_Define_Can_Use_Extern_PrefixName, zVms_Define_Can_Use_Extern_PrefixList, apzVms_Define_Can_Use_Extern_PrefixMachs, VMS_DEFINE_CAN_USE_EXTERN_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVms_Define_Can_Use_Extern_PrefixTests, apzVms_Define_Can_Use_Extern_PrefixPatch, 0 }, + { zVms_Disable_Decc_String_BuiltinsName, zVms_Disable_Decc_String_BuiltinsList, + apzVms_Disable_Decc_String_BuiltinsMachs, + VMS_DISABLE_DECC_STRING_BUILTINS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVms_Disable_Decc_String_BuiltinsTests, apzVms_Disable_Decc_String_BuiltinsPatch, 0 }, + + { zVms_Do_Not_Redeclare_HostaliasName, zVms_Do_Not_Redeclare_HostaliasList, + apzVms_Do_Not_Redeclare_HostaliasMachs, + VMS_DO_NOT_REDECLARE_HOSTALIAS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVms_Do_Not_Redeclare_HostaliasTests, apzVms_Do_Not_Redeclare_HostaliasPatch, 0 }, + + { zVms_Forward_Declare_StructName, zVms_Forward_Declare_StructList, + apzVms_Forward_Declare_StructMachs, + VMS_FORWARD_DECLARE_STRUCT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVms_Forward_Declare_StructTests, apzVms_Forward_Declare_StructPatch, 0 }, + + { zVms_No_64bit_GetoptName, zVms_No_64bit_GetoptList, + apzVms_No_64bit_GetoptMachs, + VMS_NO_64BIT_GETOPT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVms_No_64bit_GetoptTests, apzVms_No_64bit_GetoptPatch, 0 }, + + { zVms_Use_Fast_SetjmpName, zVms_Use_Fast_SetjmpList, + apzVms_Use_Fast_SetjmpMachs, + VMS_USE_FAST_SETJMP_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVms_Use_Fast_SetjmpTests, apzVms_Use_Fast_SetjmpPatch, 0 }, + { zVms_Use_Pragma_Extern_ModelName, zVms_Use_Pragma_Extern_ModelList, apzVms_Use_Pragma_Extern_ModelMachs, VMS_USE_PRAGMA_EXTERN_MODEL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVms_Use_Pragma_Extern_ModelTests, apzVms_Use_Pragma_Extern_ModelPatch, 0 }, - { zVms_Disable_Decc_String_BuiltinsName, zVms_Disable_Decc_String_BuiltinsList, - apzVms_Disable_Decc_String_BuiltinsMachs, - VMS_DISABLE_DECC_STRING_BUILTINS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aVms_Disable_Decc_String_BuiltinsTests, apzVms_Disable_Decc_String_BuiltinsPatch, 0 }, + { zVms_Use_Quoted_IncludeName, zVms_Use_Quoted_IncludeList, + apzVms_Use_Quoted_IncludeMachs, + VMS_USE_QUOTED_INCLUDE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVms_Use_Quoted_IncludeTests, apzVms_Use_Quoted_IncludePatch, 0 }, { zVoid_NullName, zVoid_NullList, apzVoid_NullMachs, @@ -10426,6 +10733,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { VXWORKS_GCC_PROBLEM_TEST_CT, FD_MACH_ONLY, aVxworks_Gcc_ProblemTests, apzVxworks_Gcc_ProblemPatch, 0 }, + { zVxworks_Ioctl_MacroName, zVxworks_Ioctl_MacroList, + apzVxworks_Ioctl_MacroMachs, + VXWORKS_IOCTL_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Ioctl_MacroTests, apzVxworks_Ioctl_MacroPatch, 0 }, + + { zVxworks_Mkdir_MacroName, zVxworks_Mkdir_MacroList, + apzVxworks_Mkdir_MacroMachs, + VXWORKS_MKDIR_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Mkdir_MacroTests, apzVxworks_Mkdir_MacroPatch, 0 }, + { zVxworks_Needs_VxtypesName, zVxworks_Needs_VxtypesList, apzVxworks_Needs_VxtypesMachs, VXWORKS_NEEDS_VXTYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10436,11 +10753,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = { VXWORKS_NEEDS_VXWORKS_TEST_CT, FD_MACH_ONLY, aVxworks_Needs_VxworksTests, apzVxworks_Needs_VxworksPatch, 0 }, + { zVxworks_RegsName, zVxworks_RegsList, + apzVxworks_RegsMachs, + VXWORKS_REGS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_RegsTests, apzVxworks_RegsPatch, 0 }, + { zVxworks_TimeName, zVxworks_TimeList, apzVxworks_TimeMachs, VXWORKS_TIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVxworks_TimeTests, apzVxworks_TimePatch, 0 }, + { zVxworks_Write_ConstName, zVxworks_Write_ConstList, + apzVxworks_Write_ConstMachs, + VXWORKS_WRITE_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Write_ConstTests, apzVxworks_Write_ConstPatch, 0 }, + { zX11_ClassName, zX11_ClassList, apzX11_ClassMachs, X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/fixlib.h b/fixincludes/fixlib.h index 42d98b2255..45fe5a3cdb 100644 --- a/fixincludes/fixlib.h +++ b/fixincludes/fixlib.h @@ -3,7 +3,7 @@ files which are fixed to work correctly with ANSI C and placed in a directory that GCC will search. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2009 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2009, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -140,7 +140,10 @@ typedef int apply_fix_p_t; /* Apply Fix Predicate Type */ "amount of user entertainment" ) \ \ _ENV_( pz_find_base, BOOL_TRUE, "FIND_BASE", \ - "leader to trim from file names" ) + "leader to trim from file names" ) \ + \ + _ENV_( pz_test_mode, BOOL_FALSE, "TEST_MODE", \ + "run fixincludes in test mode" ) #define _ENV_(v,m,n,t) extern tCC* v; ENV_TABLE @@ -211,6 +214,27 @@ typedef struct { extern int gnu_type_map_ct; +typedef enum { + VERB_SILENT = 0, + VERB_FIXES, + VERB_APPLIES, + VERB_PROGRESS, + VERB_TESTS, + VERB_EVERYTHING +} te_verbose; + +extern te_verbose verbose_level; + +#define VLEVEL(l) ((unsigned int) verbose_level >= (unsigned int) l) +#define NOT_SILENT VLEVEL(VERB_FIXES) + +typedef enum { + TESTING_OFF = 0, + TESTING_ON = 1 +} fixinc_mode_t; + +extern fixinc_mode_t fixinc_mode; + #ifdef HAVE_MMAP_FILE #define UNLOAD_DATA() do { if (curr_data_mapped) { \ munmap ((void*)pz_curr_data, data_map_size); close (data_map_fd); } \ diff --git a/fixincludes/fixopts.c b/fixincludes/fixopts.c index d305cd7674..0ea3256836 100644 --- a/fixincludes/fixopts.c +++ b/fixincludes/fixopts.c @@ -1,6 +1,6 @@ /* Handle options that are passed from environment variables. - Copyright (C) 2004, 2009 Free Software Foundation, Inc. + Copyright (C) 2004, 2009, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -20,31 +20,43 @@ along with GCC; see the file COPYING3. If not see #include "fixlib.h" -#define _ENV_(v,m,n,t) tCC* v = NULL; +te_verbose verbose_level = VERB_PROGRESS; + +fixinc_mode_t fixinc_mode = TESTING_OFF; + +#define _ENV_(v,m,n,t) char const * v = NULL; ENV_TABLE #undef _ENV_ -void -initialize_opts (void) +static void +show_not_def (char const * vname) { static const char var_not_found[] = -#ifndef __STDC__ - "fixincl ERROR: %s environment variable not defined\n" -#else "fixincl ERROR: %s environment variable not defined\n" - "each of these must be defined:\n" -# define _ENV_(vv,mm,nn,tt) "\t" nn " - " tt "\n" + "each of these must be defined:\n"; + static char const not_found_var[] = "\t%s\n"; + + fprintf (stderr, var_not_found, vname); +# define _ENV_(vv,mm,nn,tt) \ + if (mm) fprintf (stderr, not_found_var, nn); ENV_TABLE # undef _ENV_ -#endif - ; -#define _ENV_(v,m,n,t) { tSCC var[] = n; \ - v = getenv (var); if (m && (v == NULL)) { \ - fprintf (stderr, var_not_found, var); \ - exit (EXIT_FAILURE); } } + exit (EXIT_FAILURE); +} -ENV_TABLE +void +initialize_opts (void) +{ +#define _ENV_(v,m,n,t) { \ + static char const var[] = n; \ + v = getenv (var); \ + if (m && (v == NULL)) show_not_def (var); \ + } + ENV_TABLE; #undef _ENV_ + + if ((pz_test_mode != NULL) && (strcmp (pz_test_mode, "true") == 0)) + fixinc_mode = TESTING_ON; } diff --git a/fixincludes/fixtests.c b/fixincludes/fixtests.c index d668b92f2a..84b6d876e2 100644 --- a/fixincludes/fixtests.c +++ b/fixincludes/fixtests.c @@ -3,7 +3,8 @@ Test to see if a particular fix should be applied to a header file. - Copyright (C) 1997, 1998, 1999, 2000, 2009 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2009, 2012 + Free Software Foundation, Inc. = = = = = = = = = = = = = = = = = = = = = = = = = @@ -46,7 +47,7 @@ along with GCC; see the file COPYING3. If not see #include "fixlib.h" -#define _ENV_(v,m,n,t) extern tCC* v; +#define _ENV_(v,m,n,t) extern char const * v; ENV_TABLE #undef _ENV_ diff --git a/fixincludes/genfixes b/fixincludes/genfixes index f186a50824..f0fc5e64f8 100755 --- a/fixincludes/genfixes +++ b/fixincludes/genfixes @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 1999, 2000, 2001, 2009 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2009, 2012 Free Software Foundation, Inc. # This file is part of GCC. # GCC is free software; you can redistribute it and/or modify diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 2e9fee5ec8..411300fb2e 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -11,7 +11,7 @@ autogen definitions fixincl; pattern='^/\*$' \ trailer='^/\*EOF\*[/]' \ input=inclhack.def \ - key='hackname[ ]*=[ ]*(.*);' + key=$'hackname[ \t]*=[ \t]*(.*);' Set up a debug test so we can make the templates emit special code while debugging these fixes: */ @@ -64,6 +64,43 @@ fix = { _EOArg_; }; +/* On AIX when _LARGE_FILES is defined fcntl.h defines open to + * open64 and creat to creat64. This fixes fcntl.h to + * undef those defines and use __asm__ to alias the symbols if + * building with g++ and -D_LARGE_FILES + */ +fix = { + hackname = AAB_aix_fcntl; + files = fcntl.h; + select = "define open[ \t]open64"; + mach = "*-*-aix*"; + test-text = ''; /* no way to test */ + + c_fix = wrap; + + c_fix_arg = ""; + + c_fix_arg = <<- _EOArg_ + + #if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus + #define __need__aix_fcntl_h_fix + #ifdef __need__aix_fcntl_h_fix + #undef open + #undef creat + #undef openat + /* Alias the symbols using asm */ + extern "C" { + extern int open(const char *, int, ...) __asm__("open64"); + extern int creat(const char *, mode_t) __asm__("creat64"); + #if (_XOPEN_SOURCE >= 700) + extern int openat(int, const char *, int, ...) __asm__("open64at"); + #endif + } + #endif + #endif + + _EOArg_; +}; /* * On Mac OS 10.3.9, the 'long double' functions are available in @@ -157,25 +194,6 @@ fix = { _EndOfHeader_; }; - -/* - * ... and for the previous fix to be useful, you have to not use "" - * includes. - */ -fix = { - hackname = AAB_darwin7_9_long_double_funcs_2; - mach = "*-*-darwin7.9*"; - files = math.h; - select = '#include[ \t]+\"'; - c_fix = format; - c_fix_arg = "%1<%2.h>"; - - c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"'; - - test_text = '#include "architecture/ppc/math.h"'; -}; - - /* * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) */ @@ -217,7 +235,6 @@ fix = { _EndOfHeader_; }; - /* * This fixes __FD_ZERO bug for glibc-1.x */ @@ -255,7 +272,6 @@ fix = { _EndOfHeader_; }; - /* * This fixes __FD_ZERO bug for glibc-2.0.x */ @@ -297,7 +313,6 @@ fix = { _EndOfHeader_; }; - /* * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing * the same interface as <stdarg.h>. No idea why they couldn't have just @@ -316,7 +331,6 @@ fix = { _EndOfHeader_; }; - /* * Fix non-ANSI memcpy declaration that conflicts with gcc's builtin * declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because @@ -354,6 +368,219 @@ fix = { _EndOfHeader_; }; +/* + * Fix assert.h on VxWorks: + */ +fix = { + hackname = AAB_vxworks_assert; + files = assert.h; + mach = "*-*-vxworks*"; + + replace = <<- _EndOfHeader_ + #ifndef _ASSERT_H + #define _ASSERT_H + + #ifdef assert + #undef assert + #endif + + #if defined(__STDC__) || defined(__cplusplus) + extern void __assert (const char*); + #else + extern void __assert (); + #endif + + #ifdef NDEBUG + #define assert(ign) ((void)0) + #else + + #define ASSERT_STRINGIFY(str) ASSERT_STRINGIFY_HELPER(str) + #define ASSERT_STRINGIFY_HELPER(str) #str + + #define assert(test) ((void) \ + ((test) ? ((void)0) : \ + __assert("Assertion failed: " ASSERT_STRINGIFY(test) ", file " \ + __FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n"))) + + #endif + + #endif + _EndOfHeader_; +}; + +/* + * Add needed include to regs.h (NOT the gcc header) on VxWorks + */ + +fix = { + hackname = AAB_vxworks_regs_vxtypes; + files = regs.h; + mach = "*-*-vxworks*"; + + replace = <<- _EndOfHeader_ + #ifndef _REGS_H + #define _REGS_H + #include <types/vxTypesOld.h> + #include_next <arch/../regs.h> + #endif + _EndOfHeader_; +}; + +/* + * Make VxWorks stdint.h a bit more compliant - add typedefs + */ +fix = { + hackname = AAB_vxworks_stdint; + files = stdint.h; + mach = "*-*-vxworks*"; + + replace = <<- _EndOfHeader_ + #ifndef _STDINT_H + #define _STDINT_H + /* get int*_t, uint*_t */ + #include <types/vxTypes.h> + + /* get legacy vxworks types for compatibility */ + #include <types/vxTypesOld.h> + + typedef long intptr_t; + typedef unsigned long uintptr_t; + + typedef int64_t intmax_t; + typedef uint64_t uintmax_t; + + typedef int8_t int_least8_t; + typedef int16_t int_least16_t; + typedef int32_t int_least32_t; + typedef int64_t int_least64_t; + + typedef uint8_t uint_least8_t; + typedef uint16_t uint_least16_t; + typedef uint32_t uint_least32_t; + typedef uint64_t uint_least64_t; + + typedef int8_t int_fast8_t; + typedef int int_fast16_t; + typedef int32_t int_fast32_t; + typedef int64_t int_fast64_t; + + typedef uint8_t uint_fast8_t; + typedef unsigned int uint_fast16_t; + typedef uint32_t uint_fast32_t; + typedef uint64_t uint_fast64_t; + + /* Ranges */ + #define UINT8_MAX (~(uint8_t)0) + #define UINT8_MIN 0 + #define UINT16_MAX (~(uint16_t)0) + #define UINT16_MIN 0 + #define UINT32_MAX (~(uint32_t)0) + #define UINT32_MIN 0 + #define UINT64_MAX (~(uint64_t)0) + #define UINT64_MIN 0 + + #define UINTPTR_MAX (~(uintptr_t)0) + #define UINTPTR_MIN 0 + + /* Need to do int_fast16_t as well, as type + size may be architecture dependent */ + #define UINT_FAST16_MAX (~(uint_fast16_t)0) + #define UINT_FAST16_MAX 0 + + #define INT8_MAX (UINT8_MAX>>1) + #define INT8_MIN (INT8_MAX+1) + #define INT16_MAX (UINT16_MAX>>1) + #define INT16_MIN (INT16_MAX+1) + #define INT32_MAX (UINT32_MAX>>1) + #define INT32_MIN (INT32_MAX+1) + #define INT64_MAX (UINT64_MAX>>1) + #define INT64_MIN (INT64_MAX+1) + + #define INTPTR_MAX (UINTPTR_MAX>>1) + #define INTPTR_MIN (INTPTR_MAX+1) + + #define INT_FAST16_MAX (UINT_FAST16_MAX>>1) + #define INT_FAST16_MIN (INT_FAST16_MAX+1) + + /* now define equiv. constants */ + #define UINT_FAST8_MAX UINT8_MAX + #define UINT_FAST8_MIN UINT_FAST8_MIN + #define INT_FAST8_MAX INT8_MAX + #define INT_FAST8_MIN INT8_MIN + #define UINT_FAST32_MAX UINT32_MAX + #define UINT_FAST32_MIN UINT32_MIN + #define INT_FAST32_MAX INT32_MAX + #define INT_FAST32_MIN INT32_MIN + #define UINT_FAST64_MAX UINT64_MAX + #define UINT_FAST64_MIN UINT64_MIN + #define INT_FAST64_MAX INT64_MAX + #define INT_FAST64_MIN INT64_MIN + + #define UINT_LEAST8_MAX UINT8_MAX + #define UINT_LEAST8_MIN UINT8_MIN + #define INT_LEAST8_MAX INT8_MAX + #define INT_LEAST8_MIN INT8_MIN + #define UINT_LEAST16_MAX UINT16_MAX + #define UINT_LEAST16_MIN UINT16_MIN + #define INT_LEAST16_MAX INT16_MAX + #define INT_LEAST16_MIN INT16_MIN + #define UINT_LEAST32_MAX UINT32_MAX + #define UINT_LEAST32_MIN UINT32_MIN + #define INT_LEAST32_MAX INT32_MAX + #define INT_LEAST32_MIN INT32_MIN + #define UINT_LEAST64_MAX UINT64_MAX + #define UINT_LEAST64_MIN UINT64_MIN + #define INT_LEAST64_MAX INT64_MAX + #define INT_LEAST64_MIN INT64_MIN + + #define UINTMAX_MAX UINT64_MAX + #define UINTMAX_MIN UINT64_MIN + #define INTMAX_MAX INT64_MAX + #define INTMAX_MIN INT64_MIN + + #endif + _EndOfHeader_; +}; + +/* + * This hack makes makes unistd.h more POSIX-compliant on VxWorks + */ +fix = { + hackname = AAB_vxworks_unistd; + files = unistd.h; + mach = "*-*-vxworks*"; + + replace = <<- _EndOfHeader_ + #ifndef _UNISTD_H + #define _UNISTD_H + #include_next <unistd.h> + #include <ioLib.h> + #ifndef STDIN_FILENO + #define STDIN_FILENO 0 + #endif + #ifndef STDOUT_FILENO + #define STDOUT_FILENO 1 + #endif + #ifndef STDERR_FILENO + #define STDERR_FILENO 2 + #endif + #endif /* _UNISTD_H */ + _EndOfHeader_; +}; + +/* + * assert.h on AIX 7 redefines static_assert as _Static_assert without + * protecting C++. + */ +fix = { + hackname = aix_assert; + mach = "*-*-aix*"; + files = assert.h; + select = "#define[ \t]static_assert[ \t]_Static_assert"; + c_fix = format; + c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; + test_text = "#define static_assert _Static_assert"; +}; /* * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I, @@ -397,7 +624,36 @@ fix = { }; /* - * pthread.h on AIX defines PTHREAD_ONCE_INIT without enough braces. + * Fix AIX definition of NULL for G++. + */ +fix = { + hackname = aix_null; + mach = "*-*-aix*"; + files = curses.h, dbm.h, locale.h, stdio.h, stdlib.h, string.h, + time.h, unistd.h, wchar.h, sys/dir.h, sys/param.h, sys/types.h; + bypass = __null; + select = "#define[ \t]+NULL[ \t]+\\(*0L*\\)*"; + c_fix = format; + c_fix_arg = <<- _EOFix_ + #ifndef NULL + #ifdef __cplusplus + #ifdef __GNUG__ + #define NULL __null + #else /* ! __GNUG__ */ + #define NULL 0L + #endif /* __GNUG__ */ + #else /* ! __cplusplus */ + #define NULL ((void *)0) + #endif /* __cplusplus */ + #endif /* !NULL */ + _EOFix_; + test_text = "# define\tNULL \t(0L) /* typed NULL */"; +}; + +/* + * pthread.h on AIX defines PTHREAD_ONCE_INIT, PTHREAD_MUTEX_INITIALIZER, + * PTHREAD_COND_INITIALIZER and PTHREAD_RWLOCK_INITIALIZER without enough + * braces. */ fix = { hackname = aix_once_init_1; @@ -425,6 +681,45 @@ fix = { "}\n"; }; +fix = { + hackname = aix_mutex_initializer_1; + mach = "*-*-aix*"; + files = "pthread.h"; + select = "#define[ \t]PTHREAD_MUTEX_INITIALIZER \\\\\n" + "\\{ \\\\\n"; + c_fix = format; + c_fix_arg = "#define PTHREAD_MUTEX_INITIALIZER \\\n" + "{{ \\\n"; + test_text = "#define PTHREAD_MUTEX_INITIALIZER \\\\\n" + "{ \\\\\n"; +}; + +fix = { + hackname = aix_cond_initializer_1; + mach = "*-*-aix*"; + files = "pthread.h"; + select = "#define[ \t]PTHREAD_COND_INITIALIZER \\\\\n" + "\\{ \\\\\n"; + c_fix = format; + c_fix_arg = "#define PTHREAD_COND_INITIALIZER \\\n" + "{{ \\\n"; + test_text = "#define PTHREAD_COND_INITIALIZER \\\\\n" + "{ \\\\\n"; +}; + +fix = { + hackname = aix_rwlock_initializer_1; + mach = "*-*-aix*"; + files = "pthread.h"; + select = "#define[ \t]PTHREAD_RWLOCK_INITIALIZER \\\\\n" + "\\{ \\\\\n"; + c_fix = format; + c_fix_arg = "#define PTHREAD_RWLOCK_INITIALIZER \\\n" + "{{ \\\n"; + test_text = "#define PTHREAD_RWLOCK_INITIALIZER \\\\\n" + "{ \\\\\n"; +}; + /* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace * which violates a requirement of ISO C. @@ -439,7 +734,6 @@ fix = { "{...init stuff...}"; }; - /* * AIX stdint.h fixes. */ @@ -456,7 +750,9 @@ fix = { "#define UINT16_MAX (65535U)"; }; - +/* + * aix_stdint_2 + */ fix = { hackname = aix_stdint_2; mach = "*-*-aix*"; @@ -485,7 +781,9 @@ fix = { "#define UINTPTR_MAX UINT32_MAX"; }; - +/* + * aix_stdint_3 + */ fix = { hackname = aix_stdint_3; mach = "*-*-aix*"; @@ -508,7 +806,9 @@ fix = { "#define PTRDIFF_MAX INT32_MAX"; }; - +/* + * aix_stdint_4 + */ fix = { hackname = aix_stdint_4; mach = "*-*-aix*"; @@ -525,7 +825,9 @@ fix = { "#define SIZE_MAX UINT32_MAX"; }; - +/* + * aix_stdint_5 + */ fix = { hackname = aix_stdint_5; mach = "*-*-aix*"; @@ -539,7 +841,6 @@ fix = { "#define UINT16_C(c) __CONCAT__(c,U)"; }; - /* * sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline * in an otherwise harmless (and #ifed out) macro definition @@ -554,7 +855,6 @@ fix = { " bar \\ \n baz \\ \n bat"; }; - /* * sys/wait.h on AIX 5.2 defines macros that have both signed and * unsigned types in conditional expressions. @@ -565,10 +865,10 @@ fix = { select = '\? (\(\(\(\(unsigned[^)]*\)[^)]*\) >> [^)]*\) \& 0xff\) : -1)'; c_fix = format; c_fix_arg = "? (int)%1"; - test_text = "#define WSTOPSIG(__x) (int)(WIFSTOPPED(__x) ? ((((unsigned int)__x) >> 8) & 0xff) : -1)"; + test_text = "#define WSTOPSIG(__x) " + "(int)(WIFSTOPPED(__x) ? ((((unsigned int)__x) >> 8) & 0xff) : -1)"; }; - /* * sys/signal.h on some versions of AIX uses volatile in the typedef of * sig_atomic_t, which causes gcc to generate a warning about duplicate @@ -584,7 +884,6 @@ fix = { test_text = "typedef volatile int sig_atomic_t;"; }; - /* * Fix __assert declaration in assert.h on Alpha OSF/1. */ @@ -597,64 +896,6 @@ fix = { test_text = 'extern void __assert(char *, char *, int);'; }; - -/* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX V4/5 headers. - */ -fix = { - hackname = alpha___extern_prefix; - select = "(.*)(defined\\(__DECC\\)|def[ \t]*__DECC)[ \t]*\n" - "(#[ \t]*pragma[ \t]*extern_prefix.*)"; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "%1 (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX))\n%3"; - - test_text = "#ifdef __DECC\n" - "#pragma extern_prefix \"_P\"\n" - "# if defined(__DECC)\n" - "# pragma extern_prefix \"_E\"\n" - "# if !defined(_LIBC_POLLUTION_H_) && defined(__DECC)\n" - "# pragma extern_prefix \"\""; -}; - - -/* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX V4/5 <standards.h>. - */ -fix = { - hackname = alpha___extern_prefix_standards; - files = standards.h; - select = ".*!defined\\(_LIBC_POLLUTION_H_\\) && !defined\\(__DECC\\)"; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "%0 && !defined(__PRAGMA_EXTERN_PREFIX)"; - - test_text = "#if (_ISO_C_SOURCE>=19990L) " - "&& !defined(_LIBC_POLLUTION_H_) && !defined(__DECC)"; -}; - - -/* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX V5 <sys/mount.h> and - * <sys/stat.h>. The tests for __DECC are special in various ways, so - * alpha__extern_prefix cannot be used. - */ -fix = { - hackname = alpha___extern_prefix_sys_stat; - files = sys/stat.h; - files = sys/mount.h; - select = "#[ \t]*if[ \t]*defined\\(__DECC\\)"; - - mach = "alpha*-dec-osf5*"; - c_fix = format; - c_fix_arg = "%0 || defined(__PRAGMA_EXTERN_PREFIX)"; - - test_text = "# if defined(__DECC)"; -}; - - /* * Fix assert macro in assert.h on Alpha OSF/1. * The superfluous int cast breaks C++. @@ -669,38 +910,6 @@ fix = { ': __assert(#EX, __FILE__, __LINE__))'; }; - -/* - * Fix #defines under Alpha OSF/1: - * The following files contain '#pragma extern_prefix "_FOO"' followed by - * a '#define something(x,y,z) _FOOsomething(x,y,z)'. The intent of these - * statements is to reduce namespace pollution. While these macros work - * properly in most cases, they don't allow you to take a pointer to the - * "something" being modified. To get around this limitation, change these - * statements to be of the form '#define something _FOOsomething'. - * - * sed ain't egrep, lesson 2463: sed can use self-referential - * regular expressions. In the substitute expression below, - * "\\1" and "\\2" refer to subexpressions found earlier in the - * same match. So, we continue to use sed. "extern_prefix" will - * be a rare match anyway... - */ -fix = { - hackname = alpha_bad_lval; - - select = "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix"; - mach = "alpha*-dec-osf*"; - - sed = - "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*" - "\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/"; - - test_text = '#pragma extern_prefix "_FOO"'"\n" - "#define something(x,y,z) _FOOsomething(x,y,z)\n" - "#define mumble _FOOmumble"; -}; - - /* * Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX. */ @@ -714,7 +923,6 @@ fix = { test_text = 'extern int getopt(int, char *[], char *);'; }; - /* * Fix missing semicolon on Alpha OSF/4 in <net/if.h> */ @@ -727,7 +935,6 @@ fix = { test_text = ' struct sockaddr vmif_paddr /* protocol address */'; }; - /* * Remove erroneous parentheses in sym.h on Alpha OSF/1. */ @@ -740,100 +947,6 @@ fix = { test_text = "#ifndef(__mips64) /* bogus */\nextern int foo;\n#endif"; }; - -/* - * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX <pthread.h>. - */ -fix = { - hackname = alpha_pthread; - files = pthread.h; - select = "((#[ \t]*if)([ \t]*defined[ \t]*\\(_PTHREAD_ENV_DECC\\)" - "|def _PTHREAD_ENV_DECC)(.*))\n" - "(#[ \t]*define _PTHREAD_USE_PTDNAM_)"; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "%2 defined (_PTHREAD_ENV_DECC)%4 " - "|| defined (__PRAGMA_EXTERN_PREFIX)\n%5"; - - test_text = "# if defined (_PTHREAD_ENV_DECC) " - "|| defined (_PTHREAD_ENV_EPCC)\n" - "# define _PTHREAD_USE_PTDNAM_\n" - "# endif\n" - "# ifdef _PTHREAD_ENV_DECC\n" - "# define _PTHREAD_USE_PTDNAM_\n" - "# endif"; -}; - - -/* - * Recognize GCC in Tru64 UNIX V5.1B <pthread.h>. - */ -fix = { - hackname = alpha_pthread_gcc; - files = pthread.h; - select = "#else\n# error <pthread.h>: unrecognized compiler."; - - mach = "alpha*-dec-osf*"; - c_fix = format; - c_fix_arg = "#elif defined (__GNUC__)\n" - "# define _PTHREAD_ENV_GCC\n" - "%0"; - - test_text = "# define _PTHREAD_ENV_INTELC\n" - "#else\n" - "# error <pthread.h>: unrecognized compiler.\n" - "#endif"; -}; - - -/* - * Compaq Tru64 v5.1 defines all of its PTHREAD_*_INITIALIZER macros - * incorrectly, specifying less fields in the initializers than are - * defined in the corresponding structure types. Use of these macros - * in user code results in spurious warnings. - */ -fix = { - hackname = alpha_pthread_init; - files = pthread.h; - select = ' \* @\(#\).RCSfile: pthread\.h,v \$' - ' .Revision: 1\.1\.33\.21 \$ \(DEC\)' - ' .Date: 2000/08/15 15:30:13 \$'; - mach = "alpha*-dec-osf*"; - sed = "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" - "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 = <<- _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. @@ -847,7 +960,6 @@ fix = { test_text = "extern char* sbrk(ptrdiff_t increment);"; }; - /* * For C++, avoid any typedef or macro definition of bool, * and use the built in type instead. @@ -870,7 +982,9 @@ fix = { test_text = "# define bool\t char \n"; }; - +/* + * avoid_bool_type + */ fix = { hackname = avoid_bool_type; files = curses.h; @@ -887,7 +1001,6 @@ fix = { test_text = "typedef unsigned int\tbool \t; /* bool\n type */"; }; - /* * For C++, avoid any typedef definition of wchar_t, * and use the built in type instead. @@ -911,7 +1024,6 @@ fix = { test_text = "typedef unsigned short\twchar_t \t; /* wchar_t\n type */"; }; - /* * Fix `typedef struct term;' on hppa1.1-hp-hpux9. */ @@ -925,7 +1037,6 @@ fix = { test_text = 'typedef struct term;'; }; - /* * Fix one other error in this file: * a mismatched quote not inside a C comment. @@ -940,7 +1051,6 @@ fix = { test_text = "/* doesn't have matched single quotes */"; }; - /* * check for broken assert.h that needs stdio.h */ @@ -954,7 +1064,6 @@ fix = { test_text = "extern FILE* stderr;"; }; - /* * check for broken assert.h that needs stdlib.h */ @@ -970,14 +1079,9 @@ fix = { test_text = "extern void exit ( int );"; }; - /* * Remove `extern double cabs' declarations from math.h. * This conflicts with C99. Discovered on AIX. - * IRIX 5 and IRIX 6 before 6.5.18 (where C99 support was introduced) - * declares cabs() to take a struct __cabs_s argument. - * SunOS4 has its cabs() declaration followed by a comment which - * terminates on the following line. * Darwin hides its broken cabs in architecture-specific subdirs. */ fix = { @@ -993,14 +1097,9 @@ fix = { "#else\n" "extern double cabs();\n" "#endif\n" - "extern double cabs ( _Complex z );\n" - "extern double cabs(); /* This is a comment\n" - " and it ends here. */\n" - "extern double cabs(struct __cabs_s);\n" - "extern long double cabsl( struct __cabsl_s );"; + "extern double cabs ( _Complex z );"; }; - /* * Fixup Darwin's broken check for __builtin_nanf. */ @@ -1014,14 +1113,13 @@ fix = { */ files = "architecture/ppc/math.h"; files = "architecture/*/math.h"; - select = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)"; + select = '#if defined\(__APPLE_CC__\) && \(__APPLE_CC__ >= 1345\)'; bypass = "powl"; c_fix = format; c_fix_arg = "#if 1"; test_text = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)"; }; - /* * Various systems derived from BSD4.4 contain a macro definition * for vfscanf that interacts badly with requirements of builtin-attrs.def. @@ -1042,19 +1140,17 @@ fix = { }; /* - * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests - * that it conforms to ISO/IEC 14882:2011. It currently does - * not support the [[noreturn]] procedure attribute. - * When it does, this hack should be removed. - * SEE: gcc.gnu.org/bugzilla/show_bug.cgi?id=51776 + * Old Linux kernel's <compiler.h> header breaks Traditional CPP */ fix = { - hackname = cdef_cplusplus; - files = sys/cdefs.h; - select = '\[\[noreturn\]\]'; + hackname = complier_h_tradcpp; + files = linux/compiler.h; + + select = "#define __builtin_warning\\(x, y\\.\\.\\.\\) \\(1\\)"; c_fix = format; - c_fix_arg = '__attribute__((__noreturn__))'; - test_text = "#define _Noreturn [[noreturn]]"; + c_fix_arg = "/* __builtin_warning(x, y...) is obsolete */"; + + test_text = "#define __builtin_warning(x, y...) (1)"; }; /* @@ -1088,6 +1184,9 @@ fix = { test_text = "#define _CTRL(c) ('c'&037)"; }; +/* + * Fix various macros used to define ioctl numbers. + */ fix = { hackname = ctrl_quotes_use; select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']"; @@ -1096,7 +1195,6 @@ fix = { test_text = "#define TCTRLFOO BSD43_CTRL(T, 1)"; }; - /* * sys/mman.h on HP/UX is not C++ ready, * even though NO_IMPLICIT_EXTERN_C is defined on HP/UX. @@ -1124,6 +1222,22 @@ fix = { test_text = "extern void* malloc( size_t );"; }; +/* + * For the AAB_darwin7_9_long_double_funcs fix to be useful, + * you have to not use "" includes. + */ +fix = { + hackname = darwin_9_long_double_funcs_2; + mach = "*-*-darwin7.9*"; + files = math.h; + select = '#include[ \t]+\"'; + c_fix = format; + c_fix_arg = "%1<%2.h>"; + + c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"'; + + test_text = '#include "architecture/ppc/math.h"'; +}; /* * On darwin8 and earlier, mach-o/swap.h isn't properly guarded @@ -1150,12 +1264,10 @@ fix = { test_text = "extern void swap_fat_header();\n"; }; - /* * AvailabilityMacros.h on Darwin breaks with GCC 4.0, because of * bad __GNUC__ tests. */ - fix = { hackname = darwin_gcc4_breakage; mach = "*-*-darwin*"; @@ -1167,7 +1279,6 @@ fix = { "(__GNUC_MINOR__ >= 1)\n"; }; - /* * __private_extern__ doesn't exist in FSF GCC. Even if it did, * why would you ever put it in a system header file? @@ -1185,7 +1296,6 @@ fix = { "unsigned long *address);\n"; }; - /* * Darwin headers have a stdint.h that defines UINT8_C and UINT16_C to * unsigned constants. @@ -1202,7 +1312,6 @@ fix = { "#define UINT16_C(v) (v ## U)"; }; - /* * Darwin headers have a stdint.h that defines INTPTR_MIN and INTPTR_MAX * with wrong types. @@ -1235,7 +1344,6 @@ fix = { "#endif"; }; - /* * Darwin headers have a stdint.h that defines UINTPTR_MAX with a wrong type. */ @@ -1261,7 +1369,6 @@ fix = { "#endif"; }; - /* * Darwin headers have a stdint.h that defines SIZE_MAX with a wrong type. */ @@ -1287,7 +1394,6 @@ fix = { "#endif"; }; - /* * Darwin headers have a stdint.h that defines {U,}INTMAX_{MIN,MAX} * with a wrong type. @@ -1316,7 +1422,6 @@ fix = { "#define UINTMAX_MAX UINT64_MAX"; }; - /* * Darwin headers have a stdint.h that defines {U,}INTMAX_C * with a wrong type. @@ -1349,7 +1454,6 @@ fix = { "#endif"; }; - /* * Darwin headers have a stdint.h that defines {U,}INTMAX_C * with a wrong type. @@ -1372,7 +1476,6 @@ fix = { "#define UINTMAX_C(v) (v ## ULL)"; }; - /* * Fix <c_asm.h> on Digital UNIX V4.0: * It contains a prototype for a DEC C internal asm() function, @@ -1390,7 +1493,6 @@ fix = { "};\n#pragma intrinsic( dasm )\n/* END ASM TEST*/"; }; - /* * Fix typo in <wchar.h> on DJGPP 2.03. */ @@ -1406,7 +1508,6 @@ fix = { "extern __DJ_wint_t x;\n"; }; - /* * Fix these Sun OS files to avoid an invalid identifier in an #ifdef. */ @@ -1421,6 +1522,59 @@ fix = { test_text = "#ifdef ecd.cursor\n#error bogus\n#endif /* ecd+cursor */"; }; +/* + * Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64 + * that fails when compiling for SSE-less 32-bit x86. + */ +fix = { + hackname = feraiseexcept_nosse_divbyzero; + mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*'; + files = bits/fenv.h, '*/bits/fenv.h'; + select = "^([\t ]*)__asm__ __volatile__ \\(\"divss %1, %0 *\" : " + ": \"x\" \\(__f\\), \"x\" \\(__g\\)\\);$"; + bypass = "\"fdivp .*; fwait\""; + + c_fix = format; + c_fix_arg = <<- _EOText_ + # ifdef __SSE_MATH__ + %0 + # else + %1__asm__ __volatile__ ("fdivp %%%%st, %%%%st(1); fwait" + %1 : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); + # endif + _EOText_; + + test_text = <<- _EOText_ + __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); + _EOText_; +}; + +/* + * Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64 + * that fails when compiling for SSE-less 32-bit x86. + */ +fix = { + hackname = feraiseexcept_nosse_invalid; + mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*'; + files = bits/fenv.h, '*/bits/fenv.h'; + select = "^([\t ]*)__asm__ __volatile__ \\(\"divss %0, %0 *\" : " + ": \"x\" \\(__f\\)\\);$"; + bypass = "\"fdiv .*; fwait\""; + + c_fix = format; + c_fix_arg = <<- _EOText_ + # ifdef __SSE_MATH__ + %0 + # else + %1__asm__ __volatile__ ("fdiv %%%%st, %%%%st(0); fwait" + %1 : "=t" (__f) : "0" (__f)); + # endif + _EOText_; + + test_text = <<- _EOText_ + __asm__ __volatile__ ("divss %0, %0" : : "x" (__f)); + _EOText_; +}; /* * Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume @@ -1438,7 +1592,6 @@ fix = { test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7'; }; - /* * Some releases of FreeBSD 4 and FreeBSD 5.0 and 5.1 system headers presume * neither the existence of GCC 4 nor its exact feature set yet break @@ -1454,7 +1607,6 @@ fix = { test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ == 3'; }; - /* * Some versions of glibc don't expect the C99 inline semantics. */ @@ -1472,7 +1624,6 @@ fix = { EOT; }; - /* * Similar, but a version that didn't have __NO_INLINE__ */ @@ -1490,7 +1641,6 @@ fix = { EOT; }; - /* * The glibc_c99_inline_1 fix should have fixed everything. Unfortunately * there are many glibc headers which do not respect __USE_EXTERN_INLINES. @@ -1526,7 +1676,9 @@ fix = { EOT; }; - +/* + * glibc_c99_inline_3 + */ fix = { hackname = glibc_c99_inline_3; files = bits/string2.h, '*/bits/string2.h'; @@ -1544,7 +1696,9 @@ fix = { EOT; }; - +/* + * glibc_c99_inline_4 + */ fix = { hackname = glibc_c99_inline_4; files = sys/sysmacros.h, '*/sys/sysmacros.h', wchar.h, '*/wchar.h'; @@ -1558,7 +1712,6 @@ fix = { EOT; }; - /* glibc-2.3.5 defines pthread mutex initializers incorrectly, * so we replace them with versions that correspond to the * definition. @@ -1632,7 +1785,6 @@ fix = { _EOText_; }; - /* glibc versions before 2.5 have a version of stdint.h that defines UINT8_C and UINT16_C to produce unsigned constants, as do uClibc versions with stdint.h based on those glibc versions. */ @@ -1643,17 +1795,18 @@ fix = { c_fix = format; c_fix_arg = "# define UINT8_C(c)\tc\n# define UINT16_C(c)\tc"; c_fix_arg = "# define UINT8_C\\(c\\)\tc ## U\n# define UINT16_C\\(c\\)\tc ## U"; - test_text = "/* This file is part of the GNU C Library. */\n# define UINT8_C(c)\tc ## U\n# define UINT16_C(c)\tc ## U"; + test_text = "/* This file is part of the GNU C Library. */\n" + "# define UINT8_C(c)\tc ## U\n" + "# define UINT16_C(c)\tc ## U"; }; - /* Some versions of glibc have a version of bits/string2.h that produces "value computed is not used" warnings from strncpy; fix this definition by using __builtin_strncpy instead as in newer versions. */ fix = { hackname = glibc_strncpy; - files = bits/string2.h; + files = bits/string2.h, '*/bits/string2.h'; bypass = "__builtin_strncpy"; c_fix = format; c_fix_arg = "# define strncpy(dest, src, n) __builtin_strncpy (dest, src, n)"; @@ -1678,7 +1831,9 @@ fix = { select = '\(\(\(type\) 0.25\) && \(\(type\) 0.25 - 1\)\)'; bypass = "__floating_type\\(type\\) \\\\\n.*__builtin_classify_type"; c_fix = format; - c_fix_arg = "(__builtin_classify_type ((type) 0) == 8 || (__builtin_classify_type ((type) 0) == 9 && __builtin_classify_type (__real__ ((type) 0)) == 8))"; + c_fix_arg = "(__builtin_classify_type ((type) 0) == 8 || " + "(__builtin_classify_type ((type) 0) == 9 && " + "__builtin_classify_type (__real__ ((type) 0)) == 8))"; test_text = "# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))"; }; @@ -1710,7 +1865,6 @@ fix = { "typedef ushort_t wchar_t; /* ushort_t */"; }; - /* * Fix HP & Sony's use of "../machine/xxx.h" * to refer to: <machine/xxx.h> @@ -1730,7 +1884,6 @@ fix = { test_text = ' # include "../machine/mumble.h"'; }; - /* * Check for (...) in C++ code in HP/UX sys/file.h. */ @@ -1746,7 +1899,6 @@ fix = { test_text = "extern void foo(...); /* HPUX_SOURCE - bad varargs */"; }; - /* * Un-Hide a series of five FP defines from post-1999 compliance GCC: * FP_NORMAL, FP_ZERO, FP_INFINITE, FP_SUBNORMAL and FP_NAN @@ -1780,7 +1932,6 @@ fix = { "# 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. @@ -1828,7 +1979,6 @@ fix = { " }\n"; }; - /* * Fix hpux 10.X missing ctype declarations 1 */ @@ -1850,7 +2000,6 @@ fix = { test_text = "# define _toupper(__c) __toupper(__c)\n"; }; - /* * Fix hpux 10.X missing ctype declarations 2 */ @@ -1891,7 +2040,6 @@ fix = { " extern unsigned int *__SB_masks;\n"; }; - /* * Fix hpux 10.X missing stdio declarations */ @@ -1913,7 +2061,6 @@ fix = { test_text = "# define _iob __iob\n"; }; - /* * Make sure hpux defines abs in header. */ @@ -1927,6 +2074,33 @@ fix = { test_text = "#ifndef _MATH_INCLUDED"; }; +/* + * hpux sendfile() + */ +fix = { + hackname = hpux11_extern_sendfile; + mach = "*-hp-hpux11.[12]*"; + files = sys/socket.h; + select = "^[ \t]*extern sbsize_t sendfile.*\n.*, int\\)\\);\n"; + c_fix = format; + c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n"; + test_text = " extern sbsize_t sendfile __((int, int, off_t, bsize_t,\n" + " const struct iovec *, int));\n"; +}; + +/* + * hpux sendpath() + */ +fix = { + hackname = hpux11_extern_sendpath; + mach = "*-hp-hpux11.[12]*"; + files = sys/socket.h; + select = "^[ \t]*extern sbsize_t sendpath.*\n.*, int\\)\\);\n"; + c_fix = format; + c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n"; + test_text = " extern sbsize_t sendpath __((int, int, off_t, bsize_t,\n" + " const struct iovec *, int));\n"; +}; /* * Keep HP-UX 11 from stomping on C++ math namespace @@ -1947,7 +2121,6 @@ fix = { "#endif"; }; - /* * Fix C99 constant in __POINTER_SET define. */ @@ -1962,7 +2135,6 @@ fix = { 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. @@ -1980,7 +2152,6 @@ fix = { " extern int getpwuid_r( char *, __size_t, struct passwd **);\n"; }; - /* * Fix hpux 11.00 broken snprintf declaration * (third argument is char *, needs to be const char * to prevent @@ -2014,7 +2185,6 @@ fix = { ' __va__list);'; }; - /* * get rid of bogus inline definitions in HP-UX 8.0 */ @@ -2032,6 +2202,75 @@ fix = { "inline double sqr(double v) { return v**0.5; }"; }; +/* + * hpux intptr + */ +fix = { + hackname = hpux_c99_intptr; + mach = "*-hp-hpux11.3*"; + files = stdint-hpux11.h, stdint.h; + sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*" + "INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*" + "INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*" + "INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*" + "INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*" + "UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*" + "UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@"; + test_text = "#define PTRDIFF_MAX INT32_MAX\n" + "#define PTRDIFF_MIN INT32_MIN\n" + "#define INTPTR_MAX INT32_MAX\n" + "#define INTPTR_MIN INT32_MIN\n" + "#define UINTPTR_MAX UINT32_MAX\n" + "#define SIZE_MAX UINT32_MAX\n"; +}; + +/* + * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31. + */ +fix = { + hackname = hpux_c99_inttypes; + mach = "*-hp-hpux11.[23]*"; + files = inttypes.h; + files = stdint-hpux11.h, stdint.h; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*" + "__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*" + "__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*" + "__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@" + "#define UINT32_C(__c) __CONCAT__(__c,u)@"; + test_text = "#define UINT8_C(__c) __CONCAT_U__(__c)\n" + "#define UINT16_C(__c) __CONCAT_U__(__c)\n" + "#define INT32_C(__c) __CONCAT__(__c,l)\n" + "#define UINT32_C(__c) __CONCAT__(__c,ul)\n"; +}; + +/* + * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31. + */ +fix = { + hackname = hpux_c99_inttypes2; + mach = "*-hp-hpux11.2*"; + files = stdint-hpux11.h, stdint.h; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*" + "((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*" + "((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*" + "((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@"; + sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*" + "((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@"; + test_text = "# define INT8_C(__c) ((signed char)(__c))\n" + "# define UINT8_C(__c) ((unsigned char)(__c))\n" + "# define INT16_C(__c) ((short)(__c))\n" + "# define UINT16_C(__c) ((unsigned short)(__c))\n"; +}; /* * Fix hpux broken ctype macros @@ -2048,6 +2287,25 @@ fix = { "# define isalpha(__c) (__SB_masks ? __SB_masks[__c] & _IS\n"; }; +/* + * hpux errno() + */ +fix = { + hackname = hpux_extern_errno; + mach = "*-hp-hpux10.*"; + mach = "*-hp-hpux11.[0-2]*"; + files = errno.h; + select = "^[ \t]*extern int errno;$"; + c_fix = format; + c_fix_arg = "#ifdef __cplusplus\n" + "extern \"C\" {\n" + "#endif\n" + "%0\n" + "#ifdef __cplusplus\n" + "}\n" + "#endif"; + test_text = " extern int errno;\n"; +}; /* * Fix hpux broken #ifndef _XOPEN_SOURCE_EXTENDED conditional on htonl etc. @@ -2076,6 +2334,32 @@ fix = { "#endif /* ! _XOPEN_SOURCE_EXTENDED */"; }; +/* + * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31. + */ +fix = { + hackname = hpux_imaginary_i; + mach = "ia64-hp-hpux11.*"; + files = complex.h; + select = "^[ \t]*#[ \t]*define[ \t]*_Complex_I.*"; + c_fix = format; + c_fix_arg = "#define _Complex_I (__extension__ 1.0iF)"; + test_text = "#define _Complex_I (0.f+_Imaginary_I)\n"; +}; + +/* + * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31. + */ +fix = { + hackname = hpux_inttype_int8_t; + mach = "*-hp-hpux1[01].*"; + files = sys/_inttypes.h; + select = "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*"; + c_fix = format; + c_fix_arg = "typedef signed char int%18_t;"; + test_text = "typedef char int_least8_t;\n" + "typedef char int8_t;\n"; +}; /* * HP-UX long_double @@ -2099,91 +2383,25 @@ fix = { "extern long_double strtold(const char *, char **);\n"; }; - /* - * We cannot use the above rule on 11.31 because it removes the strtold - * definition. ia64 is OK with no hack, PA needs some help. - */ +/* + * We cannot use the above rule on 11.31 because it removes the strtold + * definition. ia64 is OK with no hack, PA needs some help. + */ fix = { hackname = hpux_long_double_2; mach = "hppa*-*-hpux11.3*"; files = stdlib.h; - select = "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| defined\\(_PROTOTYPES\\) \\|\\| defined\\(_LONG_DOUBLE_STRUCT\\)"; + select = "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| " + "defined\\(_PROTOTYPES\\) \\|\\| " + "defined\\(_LONG_DOUBLE_STRUCT\\)"; c_fix = format; c_fix_arg = "# if !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)"; - test_text = "# if !defined(__ia64) || !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)\n"; -}; - -/* - * Fix hpux10.20 <sys/time.h> to avoid invalid forward decl - */ -fix = { - hackname = hpux_systime; - files = sys/time.h; - select = "^extern struct sigevent;"; - - c_fix = format; - c_fix_arg = "struct sigevent;"; - - test_text = 'extern struct sigevent;'; + test_text = "# if !defined(__ia64) || " + "!defined(_PROTOTYPES) || " + "defined(_LONG_DOUBLE_STRUCT)\n"; }; - -/* - * Wrap spu_info in ifdef _KERNEL. GCC cannot handle an array of unknown - * type and mpinfou is only defined when _KERNEL is set. - */ -fix = { - hackname = hpux_spu_info; - mach = "*-hp-hpux*"; - /* - * It is tempting to omit the first "files" entry. Do not. - * The testing machinery will take the first "files" entry as the name - * of a test file to play with. It would be a nuisance to have a directory - * with the name "*". - */ - files = "ia64/sys/getppdp.h"; - files = "*/sys/getppdp.h"; - select = "^.*extern.*spu_info.*"; - - c_fix = format; - c_fix_arg = "#ifdef _KERNEL\n%0\n#endif"; - - test_text = "extern union mpinfou spu_info[];"; -}; - -fix = { - hackname = hpux11_extern_sendfile; - mach = "*-hp-hpux11.[12]*"; - files = sys/socket.h; - select = "^[ \t]*extern sbsize_t sendfile.*\n.*, int\\)\\);\n"; - c_fix = format; - c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n"; - test_text = " extern sbsize_t sendfile __((int, int, off_t, bsize_t,\n const struct iovec *, int));\n"; -}; - -fix = { - hackname = hpux11_extern_sendpath; - mach = "*-hp-hpux11.[12]*"; - files = sys/socket.h; - select = "^[ \t]*extern sbsize_t sendpath.*\n.*, int\\)\\);\n"; - c_fix = format; - c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n"; - test_text = " extern sbsize_t sendpath __((int, int, off_t, bsize_t,\n const struct iovec *, int));\n"; -}; - -fix = { - hackname = hpux_extern_errno; - mach = "*-hp-hpux10.*"; - mach = "*-hp-hpux11.[0-2]*"; - files = errno.h; - select = "^[ \t]*extern int errno;$"; - c_fix = format; - c_fix_arg = "#ifdef __cplusplus\nextern \"C\" {\n#endif\n%0\n#ifdef __cplusplus\n}\n#endif"; - test_text = " extern int errno;\n"; -}; - - /* * Add missing braces to pthread initializer defines. */ @@ -2226,57 +2444,32 @@ fix = { "}\n"; }; -fix = { - hackname = hpux_c99_intptr; - mach = "*-hp-hpux11.3*"; - files = stdint-hpux11.h, stdint.h; - sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@"; - test_text = "#define PTRDIFF_MAX INT32_MAX\n" - "#define PTRDIFF_MIN INT32_MIN\n" - "#define INTPTR_MAX INT32_MAX\n" - "#define INTPTR_MIN INT32_MIN\n" - "#define UINTPTR_MAX UINT32_MAX\n" - "#define SIZE_MAX UINT32_MAX\n"; -}; - /* - * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31. + * Wrap spu_info in ifdef _KERNEL. GCC cannot handle an array of unknown + * type and mpinfou is only defined when _KERNEL is set. */ - fix = { - hackname = hpux_c99_inttypes; - mach = "*-hp-hpux11.[23]*"; - files = inttypes.h; - files = stdint-hpux11.h, stdint.h; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@#define UINT32_C(__c) __CONCAT__(__c,u)@"; - test_text = "#define UINT8_C(__c) __CONCAT_U__(__c)\n" - "#define UINT16_C(__c) __CONCAT_U__(__c)\n" - "#define INT32_C(__c) __CONCAT__(__c,l)\n" - "#define UINT32_C(__c) __CONCAT__(__c,ul)\n"; -}; + hackname = hpux_spu_info; + mach = "*-hp-hpux*"; + /* + * It is tempting to omit the first "files" entry. Do not. + * The testing machinery will take the first "files" entry as the name + * of a test file to play with. It would be a nuisance to have a directory + * with the name "*". + */ + files = "ia64/sys/getppdp.h"; + files = "*/sys/getppdp.h"; + select = "^.*extern.*spu_info.*"; -fix = { - hackname = hpux_c99_inttypes2; - mach = "*-hp-hpux11.2*"; - files = stdint-hpux11.h, stdint.h; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@"; - sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@"; - test_text = "# define INT8_C(__c) ((signed char)(__c))\n" - "# define UINT8_C(__c) ((unsigned char)(__c))\n" - "# define INT16_C(__c) ((short)(__c))\n" - "# define UINT16_C(__c) ((unsigned short)(__c))\n"; + c_fix = format; + c_fix_arg = "#ifdef _KERNEL\n%0\n#endif"; + + test_text = "extern union mpinfou spu_info[];"; }; +/* + * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31. + */ fix = { hackname = hpux_stdint_least_fast; mach = "*-hp-hpux11.2*"; @@ -2290,25 +2483,18 @@ fix = { _EOFix_; }; +/* + * Fix hpux10.20 <sys/time.h> to avoid invalid forward decl + */ fix = { - hackname = hpux_inttype_int8_t; - mach = "*-hp-hpux1[01].*"; - files = sys/_inttypes.h; - select = "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*"; - c_fix = format; - c_fix_arg = "typedef signed char int%18_t;"; - test_text = "typedef char int_least8_t;\n" - "typedef char int8_t;\n"; -}; + hackname = hpux_systime; + files = sys/time.h; + select = "^extern struct sigevent;"; -fix = { - hackname = hpux_imaginary_i; - mach = "ia64-hp-hpux11.*"; - files = complex.h; - select = "^[ \t]*#[ \t]*define[ \t]*_Complex_I.*"; c_fix = format; - c_fix_arg = "#define _Complex_I (__extension__ 1.0iF)"; - test_text = "#define _Complex_I (0.f+_Imaginary_I)\n"; + c_fix_arg = "struct sigevent;"; + + test_text = 'extern struct sigevent;'; }; /* @@ -2316,7 +2502,7 @@ fix = { */ fix = { hackname = huge_val_hex; - files = bits/huge_val.h; + files = bits/huge_val.h, '*/bits/huge_val.h'; select = "^#[ \t]*define[ \t]*HUGE_VAL[ \t].*0x1\\.0p.*"; bypass = "__builtin_huge_val"; @@ -2326,13 +2512,12 @@ fix = { test_text = "# define HUGE_VAL\t(__extension__ 0x1.0p2047)"; }; - /* * Fix glibc definition of HUGE_VALF in terms of hex floating point constant */ fix = { hackname = huge_valf_hex; - files = bits/huge_val.h; + files = bits/huge_val.h, '*/bits/huge_val.h'; select = "^#[ \t]*define[ \t]*HUGE_VALF[ \t].*0x1\\.0p.*"; bypass = "__builtin_huge_valf"; @@ -2342,13 +2527,12 @@ fix = { test_text = "# define HUGE_VALF (__extension__ 0x1.0p255f)"; }; - /* * Fix glibc definition of HUGE_VALL in terms of hex floating point constant */ fix = { hackname = huge_vall_hex; - files = bits/huge_val.h; + files = bits/huge_val.h, '*/bits/huge_val.h'; select = "^#[ \t]*define[ \t]*HUGE_VALL[ \t].*0x1\\.0p.*"; bypass = "__builtin_huge_vall"; @@ -2358,7 +2542,6 @@ fix = { test_text = "# define HUGE_VALL (__extension__ 0x1.0p32767L)"; }; - /* * Fix return type of abort and free */ @@ -2376,7 +2559,6 @@ fix = { "extern int exit(void*);"; }; - /* * Fix various macros used to define ioctl numbers. * The traditional syntax was: @@ -2407,6 +2589,9 @@ fix = { "#define XX_IO(x) ('x'<<8|256)"; }; +/* + * Fix the usage of the ioctl macro numbers. + */ fix = { hackname = io_quotes_use; select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*" @@ -2418,7 +2603,6 @@ fix = { "BSD43__IOWR(T, 1) /* Some are multi-line */"; }; - /* * Check for missing ';' in struct */ @@ -2435,111 +2619,6 @@ fix = { "}; /* mumbled struct */\n"; }; - -/* - * IRIX 6.5.1[89] <internal/sgimacros.h> unconditionally defines - * __restrict as restrict iff __c99. This is wrong for C++, which - * needs many C99 features, but only supports __restrict. - */ -fix = { - hackname = irix___restrict; - files = internal/sgimacros.h; - select = "(#ifdef __c99\n)(#[ \t]*define __restrict restrict)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "%1" - "# ifndef __cplusplus\n%2\n# endif"; - - test_text = "#ifdef __c99\n# define __restrict restrict"; -}; - -/* - * IRIX 6.5.22 <internal/math_core.h> uses the SGI c99 __generic() intrinsic - * to define the fpclasify, isfinite, isinf, isnan, isnormal and signbit - * functions. - * - * This was probably introduced around IRIX 6.5.18 - */ -fix = { - hackname = irix___generic1; - files = internal/math_core.h; - mach = "mips-sgi-irix6.5"; - select = "#define ([a-z]+)\\(x\\) *__generic.*"; - - c_fix = format; - c_fix_arg = "extern int %1(double);\n" - "extern int %1f(float);\n" - "extern int %1l(long double);\n" - "#define %1(x) (sizeof(x) == sizeof(double) ? _%1(x) \\\n" - " : sizeof(x) == sizeof(float) ? _%1f(x) \\\n" - " : _%1l(x))\n"; - - test_text = - "#define isnan(x) __generic(x,,, _isnan, _isnanf, _isnanl,,,)(x)\n"; -}; - - -/* Likewise <internal/math_core.h> on IRIX 6.5.19 and later uses the SGI - compiler's __generic intrinsic to define isgreater, isgreaterequal, - isless, islessequal, islessgreater and isunordered functions. */ -fix = { - hackname = irix___generic2; - files = internal/math_core.h; - mach = "mips-sgi-irix6.5"; - select = "#define ([a-z]+)\\(x,y\\) *__generic.*"; - - c_fix = format; - c_fix_arg = "#define %1(x,y) \\\n" - " ((sizeof(x)<=4 && sizeof(y)<=4) ? _%1f(x,y) \\\n" - " : (sizeof(x)<=8 && sizeof(y)<=8) ? _%1(x,y) \\\n" - " : _%1l(x,y))\n"; - - test_text = - "#define isless(x,y) __generic(x,y,, _isless, _islessf, _islessl,,,)(x,y)"; -}; - - -/* - * IRIX 5.2's <sys/asm.h> contains an asm comment with a contraction - * that causes the assembly preprocessor to complain about an - * unterminated character constant. - */ -fix = { - hackname = irix_asm_apostrophe; - files = sys/asm.h; - - select = "^[ \t]*#.*[Ww]e're"; - c_fix = format; - c_fix_arg = "%1 are"; - c_fix_arg = "^([ \t]*#.*[Ww]e)'re"; - test_text = "\t# and we're on vacation"; -}; - - -/* - * IRIX 6.5 complex.h defines _Complex_I and _Imaginary_I in terms of __I__, - * which is a MIPSpro compiler builtin. Remove _Imaginary_I and imaginary - * definitions which are not supported by GCC. - */ -fix = { - hackname = irix_complex; - mach = "mips-sgi-irix6.5"; - files = complex.h; - select = "#define[ \t]_Complex_I[ \t]\\(\\(float[ \t]_Complex\\)[ \t]\\(__I__\\)\\)"; - sed = "s/#define[ \t]_Complex_I[ \t]((float[ \t]_Complex)[ \t](__I__))/" - "#define _Complex_I (__extension__ 1.0iF)/"; - sed = "/#define[ \t]imaginary[ \t]_Imaginary/d"; - sed = "/#define[ \t]_Imaginary_I/d"; - sed = "s/#define[ \t]I[ \t]_Imaginary_I/#define I _Complex_I/"; - test_text = "#define _Complex_I ((float _Complex) (__I__))\n" - "#define imaginary _Imaginary\n" - "// #define _Imaginary_I ((float _Imaginary) 1)\n" - "#define _Imaginary_I __I__\n" - "#define I _Imaginary_I"; -}; - - /* * Non-traditional "const" declaration in Irix's limits.h. */ @@ -2552,157 +2631,13 @@ fix = { test_text = "extern const char limit; /* test limits */"; }; - -/* - * IRIX 6.5 PTHREAD_*_INITIALIZER need an additional level of braces in - * <pthread.h>. - */ -fix = { - hackname = irix_pthread_init; - files = pthread.h; - select = "^(#define[ \t]+PTHREAD_.*_INITIALIZER[ \t]+)(\\{ 0 \\})"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "%1{ %2 }"; - test_text = "#define PTHREAD_MUTEX_INITIALIZER { 0 }\n" - "#define PTHREAD_COND_INITIALIZER { 0 }\n" - "#define PTHREAD_RWLOCK_INITIALIZER { 0 }"; -}; - - -/* - * IRIX 6.5.1[78] <sys/socket.h> has a broken definition of socklen_t. - * Various socket function prototypes use different types instead, - * depending on the API in use (BSD, XPG4/5), but the socklen_t - * definition doesn't reflect this (SGI Bug Id 864477, fixed in - * IRIX 6.5.19). - */ -fix = { - hackname = irix_socklen_t; - files = sys/socket.h; - select = "(#define _SOCKLEN_T\n)(typedef u_int32_t socklen_t;)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "%1" - "#if _NO_XOPEN4 && _NO_XOPEN5\n" - "typedef int socklen_t;\n" - "#else\n" - "%2\n" - "#endif /* _NO_XOPEN4 && _NO_XOPEN5 */"; - - test_text = "#define _SOCKLEN_T\ntypedef u_int32_t socklen_t;"; -}; - /* - * IRIX 6.5 <stdint.h> only works with ISO C99 and errors out - * otherwise. - */ -fix = { - hackname = irix_stdint_c99_mode; - files = stdint.h; - select = "(#ifndef __c99\n)(#error This header file is to be used only for c99 mode compilations)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - c_fix_arg = "#if 0\n" - "%2"; - test_text = - "#ifndef __c99\n#error This header file is to be used only for c99 mode compilations\n#else"; -}; - - -/* - * IRIX 6.5 <stdint.h> has some *_MIN/MAX constants whose types don't - * match the corresponding types, as required by ISO C99. - */ -fix = { - hackname = irix_stdint_c99_types; - files = stdint-irix65.h, stdint.h; - mach = "mips-sgi-irix6.5"; - sed = "s@^#define INT64_MIN.*(-0x7fffffffffffffff - 1)$@" - "#define INT64_MIN (-0x7fffffffffffffffLL - 1)@"; - sed = "s@^#define INT64_MAX.*0x7fffffffffffffff$@" - "#define INT64_MAX 0x7fffffffffffffffLL@"; - sed = "s@^#define UINT32_MAX.*0xffffffff$@" - "#define UINT32_MAX 0xffffffffU@"; - sed = "s@^#define UINT64_MAX.*0xffffffffffffffff$@" - "#define UINT64_MAX 0xffffffffffffffffULL@"; - sed = "s@^#define INTPTR_MIN.*INT32_MIN$@" - "#define INTPTR_MIN (-0x7fffffffL - 1)@"; - sed = "s@^#define INTPTR_MAX.*INT32_MAX$@" - "#define INTPTR_MAX 0x7fffffffL@"; - sed = "s@^#define UINTPTR_MAX.*UINT32_MAX$@" - "#define UINTPTR_MAX 0xffffffffUL@"; - sed = "s@^#define INTPTR_MIN.*INT64_MIN@" - "#define INTPTR_MIN (-0x7fffffffffffffffL - 1)@"; - sed = "s@^#define INTPTR_MAX.*INT64_MAX$@" - "#define INTPTR_MAX 0x7fffffffffffffffL@"; - sed = "s@^#define UINTPTR_MAX.*UINT64_MAX$@" - "#define UINTPTR_MAX 0xffffffffffffffffUL@"; - sed = "s@^#define PTRDIFF_MIN.*INT64_MIN$@" - "#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1)@"; - sed = "s@^#define PTRDIFF_MAX.*INT64_MAX$@" - "#define PTRDIFF_MAX 0x7fffffffffffffffL@"; - sed = "s@^#define SIZE_MAX.*UINT64_MAX$@" - "#define SIZE_MAX 0xffffffffffffffffUL@"; - test_text = "#define INT64_MIN (-0x7fffffffffffffff - 1)\n" - "#define INT64_MAX 0x7fffffffffffffff\n" - "#define UINT32_MAX 0xffffffff\n" - "#define UINT64_MAX 0xffffffffffffffff\n" - "#define INTPTR_MIN INT32_MIN\n" - "#define INTPTR_MAX INT32_MAX\n" - "#define UINTPTR_MAX UINT32_MAX\n" - "#define INTPTR_MIN INT64_MIN\n" - "#define INTPTR_MAX INT64_MAX\n" - "#define UINTPTR_MAX UINT64_MAX\n" - "#define PTRDIFF_MIN INT64_MIN\n" - "#define PTRDIFF_MAX INT64_MAX\n" - "#define SIZE_MAX UINT64_MAX"; -}; - - -/* - * IRIX 6.5 <stdint.h> uses casts in some macros which cannot thus be used - * in preprocessor tests, although ISO C99 requires this. - */ -fix = { - hackname = irix_stdint_c99_macros; - files = stdint-irix65.h, stdint.h; - mach = "mips-sgi-irix6.5"; - sed = "s@^#define INT8_C(x).*int.*_t.*$@#define INT8_C(x) (x)@"; - sed = "s@^#define INT16_C(x).*int.*_t.*$@#define INT16_C(x) (x)@"; - sed = "s@^#define INT32_C(x).*int.*_t.*$@#define INT32_C(x) (x)@"; - sed = "s@^#define INT64_C(x).*int.*_t.*$@#define INT64_C(x) (x ## LL)@"; - sed = "s@^#define UINT8_C(x).*int.*_t.*$@#define UINT8_C(x) (x)@"; - sed = "s@^#define UINT16_C(x).*int.*_t.*$@#define UINT16_C(x) (x)@"; - sed = "s@^#define UINT32_C(x).*int.*_t.*$@#define UINT32_C(x) (x ## U)@"; - sed = "s@^#define UINT64_C(x).*int.*_t.*$@#define UINT64_C(x) (x ## ULL)@"; - sed = "s@^#define INTMAX_C(x).*int.*_t.*$@#define INTMAX_C(x) (x ## LL)@"; - sed = "s@^#define UINTMAX_C(x).*int.*_t.*$@#define UINTMAX_C(x) (x ## ULL)@"; - test_text = "#define INT8_C(x) (int_least8_t)(x)\n" - "#define INT16_C(x) (int_least16_t)(x)\n" - "#define INT32_C(x) (int_least32_t)(x)\n" - "#define INT64_C(x) (int_least64_t)(x)\n" - "#define UINT8_C(x) (uint_least8_t)(x)\n" - "#define UINT16_C(x) (uint_least16_t)(x)\n" - "#define UINT32_C(x) (uint_least32_t)(x)\n" - "#define UINT64_C(x) (uint_least64_t)(x)\n" - "#define INTMAX_C(x) (intmax_t)(x)\n" - "#define UINTMAX_C(x) (uintmax_t)(x)"; -}; - - -/* - * IRIX 5.x's stdio.h and IRIX 6.5's internal/stdio_core.h declare - * some functions that take a va_list as + * IRIX 5.x's stdio.h declares some functions that take a va_list as * taking char *. However, GCC uses void * for va_list, so * calling vfprintf with a va_list fails in C++. */ fix = { hackname = irix_stdio_va_list; files = stdio.h; - files = internal/stdio_core.h; select = '/\* va_list \*/ char \*'; c_fix = format; @@ -2711,27 +2646,6 @@ fix = { "extern int printf( const char *, /* va_list */ char * );"; }; - -/* - * IRIX 6.5.19 <internal/wchar_core.h> provides the XPG4 variant of - * wcsftime by default. ISO C99 requires the XPG5 variant instead. - */ -fix = { - hackname = irix_wcsftime; - files = internal/wchar_core.h; - select = "#if _NO_XOPEN5\n(extern size_t[ \t]+wcsftime.*const char \*.*)"; - - mach = "mips-sgi-irix6.5"; - c_fix = format; - 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 *);"; -}; - - /* * These files in Sun OS 4.x and ARM/RISCiX and BSD4.3 * use / * * / to concatenate tokens. @@ -2756,8 +2670,8 @@ fix = { test_text = "#define __CONCAT__(a,b) a/**/b"; }; - -/* The /usr/include/sys/ucontext.h on ia64-*linux-gnu systems defines +/* + * The /usr/include/sys/ucontext.h on ia64-*linux-gnu systems defines * an _SC_GR0_OFFSET macro using an idiom that isn't a compile time * constant on recent versions of g++. */ @@ -2773,7 +2687,6 @@ fix = { "\t(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)\n"; }; - /* * Remove header file warning from sys/time.h. Autoconf's * AC_HEADER_TIME recommends to include both sys/time.h and time.h @@ -2788,7 +2701,6 @@ fix = { test_text = "#warning Using <time.h> instead of <sys/time.h>"; }; - /* * Add missing declaration for putenv. */ @@ -2805,7 +2717,6 @@ fix = { test_text = "extern char *getenv _AP((const char *));"; }; - /* * Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_. * @@ -2824,7 +2735,6 @@ fix = { test_text = " # define _BSD_VA_LIST_\tchar**"; }; - /* * Fix non-ansi machine name defines */ @@ -2838,7 +2748,6 @@ fix = { "\n/* no uniform test, so be careful :-) */"; }; - /* * Some math.h files define struct exception (it's in the System V * Interface Definition), which conflicts with the class exception defined @@ -2851,7 +2760,7 @@ fix = { files = math.h; select = "struct exception"; /* - * This should be bypassed on __cplusplus, but some supposedly C++ C++ + * This should be bypassed on __cplusplus, but some supposedly C++ * aware headers, such as Solaris 8 and 9, don't wrap their struct * exception either. So currently we bypass only for glibc, based on a * comment in the fixed glibc header. Ick. @@ -2871,7 +2780,6 @@ fix = { test_text = "typedef struct exception t_math_exception;"; }; - /* * This looks pretty broken to me. ``dbl_max_def'' will contain * "define DBL_MAX " at the start, when what we really want is just @@ -2909,7 +2817,6 @@ fix = { "#define HUGE_VAL DBL_MAX"; }; - /* * nested comment */ @@ -2922,7 +2829,6 @@ fix = { test_text = "/*#include <rpc/auth_des.h> /* skip this */"; }; - /* * Some versions of NetBSD don't expect the C99 inline semantics. */ @@ -2942,7 +2848,9 @@ fix = { test_text = "extern __inline int\nsigaddset(sigset_t *set, int signo)\n{}"; }; - +/* + * netbsd_c99_inline_2 + */ fix = { hackname = netbsd_c99_inline_2; mach = "*-*-netbsd*"; @@ -2961,7 +2869,6 @@ fix = { test_text = "#define _SIGINLINE extern __inline"; }; - /* * NetBSD has a semicolon after the ending '}' for some extern "C". */ @@ -2977,10 +2884,11 @@ fix = { test_text = "#define __END_DECLS };"; }; - -/* newlib's stdint.h has several failures to conform to C99. The fix - for these removed a comment that can be matched to identify unfixed - versions. */ +/* + * newlib's stdint.h has several failures to conform to C99. The fix + * for these removed a comment that can be matched to identify unfixed + * versions. + */ fix = { hackname = newlib_stdint_1; files = stdint-newlib.h, stdint.h; @@ -2988,12 +2896,18 @@ fix = { sed = "s@#define INT32_MIN.*@#define INT32_MIN (-INT32_MAX - 1)@"; sed = "s@#define INT32_MAX.*@#define INT32_MAX __INT32_MAX__@"; sed = "s@#define UINT32_MAX.*@#define UINT32_MAX __UINT32_MAX__@"; - sed = "s@#define INT_LEAST32_MIN.*@#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)@"; - sed = "s@#define INT_LEAST32_MAX.*@#define INT_LEAST32_MAX __INT_LEAST32_MAX__@"; - sed = "s@#define UINT_LEAST32_MAX.*@#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__@"; - sed = 's@#define INT_FAST\([0-9]*\)_MIN.*@#define INT_FAST\1_MIN (-INT_FAST\1_MAX - 1)@'; - sed = 's@#define INT_FAST\([0-9]*\)_MAX.*@#define INT_FAST\1_MAX __INT_FAST\1_MAX__@'; - sed = 's@#define UINT_FAST\([0-9]*\)_MAX.*@#define UINT_FAST\1_MAX __UINT_FAST\1_MAX__@'; + sed = "s@#define INT_LEAST32_MIN.*@" + "#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)@"; + sed = "s@#define INT_LEAST32_MAX.*@" + "#define INT_LEAST32_MAX __INT_LEAST32_MAX__@"; + sed = "s@#define UINT_LEAST32_MAX.*@" + "#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__@"; + sed = 's@#define INT_FAST\([0-9]*\)_MIN.*@' + '#define INT_FAST\1_MIN (-INT_FAST\1_MAX - 1)@'; + sed = 's@#define INT_FAST\([0-9]*\)_MAX.*@' + '#define INT_FAST\1_MAX __INT_FAST\1_MAX__@'; + sed = 's@#define UINT_FAST\([0-9]*\)_MAX.*@' + '#define UINT_FAST\1_MAX __UINT_FAST\1_MAX__@'; sed = "s@#define SIZE_MAX.*@#define SIZE_MAX __SIZE_MAX__@"; sed = "s@#define PTRDIFF_MIN.*@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@"; sed = "s@#define PTRDIFF_MAX.*@#define PTRDIFF_MAX __PTRDIFF_MAX__@"; @@ -3016,7 +2930,9 @@ fix = { "#define UINT16_C(x) x##U"; }; - +/* + * newlib_stdint_2 + */ fix = { hackname = newlib_stdint_2; files = stdint-newlib.h, stdint.h; @@ -3035,7 +2951,6 @@ fix = { "/** Macros for minimum-width integer constant expressions */"; }; - /* * NeXT 3.2 adds const prefix to some math functions. * These conflict with the built-in functions. @@ -3052,7 +2967,6 @@ fix = { test_text = "extern\tdouble\t__const__\tmumble();"; }; - /* * NeXT 3.2 uses the word "template" as a parameter for some * functions. GCC reports an invalid use of a reserved key word @@ -3069,7 +2983,6 @@ fix = { test_text = "extern mumble( char * template); /* fix */"; }; - /* * NeXT 3.2 includes the keyword volatile in the abort() and exit() * function prototypes. That conflicts with the built-in functions. @@ -3086,7 +2999,6 @@ fix = { test_text = "extern\tvolatile\tvoid\tabort();"; }; - /* * NeXT 2.0 defines 'int wait(union wait*)', which conflicts with Posix.1. * Note that version 3 of the NeXT system has wait.h in a different directory, @@ -3103,7 +3015,6 @@ fix = { test_text = "extern pid_d wait(union wait*);"; }; - /* * a missing semi-colon at the end of the nodeent structure definition. */ @@ -3236,7 +3147,6 @@ fix = { test_text = "#include <reg_types.h>"; }; - /* * On broken glibc-2.3.3 systems an array of incomplete structures is * passed to __sigsetjmp. Fix that to take a pointer instead. @@ -3247,8 +3157,10 @@ fix = { select = "struct __jmp_buf_tag"; c_fix = format; c_fix_arg = "%1 *%2%3"; - c_fix_arg = "^(extern int __sigsetjmp \\(struct __jmp_buf_tag) (__env)\\[1\\](.*)$"; - test_text = "extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask);"; + c_fix_arg = "^(extern int __sigsetjmp \\(struct __jmp_buf_tag) " + "(__env)\\[1\\](.*)$"; + test_text = "extern int __sigsetjmp (struct __jmp_buf_tag __env[1], " + "int __savemask);"; }; /* @@ -3265,7 +3177,6 @@ fix = { test_text = "extern int\tfclose(), fflush(), fread(), fwrite(), foo();"; }; - /* * Fix casts as lvalues in glibc's <rpc/xdr.h>. */ @@ -3279,7 +3190,9 @@ fix = { "\t((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))"; }; - +/* + * rpc_xdr_lvalue_cast_b + */ fix = { hackname = rpc_xdr_lvalue_cast_b; files = rpc/xdr.h; @@ -3290,7 +3203,6 @@ fix = { "\t(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))"; }; - /* * function class(double x) conflicts with C++ keyword on rs/6000 */ @@ -3306,7 +3218,6 @@ fix = { test_text = "extern int class();"; }; - /* * Wrong fchmod prototype on RS/6000. */ @@ -3319,7 +3230,6 @@ fix = { test_text = "extern int fchmod(char *, mode_t);"; }; - /* * parameters conflict with C++ new on rs/6000 */ @@ -3335,7 +3245,6 @@ fix = { test_text = 'extern int rename(const char *old, const char *new);'; }; - /* * Solaris 10+ <sys/feature_tests.h> defines _RESTRICT_KYWD as restrict * for C99. This is wrong for C++, which needs many C99 features, but @@ -3352,7 +3261,6 @@ fix = { test_text = "#define _RESTRICT_KYWD restrict"; }; - /* * Solaris 10+ complex.h defines _Complex_I and _Imaginary_I in terms of * themselves, which are Sun Studio compiler intrinsics. Remove _Imaginary_I @@ -3376,7 +3284,6 @@ fix = { "#define I _Imaginary_I"; }; - /* * Solaris 10+ <complex.h> is wrapped in #ifndef __cplusplus. Wrap in * extern "C" instead so libstdc++ can use it. @@ -3393,27 +3300,6 @@ fix = { "#endif /* !defined(__cplusplus) */"; }; - -/* - * Solaris 8 PTHREAD_COND_INITIALIZER lacks the __pthread_cond_magic field. - * COND_MAGIC is only defined in <synch.h> and pollutes the namespace, so - * use the value literally instead. - */ -fix = { - hackname = solaris_cond_init; - select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - files = pthread.h; - mach = '*-*-solaris2.8'; - c_fix = format; - c_fix_arg = "%1, 0x4356%2"; - c_fix_arg = "^(#define[ \t]+PTHREAD_COND_INITIALIZER[ \t]+" - "\\{.*0)(\\},[ \t]*0\\}.*)$"; - test_text = - '#pragma ident "@(#)pthread.h 1.29 01/07/07 SMI"'"\n" - '#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* = DEFAULTCV */'; -}; - - /* * g++ rejects functions declared with both C and C++ linkage. */ @@ -3433,7 +3319,6 @@ fix = { " void *bsearch(const void *, const void *, size_t, size_t,"; }; - /* * Solaris <iso/stdio_iso.h> doesn't declare getc for C++ with * _STRICT_STDC, but uses it. @@ -3450,6 +3335,97 @@ fix = { "#if !defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC)"; }; +/* + * Sun Solaris 2 has a version of sys/int_const.h that defines + * UINT8_C and UINT16_C to unsigned constants. + */ +fix = { + hackname = solaris_int_const; + files = sys/int_const.h; + mach = '*-*-solaris2*'; + c_fix = format; + c_fix_arg = "#define\tUINT8_C(c)\t(c)\n" + "%1\n" + "#define\tUINT16_C(c)\t(c)"; + select = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n" + "(/\*.*\*/)\n" + "#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*"; + test_text = + "#define UINT8_C(c) __CONCAT__(c,u)\n" + "/* CSTYLED */\n" + "#define UINT16_C(c) __CONCAT__(c,u)"; +}; + +/* + * Sun Solaris 2 has a version of sys/int_limits.h that defines + * UINT8_MAX and UINT16_MAX to unsigned constants. + */ +fix = { + hackname = solaris_int_limits_1; + files = sys/int_limits.h; + mach = '*-*-solaris2*'; + c_fix = format; + c_fix_arg = "#define\tUINT8_MAX\t(255)\n" + "#define\tUINT16_MAX\t(65535)"; + select = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n" + "#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)"; + test_text = + "#define UINT8_MAX (255U)\n" + "#define UINT16_MAX (65535U)"; +}; + +/* + * Sun Solaris 2 has a version of sys/int_limits.h that defines + * INT_FAST16 limits to wrong values for sys/int_types.h. + */ +fix = { + hackname = solaris_int_limits_2; + files = sys/int_limits.h; + mach = '*-*-solaris2*'; + c_fix = format; + c_fix_arg = "#define\t%1_FAST16_%2 %132_%2"; + select = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*"; + test_text = + "#define INT_FAST16_MAX INT16_MAX\n" + "#define UINT_FAST16_MAX UINT16_MAX\n" + "#define INT_FAST16_MIN INT16_MIN"; +}; + +/* + * Sun Solaris 2 has a version of sys/int_limits.h that defines + * SIZE_MAX as unsigned long. + */ +fix = { + hackname = solaris_int_limits_3; + files = sys/int_limits.h; + mach = '*-*-solaris2*'; + c_fix = format; + c_fix_arg = "#define\tSIZE_MAX\t4294967295U"; + select = "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL"; + test_text = + "#define SIZE_MAX 4294967295UL"; +}; + +/* + * Sun Solaris up to 9 has a version of sys/int_types.h that forbids use + * of Standard C99 64-bit types in 32-bit mode. + */ +fix = { + hackname = solaris_int_types; + select = "__STDC__ - 0 == 0"; + bypass = "_LONGLONG_TYPE"; + files = sys/int_types.h; + c_fix = format; + c_fix_arg = + "(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))"; + test_text = + "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" + "typedef long long int64_t;\n" + "#endif\n\n" + "#if defined(_LP64) || (__STDC__ - 0 == 0 && !defined(_NO_LONGLONG))\n" + "typedef int64_t intmax_t;\n" + "#endif"; +}; /* * Before Solaris 10, <iso/setjmp_iso.h> doesn't mark longjump noreturn. @@ -3466,7 +3442,6 @@ fix = { test_text = "extern void longjmp(jmp_buf, int);"; }; - /* * Sun Solaris 10 defines several C99 math macros in terms of * builtins specific to the Studio compiler, in particular not @@ -3490,6 +3465,35 @@ fix = { "#define HUGE_VALL __builtin_huge_vall"; }; +/* + * On Solaris 11, if you do isinf(NaN) you'll get a floating point + * exception. Provide an alternative using GCC's builtin. + */ +fix = { + hackname = solaris_math_10; + select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; + files = iso/math_c99.h; + c_fix = format; + c_fix_arg = "#define\tisinf(x) __builtin_isinf(x)"; + c_fix_arg = "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n" + "[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);" + "[ \t]*\\\\\n" + "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*" + "INFINITY[ \t]*\\|\\|[ \t]*\\\\\n" + "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*" + "\\(-INFINITY\\);[ \t]*\\}\\)"; + test_text = + '#pragma ident "@(#)math_c99.h 1.12 07/01/21 SMI"'"\n" + "#undef isinf\n" + "#define isinf(x) __extension__( \\\\\n" + " { __typeof(x) __x_i = (x); \\\\\n" + " __x_i == (__typeof(__x_i)) INFINITY || \\\\\n" + " __x_i == (__typeof(__x_i)) (-INFINITY); })"; +}; + +/* + * Solaris math INFINITY + */ fix = { hackname = solaris_math_2; select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; @@ -3504,6 +3508,9 @@ fix = { "#define INFINITY __builtin_infinity"; }; +/* + * Solaris math NAN + */ fix = { hackname = solaris_math_3; select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; @@ -3518,6 +3525,9 @@ fix = { "#define NAN __builtin_nan"; }; +/* + * Solaris math fpclassify + */ fix = { hackname = solaris_math_4; select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; @@ -3525,7 +3535,8 @@ fix = { files = iso/math_c99.h; c_fix = format; c_fix_arg = "#define\tfpclassify(x) \\\n" - " __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (x))"; + " __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, " + "FP_SUBNORMAL, FP_ZERO, (x))"; c_fix_arg = "^#define[ \t]+fpclassify\\(x\\)[ \t]+__builtin_fpclassify\\(x\\)"; test_text = '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n" @@ -3533,6 +3544,9 @@ fix = { "#define fpclassify(x) __builtin_fpclassify(x)"; }; +/* + * Solaris math signbit + */ fix = { hackname = solaris_math_8; select = '@\(#\)math_c99\.h' "[ \t]+1\\.[0-9]+[ \t]+[0-9/]+ SMI"; @@ -3552,6 +3566,9 @@ fix = { _EOText_; }; +/* + * Solaris math comparison macros + */ fix = { hackname = solaris_math_9; select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; @@ -3559,7 +3576,8 @@ fix = { files = iso/math_c99.h; c_fix = format; c_fix_arg = "#define\t%1(x, y)%2__builtin_%1(x, y)"; - c_fix_arg = "^#define[ \t]+([a-z]+)\\(x, y\\)([ \t]+)\\(\\(x\\) __builtin_[a-z]+\\(y\\)\\)"; + c_fix_arg = "^#define[ \t]+([a-z]+)\\(x, y\\)([ \t]+)\\(\\(x\\) " + "__builtin_[a-z]+\\(y\\)\\)"; test_text = '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n" "#undef isgreater\n" @@ -3577,30 +3595,6 @@ fix = { }; /* - * On Solaris 11, if you do isinf(NaN) you'll get a floating point - * exception. Provide an alternative using GCC's builtin. - */ - -fix = { - hackname = solaris_math_10; - select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - files = iso/math_c99.h; - c_fix = format; - c_fix_arg = "#define\tisinf(x) __builtin_isinf(x)"; - c_fix_arg = "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n" - "[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);[ \t]*\\\\\n" - "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*INFINITY[ \t]*\\|\\|[ \t]*\\\\\n" - "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*\\(-INFINITY\\);[ \t]*\\}\\)"; - test_text = - '#pragma ident "@(#)math_c99.h 1.12 07/01/21 SMI"'"\n" - "#undef isinf\n" - "#define isinf(x) __extension__( \\\\\n" - " { __typeof(x) __x_i = (x); \\\\\n" - " __x_i == (__typeof(__x_i)) INFINITY || \\\\\n" - " __x_i == (__typeof(__x_i)) (-INFINITY); })"; -}; - -/* * Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing * "0" for the last field of the pthread_mutex_t structure, which is * of type upad64_t, which itself is typedef'd to int64_t, but with @@ -3638,52 +3632,6 @@ fix = { " {{{0, 0, 0, 0}, DEFAULT_TYPE, _COND_MAGIC}, 0}"; }; - -/* - * The pow overloads with int were removed in C++ 2011. - */ -fix = { - hackname = solaris_pow_int_overload; - mach = '*-*-solaris2*'; - files = "iso/math_iso.h"; - select = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)" - " *\\{[^{}]*\n[^{}]*\\}"; - c_fix = format; - c_fix_arg = "#ifndef __GXX_EXPERIMENTAL_CXX0X__\n%0\n#endif"; - - test_text = - " inline long double pow(long double __X, int __Y) { return\n" - " __powl(__X, (long double) (__Y)); }"; -}; - - -/* - * Sun Solaris defines PTHREAD_RWLOCK_INITIALIZER with a "0" for some - * fields of the pthread_rwlock_t structure, which are of type - * upad64_t, which itself is typedef'd to int64_t, but with __STDC__ - * defined (e.g. by -ansi) it is a union. So change the initializer - * to "{0}" instead. - */ -fix = { - hackname = solaris_rwlock_init_1; - select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - files = pthread.h; - mach = '*-*-solaris*'; - c_fix = format; - c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" - "%0\n" - "#else\n" - "%1{0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}}\n" - "#endif"; - c_fix_arg = "(^#define[ \t]+PTHREAD_RWLOCK_INITIALIZER[ \t]+)" - "\\{0, 0, 0, \\{0, 0, 0\\}, \\{0, 0\\}, \\{0, 0\\}\\}[ \t]*$"; - - test_text = - '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n" - "#define PTHREAD_RWLOCK_INITIALIZER\t{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}"; -}; - - /* * Sun Solaris defines PTHREAD_ONCE_INIT as an array containing a * structure. As such, it need two levels of brackets, but only @@ -3702,7 +3650,6 @@ fix = { "#define PTHREAD_ONCE_INIT\t{0, 0, 0, PTHREAD_ONCE_NOTDONE}"; }; - /* * Sun Solaris defines PTHREAD_ONCE_INIT with a "0" for some * fields of the pthread_once_t structure, which are of type @@ -3735,121 +3682,65 @@ fix = { "#define PTHREAD_ONCE_INIT\t{{0, 0, 0, PTHREAD_ONCE_NOTDONE}}\n"; }; - /* - * Sun Solaris 2 has a version of sys/int_const.h that defines - * UINT8_C and UINT16_C to unsigned constants. - */ -fix = { - hackname = solaris_int_const; - files = sys/int_const.h; - mach = '*-*-solaris2*'; - c_fix = format; - c_fix_arg = "#define\tUINT8_C(c)\t(c)\n" - "%1\n" - "#define\tUINT16_C(c)\t(c)"; - select = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n" - "(/\*.*\*/)\n" - "#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*"; - test_text = - "#define UINT8_C(c) __CONCAT__(c,u)\n" - "/* CSTYLED */\n" - "#define UINT16_C(c) __CONCAT__(c,u)"; -}; - - -/* - * Sun Solaris 2 has a version of sys/int_limits.h that defines - * UINT8_MAX and UINT16_MAX to unsigned constants. + * Solaris 10+ <spawn.h> uses char *const argv[_RESTRICT_KYWD] in the + * posix_spawn declarations, which doesn't work with C++. */ fix = { - hackname = solaris_int_limits_1; - files = sys/int_limits.h; + hackname = solaris_posix_spawn_restrict; + files = spawn.h; mach = '*-*-solaris2*'; c_fix = format; - c_fix_arg = "#define\tUINT8_MAX\t(255)\n" - "#define\tUINT16_MAX\t(65535)"; - select = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n" - "#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)"; + c_fix_arg = "%1*_RESTRICT_KYWD %2%3"; + select = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; test_text = - "#define UINT8_MAX (255U)\n" - "#define UINT16_MAX (65535U)"; + "char *const argv[_RESTRICT_KYWD],\n" + "char *const envp[_RESTRICT_KYWD]);"; }; - /* - * Sun Solaris 2 has a version of sys/int_limits.h that defines - * INT_FAST16 limits to wrong values for sys/int_types.h. + * The pow overloads with int were removed in C++ 2011 DR 550. */ fix = { - hackname = solaris_int_limits_2; - files = sys/int_limits.h; + hackname = solaris_pow_int_overload; mach = '*-*-solaris2*'; + files = "iso/math_iso.h"; + select = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)" + " *\\{[^{}]*\n[^{}]*\\}"; c_fix = format; - c_fix_arg = "#define\t%1_FAST16_%2 %132_%2"; - select = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*"; - test_text = - "#define INT_FAST16_MAX INT16_MAX\n" - "#define UINT_FAST16_MAX UINT16_MAX\n" - "#define INT_FAST16_MIN INT16_MIN"; -}; - + c_fix_arg = "#if __cplusplus < 201103L\n%0\n#endif"; -/* - * Sun Solaris 2 has a version of sys/int_limits.h that defines - * SIZE_MAX as unsigned long. - */ -fix = { - hackname = solaris_int_limits_3; - files = sys/int_limits.h; - mach = '*-*-solaris2*'; - c_fix = format; - c_fix_arg = "#define\tSIZE_MAX\t4294967295U"; - select = "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL"; test_text = - "#define SIZE_MAX 4294967295UL"; + " inline long double pow(long double __X, int __Y) { return\n" + " __powl(__X, (long double) (__Y)); }"; }; - /* - * Sun Solaris up to 9 has a version of sys/int_types.h that forbids use - * of Standard C99 64-bit types in 32-bit mode. + * Sun Solaris defines PTHREAD_RWLOCK_INITIALIZER with a "0" for some + * fields of the pthread_rwlock_t structure, which are of type + * upad64_t, which itself is typedef'd to int64_t, but with __STDC__ + * defined (e.g. by -ansi) it is a union. So change the initializer + * to "{0}" instead. */ fix = { - hackname = solaris_int_types; - select = "__STDC__ - 0 == 0"; - bypass = "_LONGLONG_TYPE"; - files = sys/int_types.h; - c_fix = format; - c_fix_arg = - "(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))"; - test_text = - "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" - "typedef long long int64_t;\n" - "#endif\n\n" - "#if defined(_LP64) || (__STDC__ - 0 == 0 && !defined(_NO_LONGLONG))\n" - "typedef int64_t intmax_t;\n" - "#endif"; -}; - + hackname = solaris_rwlock_init_1; + select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; + files = pthread.h; + mach = '*-*-solaris*'; + c_fix = format; + c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" + "%0\n" + "#else\n" + "%1{0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}}\n" + "#endif"; + c_fix_arg = "(^#define[ \t]+PTHREAD_RWLOCK_INITIALIZER[ \t]+)" + "\\{0, 0, 0, \\{0, 0, 0\\}, \\{0, 0\\}, \\{0, 0\\}\\}[ \t]*$"; -/* - * Solaris 10+ <spawn.h> uses char *const argv[_RESTRICT_KYWD] in the - * posix_spawn declarations, which doesn't work with C++. - */ -fix = { - hackname = solaris_posix_spawn_restrict; - files = spawn.h; - mach = '*-*-solaris2*'; - c_fix = format; - c_fix_arg = "%1*_RESTRICT_KYWD %2%3"; - select = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; test_text = - "char *const argv[_RESTRICT_KYWD],\n" - "char *const envp[_RESTRICT_KYWD]);"; + '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n" + "#define PTHREAD_RWLOCK_INITIALIZER\t{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}"; }; - /* * Before Solaris 10, <stdio.h> lacks declarations of std::__filbuf and * std::__flsbuf, but <iso/stdio_iso.h> uses them. @@ -3870,7 +3761,6 @@ fix = { "#endif"; }; - /* * Sun Solaris 8 has what appears to be some gross workaround for * some old version of their c++ compiler. G++ doesn't want it @@ -3889,15 +3779,14 @@ fix = { test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)"; }; - /* - * On Solaris 8 and 9, __va_list needs to become a typedef for + * On Solaris 9, __va_list needs to become a typedef for * __builtin_va_list to make -Wmissing-format-attribute work. */ fix = { hackname = solaris_sys_va_list; files = sys/va_list.h; - mach = '*-*-solaris2.[89]'; + mach = '*-*-solaris2.9'; select = "#if.*__STDC__.*\n" "typedef void \\*__va_list;\n" "#else\n" @@ -3917,7 +3806,6 @@ fix = { "#endif"; }; - /* * a missing semi-colon at the end of the statsswtch structure definition. */ @@ -3930,7 +3818,6 @@ fix = { test_text = "struct statswtch {\n int boottime\n};"; }; - /* * Arrange for stdio.h to use stdarg.h to define __gnuc_va_list. * On 4BSD-derived systems, stdio.h defers to machine/ansi.h; that's @@ -3954,22 +3841,17 @@ fix = { test_text = ""; }; - /* * Don't use or define the name va_list in stdio.h. This is for * ANSI. Note _BSD_VA_LIST_ is dealt with elsewhere. The presence * of __gnuc_va_list, __DJ_va_list, or _G_va_list is taken to * indicate that the header knows what it's doing -- under SUSv2, * stdio.h is required to define va_list, and we shouldn't break - * that. On IRIX 6.5, internal/wchar_core.h used to get its - * definition of va_list from stdio.h. Since this doesn't happen any - * longer, use __gnuc_va_list there, too. + * that. */ fix = { hackname = stdio_va_list; files = stdio.h; - files = internal/stdio_core.h; - files = internal/wchar_core.h; bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list'; /* * On Solaris 10, the definition in @@ -4006,7 +3888,6 @@ fix = { test_text = "extern void mumble( va_list);"; }; - /* * Fix headers that use va_list from stdio.h to use the updated * va_list from the stdio_va_list change. Note _BSD_VA_LIST_ is @@ -4056,7 +3937,6 @@ fix = { test_text = "extern void mumble( va_list);"; }; - /* * "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0" * is "!defined( __STRICT_ANSI__ )" @@ -4119,7 +3999,6 @@ fix = { "int foo;\n#endif"; }; - /* * "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1" * is "defined( __STRICT_ANSI__ )" @@ -4139,7 +4018,6 @@ fix = { test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif"; }; - /* * IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s * in prototype without previous definition. @@ -4153,7 +4031,6 @@ fix = { test_text = "extern void xdrstdio_create( struct __file_s* );"; }; - /* * IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr * in prototype without previous definition. @@ -4172,7 +4049,6 @@ fix = { test_text = "extern AUTH* authdes_create( struct sockaddr* );"; }; - /* * Apply fix this to all OSs since this problem seems to effect * more than just SunOS. @@ -4200,7 +4076,6 @@ fix = { "};"; }; - /* * Fix bogus #ifdef on SunOS 4.1. */ @@ -4215,7 +4090,6 @@ fix = { test_text = "#ifdef __i386__ || __vax__ || __sun4c__"; }; - /* * Fix the CAT macro in SunOS memvar.h. */ @@ -4234,7 +4108,6 @@ fix = { "#define CAT(a,b)\ta/**/b"; }; - /* * Fix return type of free and {c,m,re}alloc in <malloc.h> on SunOS 4.1. * Also fix return type of {m,re}alloc in <malloc.h> on sysV68 @@ -4258,7 +4131,6 @@ fix = { "char*\trealloc();"; }; - /* * Check for yet more missing ';' in struct (in SunOS 4.0.x) */ @@ -4270,7 +4142,6 @@ fix = { test_text = "struct mumble\n int _cnt\n};"; }; - /* * signal.h on SunOS defines signal using (), * which causes trouble when compiling with g++ -pedantic. @@ -4290,7 +4161,6 @@ fix = { test_text = "void\t(*signal())();"; }; - /* * Correct the return type for strlen in strings.h in SunOS 4. */ @@ -4303,6 +4173,19 @@ fix = { test_text = " int\tstrlen(); /* string length */"; }; +/* + * Linux kernel's vt.h breaks C++ + */ +fix = { + hackname = suse_linux_vt_cxx; + files = linux/vt.h; + + select = "^[ \t]*unsigned int new;"; + c_fix = format; + c_fix_arg = "unsigned int newev;"; + + test_text = " unsigned int new; /* New console (if changing) */"; +}; /* * Disable apparent native compiler optimization cruft in SVR4.2 <string.h> @@ -4317,7 +4200,6 @@ fix = { test_text = "#define strlen __std_hdr_strlen\n"; }; - /* * Fix broken decl of getcwd present on some svr4 systems. */ @@ -4334,7 +4216,6 @@ fix = { test_text = "extern char* getcwd(char *, int);"; }; - /* * Fix broken decl of profil present on some svr4 systems. */ @@ -4345,9 +4226,6 @@ fix = { select = 'profil\(unsigned short \*, unsigned int, unsigned int, unsigned int\)'; - /* The fix is wrong on IRIX 5/6 and creates a conflict with another - prototype in <sys/profil.h>. */ - bypass = 'Silicon Graphics'; c_fix = format; c_fix_arg = 'profil(unsigned short *, size_t, int, unsigned int)'; @@ -4355,7 +4233,6 @@ fix = { 'profil(unsigned short *, unsigned int, unsigned int, unsigned int);'; }; - /* * Correct types for signal handler constants like SIG_DFL; they might be * void (*) (), and should be void (*) (int). C++ doesn't like the @@ -4371,7 +4248,6 @@ fix = { "#define SIG_IGN (void (*)())0\n"; }; - /* * Some SysV r4 systems, including Sequent's DYNIX/ptx, use the local * function 'getrnge' in <regexp.h> before they declare it. For these @@ -4400,7 +4276,6 @@ fix = { "{}"; }; - /* * Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn} * in string.h on sysV68 @@ -4448,7 +4323,6 @@ fix = { "\tstrlen(), strspn();"; }; - /* * Fix return type of calloc, malloc, realloc, bsearch and exit */ @@ -4468,14 +4342,13 @@ fix = { "extern char*\tbsearch(void*,size_t,size_t);\n"; }; - /* * __thread is now a keyword. */ fix = { hackname = thread_keyword; files = "pthread.h"; - files = "bits/sigthread.h"; + files = bits/sigthread.h, '*/bits/sigthread.h'; select = "([* ])__thread([,)])"; c_fix = format; c_fix_arg = "%1__thr%2"; @@ -4500,7 +4373,6 @@ fix = { test_text = "#ifdef _cplusplus\nint bogus;\n#endif"; }; - /* * parameters not const on DECstation Ultrix V4.0 and OSF/1. */ @@ -4522,7 +4394,6 @@ fix = { "extern int scanf( char *__format, ...);\n"; }; - /* * parameters not const on DECstation Ultrix V4.0 and OSF/1. */ @@ -4544,7 +4415,6 @@ fix = { "extern char *tempnam(char*,char*);\n"; }; - /* * Fix definitions of macros used by va-i960.h in VxWorks header file. */ @@ -4563,6 +4433,40 @@ fix = { "#define __alignof__(x) ..."; }; +/* + * On VMS, add missing braces around sigset_t constants. + */ +fix = { + hackname = vms_add_missing_braces; + select = "(_SIG_[A-Z]+_SET[ \t]+= \\{)(0x[0F]+, 0x[0F]+)"; + mach = "*-*-*vms*"; + files = "rtldef/signal.h"; + c_fix = format; + + c_fix_arg = '%1 {%2} '; + + test_text = "static const __sigset_t _SIG_EMPTY_SET = " + "{0x00000000, 0x00000000},\n" + " _SIG_FULL_SET = {0xFFFFFFFF, 0xFFFFFFFF};\n"; +}; + +/* + * On VMS, some DEC-C builtins are directly used. + */ +fix = { + hackname = vms_decc_builtin; + select = "(__MEMSET|__MEMMOVE|__MEMCPY|__STRLEN|__STRCPY)"; + mach = "*-*-*vms*"; + files = rtldef/string.h, rtldef/time.h, rtldef/strings.h, + rtldef/socket.h; + sed = "s@__MEMSET@memset@"; + sed = "s@__MEMMOVE@memmove@"; + sed = "s@__MEMCPY@memcpy@"; + sed = "s@__STRLEN@strlen@"; + sed = "s@__STRCPY@strcpy@"; + + test_text = "define FD_ZERO(__p) __MEMSET((__p), 0, sizeof(*(__p)))\n"; +}; /* * Define __CAN_USE_EXTERN_PREFIX on vms. @@ -4588,6 +4492,95 @@ fix = { }; /* + * On VMS, disable the use of dec-c string builtins + */ +fix = { + hackname = vms_disable_decc_string_builtins; + select = "#if !defined\\(__VAX\\)\n"; + mach = "*-*-*vms*"; + files = "rtldef/string.h"; + c_fix = format; + + c_fix_arg = "#if !defined(__VAX) && !defined(__GNUC__)\n"; + + test_text = "#if !defined(__VAX)\n"; +}; + +/* + * On VMS, fix incompatible redeclaration of hostalias. + */ +fix = { + hackname = vms_do_not_redeclare_hostalias; + select = "(void[ \t]+fp_nquery \\(const u_char \\*, int, FILE \\*\\);)\n" + "(__char_ptr32[ \t]+hostalias \\(const char \\*\\);)"; + mach = "*-*-*vms*"; + files = "rtldef/resolv.h"; + c_fix = format; + + c_fix_arg = "%1\n" + "/* %2 */"; + + test_text = "void fp_nquery (const u_char *, int, FILE *);\n" + "__char_ptr32 hostalias (const char *);\n"; +}; + +/* + * On VMS, forward declare structure before referencing them in prototypes. + */ +fix = { + hackname = vms_forward_declare_struct; + select = "(/\\* forward decls for C\\+\\+ \\*/\n)" + "#ifdef __cplusplus\n"; + mach = "*-*-*vms*"; + files = rtldef/if.h; + c_fix = format; + + c_fix_arg = "%1" + "#if defined (__cplusplus) || defined (__GNUC__)\n"; + + test_text = "/* forward decls for C++ */\n" + "#ifdef __cplusplus\n" + "struct foo;\n" + "#endif\n"; +}; + +/* + * On VMS, do not declare getopt and al if pointers are 64 bit. + */ +fix = { + hackname = vms_no_64bit_getopt; + select = "^[ \t]*(extern[ \t]*)?(int[ \t]*(getopt|optind|opterr|optopt)" + "|(char \\*optarg))([ \t]*\\(.*\\))?;\n"; + mach = "*-*-*vms*"; + files = rtldef/stdio.h, rtldef/unistd.h; + c_fix = format; + + c_fix_arg = <<- _EOArg_ + #if __INITIAL_POINTER_SIZE != 64 /* getopt is short ptr only. */ + %0#endif + + _EOArg_; + + test_text = "int getopt (int, char * const [], const char *);"; +}; + +/* + * On VMS, force the use of fast setjmp, as the normal setjmp uses conditions + * which is not yet fully supported by gcc. + */ +fix = { + hackname = vms_use_fast_setjmp; + select = "(#[ \t]*if[ \t]*defined\\(__FAST_SETJMP\\)[ \t]*\\|\\|)"; + mach = "*-*-*vms*"; + files = rtldef/setjmp.h; + c_fix = format; + + c_fix_arg = "%0 defined (__GNUC__) ||"; + + test_text = "# if defined(__FAST_SETJMP) || defined(__UNIX_SETJMP)"; +}; + +/* * On VMS, use pragma extern_model instead of VAX-C keywords. */ fix = { @@ -4609,18 +4602,19 @@ fix = { }; /* - * On VMS, disable the use of dec-c string builtins + * On VMS, change <resource.h> to <sys/resource.h> to avoid a + * conflict while building gcc. Likewise for <builtins.h> */ fix = { - hackname = vms_disable_decc_string_builtins; - select = "#if !defined\\(__VAX\\)\n"; + hackname = vms_use_quoted_include; + select = "(#[ \t]*include[ \t]+)<(resource|builtins)\\.h>"; mach = "*-*-*vms*"; - files = "rtldef/string.h"; + files = rtldef/wait.h, starlet_c/pthread.h; c_fix = format; - c_fix_arg = "#if !defined(__VAX) && !defined(__GNUC__)\n"; + c_fix_arg = '%1<sys/%2.h>'; - test_text = "#if !defined(__VAX)\n"; + test_text = "# include <resource.h>"; }; /* @@ -4629,27 +4623,29 @@ fix = { */ fix = { hackname = void_null; - files = curses.h; - files = dbm.h; - files = locale.h; - files = stdio.h; - files = stdlib.h; - files = string.h; - files = time.h; - files = unistd.h; - files = sys/dir.h; - files = sys/param.h; - files = sys/types.h; + files = curses.h, dbm.h, locale.h, stdio.h, stdlib.h, string.h, + time.h, unistd.h, sys/dir.h, sys/param.h, sys/types.h; /* avoid changing C++ friendly NULL */ bypass = __cplusplus; bypass = __null; select = "^#[ \t]*define[ \t]+NULL[ \t]+\\(\\(void[ \t]*\\*\\)0\\)"; c_fix = format; - c_fix_arg = "#define NULL 0"; + c_fix_arg = <<- _EOFix_ + #ifndef NULL + #ifdef __cplusplus + #ifdef __GNUG__ + #define NULL __null + #else /* ! __GNUG__ */ + #define NULL 0L + #endif /* __GNUG__ */ + #else /* ! __cplusplus */ + #define NULL ((void *)0) + #endif /* __cplusplus */ + #endif /* !NULL */ + _EOFix_; test_text = "# define\tNULL \t((void *)0) /* typed NULL */"; }; - /* * Make VxWorks header which is almost gcc ready fully gcc ready. */ @@ -4690,6 +4686,40 @@ fix = { "#endif /* __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__ */\n"; }; +/* + * Wrap VxWorks ioctl to keep everything pretty + */ +fix = { + hackname = vxworks_ioctl_macro; + files = ioLib.h; + mach = "*-*-vxworks*"; + + c_fix = format; + c_fix_arg = "%0\n" + "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n"; + c_fix_arg = "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);"; + + test_text = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;"; +}; + +/* + * Wrap VxWorks mkdir to be posix compliant + */ +fix = { + hackname = vxworks_mkdir_macro; + files = sys/stat.h; + mach = "*-*-vxworks*"; + + c_fix = format; + c_fix_arg = "%0\n" + "#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n"; + c_fix_arg = "extern[\t ]+STATUS[\t ]+mkdir[\t ]*" + "\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*" /* arg type */ + "(|[_[:alpha:]][_[:alnum:]]*)" /* arg name (optional) */ + "\\)[\t ]*;"; + + test_text = "extern STATUS mkdir (const char * _qwerty) ;"; +}; /* * Fix VxWorks <time.h> to not require including <vxTypes.h>. @@ -4703,7 +4733,6 @@ fix = { test_text = "uint_t\t_clocks_per_sec;"; }; - /* * Fix VxWorks <sys/stat.h> to not require including <vxWorks.h>. */ @@ -4723,6 +4752,19 @@ fix = { "# define\t__INCstath <sys/stat.h>"; }; +/* + * Make it so VxWorks does not include gcc/regs.h accidentally + */ +fix = { + hackname = vxworks_regs; + mach = "*-*-vxworks*"; + + select = "#[\t ]*include[\t ]+[<\"]regs.h[>\"]"; + c_fix = format; + c_fix_arg = "#include <arch/../regs.h>"; + + test_text = "#include <regs.h>\n"; +}; /* * Another bad dependency in VxWorks 5.2 <time.h>. @@ -4750,6 +4792,23 @@ fix = { "#define VOIDFUNCPTR (void(*)())"; }; +/* + * This hack makes write const-correct on VxWorks + */ +fix = { + hackname = vxworks_write_const; + files = ioLib.h; + mach = "*-*-vxworks*"; + + c_fix = format; + c_fix_arg = "extern int write (int, const char*, size_t);"; + c_fix_arg = "extern[\t ]+int[\t ]+write[\t ]*\\(" + "[\t ]*int[\t ]*," + "[\t ]*char[\t ]*\\*[\t ]*," + "[\t ]*size_t[\t ]*\\)[\t ]*;"; + + test_text = "extern int write ( int , char * , size_t ) ;"; +}; /* * There are several name conflicts with C++ reserved words in X11 header @@ -4770,7 +4829,6 @@ fix = { "} mumble;\n"; }; - /* * class in Xm/BaseClassI.h */ @@ -4786,7 +4844,6 @@ fix = { test_text = "extern mumble (int class);\n"; }; - /* * new in Xm/Traversal.h */ @@ -4810,7 +4867,6 @@ fix = { "};\nextern Wedged( Widget new, Widget old );"; }; - /* * Incorrect sprintf declaration in X11/Xmu.h */ @@ -4825,5 +4881,4 @@ fix = { test_text = "extern char *\tsprintf();"; }; - /*EOF*/ diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh index 89e8ab7d5f..6653fedb6e 100755 --- a/fixincludes/mkfixinc.sh +++ b/fixincludes/mkfixinc.sh @@ -15,7 +15,6 @@ case $machine in i?86-*-mingw32* | \ x86_64-*-mingw32* | \ i?86-*-interix* | \ - *-*-vxworks* | \ powerpc-*-eabisim* | \ powerpc-*-eabi* | \ powerpc-*-rtems* | \ diff --git a/fixincludes/tests/base/architecture/ppc/math.h b/fixincludes/tests/base/architecture/ppc/math.h index dcd04236bc..4af7808fcc 100644 --- a/fixincludes/tests/base/architecture/ppc/math.h +++ b/fixincludes/tests/base/architecture/ppc/math.h @@ -7,82 +7,8 @@ This had to be done to correct non-standard usages in the original, manufacturer supplied header file. */ -/* This file prototypes the long double functions available on Mac OS - 10.3.9. */ -#ifndef __MATH__ -# undef __APPLE_CC__ -# define __APPLE_CC__ 1345 -# include_next <architecture/ppc/math.h> -# undef __APPLE_CC__ -# define __APPLE_CC__ 1 -# ifndef __LIBMLDBL_COMPAT -# ifdef __LONG_DOUBLE_128__ -# define __LIBMLDBL_COMPAT(sym) __asm("_" #sym "$LDBL128") -# else -# define __LIBMLDBL_COMPAT(sym) -# endif /* __LONG_DOUBLE_128__ */ -# endif /* __LIBMLDBL_COMPAT */ -# ifdef __cplusplus - extern "C" { -# endif - extern long double acosl( long double ) __LIBMLDBL_COMPAT(acosl); - extern long double asinl( long double ) __LIBMLDBL_COMPAT(asinl); - extern long double atanl( long double ) __LIBMLDBL_COMPAT(atanl); - extern long double atan2l( long double, long double ) __LIBMLDBL_COMPAT(atan2l); - extern long double cosl( long double ) __LIBMLDBL_COMPAT(cosl); - extern long double sinl( long double ) __LIBMLDBL_COMPAT(sinl); - extern long double tanl( long double ) __LIBMLDBL_COMPAT(tanl); - extern long double acoshl( long double ) __LIBMLDBL_COMPAT(acoshl); - extern long double asinhl( long double ) __LIBMLDBL_COMPAT(asinhl); - extern long double atanhl( long double ) __LIBMLDBL_COMPAT(atanhl); - extern long double coshl( long double ) __LIBMLDBL_COMPAT(coshl); - extern long double sinhl( long double ) __LIBMLDBL_COMPAT(sinhl); - extern long double tanhl( long double ) __LIBMLDBL_COMPAT(tanhl); - extern long double expl( long double ) __LIBMLDBL_COMPAT(expl); - extern long double exp2l( long double ) __LIBMLDBL_COMPAT(exp2l); - extern long double expm1l( long double ) __LIBMLDBL_COMPAT(expm1l); - extern long double logl( long double ) __LIBMLDBL_COMPAT(logl); - extern long double log10l( long double ) __LIBMLDBL_COMPAT(log10l); - extern long double log2l( long double ) __LIBMLDBL_COMPAT(log2l); - extern long double log1pl( long double ) __LIBMLDBL_COMPAT(log1pl); - extern long double logbl( long double ) __LIBMLDBL_COMPAT(logbl); - extern long double modfl( long double, long double * ) __LIBMLDBL_COMPAT(modfl); - extern long double ldexpl( long double, int ) __LIBMLDBL_COMPAT(ldexpl); - extern long double frexpl( long double, int * ) __LIBMLDBL_COMPAT(frexpl); - extern int ilogbl( long double ) __LIBMLDBL_COMPAT(ilogbl); - extern long double scalbnl( long double, int ) __LIBMLDBL_COMPAT(scalbnl); - extern long double scalblnl( long double, long int ) __LIBMLDBL_COMPAT(scalblnl); - extern long double fabsl( long double ) __LIBMLDBL_COMPAT(fabsl); - extern long double cbrtl( long double ) __LIBMLDBL_COMPAT(cbrtl); - extern long double hypotl( long double, long double ) __LIBMLDBL_COMPAT(hypotl); - extern long double powl( long double, long double ) __LIBMLDBL_COMPAT(powl); - extern long double sqrtl( long double ) __LIBMLDBL_COMPAT(sqrtl); - extern long double erfl( long double ) __LIBMLDBL_COMPAT(erfl); - extern long double erfcl( long double ) __LIBMLDBL_COMPAT(erfcl); - extern long double lgammal( long double ) __LIBMLDBL_COMPAT(lgammal); - extern long double tgammal( long double ) __LIBMLDBL_COMPAT(tgammal); - extern long double ceill( long double ) __LIBMLDBL_COMPAT(ceill); - extern long double floorl( long double ) __LIBMLDBL_COMPAT(floorl); - extern long double nearbyintl( long double ) __LIBMLDBL_COMPAT(nearbyintl); - extern long double rintl( long double ) __LIBMLDBL_COMPAT(rintl); - extern long int lrintl( long double ) __LIBMLDBL_COMPAT(lrintl); - extern long long int llrintl( long double ) __LIBMLDBL_COMPAT(llrintl); - extern long double roundl( long double ) __LIBMLDBL_COMPAT(roundl); - extern long int lroundl( long double ) __LIBMLDBL_COMPAT(lroundl); - extern long long int llroundl( long double ) __LIBMLDBL_COMPAT(llroundl); - extern long double truncl( long double ) __LIBMLDBL_COMPAT(truncl); - extern long double fmodl( long double, long double) __LIBMLDBL_COMPAT(fmodl); - extern long double remainderl( long double, long double ) __LIBMLDBL_COMPAT(remainderl); - extern long double remquol( long double, long double, int * ) __LIBMLDBL_COMPAT(remquol); - extern long double copysignl( long double, long double ) __LIBMLDBL_COMPAT(copysignl); - extern long double nanl( const char * ) __LIBMLDBL_COMPAT(nanl); - extern long double nextafterl( long double, long double ) __LIBMLDBL_COMPAT(nextafterl); - extern long double nexttowardl( long double, long double ) __LIBMLDBL_COMPAT(nexttowardl); - extern long double fdiml( long double, long double ) __LIBMLDBL_COMPAT(fdiml); - extern long double fmaxl( long double, long double ) __LIBMLDBL_COMPAT(fmaxl); - extern long double fminl( long double, long double ) __LIBMLDBL_COMPAT(fminl); - extern long double fmal( long double, long double, long double ) __LIBMLDBL_COMPAT(fmal); -# ifdef __cplusplus - } -# endif -#endif /* __MATH__ */ + + +#if defined( BROKEN_NAN_CHECK ) +#if 1 +#endif /* BROKEN_NAN_CHECK */ diff --git a/fixincludes/tests/base/assert.h b/fixincludes/tests/base/assert.h index 2642cbe49c..19dc52575e 100644 --- a/fixincludes/tests/base/assert.h +++ b/fixincludes/tests/base/assert.h @@ -19,6 +19,13 @@ #include <stdio.h> +#if defined( AIX_ASSERT_CHECK ) +#ifndef __cplusplus +#define static_assert _Static_assert +#endif +#endif /* AIX_ASSERT_CHECK */ + + #if defined( ALPHA___ASSERT_CHECK ) extern void __assert(const char *, const char *, int); #endif /* ALPHA___ASSERT_CHECK */ diff --git a/fixincludes/tests/base/bits/fenv.h b/fixincludes/tests/base/bits/fenv.h new file mode 100644 index 0000000000..eec612b7e2 --- /dev/null +++ b/fixincludes/tests/base/bits/fenv.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/bits/fenv.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( FERAISEEXCEPT_NOSSE_DIVBYZERO_CHECK ) +# ifdef __SSE_MATH__ + __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); +# else + __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" + : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); +# endif +#endif /* FERAISEEXCEPT_NOSSE_DIVBYZERO_CHECK */ + + +#if defined( FERAISEEXCEPT_NOSSE_INVALID_CHECK ) +# ifdef __SSE_MATH__ + __asm__ __volatile__ ("divss %0, %0" : : "x" (__f)); +# else + __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" + : "=t" (__f) : "0" (__f)); +# endif +#endif /* FERAISEEXCEPT_NOSSE_INVALID_CHECK */ diff --git a/fixincludes/tests/base/complex.h b/fixincludes/tests/base/complex.h index b3fe27aca2..f648d6fc2c 100644 --- a/fixincludes/tests/base/complex.h +++ b/fixincludes/tests/base/complex.h @@ -21,12 +21,6 @@ #endif /* HPUX_IMAGINARY_I_CHECK */ -#if defined( IRIX_COMPLEX_CHECK ) -#define _Complex_I (__extension__ 1.0iF) -#define I _Complex_I -#endif /* IRIX_COMPLEX_CHECK */ - - #if defined( SOLARIS_COMPLEX_CHECK ) #define _Complex_I (__extension__ 1.0iF) #define complex _Complex diff --git a/fixincludes/tests/base/curses.h b/fixincludes/tests/base/curses.h index e05f8912d7..4a183be632 100644 --- a/fixincludes/tests/base/curses.h +++ b/fixincludes/tests/base/curses.h @@ -9,6 +9,11 @@ +#if defined( AIX_NULL_CHECK ) +# define NULL (0L) /* typed NULL */ +#endif /* AIX_NULL_CHECK */ + + #if defined( AVOID_BOOL_DEFINE_CHECK ) #ifndef __cplusplus # define bool char @@ -31,5 +36,15 @@ struct term; #if defined( VOID_NULL_CHECK ) -#define NULL 0 /* typed NULL */ +#ifndef NULL +#ifdef __cplusplus +#ifdef __GNUG__ +#define NULL __null +#else /* ! __GNUG__ */ +#define NULL 0L +#endif /* __GNUG__ */ +#else /* ! __cplusplus */ +#define NULL ((void *)0) +#endif /* __cplusplus */ +#endif /* !NULL */ /* typed NULL */ #endif /* VOID_NULL_CHECK */ diff --git a/fixincludes/tests/base/internal/math_core.h b/fixincludes/tests/base/internal/math_core.h deleted file mode 100644 index f39ac3f90c..0000000000 --- a/fixincludes/tests/base/internal/math_core.h +++ /dev/null @@ -1,30 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/internal/math_core.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IRIX___GENERIC1_CHECK ) -extern int isnan(double); -extern int isnanf(float); -extern int isnanl(long double); -#define isnan(x) (sizeof(x) == sizeof(double) ? _isnan(x) \ - : sizeof(x) == sizeof(float) ? _isnanf(x) \ - : _isnanl(x)) - - -#endif /* IRIX___GENERIC1_CHECK */ - - -#if defined( IRIX___GENERIC2_CHECK ) -#define isless(x,y) \ - ((sizeof(x)<=4 && sizeof(y)<=4) ? _islessf(x,y) \ - : (sizeof(x)<=8 && sizeof(y)<=8) ? _isless(x,y) \ - : _islessl(x,y)) - -#endif /* IRIX___GENERIC2_CHECK */ diff --git a/fixincludes/tests/base/internal/wchar_core.h b/fixincludes/tests/base/internal/wchar_core.h deleted file mode 100644 index 9c9fc4e97b..0000000000 --- a/fixincludes/tests/base/internal/wchar_core.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/internal/wchar_core.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#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 *); -#endif /* IRIX_WCSFTIME_CHECK */ diff --git a/fixincludes/tests/base/ioLib.h b/fixincludes/tests/base/ioLib.h new file mode 100644 index 0000000000..d570c895d5 --- /dev/null +++ b/fixincludes/tests/base/ioLib.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/ioLib.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( VXWORKS_IOCTL_MACRO_CHECK ) +extern int ioctl ( int asdf1234, int jkl , int qwerty ) ; +#endif /* VXWORKS_IOCTL_MACRO_CHECK */ + + +#if defined( VXWORKS_WRITE_CONST_CHECK ) +extern int write (int, const char*, size_t); +#endif /* VXWORKS_WRITE_CONST_CHECK */ diff --git a/fixincludes/tests/base/iso/math_c99.h b/fixincludes/tests/base/iso/math_c99.h index 4d9b6311f6..3758cb9b5b 100644 --- a/fixincludes/tests/base/iso/math_c99.h +++ b/fixincludes/tests/base/iso/math_c99.h @@ -20,6 +20,13 @@ #endif /* SOLARIS_MATH_1_CHECK */ +#if defined( SOLARIS_MATH_10_CHECK ) +#pragma ident "@(#)math_c99.h 1.12 07/01/21 SMI" +#undef isinf +#define isinf(x) __builtin_isinf(x) +#endif /* SOLARIS_MATH_10_CHECK */ + + #if defined( SOLARIS_MATH_2_CHECK ) #ident "@(#)math_c99.h 1.9 04/11/01 SMI" #undef INFINITY @@ -68,10 +75,3 @@ #undef isunordered #define isunordered(x, y) __builtin_isunordered(x, y) #endif /* SOLARIS_MATH_9_CHECK */ - - -#if defined( SOLARIS_MATH_10_CHECK ) -#pragma ident "@(#)math_c99.h 1.12 07/01/21 SMI" -#undef isinf -#define isinf(x) __builtin_isinf(x) -#endif /* SOLARIS_MATH_10_CHECK */ diff --git a/fixincludes/tests/base/iso/math_iso.h b/fixincludes/tests/base/iso/math_iso.h index 6c08a94bb5..a1313a7f49 100644 --- a/fixincludes/tests/base/iso/math_iso.h +++ b/fixincludes/tests/base/iso/math_iso.h @@ -10,7 +10,7 @@ #if defined( SOLARIS_POW_INT_OVERLOAD_CHECK ) -#ifndef __GXX_EXPERIMENTAL_CXX0X__ +#if __cplusplus < 201103L inline long double pow(long double __X, int __Y) { return __powl(__X, (long double) (__Y)); } #endif diff --git a/fixincludes/tests/base/internal/sgimacros.h b/fixincludes/tests/base/linux/compiler.h index a491e865af..713527644b 100644 --- a/fixincludes/tests/base/internal/sgimacros.h +++ b/fixincludes/tests/base/linux/compiler.h @@ -2,16 +2,13 @@ It has been auto-edited by fixincludes from: - "fixinc/tests/inc/internal/sgimacros.h" + "fixinc/tests/inc/linux/compiler.h" This had to be done to correct non-standard usages in the original, manufacturer supplied header file. */ -#if defined( IRIX___RESTRICT_CHECK ) -#ifdef __c99 -# ifndef __cplusplus -# define __restrict restrict -# endif -#endif /* IRIX___RESTRICT_CHECK */ +#if defined( COMPLIER_H_TRADCPP_CHECK ) +/* __builtin_warning(x, y...) is obsolete */ +#endif /* COMPLIER_H_TRADCPP_CHECK */ diff --git a/fixincludes/tests/base/linux/vt.h b/fixincludes/tests/base/linux/vt.h new file mode 100644 index 0000000000..94e44efc26 --- /dev/null +++ b/fixincludes/tests/base/linux/vt.h @@ -0,0 +1,14 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/linux/vt.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( SUSE_LINUX_VT_CXX_CHECK ) +unsigned int newev; /* New console (if changing) */ +#endif /* SUSE_LINUX_VT_CXX_CHECK */ diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h index 9733744eaf..766017280b 100644 --- a/fixincludes/tests/base/math.h +++ b/fixincludes/tests/base/math.h @@ -15,11 +15,6 @@ #endif -#if defined( AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_CHECK ) -#include <architecture/ppc/math.h> -#endif /* AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_2_CHECK */ - - #if defined( BROKEN_CABS_CHECK ) #ifdef __STDC__ @@ -27,11 +22,12 @@ #endif - /* This is a comment - and it ends here. */ +#endif /* BROKEN_CABS_CHECK */ -#endif /* BROKEN_CABS_CHECK */ +#if defined( DARWIN_9_LONG_DOUBLE_FUNCS_2_CHECK ) +#include <architecture/ppc/math.h> +#endif /* DARWIN_9_LONG_DOUBLE_FUNCS_2_CHECK */ #if defined( HPPA_HPUX_FP_MACROS_CHECK ) diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h index 24a215fa47..c39cd9472d 100644 --- a/fixincludes/tests/base/pthread.h +++ b/fixincludes/tests/base/pthread.h @@ -23,50 +23,31 @@ #endif /* AIX_ONCE_INIT_2_CHECK */ -#if defined( AIX_PTHREAD_CHECK ) +#if defined( AIX_MUTEX_INITIALIZER_1_CHECK ) #define PTHREAD_MUTEX_INITIALIZER \ -{...init stuff...} -#endif /* AIX_PTHREAD_CHECK */ +{{ \ +#endif /* AIX_MUTEX_INITIALIZER_1_CHECK */ -#if defined( ALPHA_PTHREAD_CHECK ) -# if defined (_PTHREAD_ENV_DECC) || defined (_PTHREAD_ENV_EPCC) || defined (__PRAGMA_EXTERN_PREFIX) -# define _PTHREAD_USE_PTDNAM_ -# endif -# if defined (_PTHREAD_ENV_DECC) || defined (__PRAGMA_EXTERN_PREFIX) -# define _PTHREAD_USE_PTDNAM_ -# endif -#endif /* ALPHA_PTHREAD_CHECK */ +#if defined( AIX_COND_INITIALIZER_1_CHECK ) +#define PTHREAD_COND_INITIALIZER \ +{{ \ + +#endif /* AIX_COND_INITIALIZER_1_CHECK */ -#if defined( ALPHA_PTHREAD_GCC_CHECK ) -# define _PTHREAD_ENV_INTELC -#elif defined (__GNUC__) -# define _PTHREAD_ENV_GCC -#else -# error <pthread.h>: unrecognized compiler. -#endif -#endif /* ALPHA_PTHREAD_GCC_CHECK */ - - -#if defined( ALPHA_PTHREAD_INIT_CHECK ) -/* - * @(#)_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, 0, 0, 0, 0, 0, 0 } -# define PTHREAD_COND_INITIALIZER {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, 0, 0, 0, 0 } -# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_, 0, 0, 0, 0 } -# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_, 0, 0 } -#else -# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, 0, 0, 0, 0, 0, 0 } -# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_, 0, 0, 0, 0 } -# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) {0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_, 0, 0 } -#endif -#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 */ +#if defined( AIX_RWLOCK_INITIALIZER_1_CHECK ) +#define PTHREAD_RWLOCK_INITIALIZER \ +{{ \ + +#endif /* AIX_RWLOCK_INITIALIZER_1_CHECK */ + + +#if defined( AIX_PTHREAD_CHECK ) +#define PTHREAD_MUTEX_INITIALIZER \ +{...init stuff...} +#endif /* AIX_PTHREAD_CHECK */ #if defined( GLIBC_MUTEX_INIT_CHECK ) @@ -110,28 +91,11 @@ #endif /* GLIBC_MUTEX_INIT_CHECK */ -#if defined( IRIX_PTHREAD_INIT_CHECK ) -#define PTHREAD_MUTEX_INITIALIZER { { 0 } } -#define PTHREAD_COND_INITIALIZER { { 0 } } -#define PTHREAD_RWLOCK_INITIALIZER { { 0 } } -#endif /* IRIX_PTHREAD_INIT_CHECK */ - - #if defined( PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK ) extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask); #endif /* PTHREAD_INCOMPLETE_STRUCT_ARGUMENT_CHECK */ -#if defined( SOLARIS_COND_INIT_CHECK ) -#pragma ident "@(#)pthread.h 1.29 01/07/07 SMI" -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, 0} /* = DEFAULTCV */ -#else -#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, {0}} /* = DEFAULTCV */ -#endif -#endif /* SOLARIS_COND_INIT_CHECK */ - - #if defined( SOLARIS_MUTEX_INIT_2_CHECK ) #ident "@(#)pthread.h 1.26 98/04/12 SMI" #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) @@ -140,9 +104,9 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask); #define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, {0}} #endif #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, 0} /* DEFAULTCV */ +#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* DEFAULTCV */ #else -#define PTHREAD_COND_INITIALIZER {{{0}, 0, 0x4356}, {0}} /* DEFAULTCV */ +#define PTHREAD_COND_INITIALIZER {{{0}, 0}, {0}} /* DEFAULTCV */ #endif #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) #define PTHREAD_MUTEX_INITIALIZER /* = DEFAULTMUTEX */ \ @@ -161,16 +125,6 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask); #endif /* SOLARIS_MUTEX_INIT_2_CHECK */ -#if defined( SOLARIS_RWLOCK_INIT_1_CHECK ) -#ident "@(#)pthread.h 1.26 98/04/12 SMI" -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_RWLOCK_INITIALIZER {0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}} -#else -#define PTHREAD_RWLOCK_INITIALIZER {0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}} -#endif -#endif /* SOLARIS_RWLOCK_INIT_1_CHECK */ - - #if defined( SOLARIS_ONCE_INIT_1_CHECK ) #pragma ident "@(#)pthread.h 1.37 04/09/28 SMI" #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) @@ -192,6 +146,16 @@ extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask); #endif /* SOLARIS_ONCE_INIT_2_CHECK */ +#if defined( SOLARIS_RWLOCK_INIT_1_CHECK ) +#ident "@(#)pthread.h 1.26 98/04/12 SMI" +#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) +#define PTHREAD_RWLOCK_INITIALIZER {0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}} +#else +#define PTHREAD_RWLOCK_INITIALIZER {0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}} +#endif +#endif /* SOLARIS_RWLOCK_INIT_1_CHECK */ + + #if defined( THREAD_KEYWORD_CHECK ) extern int pthread_create (pthread_t *__restrict __thr, extern int pthread_kill (pthread_t __thr, int __signo); diff --git a/fixincludes/tests/base/rtldef/if.h b/fixincludes/tests/base/rtldef/if.h new file mode 100644 index 0000000000..836ff2733d --- /dev/null +++ b/fixincludes/tests/base/rtldef/if.h @@ -0,0 +1,18 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/rtldef/if.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( VMS_FORWARD_DECLARE_STRUCT_CHECK ) +/* forward decls for C++ */ +#if defined (__cplusplus) || defined (__GNUC__) +struct foo; +#endif + +#endif /* VMS_FORWARD_DECLARE_STRUCT_CHECK */ diff --git a/fixincludes/tests/base/rtldef/resolv.h b/fixincludes/tests/base/rtldef/resolv.h new file mode 100644 index 0000000000..0b5b2483ca --- /dev/null +++ b/fixincludes/tests/base/rtldef/resolv.h @@ -0,0 +1,16 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/rtldef/resolv.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( VMS_DO_NOT_REDECLARE_HOSTALIAS_CHECK ) +void fp_nquery (const u_char *, int, FILE *); +/* __char_ptr32 hostalias (const char *); */ + +#endif /* VMS_DO_NOT_REDECLARE_HOSTALIAS_CHECK */ diff --git a/fixincludes/tests/base/rtldef/setjmp.h b/fixincludes/tests/base/rtldef/setjmp.h new file mode 100644 index 0000000000..5414efc54e --- /dev/null +++ b/fixincludes/tests/base/rtldef/setjmp.h @@ -0,0 +1,14 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/rtldef/setjmp.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( VMS_USE_FAST_SETJMP_CHECK ) +# if defined(__FAST_SETJMP) || defined (__GNUC__) || defined(__UNIX_SETJMP) +#endif /* VMS_USE_FAST_SETJMP_CHECK */ diff --git a/fixincludes/tests/base/rtldef/signal.h b/fixincludes/tests/base/rtldef/signal.h new file mode 100644 index 0000000000..3b5a2b8639 --- /dev/null +++ b/fixincludes/tests/base/rtldef/signal.h @@ -0,0 +1,16 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/rtldef/signal.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( VMS_ADD_MISSING_BRACES_CHECK ) +static const __sigset_t _SIG_EMPTY_SET = { {0x00000000, 0x00000000} }, + _SIG_FULL_SET = { {0xFFFFFFFF, 0xFFFFFFFF} }; + +#endif /* VMS_ADD_MISSING_BRACES_CHECK */ diff --git a/fixincludes/tests/base/rtldef/stdio.h b/fixincludes/tests/base/rtldef/stdio.h new file mode 100644 index 0000000000..4835d0fe0d --- /dev/null +++ b/fixincludes/tests/base/rtldef/stdio.h @@ -0,0 +1,16 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/rtldef/stdio.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( VMS_NO_64BIT_GETOPT_CHECK ) +#if __INITIAL_POINTER_SIZE != 64 /* getopt is short ptr only. */ +int getopt (int, char * const [], const char *); +#endif +#endif /* VMS_NO_64BIT_GETOPT_CHECK */ diff --git a/fixincludes/tests/base/rtldef/string.h b/fixincludes/tests/base/rtldef/string.h index 1ac9b2add9..e01354831d 100644 --- a/fixincludes/tests/base/rtldef/string.h +++ b/fixincludes/tests/base/rtldef/string.h @@ -9,6 +9,12 @@ +#if defined( VMS_DECC_BUILTIN_CHECK ) +define FD_ZERO(__p) memset((__p), 0, sizeof(*(__p))) + +#endif /* VMS_DECC_BUILTIN_CHECK */ + + #if defined( VMS_DISABLE_DECC_STRING_BUILTINS_CHECK ) #if !defined(__VAX) && !defined(__GNUC__) diff --git a/fixincludes/tests/base/sys/asm.h b/fixincludes/tests/base/rtldef/wait.h index 658830a7bf..0587834f13 100644 --- a/fixincludes/tests/base/sys/asm.h +++ b/fixincludes/tests/base/rtldef/wait.h @@ -2,13 +2,13 @@ It has been auto-edited by fixincludes from: - "fixinc/tests/inc/sys/asm.h" + "fixinc/tests/inc/rtldef/wait.h" This had to be done to correct non-standard usages in the original, manufacturer supplied header file. */ -#if defined( IRIX_ASM_APOSTROPHE_CHECK ) - # and we are on vacation -#endif /* IRIX_ASM_APOSTROPHE_CHECK */ +#if defined( VMS_USE_QUOTED_INCLUDE_CHECK ) +# include <sys/resource.h> +#endif /* VMS_USE_QUOTED_INCLUDE_CHECK */ diff --git a/fixincludes/tests/base/standards.h b/fixincludes/tests/base/standards.h deleted file mode 100644 index fccf8063fa..0000000000 --- a/fixincludes/tests/base/standards.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/standards.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ALPHA___EXTERN_PREFIX_STANDARDS_CHECK ) -#if (_ISO_C_SOURCE>=19990L) && !defined(_LIBC_POLLUTION_H_) && !defined(__DECC) && !defined(__PRAGMA_EXTERN_PREFIX) -#endif /* ALPHA___EXTERN_PREFIX_STANDARDS_CHECK */ diff --git a/fixincludes/tests/base/stdint-irix65.h b/fixincludes/tests/base/stdint-irix65.h deleted file mode 100644 index d1757fb552..0000000000 --- a/fixincludes/tests/base/stdint-irix65.h +++ /dev/null @@ -1,40 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/stdint-irix65.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IRIX_STDINT_C99_TYPES_CHECK ) -#define INT64_MIN (-0x7fffffffffffffffLL - 1) -#define INT64_MAX 0x7fffffffffffffffLL -#define UINT32_MAX 0xffffffffU -#define UINT64_MAX 0xffffffffffffffffULL -#define INTPTR_MIN (-0x7fffffffL - 1) -#define INTPTR_MAX 0x7fffffffL -#define UINTPTR_MAX 0xffffffffUL -#define INTPTR_MIN (-0x7fffffffffffffffL - 1) -#define INTPTR_MAX 0x7fffffffffffffffL -#define UINTPTR_MAX 0xffffffffffffffffUL -#define PTRDIFF_MIN (-0x7fffffffffffffffL - 1) -#define PTRDIFF_MAX 0x7fffffffffffffffL -#define SIZE_MAX 0xffffffffffffffffUL -#endif /* IRIX_STDINT_C99_TYPES_CHECK */ - - -#if defined( IRIX_STDINT_C99_MACROS_CHECK ) -#define INT8_C(x) (x) -#define INT16_C(x) (x) -#define INT32_C(x) (x) -#define INT64_C(x) (x ## LL) -#define UINT8_C(x) (x) -#define UINT16_C(x) (x) -#define UINT32_C(x) (x ## U) -#define UINT64_C(x) (x ## ULL) -#define INTMAX_C(x) (x ## LL) -#define UINTMAX_C(x) (x ## ULL) -#endif /* IRIX_STDINT_C99_MACROS_CHECK */ diff --git a/fixincludes/tests/base/stdint.h b/fixincludes/tests/base/stdint.h index 3d897f88f7..54da0a1220 100644 --- a/fixincludes/tests/base/stdint.h +++ b/fixincludes/tests/base/stdint.h @@ -14,10 +14,3 @@ # define UINT8_C(c) c # define UINT16_C(c) c #endif /* GLIBC_STDINT_CHECK */ - - -#if defined( IRIX_STDINT_C99_MODE_CHECK ) -#if 0 -#error This header file is to be used only for c99 mode compilations -#else -#endif /* IRIX_STDINT_C99_MODE_CHECK */ diff --git a/fixincludes/tests/base/sys/cdefs.h b/fixincludes/tests/base/sys/cdefs.h index e42df6f527..6ccd0b7738 100644 --- a/fixincludes/tests/base/sys/cdefs.h +++ b/fixincludes/tests/base/sys/cdefs.h @@ -9,11 +9,6 @@ -#if defined( CDEF_CPLUSPLUS_CHECK ) -#define _Noreturn __attribute__((__noreturn__)) -#endif /* CDEF_CPLUSPLUS_CHECK */ - - #if defined( FREEBSD_GCC3_BREAKAGE_CHECK ) #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 #endif /* FREEBSD_GCC3_BREAKAGE_CHECK */ diff --git a/fixincludes/tests/base/sys/socket.h b/fixincludes/tests/base/sys/socket.h index 3c6e420275..d0cd37e257 100644 --- a/fixincludes/tests/base/sys/socket.h +++ b/fixincludes/tests/base/sys/socket.h @@ -25,13 +25,3 @@ #endif #endif /* HPUX11_EXTERN_SENDPATH_CHECK */ - - -#if defined( IRIX_SOCKLEN_T_CHECK ) -#define _SOCKLEN_T -#if _NO_XOPEN4 && _NO_XOPEN5 -typedef int socklen_t; -#else -typedef u_int32_t socklen_t; -#endif /* _NO_XOPEN4 && _NO_XOPEN5 */ -#endif /* IRIX_SOCKLEN_T_CHECK */ diff --git a/fixincludes/tests/base/sys/stat.h b/fixincludes/tests/base/sys/stat.h index 5c254ea94c..9c81cff94b 100644 --- a/fixincludes/tests/base/sys/stat.h +++ b/fixincludes/tests/base/sys/stat.h @@ -9,11 +9,6 @@ -#if defined( ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK ) -# if defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX) -#endif /* ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK */ - - #if defined( GLIBC_C99_INLINE_2_CHECK ) #ifdef __GNUC_GNU_INLINE__ extern @@ -33,6 +28,13 @@ extern int fchmod(int, mode_t); #endif /* RS6000_FCHMOD_CHECK */ +#if defined( VXWORKS_MKDIR_MACRO_CHECK ) +extern STATUS mkdir (const char * _qwerty) ; +#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir)) + +#endif /* VXWORKS_MKDIR_MACRO_CHECK */ + + #if defined( VXWORKS_NEEDS_VXWORKS_CHECK ) #include </dev/null> /* ULONG */ # define __INCstath <sys/stat.h> diff --git a/fixincludes/tests/base/testing.h b/fixincludes/tests/base/testing.h index c15a151280..cf95321fb8 100644 --- a/fixincludes/tests/base/testing.h +++ b/fixincludes/tests/base/testing.h @@ -9,23 +9,6 @@ -#if defined( ALPHA___EXTERN_PREFIX_CHECK ) -#if (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX)) -#pragma extern_prefix "_P" -# if (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX)) -# pragma extern_prefix "_E" -# if !defined(_LIBC_POLLUTION_H_) && (defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX)) -# pragma extern_prefix "" -#endif /* ALPHA___EXTERN_PREFIX_CHECK */ - - -#if defined( ALPHA_BAD_LVAL_CHECK ) -#pragma extern_prefix "_FOO" -#define something _FOOsomething -#define mumble _FOOmumble -#endif /* ALPHA_BAD_LVAL_CHECK */ - - #if defined( AVOID_WCHAR_T_TYPE_CHECK ) #ifndef __cplusplus typedef unsigned short wchar_t ; @@ -131,3 +114,9 @@ extern size_t #endif #endif /* VMS_USE_PRAGMA_EXTERN_MODEL_CHECK */ + + +#if defined( VXWORKS_REGS_CHECK ) +#include <arch/../regs.h> + +#endif /* VXWORKS_REGS_CHECK */ |