diff options
author | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-08-31 09:27:00 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-08-31 09:27:00 +0000 |
commit | 71b5d516bc6cd5fc865ac560e4bea70607207272 (patch) | |
tree | e19ddbe1d510ce04084d29a56d22cd1051cc1767 /gcc | |
parent | f7b0fb680c62cc0e246909ec8be88c10e85e3d69 (diff) | |
download | gcc-71b5d516bc6cd5fc865ac560e4bea70607207272.zip gcc-71b5d516bc6cd5fc865ac560e4bea70607207272.tar.gz gcc-71b5d516bc6cd5fc865ac560e4bea70607207272.tar.bz2 |
Made fixincludes a toplevel build module.
toplevel:
2004-08-31 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (build_modules): Add fixincludes.
(dependencies): Make gcc depend on fixincludes.
* configure.in (build_tools): Add fixincludes.
(build_configdirs): Always include build_libs.
* Makefile.in: Regenerate.
* configure: Regenerate.
contrib:
2004-08-04 Paolo Bonzini <bonzini@gnu.org>
* gcc_update: Add fixincludes.
fixincludes:
2004-08-31 Paolo Bonzini <bonzini@gnu.org>
* .cvsignore: New.
* Makefile.in: From gcc/fixinc/Makefile.in, making it fully
autoconfiscated.
* configure.ac: New.
* config.h.in: Generate.
* configure: Generate.
* aclocal.m4: New.
* fixlib.h: Remove inclusions of gcc files.
* system.h: New.
Other files copied from gcc/fixinc.
gcc:
2004-08-31 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (build_subdir): New substitution.
(fixinc.sh): Simplify heavily since fixincludes is already built.
(stmp-fixinc): Depend on specs.ready.
(install-mkheaders): Use new location of fixincludes.
(clean): Do not descend into fixinc.
(FORBUILD): Replace with ../$(build_subdir).
* configure.ac (build_subdir): Substitute.
(FORBUILD): Do not set.
(all_outputs): Remove fixinc/Makefile.
(default commands): Do not create links in fixinc.
* mkfixinc.sh: New, from fixinc/mkfixinc.sh without
the fixincludes configuration steps and substituting
@FIXINCL@ in fixinc.in.
* fixinc.in: New, from fixinc/fixincl.sh.
* fixinc/*: Removed.
From-SVN: r86824
Diffstat (limited to 'gcc')
100 files changed, 85 insertions, 18816 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8e292b1..f0331aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2004-08-31 Paolo Bonzini <bonzini@gnu.org> + + * Makefile.in (build_subdir): New substitution. + (fixinc.sh): Simplify heavily since fixincludes is already built. + (stmp-fixinc): Depend on specs.ready. + (install-mkheaders): Use new location of fixincludes. + (clean): Do not descend into fixinc. + (FORBUILD): Replace with ../$(build_subdir). + * configure.ac (build_subdir): Substitute. + (FORBUILD): Do not set. + (all_outputs): Remove fixinc/Makefile. + (default commands): Do not create links in fixinc. + * mkfixinc.sh: New, from fixinc/mkfixinc.sh without + the fixincludes configuration steps and substituting + @FIXINCL@ in fixinc.in. + * fixinc.in: New, from fixinc/fixincl.sh. + + * fixinc/*: Removed. + 2004-08-31 Joseph S. Myers <jsm@polyomino.org.uk> * attribs.c (strip_attrs): Remove. @@ -135,6 +154,7 @@ * fold-const.c (tree_expr_nonzero_p): Use get_base_address before assuming an ADDR_EXPR is non-null. +>>>>>>> 2.5169 2004-08-30 Jason Merrill <jason@redhat.com> * gthr-posix.h, gthr-dce.h: Add #pragma weaks. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 093b597..dedb351 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -83,6 +83,8 @@ top_builddir = . # It's normally the absolute path to the current directory. objdir = @objdir@ +build_subdir=@build_subdir@ + # -------- # Defined vpaths # -------- @@ -742,10 +744,9 @@ ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS) \ # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) -# Build and host support libraries. FORBUILD is either -# .. or ../$(build_alias) depending on whether host != build. +# Build and host support libraries. LIBIBERTY = ../libiberty/libiberty.a -BUILD_LIBIBERTY = @FORBUILD@/libiberty/libiberty.a +BUILD_LIBIBERTY = ../$(build_subdir)/libiberty/libiberty.a # Dependencies on the intl and portability libraries. LIBDEPS= $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) $(BANSHEELIB) @@ -2778,28 +2779,16 @@ specs.ready: specs $(STAMP) specs.ready; \ fi -# Until someone fixes this recursive make nightmare (please note where -# BUILD_CFLAGS is first expanded below versus which later make invocation -# has the fine-grain -warn markings for fixinc): -fixinc.sh-warn = -Wno-error - -FIXINCSRCDIR=$(srcdir)/fixinc -fixinc.sh: $(FIXINCSRCDIR)/mkfixinc.sh $(FIXINCSRCDIR)/fixincl.c \ - $(FIXINCSRCDIR)/procopen.c $(FIXINCSRCDIR)/server.c \ - $(FIXINCSRCDIR)/server.h $(FIXINCSRCDIR)/inclhack.def specs.ready - (MAKE="$(MAKE)"; srcdir=`cd $(srcdir)/fixinc && ${PWD_COMMAND}` ; \ - CC="$(CC_FOR_BUILD)"; CFLAGS="$(BUILD_CFLAGS)"; LDFLAGS="$(BUILD_LDFLAGS)"; \ - LIBERTY=`${PWD_COMMAND}`/"$(BUILD_LIBIBERTY)"; \ - export MAKE srcdir CC CFLAGS LDFLAGS LIBERTY; \ - cd ./fixinc && \ - $(SHELL) $${srcdir}/mkfixinc.sh $(build) $(target)) +fixinc.sh: mkfixinc.sh fixinc.in + build_subdir="$(build_subdir)" srcdir="$(srcdir)" \ + $(SHELL) $(srcdir)/mkfixinc.sh $(build) $(target) .PHONY: install-gcc-tooldir install-gcc-tooldir: $(mkinstalldirs) $(DESTDIR)$(gcc_tooldir) # Build fixed copies of system files. -stmp-fixinc: fixinc.sh gsyslimits.h +stmp-fixinc: fixinc.sh gsyslimits.h specs.ready @if test ! -d ${SYSTEM_HEADER_DIR}; then \ echo The directory that should contain system headers does not exist: >&2 ; \ echo " ${SYSTEM_HEADER_DIR}" >&2 ; \ @@ -3042,8 +3031,7 @@ mostlyclean: lang.mostlyclean -rm -rf fix-header$(build_exeext) xsys-protos.h deduced.h tmp-deduced.h \ gen-protos$(build_exeext) fixproto.list fixtmp.* fixhdr.ready # Delete files generated for fixincl - -rm -rf fixincl fixinc.sh specs.ready - (cd fixinc && $(MAKE) clean) + -rm -rf fixinc.sh specs.ready # Delete unwanted output files from TeX. -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg -rm -f */*.toc */*.log */*.vr */*.fn */*.cp */*.tp */*.ky */*.pg @@ -3352,7 +3340,8 @@ install-mkheaders: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir \ $(INSTALL_DATA) $(srcdir)/README-fixinc \ $(DESTDIR)$(itoolsdatadir)/include/README ; \ $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \ - $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \ + $(INSTALL_PROGRAM) ../$(build_subdir)/fixincludes/fixincl$(build_exeext) \ + $(DESTDIR)$(itoolsdir)/fixincl ; \ $(INSTALL_DATA) $(srcdir)/gsyslimits.h \ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h ; \ else :; fi diff --git a/gcc/configure b/gcc/configure index db6fc03..28f5551 100755 --- a/gcc/configure +++ b/gcc/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER EGREP valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir gcc_version gcc_version_full gcc_version_trigger host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. @@ -9487,7 +9487,6 @@ fi if test x$host = x$build then build_auto=auto-host.h - FORBUILD=.. else # We create a subdir, then run autoconf in the subdir. # To prevent recursion we set host and build for the new @@ -9514,7 +9513,6 @@ else cd .. rm -rf $tempdir build_auto=auto-build.h - FORBUILD=../${build_subdir} fi @@ -12266,7 +12264,7 @@ all_languages= all_boot_languages= all_compilers= all_stagestuff= -all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders libada-mk' +all_outputs='Makefile gccbug mklibgcc mkheaders libada-mk' # List of language makefile fragments. all_lang_makefrags= # List of language subdirectory makefiles. Deprecated. @@ -13245,7 +13243,6 @@ s,@manext@,$manext,;t t s,@objext@,$objext,;t t s,@gthread_flags@,$gthread_flags,;t t s,@extra_modes_file@,$extra_modes_file,;t t -s,@FORBUILD@,$FORBUILD,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@USE_NLS@,$USE_NLS,;t t @@ -13935,7 +13932,7 @@ done # This is virtually a duplicate of what happens in configure.lang; we do # an extra check to make sure this only happens if ln -s can be used. if test "$symbolic_link" = "ln -s"; then - for d in ${subdirs} fixinc ; do + for d in ${subdirs} ; do STARTDIR=`${PWDCMD-pwd}` cd $d for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include diff --git a/gcc/configure.ac b/gcc/configure.ac index f1295d4..328d42a 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1330,7 +1330,6 @@ fi if test x$host = x$build then build_auto=auto-host.h - FORBUILD=.. else # We create a subdir, then run autoconf in the subdir. # To prevent recursion we set host and build for the new @@ -1357,9 +1356,8 @@ else cd .. rm -rf $tempdir build_auto=auto-build.h - FORBUILD=../${build_subdir} fi -AC_SUBST(FORBUILD) +AC_SUBST(build_subdir) tm_file="${tm_file} defaults.h" tm_p_file="${tm_p_file} tm-preds.h" @@ -3035,7 +3033,7 @@ all_languages= all_boot_languages= all_compilers= all_stagestuff= -all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders libada-mk' +all_outputs='Makefile gccbug mklibgcc mkheaders libada-mk' # List of language makefile fragments. all_lang_makefrags= # List of language subdirectory makefiles. Deprecated. @@ -3329,7 +3327,7 @@ done # This is virtually a duplicate of what happens in configure.lang; we do # an extra check to make sure this only happens if ln -s can be used. if test "$symbolic_link" = "ln -s"; then - for d in ${subdirs} fixinc ; do + for d in ${subdirs} ; do STARTDIR=`${PWDCMD-pwd}` cd $d for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc.in index 85ec95a..8e0a270 100755 --- a/gcc/fixinc/fixincl.sh +++ b/gcc/fixinc.in @@ -28,7 +28,7 @@ # # # # # # # # # # # # # # # # # # # # # # -# Usage: fixincl.sh output-dir input-dir +# Usage: fixinc.sh output-dir input-dir # # Directory in which to store the results. # Fail if no arg to specify a directory for the output. @@ -96,13 +96,10 @@ esac # Original directory. ORIGDIR=`${PWDCMD}` export ORIGDIR -FIXINCL=${ORIGDIR}/fixinc/fixincl +FIXINCL="@FIXINCL@" if [ ! -x $FIXINCL ] ; then - FIXINCL=${ORIGDIR}/fixincl - if [ ! -x $FIXINCL ] ; then - echo "Cannot find working fixincl" >&2 - exit 1 - fi + echo "Cannot find working fixincl" >&2 + exit 1 fi export FIXINCL diff --git a/gcc/fixinc/Makefile.in b/gcc/fixinc/Makefile.in deleted file mode 100644 index a148665..0000000 --- a/gcc/fixinc/Makefile.in +++ /dev/null @@ -1,131 +0,0 @@ -# Makefile for GCC fixincludes. -# -# Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -#This file is part of GCC. - -#GCC is free software; you can redistribute it and/or modify -#it under the terms of the GNU General Public License as published by -#the Free Software Foundation; either version 2, or (at your option) -#any later version. - -#GCC is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. - -#You should have received a copy of the GNU General Public License -#along with GCC; see the file COPYING. If not, write to -#the Free Software Foundation, 59 Temple Place - Suite 330, -#Boston, MA 02111-1307, USA. - -# The makefile built from this file lives in the fixinc subdirectory. -# Its purpose is to build the any-platforms fixinc.sh script. - -SHELL=@SHELL@ - -# Some versions of `touch' (such as the version on Solaris 2.8) -# do not correctly set the timestamp due to buggy versions of `utime' -# in the kernel. So, we use `echo' instead. -STAMP = echo timestamp > - -FL_LIST = $(CFLAGS) $(CPPFLAGS) -FIXINC_DEFS = -DIN_GCC -DHAVE_CONFIG_H $(FL_LIST) $(INCLUDES) - -# Directory where sources are, from where we are. -srcdir = @srcdir@ -VPATH = $(srcdir) -subdir = fixinc - -# End of variables for you to override. - -default : all - -# Now figure out from those variables how to compile and link. - -# Specify the directories to be searched for header files. -# Both . and srcdir are used, in that order. -# -INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. \ --I$(srcdir)/../config -I$(srcdir)/../../include - -# Always use -I$(srcdir)/config when compiling. -.c.o: - $(CC) -c $(FIXINC_DEFS) $< - -# The only suffixes we want for implicit rules are .c and .o. -.SUFFIXES: -.SUFFIXES: .c .o - -# - -## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -## -## Makefile for constructing the "best" include fixer we can -## -## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - -LIBERTY = ../../libiberty/libiberty.a - -ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \ - fixlib.o ../build-errors.o - -TESTOBJ = fixincl.o fixlib.o fixtests.o -FIXOBJ = fixfixes.o fixlib.o - -HDR = server.h fixlib.h -FI = fixincl@build_exeext@ -AF = applyfix@build_exeext@ - -all : $(TARGETS) -gen : $(srcdir)/fixincl.x - -oneprocess : full-stamp -twoprocess : test-stamp $(AF) - -full-stamp : $(ALLOBJ) $(LIBERTY) - $(CC) $(FIXINC_DEFS) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBERTY) - $(STAMP) $@ - -test-stamp : $(TESTOBJ) $(LIBERTY) - $(CC) $(FIXINC_DEFS) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBERTY) - $(STAMP) $@ - -$(AF): $(FIXOBJ) $(LIBERTY) - $(CC) $(FIXINC_DEFS) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBERTY) - -$(ALLOBJ) : $(HDR) -fixincl.o : fixincl.c $(srcdir)/fixincl.x -fixtests.o : fixtests.c -fixfixes.o : fixfixes.c $(srcdir)/fixincl.x -server.o : server.c -procopen.o : procopen.c -fixlib.o : fixlib.c - -$(srcdir)/fixincl.x: @MAINT@ fixincl.tpl inclhack.def - cd $(srcdir) ; $(SHELL) ./genfixes - -clean: - rm -f *.o *-stamp $(AF) $(FI) *~ - -maintainer-clean : clean - rm -f $(srcdir)/fixincl.x - -# Build the executable and copy up into gcc dir. -# We still copy the script because we still have alternative scripts. -# -install-bin : $(TARGETS) - ./fixincl -v < /dev/null - @if [ -f ../fixinc.sh ] ; then rm -f ../fixinc.sh || \ - mv -f ../fixinc.sh ../fixinc.sh.$$ || exit 1 ; else : ; fi - @cp $(srcdir)/fixincl.sh ../fixinc.sh - chmod 755 ../fixinc.sh - -Makefile: Makefile.in ../config.status - cd .. \ - && $(SHELL) ./config.status $(subdir)/Makefile - -check : $(TARGETS) - autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def - $(SHELL) ./check.sh $(srcdir)/tests/base - @rm -f ./check.sh diff --git a/gcc/fixinc/README b/gcc/fixinc/README deleted file mode 100644 index 29c4edb..0000000 --- a/gcc/fixinc/README +++ /dev/null @@ -1,299 +0,0 @@ - -FIXINCLUDES OPERATION -===================== - -See also: http://autogen.SourceForge.net/fixinc.html - -The set of fixes required was distilled down to just the data required -to specify what needed to happen for each fix. Those data were edited -into a file named gcc/fixinc/inclhack.def. A program called AutoGen -(http://autogen.SourceForge.net) uses these definitions to instantiate -several different templates that then produces code for a fixinclude -program (fixincl.x) and a shell script to test its functioning. On -certain platforms (viz. those that do not have functional bidirectional -pipes), the fixincl program is split into two. This should only concern -you on DOS and BeOS. - -Regards, - Bruce <bkorb@gnu.org> - - - -GCC MAINTAINER INFORMATION -========================== - -If you are having some problem with a system header that is either -broken by the manufacturer, or is broken by the fixinclude process, -then you will need to alter or add information to the include fix -definitions file, ``inclhack.def''. Please also send relevant -information to gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org and, -please, to me: bkorb@gnu.org. - -To make your fix, you will need to do several things: - -1. Obtain access to the AutoGen program on some platform. It does - not have to be your build platform, but it is more convenient. - -2. Edit "inclhack.def" to reflect the changes you need to make. - See below for information on how to make those changes. - -3. Run the "genfixes" shell script to produce a new copy of - the "fixincl.x" file. - -4. Rebuild the compiler and check the header causing the issue. - 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. - -5. Go into the fixinc build directory and type, "make check". - You are guaranteed to have issues printed out as a result. - Look at the diffs produced. Make sure you have not clobbered - the proper functioning of a different fix. Make sure your - fix is properly tested and it does what it is supposed to do. - -6. Now that you have the right things happening, syncronize the - $(srcdir)/tests/base directory with the $(builddir)/tests/res - directory. The output of "make check" will be some diffs that - should give you some hints about what to do. - -7. Rerun "make check" and verify that there are no issues left. - - -MAKING CHANGES TO INCLHACK.DEF -============================== - -0. If you are not the fixincludes maintainer, please send that - person email about any changes you may want to make. Thanks! - -1. Every fix must have a "hackname" that is compatible with C syntax - for variable names and is unique without regard to alphabetic case. - Please keep them alphabetical by this name. :-) - -2. If the problem is known to exist only in certain files, - then name each such file with a "files = " entry. - -3. It is relatively expensive to fire off a process to fix a source - file, therefore write apply tests to avoid unnecessary fix - processes. The preferred apply tests are "select", "bypass" and - "c_test" because they are performed internally. "test" sends - a command to a server shell that actually fires off one or more - processes to do the testing. Avoid it, if you can, but it is - still more efficient than a fix process. Also available is - "mach". If the target machine matches any of the named - globbing-style patterns, then the machine name test will pass. - It is desired, however, to limit the use of this test. - - These tests are required to: - - 1. Be positive for all header files that require the fix. - - It is desireable to: - - 2. Be negative as often as possible whenever the fix is not - required, avoiding the process overhead. - - It is nice if: - - 3. The expression is as simple as possible to both - process and understand by people. :-) - - Please take advantage of the fact AutoGen will glue - together string fragments. It helps. Also take note - that double quote strings and single quote strings have - different formation rules. Double quote strings are a - tiny superset of ANSI-C string syntax. Single quote - strings follow shell single quote string formation - rules, except that the backslash is processed before - '\\', '\'' and '#' characters (using C character syntax). - - Examples of test specifications: - - hackname = broken_assert_stdio; - files = assert.h; - select = stderr; - bypass = "include.*stdio.h"; - - The ``broken_assert_stdio'' fix will be applied only to a file - named "assert.h" if it contains the string "stderr" _and_ it - does _not_ contain the expression "include.*stdio.h". - - hackname = no_double_slash; - c_test = "double_slash"; - - The ``no_double_slash'' fix will be applied if the - ``double_slash_test()'' function says to. See ``fixtests.c'' - for documentation on how to include new functions into that - module. - -4. There are currently four methods of fixing a file: - - 1. a series of sed expressions. Each will be an individual - "-e" argument to a single invocation of sed. - - 2. a shell script. These scripts are _required_ to read all - of stdin in order to avoid pipe stalls. They may choose to - discard the input. - - 3. Replacement text. If the replacement is empty, then no - fix is applied. Otherwise, the replacement text is - written to the output file and no further fixes are - applied. If you really want a no-op file, replace the - file with a comment. - - Replacement text "fixes" must be first in this file!! - - 4. A C language subroutine method for both tests and fixes. - See ``fixtests.c'' for instructions on writing C-language - applicability tests and ``fixfixes.c'' for C-language fixing. - These files also contain tables that describe the currently - implemented fixes and tests. - - If at all possible, you should try to use one of the C language - fixes as it is far more efficient. There are currently five - such fixes, three of which are very special purpose: - - i) char_macro_def - This function repairs the definition of an - ioctl macro that presumes CPP macro substitution within - pairs of single quote characters. - - ii) char_macro_use - This function repairs the usage of ioctl - macros that no longer can wrap an argument with single quotes. - - iii) machine_name - This function will look at "#if", "#ifdef", - "#ifndef" and "#elif" directive lines and replace the first - occurrence of a non-reserved name that is traditionally - pre-defined by the native compiler. - - The next two are for general use: - - iv) wrap - wraps the entire file with "#ifndef", "#define" and - "#endif" self-exclusionary text. It also, optionally, inserts - a prolog after the "#define" and an epilog just before the - "#endif". You can use this for a fix as follows: - - c_fix = wrap; - c_fix_arg = "/* prolog text */"; - c_fix_arg = "/* epilog text */"; - - If you want an epilog without a prolog, set the first "c_fix_arg" - to the empty string. Both or the second "c_fix_arg"s may be - omitted and the file will still be wrapped. - - THERE IS A SPECIAL EXCEPTION TO THIS, HOWEVER: - - If the regular expression '#if.*__need' is found, then it is - assumed that the file needs to be read and interpreted more - than once. However, the prolog and epilog text (if any) will - be inserted. - - v) format - Replaces text selected with a regular expression with - a specialized formating string. The formatting works as follows: - The format text is copied to the output until a '%' character - is found. If the character after the '%' is another '%', then - one '%' is output and processing continues. If the following - character is not a digit, then the '%' and that character are - copied and processing continues. Finally, if the '%' *is* - followed by a digit, that digit is used as an index into the - regmatch_t array to replace the two characters with the matched - text. i.e.: "%0" is replaced by the full matching text, "%1" - is the first matching sub-expression, etc. - - This is used as follows: - - c_fix = format; - c_fix_arg = "#ifndef %1\n%0\n#endif"; - c_fix_arg = "#define[ \t]+([A-Z][A-Z0-9a-z_]*).*"; - - This would wrap a traditional #define inside of a "#ifndef"/"#endif" - pair. The second "c_fix_arg" may be omitted *IF* there is - a select clause and the first one matches the text you want - replaced. You may delete text by supplying an empty string for - the format (the first "c_fix_arg"). - - Note: In general, a format c_fix may be used in place of one - sed expression. However, it will need to be rewritten by - hand. For example: - - sed = 's@^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$' - '@& || __GNUC__ >= 3@'; - - may be rewritten using a format c_fix as: - - c_fix = format; - c_fix_arg = '%0 || __GNUC__ >= 3'; - c_fix_arg = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$'; - - Multiple sed substitution expressions probably ought to remain sed - expressions in order to maintain clarity. Also note that if the - second sed expression is the same as the first select expression, - then you may omit the second c_fix_arg. The select expression will - be picked up and used in its absence. - -EXAMPLES OF FIXES: -================== - - hackname = AAA_ki_iface; - replace; /* empty replacement -> no fixing the file */ - - When this ``fix'' is invoked, it will prevent any fixes - from being applied. - - ------------------ - - hackname = AAB_svr4_no_varargs; - replace = "/* This file was generated by fixincludes. */\n" - "#ifndef _SYS_VARARGS_H\n" - "#define _SYS_VARARGS_H\n\n" - - "#ifdef __STDC__\n" - "#include <stdarg.h>\n" - "#else\n" - "#include <varargs.h>\n" - "#endif\n\n" - - "#endif /* _SYS_VARARGS_H */\n"; - - When this ``fix'' is invoked, the replacement text will be - emitted into the replacement include file. No further fixes - will be applied. - - ------------------ - - hackname = hpux11_fabsf; - files = math.h; - select = "^[ \t]*#[ \t]*define[ \t]+fabsf\\(.*"; - bypass = "__cplusplus"; - - c_fix = format; - c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; - - test_text = - "# define fabsf(x) ((float)fabs((double)(float)(x)))\n"; - - This fix will ensure that the #define for fabs is wrapped - with C++ protection, providing the header is not already - C++ aware. - - ------------------ - -5. Testing fixes. - - The brute force method is, of course, to configure and build - GCC. But you can also: - - cd ${top_builddir}/gcc - rm -rf fixinc.sh include/ stmp-fixinc - make stmp-fixinc - - I would really recommend, however: - - cd ${top_builddir}/gcc/fixinc - make check - - To do this, you *must* have autogen installed on your system. - The "check" step will proceed to construct a shell script that - will exercize all the fixes, using the sample test_text - provided with each fix. Once done, the changes made will - be compared against the changes saved in the source directory. - If you are changing the tests or fixes, the change will likely - be highlighted. diff --git a/gcc/fixinc/check.tpl b/gcc/fixinc/check.tpl deleted file mode 100644 index 9f8750b..0000000 --- a/gcc/fixinc/check.tpl +++ /dev/null @@ -1,176 +0,0 @@ -[= autogen5 template sh=check.sh =] -[= -# -# This file contanes the shell template to run tests on the fixes -# -=]#!/bin/sh - -set -e -TESTDIR=tests -TESTBASE=`cd $1;${PWDCMD-pwd}` - -[ -d ${TESTDIR} ] || mkdir ${TESTDIR} -cd ${TESTDIR} -TESTDIR=`${PWDCMD-pwd}` - -TARGET_MACHINE='*' -DESTDIR=`${PWDCMD-pwd}`/res -SRCDIR=`${PWDCMD-pwd}`/inc -FIND_BASE='.' -VERBOSE=[=` echo ${VERBOSE-1} `=] -INPUT=`${PWDCMD-pwd}` -ORIGDIR=${INPUT} - -export TARGET_MACHINE DESTDIR SRCDIR FIND_BASE VERBOSE INPUT ORIGDIR - -rm -rf ${DESTDIR} ${SRCDIR} -mkdir ${DESTDIR} ${SRCDIR} -( -[= - (shellf - "for f in %s - do case $f in - */* ) echo $f | sed 's;/[^/]*$;;' ;; - esac - done | sort -u | \ - while read g - do echo \" mkdir \\${SRCDIR}/$g || mkdir -p \\${SRCDIR}/$g || exit 1\" - done" (join " " (stack "fix.files")) ) =] -) 2> /dev/null[= # suppress 'No such file or directory' messages =] -cd inc -[= -(define sfile "") -(define HACK "") -(define dfile "") =][= - -FOR fix =][= - - IF (> (count "test_text") 1) =][= - (set! HACK (string-upcase! (get "hackname"))) - (set! sfile (if (exist? "files") (get "files[]") "testing.h")) - (set! dfile (string-append - (if (*==* sfile "/") - (shellf "echo \"%s\"|sed 's,/[^/]*,/,'" sfile ) - "" ) - (string-tr! (get "hackname") "_A-Z" "-a-z") - ) ) =][= - - FOR test_text (for-from 1) =] -cat >> [=(. sfile)=] <<_HACK_EOF_ - - -#if defined( [=(. HACK)=]_CHECK_[=(for-index)=] ) -[=test_text=] -#endif /* [=(. HACK)=]_CHECK_[=(for-index)=] */ -_HACK_EOF_ -echo [=(. sfile)=] | ../../fixincl -mv -f [=(. sfile)=] [=(. dfile)=]-[=(for-index)=].h -[ -f ${DESTDIR}/[=(. sfile)=] ] && [=# - =]mv ${DESTDIR}/[=(. sfile)=] ${DESTDIR}/[=(. dfile)=]-[=(for-index)=].h[= - - ENDFOR test_text =][= - - ENDIF multi-test =][= - -ENDFOR fix - -=][= - -FOR fix =][= - (set! HACK (string-upcase! (get "hackname"))) =][= - - IF (not (exist? "test_text")) =][= - (if (not (exist? "replace")) - (error (sprintf "include fix '%s' has no test text" - (get "hackname") )) ) - =][= - ELSE =] -cat >> [= - IF (exist? "files") =][= - files[0] =][= - ELSE =]testing.h[= - ENDIF =] <<_HACK_EOF_ - - -#if defined( [=(. HACK)=]_CHECK ) -[=test_text=] -#endif /* [=(. HACK)=]_CHECK */ -_HACK_EOF_ -[=ENDIF =][= - -ENDFOR fix - -=] - -find . -type f | sed 's;^\./;;' | sort | ../../fixincl -cd ${DESTDIR} - -exitok=true - -find * -type f -print > ${TESTDIR}/LIST - -# Special hack for sys/types.h: the #define-d types for size_t, -# ptrdiff_t and wchar_t are different for each port. Therefore, -# strip off the defined-to type so that the test results are the -# same for all platforms. -# -sed 's/\(#define __[A-Z_]*_TYPE__\).*/\1/' sys/types.h > XX -mv -f XX sys/types.h - -# The following subshell weirdness is for saving an exit -# status from within a while loop that reads input. If you can -# think of a cleaner way, suggest away, please... -# -exitok=` -exec < ${TESTDIR}/LIST -while read f -do - if [ ! -f ${TESTBASE}/$f ] - then - echo "Newly fixed header: $f" >&2 - exitok=false - - elif cmp $f ${TESTBASE}/$f >&2 - then - : - - else - ${DIFF:-diff} -c $f ${TESTBASE}/$f >&2 || : - exitok=false - fi -done -echo $exitok` - -cd $TESTBASE - -find * -type f -print | \ -fgrep -v 'CVS/' > ${TESTDIR}/LIST - -exitok=` -exec < ${TESTDIR}/LIST -while read f -do - if [ -s $f ] && [ ! -f ${DESTDIR}/$f ] - then - echo "Missing header fix: $f" >&2 - exitok=false - fi -done -echo $exitok` - -echo -if $exitok -then - cd ${TESTDIR} - rm -rf inc res LIST - cd .. - rmdir ${TESTDIR} > /dev/null 2>&1 || : - echo All fixinclude tests pass >&2 -else - echo There were fixinclude test FAILURES >&2 -fi -$exitok[= - -(if (defined? 'set-writable) (set-writable)) - -=] diff --git a/gcc/fixinc/fixfixes.c b/gcc/fixinc/fixfixes.c deleted file mode 100644 index 19fa27e..0000000 --- a/gcc/fixinc/fixfixes.c +++ /dev/null @@ -1,803 +0,0 @@ - -/* - - Test to see if a particular fix should be applied to a header file. - - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003 - Free Software Foundation, Inc. - -= = = = = = = = = = = = = = = = = = = = = = = = = - -NOTE TO DEVELOPERS - -The routines you write here must work closely with fixincl.c. - -Here are the rules: - -1. Every test procedure name must be suffixed with "_fix". - These routines will be referenced from inclhack.def, sans the suffix. - -2. Use the "FIX_PROC_HEAD()" macro _with_ the "_fix" suffix - (I cannot use the ## magic from ANSI C) for defining your entry point. - -3. Put your test name into the FIXUP_TABLE. - -4. Do not read anything from stdin. It is closed. - -5. Write to stderr only in the event of a reportable error - In such an event, call "exit (EXIT_FAILURE)". - -6. You have access to the fixDescList entry for the fix in question. - This may be useful, for example, if there are interesting strings - or pre-compiled regular expressions stored there. - -= = = = = = = = = = = = = = = = = = = = = = = = = - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include "fixlib.h" -#define GTYPE_SE_CT 1 - -#ifdef SEPARATE_FIX_PROC -#include "fixincl.x" -#endif - -tSCC zNeedsArg[] = "fixincl error: `%s' needs %s argument (c_fix_arg[%d])\n"; - -typedef void t_fix_proc (const char *, const char *, tFixDesc *) ; -typedef struct { - const char* fix_name; - t_fix_proc* fix_proc; -} fix_entry_t; - -#define FIXUP_TABLE \ - _FT_( "char_macro_def", char_macro_def_fix ) \ - _FT_( "char_macro_use", char_macro_use_fix ) \ - _FT_( "format", format_fix ) \ - _FT_( "machine_name", machine_name_fix ) \ - _FT_( "wrap", wrap_fix ) \ - _FT_( "gnu_type", gnu_type_fix ) - - -#define FIX_PROC_HEAD( fix ) \ -static void fix (const char* filname ATTRIBUTE_UNUSED , \ - const char* text ATTRIBUTE_UNUSED , \ - tFixDesc* p_fixd ATTRIBUTE_UNUSED ) - -#ifdef NEED_PRINT_QUOTE -/* - * Skip over a quoted string. Single quote strings may - * contain multiple characters if the first character is - * a backslash. Especially a backslash followed by octal digits. - * We are not doing a correctness syntax check here. - */ -static char* -print_quote(char q, char* text ) -{ - fputc( q, stdout ); - - for (;;) - { - char ch = *(text++); - fputc( ch, stdout ); - - switch (ch) - { - case '\\': - if (*text == NUL) - goto quote_done; - - fputc( *(text++), stdout ); - break; - - case '"': - case '\'': - if (ch != q) - break; - /*FALLTHROUGH*/ - - case '\n': - case NUL: - goto quote_done; - } - } quote_done:; - - return text; -} -#endif /* NEED_PRINT_QUOTE */ - - -/* - * Emit the GNU standard type wrapped up in such a way that - * this thing can be encountered countless times during a compile - * and not cause even a warning. - */ -static const char* -emit_gnu_type (const char* text, regmatch_t* rm ) -{ - char z_TYPE[ 64 ]; - char z_type[ 64 ]; - - fwrite (text, rm[0].rm_so, 1, stdout); - - { - const char* ps = text + rm[1].rm_so; - const char* pe = text + rm[1].rm_eo; - char* pd = z_type; - char* pD = z_TYPE; - - while (ps < pe) - *(pD++) = TOUPPER( *(pd++) = *(ps++) ); - - *pD = *pd = NUL; - } - - /* - * Now print out the reformed typedef, - * with a C++ guard for WCHAR - */ - { - tSCC z_fmt[] = "\ -#if !defined(_GCC_%s_T)%s\n\ -#define _GCC_%s_T\n\ -typedef __%s_TYPE__ %s_t;\n\ -#endif\n"; - - const char *const pz_guard = (strcmp (z_type, "wchar") == 0) - ? " && ! defined(__cplusplus)" : ""; - - printf (z_fmt, z_TYPE, pz_guard, z_TYPE, z_TYPE, z_type); - } - - return text += rm[0].rm_eo; -} - - -/* - * Copy the `format' string to std out, replacing `%n' expressions - * with the matched text from a regular expression evaluation. - * Doubled '%' characters will be replaced with a single copy. - * '%' characters in other contexts and all other characters are - * copied out verbatim. - */ -static void -format_write (tCC* format, tCC* text, regmatch_t av[] ) -{ - int c; - - while ((c = (unsigned)*(format++)) != NUL) { - - if (c != '%') - { - putchar(c); - continue; - } - - c = (unsigned)*(format++); - - /* - * IF the character following a '%' is not a digit, - * THEN we will always emit a '%' and we may or may - * not emit the following character. We will end on - * a NUL and we will emit only one of a pair of '%'. - */ - if (! ISDIGIT ( c )) - { - putchar( '%' ); - switch (c) { - case NUL: - return; - case '%': - break; - default: - putchar(c); - } - } - - /* - * Emit the matched subexpression numbered 'c'. - * IF, of course, there was such a match... - */ - else { - regmatch_t* pRM = av + (c - (unsigned)'0'); - size_t len; - - if (pRM->rm_so < 0) - continue; - - len = pRM->rm_eo - pRM->rm_so; - if (len > 0) - fwrite(text + pRM->rm_so, len, 1, stdout); - } - } -} - - -/* - * Search for multiple copies of a regular expression. Each block - * of matched text is replaced with the format string, as described - * above in `format_write'. - */ -FIX_PROC_HEAD( format_fix ) -{ - tCC* pz_pat = p_fixd->patch_args[2]; - tCC* pz_fmt = p_fixd->patch_args[1]; - regex_t re; - regmatch_t rm[10]; - IGNORE_ARG(filname); - - /* - * We must have a format - */ - if (pz_fmt == (tCC*)NULL) - { - fprintf( stderr, zNeedsArg, p_fixd->fix_name, "replacement format", 0 ); - exit (EXIT_BROKEN); - } - - /* - * IF we don't have a search text, then go find the first - * regular expression among the tests. - */ - if (pz_pat == (tCC*)NULL) - { - tTestDesc* pTD = p_fixd->p_test_desc; - int ct = p_fixd->test_ct; - for (;;) - { - if (ct-- <= 0) - { - fprintf( stderr, zNeedsArg, p_fixd->fix_name, "search text", 1 ); - exit (EXIT_BROKEN); - } - - if (pTD->type == TT_EGREP) - { - pz_pat = pTD->pz_test_text; - break; - } - - pTD++; - } - } - - /* - * Replace every copy of the text we find - */ - compile_re (pz_pat, &re, 1, "format search-text", "format_fix" ); - while (xregexec (&re, text, 10, rm, 0) == 0) - { - fwrite( text, rm[0].rm_so, 1, stdout ); - format_write( pz_fmt, text, rm ); - text += rm[0].rm_eo; - } - - /* - * Dump out the rest of the file - */ - fputs (text, stdout); -} - - -/* Scan the input file for all occurrences of text like this: - - #define TIOCCONS _IO(T, 12) - - and change them to read like this: - - #define TIOCCONS _IO('T', 12) - - which is the required syntax per the C standard. (The definition of - _IO also has to be tweaked - see below.) 'IO' is actually whatever you - provide as the `c_fix_arg' argument. */ - -FIX_PROC_HEAD( char_macro_use_fix ) -{ - /* This regexp looks for a traditional-syntax #define (# in column 1) - of an object-like macro. */ - static const char pat[] = - "^#[ \t]*define[ \t]+[_A-Za-z][_A-Za-z0-9]*[ \t]+"; - static regex_t re; - - const char* str = p_fixd->patch_args[1]; - regmatch_t rm[1]; - const char *p, *limit; - size_t len; - IGNORE_ARG(filname); - - if (str == NULL) - { - fprintf (stderr, zNeedsArg, p_fixd->fix_name, "ioctl type", 0); - exit (EXIT_BROKEN); - } - - len = strlen (str); - compile_re (pat, &re, 1, "macro pattern", "char_macro_use_fix"); - - for (p = text; - xregexec (&re, p, 1, rm, 0) == 0; - p = limit + 1) - { - /* p + rm[0].rm_eo is the first character of the macro replacement. - Find the end of the macro replacement, and the STR we were - sent to look for within the replacement. */ - p += rm[0].rm_eo; - limit = p - 1; - do - { - limit = strchr (limit + 1, '\n'); - if (!limit) - goto done; - } - while (limit[-1] == '\\'); - - do - { - if (*p == str[0] && !strncmp (p+1, str+1, len-1)) - goto found; - } - while (++p < limit - len); - /* Hit end of line. */ - continue; - - found: - /* Found STR on this line. If the macro needs fixing, - the next few chars will be whitespace or uppercase, - then an open paren, then a single letter. */ - while ((ISSPACE (*p) || ISUPPER (*p)) && p < limit) p++; - if (*p++ != '(') - continue; - if (!ISALPHA (*p)) - continue; - if (ISIDNUM (p[1])) - continue; - - /* Splat all preceding text into the output buffer, - quote the character at p, then proceed. */ - fwrite (text, 1, p - text, stdout); - putchar ('\''); - putchar (*p); - putchar ('\''); - text = p + 1; - } - done: - fputs (text, stdout); -} - - -/* Scan the input file for all occurrences of text like this: - - #define xxxIOxx(x, y) (....'x'<<16....) - - and change them to read like this: - - #define xxxIOxx(x, y) (....x<<16....) - - which is the required syntax per the C standard. (The uses of _IO - also has to be tweaked - see above.) 'IO' is actually whatever - you provide as the `c_fix_arg' argument. */ -FIX_PROC_HEAD( char_macro_def_fix ) -{ - /* This regexp looks for any traditional-syntax #define (# in column 1). */ - static const char pat[] = - "^#[ \t]*define[ \t]+"; - static regex_t re; - - const char* str = p_fixd->patch_args[1]; - regmatch_t rm[1]; - const char *p, *limit; - char arg; - size_t len; - IGNORE_ARG(filname); - - if (str == NULL) - { - fprintf (stderr, zNeedsArg, p_fixd->fix_name, "ioctl type", 0); - exit (EXIT_BROKEN); - } - - len = strlen (str); - compile_re (pat, &re, 1, "macro pattern", "fix_char_macro_defines"); - - for (p = text; - xregexec (&re, p, 1, rm, 0) == 0; - p = limit + 1) - { - /* p + rm[0].rm_eo is the first character of the macro name. - Find the end of the macro replacement, and the STR we were - sent to look for within the name. */ - p += rm[0].rm_eo; - limit = p - 1; - do - { - limit = strchr (limit + 1, '\n'); - if (!limit) - goto done; - } - while (limit[-1] == '\\'); - - do - { - if (*p == str[0] && !strncmp (p+1, str+1, len-1)) - goto found; - p++; - } - while (ISIDNUM (*p)); - /* Hit end of macro name without finding the string. */ - continue; - - found: - /* Found STR in this macro name. If the macro needs fixing, - there may be a few uppercase letters, then there will be an - open paren with _no_ intervening whitespace, and then a - single letter. */ - while (ISUPPER (*p) && p < limit) p++; - if (*p++ != '(') - continue; - if (!ISALPHA (*p)) - continue; - if (ISIDNUM (p[1])) - continue; - - /* The character at P is the one to look for in the following - text. */ - arg = *p; - p += 2; - - while (p < limit) - { - if (p[-1] == '\'' && p[0] == arg && p[1] == '\'') - { - /* Remove the quotes from this use of ARG. */ - p--; - fwrite (text, 1, p - text, stdout); - putchar (arg); - p += 3; - text = p; - } - else - p++; - } - } - done: - fputs (text, stdout); -} - -/* Fix for machine name #ifdefs that are not in the namespace reserved - by the C standard. They won't be defined if compiling with -ansi, - and the headers will break. We go to some trouble to only change - #ifdefs where the macro is defined by GCC in non-ansi mode; this - minimizes the number of headers touched. */ - -#define SCRATCHSZ 64 /* hopefully long enough */ - -FIX_PROC_HEAD( machine_name_fix ) -{ - regmatch_t match[2]; - const char *line, *base, *limit, *p, *q; - regex_t *label_re, *name_re; - char scratch[SCRATCHSZ]; - size_t len; - IGNORE_ARG(filname); - IGNORE_ARG(p_fixd); - - if (!mn_get_regexps (&label_re, &name_re, "machine_name_fix")) - { - fputs( "The target machine has no needed machine name fixes\n", stderr ); - goto done; - } - - scratch[0] = '_'; - scratch[1] = '_'; - - for (base = text; - xregexec (label_re, base, 2, match, 0) == 0; - base = limit) - { - base += match[0].rm_eo; - /* We're looking at an #if or #ifdef. Scan forward for the - next non-escaped newline. */ - line = limit = base; - do - { - limit++; - limit = strchr (limit, '\n'); - if (!limit) - goto done; - } - while (limit[-1] == '\\'); - - /* If the 'name_pat' matches in between base and limit, we have - a bogon. It is not worth the hassle of excluding comments - because comments on #if/#ifdef lines are rare, and strings on - such lines are illegal. - - REG_NOTBOL means 'base' is not at the beginning of a line, which - shouldn't matter since the name_re has no ^ anchor, but let's - be accurate anyway. */ - - for (;;) - { - again: - if (base == limit) - break; - - if (xregexec (name_re, base, 1, match, REG_NOTBOL)) - goto done; /* No remaining match in this file */ - - /* Match; is it on the line? */ - if (match[0].rm_eo > limit - base) - break; - - p = base + match[0].rm_so; - base += match[0].rm_eo; - - /* One more test: if on the same line we have the same string - with the appropriate underscores, then leave it alone. - We want exactly two leading and trailing underscores. */ - if (*p == '_') - { - len = base - p - ((*base == '_') ? 2 : 1); - q = p + 1; - } - else - { - len = base - p - ((*base == '_') ? 1 : 0); - q = p; - } - if (len + 4 > SCRATCHSZ) - abort (); - memcpy (&scratch[2], q, len); - len += 2; - scratch[len++] = '_'; - scratch[len++] = '_'; - - for (q = line; q <= limit - len; q++) - if (*q == '_' && !strncmp (q, scratch, len)) - goto again; - - fwrite (text, 1, p - text, stdout); - fwrite (scratch, 1, len, stdout); - - text = base; - } - } - done: - fputs (text, stdout); -} - - -FIX_PROC_HEAD( wrap_fix ) -{ - tSCC z_no_wrap_pat[] = "^#if.*__need_"; - static regex_t no_wrapping_re; /* assume zeroed data */ - - tCC* pz_name = NULL; - - if (no_wrapping_re.allocated == 0) - compile_re( z_no_wrap_pat, &no_wrapping_re, 0, "no-wrap pattern", - "wrap-fix" ); - - /* - * IF we do *not* match the no-wrap re, then we have a double negative. - * A double negative means YES. - */ - if (xregexec( &no_wrapping_re, text, 0, NULL, 0 ) != 0) - { - /* - * A single file can get wrapped more than once by different fixes. - * A single fix can wrap multiple files. Therefore, guard with - * *both* the fix name and the file name. - */ - size_t ln = strlen( filname ) + strlen( p_fixd->fix_name ) + 14; - char* pz = xmalloc( ln ); - pz_name = pz; - sprintf( pz, "FIXINC_WRAP_%s-%s", filname, p_fixd->fix_name ); - - for (pz += 12; 1; pz++) { - char ch = *pz; - - if (ch == NUL) - break; - - if (! ISALNUM( ch )) { - *pz = '_'; - } - else { - *pz = TOUPPER( ch ); - } - } - - printf( "#ifndef %s\n", pz_name ); - printf( "#define %s 1\n\n", pz_name ); - } - - if (p_fixd->patch_args[1] == (tCC*)NULL) - fputs( text, stdout ); - - else { - fputs( p_fixd->patch_args[1], stdout ); - fputs( text, stdout ); - if (p_fixd->patch_args[2] != (tCC*)NULL) - fputs( p_fixd->patch_args[2], stdout ); - } - - if (pz_name != NULL) { - printf( "\n#endif /* %s */\n", pz_name ); - free( (void*)pz_name ); - } -} - - -/* - * Search for multiple copies of a regular expression. Each block - * of matched text is replaced with the format string, as described - * above in `format_write'. - */ -FIX_PROC_HEAD( gnu_type_fix ) -{ - const char* pz_pat; - regex_t re; - regmatch_t rm[GTYPE_SE_CT+1]; - IGNORE_ARG(filname); - - { - tTestDesc* pTD = p_fixd->p_test_desc; - int ct = p_fixd->test_ct; - for (;;) - { - if (ct-- <= 0) - { - fprintf (stderr, zNeedsArg, p_fixd->fix_name, "search text", 1); - exit (EXIT_BROKEN); - } - - if (pTD->type == TT_EGREP) - { - pz_pat = pTD->pz_test_text; - break; - } - - pTD++; - } - } - - compile_re (pz_pat, &re, 1, "gnu type typedef", "gnu_type_fix"); - - while (xregexec (&re, text, GTYPE_SE_CT+1, rm, 0) == 0) - { - text = emit_gnu_type (text, rm); - } - - /* - * Dump out the rest of the file - */ - fputs (text, stdout); -} - - -/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = - - test for fix selector - - THIS IS THE ONLY EXPORTED ROUTINE - -*/ -void -apply_fix( tFixDesc* p_fixd, tCC* filname ) -{ -#define _FT_(n,p) { n, p }, - static fix_entry_t fix_table[] = { FIXUP_TABLE { NULL, NULL }}; -#undef _FT_ -#define FIX_TABLE_CT (ARRAY_SIZE (fix_table)-1) - - tCC* fixname = p_fixd->patch_args[0]; - char* buf; - int ct = FIX_TABLE_CT; - fix_entry_t* pfe = fix_table; - - for (;;) - { - if (strcmp (pfe->fix_name, fixname) == 0) - break; - if (--ct <= 0) - { - fprintf (stderr, "fixincl error: the `%s' fix is unknown\n", - fixname ); - exit (EXIT_BROKEN); - } - pfe++; - } - - buf = load_file_data (stdin); - (*pfe->fix_proc)( filname, buf, p_fixd ); -} - -#ifdef SEPARATE_FIX_PROC -tSCC z_usage[] = -"USAGE: applyfix <fix-name> <file-to-fix> <file-source> <file-destination>\n"; -tSCC z_reopen[] = -"FS error %d (%s) reopening %s as std%s\n"; - -int -main( int argc, char** argv ) -{ - tFixDesc* pFix; - char* pz_tmptmp; - char* pz_tmp_base; - char* pz_tmp_dot; - - if (argc != 5) - { - usage_failure: - fputs (z_usage, stderr); - return EXIT_FAILURE; - } - - { - char* pz = argv[1]; - long idx; - - if (! ISDIGIT ( *pz )) - goto usage_failure; - - idx = strtol (pz, &pz, 10); - if ((*pz != NUL) || ((unsigned)idx >= FIX_COUNT)) - goto usage_failure; - pFix = fixDescList + idx; - } - - if (freopen (argv[3], "r", stdin) != stdin) - { - fprintf (stderr, z_reopen, errno, strerror( errno ), argv[3], "in"); - return EXIT_FAILURE; - } - - pz_tmptmp = xmalloc (strlen (argv[4]) + 5); - strcpy( pz_tmptmp, argv[4] ); - - /* Don't lose because "12345678" and "12345678X" map to the same - file under DOS restricted 8+3 file namespace. Note that DOS - doesn't allow more than one dot in the trunk of a file name. */ - pz_tmp_base = basename( pz_tmptmp ); - pz_tmp_dot = strchr( pz_tmp_base, '.' ); - if (pathconf( pz_tmptmp, _PC_NAME_MAX ) <= 12 /* is this DOS or Windows9X? */ - && pz_tmp_dot != (char*)NULL) - strcpy (pz_tmp_dot+1, "X"); /* nuke the original extension */ - else - strcat (pz_tmptmp, ".X"); - if (freopen (pz_tmptmp, "w", stdout) != stdout) - { - fprintf (stderr, z_reopen, errno, strerror( errno ), pz_tmptmp, "out"); - return EXIT_FAILURE; - } - - apply_fix (pFix, argv[1]); - fclose (stdout); - fclose (stdin); - unlink (argv[4]); - if (rename (pz_tmptmp, argv[4]) != 0) - { - fprintf (stderr, "error %d (%s) renaming %s to %s\n", errno, - strerror( errno ), pz_tmptmp, argv[4]); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} -#endif diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c deleted file mode 100644 index 690184b..0000000 --- a/gcc/fixinc/fixincl.c +++ /dev/null @@ -1,1435 +0,0 @@ -/* Install modified versions of certain ANSI-incompatible system header - 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 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include "fixlib.h" - -#if defined( HAVE_MMAP_FILE ) -#include <sys/mman.h> -#define BAD_ADDR ((void*)-1) -#endif - -#if ! defined( SIGCHLD ) && defined( SIGCLD ) -# define SIGCHLD SIGCLD -#endif -#ifndef SEPARATE_FIX_PROC -#include "server.h" -#endif - -/* The contents of this string are not very important. It is mostly - just used as part of the "I am alive and working" test. */ - -static const char program_id[] = "fixincl version 1.1"; - -/* This format will be used at the start of every generated file */ - -static const char z_std_preamble[] = -"/* DO NOT EDIT THIS FILE.\n\n\ - It has been auto-edited by fixincludes from:\n\n\ -\t\"%s/%s\"\n\n\ - This had to be done to correct non-standard usages in the\n\ - original, manufacturer supplied header file. */\n\n"; - -/* Working environment strings. Essentially, invocation 'options'. */ - -#define _ENV_(v,m,n,t) tCC* v = NULL; -ENV_TABLE -#undef _ENV_ - -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 */ -char* pz_curr_data; /* original contents of that file */ -char* pz_temp_file; /* for DOS, a place to stash the temporary - fixed data between system(3) calls */ -t_bool curr_data_mapped; -int data_map_fd; -size_t data_map_size; -size_t ttl_data_size = 0; - -#ifdef DO_STATS -int process_ct = 0; -int apply_ct = 0; -int fixed_ct = 0; -int altered_ct = 0; -#endif /* DO_STATS */ - -const char incl_quote_pat[] = "^[ \t]*#[ \t]*include[ \t]*\"[^/]"; -tSCC z_fork_err[] = "Error %d (%s) starting filter process for %s\n"; -regex_t incl_quote_re; - -static void do_version (void) ATTRIBUTE_NORETURN; -char *load_file (const char *); -void run_compiles (void); -void initialize (int argc, char** argv); -void process (void); - -/* External Source Code */ - -#include "fixincl.x" - -/* * * * * * * * * * * * * * * * * * * - * - * MAIN ROUTINE - */ -extern int main (int, char **); -int -main (int argc, char** argv) -{ - char *file_name_buf; - - initialize ( argc, argv ); - - have_tty = isatty (fileno (stderr)); - - /* Before anything else, ensure we can allocate our file name buffer. */ - file_name_buf = load_file_data (stdin); - - /* Because of the way server shells work, you have to keep stdin, out - and err open so that the proper input file does not get closed - by accident */ - - freopen ("/dev/null", "r", stdin); - - if (file_name_buf == (char *) NULL) - { - fputs ("No file names listed for fixing\n", stderr); - exit (EXIT_FAILURE); - } - - for (;;) - { - char* pz_end; - - /* skip to start of name, past any "./" prefixes */ - - while (ISSPACE (*file_name_buf)) file_name_buf++; - while ((file_name_buf[0] == '.') && (file_name_buf[1] == '/')) - file_name_buf += 2; - - /* Check for end of list */ - - if (*file_name_buf == NUL) - break; - - /* Set global file name pointer and find end of name */ - - pz_curr_file = file_name_buf; - pz_end = strchr( pz_curr_file, '\n' ); - if (pz_end == (char*)NULL) - pz_end = file_name_buf = pz_curr_file + strlen (pz_curr_file); - else - file_name_buf = pz_end + 1; - - while ((pz_end > pz_curr_file) && ISSPACE( pz_end[-1])) pz_end--; - - /* IF no name is found (blank line) or comment marker, skip line */ - - if ((pz_curr_file == pz_end) || (*pz_curr_file == '#')) - continue; - *pz_end = NUL; - - process (); - } /* for (;;) */ - -#ifdef DO_STATS - if (VLEVEL( VERB_PROGRESS )) { - tSCC zFmt[] = - "\ -Processed %5d files containing %d bytes \n\ -Applying %5d fixes to %d files\n\ -Altering %5d of them\n"; - - fprintf (stderr, zFmt, process_ct, ttl_data_size, apply_ct, - fixed_ct, altered_ct); - } -#endif /* DO_STATS */ - -# ifdef SEPARATE_FIX_PROC - unlink( pz_temp_file ); -# endif - exit (EXIT_SUCCESS); -} - - -static void -do_version (void) -{ - static const char zFmt[] = "echo '%s'"; - char zBuf[ 1024 ]; - - /* The 'version' option is really used to test that: - 1. The program loads correctly (no missing libraries) - 2. that we can compile all the regular expressions. - 3. we can correctly run our server shell process - */ - run_compiles (); - sprintf (zBuf, zFmt, program_id); -#ifndef SEPARATE_FIX_PROC - puts (zBuf + 5); - exit (strcmp (run_shell (zBuf), program_id)); -#else - exit (system (zBuf)); -#endif -} - -/* * * * * * * * * * * * */ - -void -initialize ( int argc, char** argv ) -{ - 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" - ENV_TABLE -# undef _ENV_ -#endif - ; - - xmalloc_set_program_name (argv[0]); - - switch (argc) - { - case 1: - break; - - case 2: - if (strcmp (argv[1], "-v") == 0) - do_version (); - if (freopen (argv[1], "r", stdin) == (FILE*)NULL) - { - fprintf (stderr, "Error %d (%s) reopening %s as stdin\n", - errno, xstrerror (errno), argv[1] ); - exit (EXIT_FAILURE); - } - break; - - default: - fputs ("fixincl ERROR: too many command line arguments\n", stderr); - exit (EXIT_FAILURE); - } - -#ifdef SIGCHLD - /* We *MUST* set SIGCHLD to SIG_DFL so that the wait4() call will - receive the signal. A different setting is inheritable */ - signal (SIGCHLD, SIG_DFL); -#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); } } - -ENV_TABLE - -#undef _ENV_ - - if (ISDIGIT ( *pz_verbose )) - verbose_level = (te_verbose)atoi( pz_verbose ); - else - switch (*pz_verbose) { - case 's': - case 'S': - verbose_level = VERB_SILENT; break; - - case 'f': - case 'F': - verbose_level = VERB_FIXES; break; - - case 'a': - case 'A': - verbose_level = VERB_APPLIES; break; - - default: - case 'p': - case 'P': - verbose_level = VERB_PROGRESS; break; - - case 't': - case 'T': - verbose_level = VERB_TESTS; break; - - case 'e': - case 'E': - verbose_level = VERB_EVERYTHING; break; - } - if (verbose_level >= VERB_EVERYTHING) { - verbose_level = VERB_EVERYTHING; - fputs ("fixinc verbosity: EVERYTHING\n", stderr); - } - while ((pz_find_base[0] == '.') && (pz_find_base[1] == '/')) - pz_find_base += 2; - if ((pz_find_base[0] != '.') || (pz_find_base[1] != NUL)) - find_base_len = strlen( pz_find_base ); - - /* Compile all the regular expressions now. - That way, it is done only once for the whole run. - */ - run_compiles (); - -# ifdef SEPARATE_FIX_PROC - /* NULL as the first argument to `tempnam' causes it to DTRT - wrt the temporary directory where the file will be created. */ - pz_temp_file = tempnam( NULL, "fxinc" ); -# endif - - signal (SIGQUIT, SIG_IGN); -#ifdef SIGIOT - signal (SIGIOT, SIG_IGN); -#endif -#ifdef SIGPIPE - signal (SIGPIPE, SIG_IGN); -#endif - signal (SIGALRM, SIG_IGN); - signal (SIGTERM, SIG_IGN); -} - -/* * * * * * * * * * * * * - - load_file loads all the contents of a file into malloc-ed memory. - Its argument is the name of the file to read in; the returned - result is the NUL terminated contents of the file. The file - is presumed to be an ASCII text file containing no NULs. */ -char * -load_file ( const char* fname ) -{ - struct stat stbf; - char* res; - - if (stat (fname, &stbf) != 0) - { - if (NOT_SILENT) - fprintf (stderr, "error %d (%s) stat-ing %s\n", - errno, xstrerror (errno), fname ); - return (char *) NULL; - } - if (stbf.st_size == 0) - return (char*)NULL; - - /* Make the data map size one larger than the file size for documentation - purposes. Truth is that there will be a following NUL character if - the file size is not a multiple of the page size. If it is a multiple, - then this adjustment sometimes fails anyway. */ - data_map_size = stbf.st_size+1; - data_map_fd = open (fname, O_RDONLY); - ttl_data_size += data_map_size-1; - - if (data_map_fd < 0) - { - if (NOT_SILENT) - fprintf (stderr, "error %d (%s) opening %s for read\n", - errno, xstrerror (errno), fname); - return (char*)NULL; - } - -#ifdef HAVE_MMAP_FILE - curr_data_mapped = BOOL_TRUE; - - /* IF the file size is a multiple of the page size, - THEN sometimes you will seg fault trying to access a trailing byte */ - if ((stbf.st_size & (getpagesize()-1)) == 0) - res = (char*)BAD_ADDR; - else - res = (char*)mmap ((void*)NULL, data_map_size, PROT_READ, - MAP_PRIVATE, data_map_fd, 0); - if (res == (char*)BAD_ADDR) -#endif - { - FILE* fp = fdopen (data_map_fd, "r"); - curr_data_mapped = BOOL_FALSE; - res = load_file_data (fp); - fclose (fp); - } - - return res; -} - -static int -machine_matches( tFixDesc* p_fixd ) - { -# ifndef SEPARATE_FIX_PROC - tSCC case_fmt[] = "case %s in\n"; /* 9 bytes, plus string */ - tSCC esac_fmt[] = - " )\n echo %s ;;\n* ) echo %s ;;\nesac";/* 4 bytes */ - tSCC skip[] = "skip"; /* 4 bytes */ - tSCC run[] = "run"; /* 3 bytes */ - /* total bytes to add to machine sum: 49 - see fixincl.tpl */ - - const char **papz_machs = p_fixd->papz_machs; - char *pz; - const char *pz_sep = ""; - tCC *pz_if_true; - tCC *pz_if_false; - char cmd_buf[ MACH_LIST_SIZE_LIMIT ]; /* size lim from fixincl.tpl */ - - /* Start the case statement */ - - sprintf (cmd_buf, case_fmt, pz_machine); - pz = cmd_buf + strlen (cmd_buf); - - /* Determine if a match means to apply the fix or not apply it */ - - if (p_fixd->fd_flags & FD_MACH_IFNOT) - { - pz_if_true = skip; - pz_if_false = run; - } - else - { - pz_if_true = run; - pz_if_false = skip; - } - - /* Emit all the machine names. If there are more than one, - then we will insert " | \\\n" between the names */ - - for (;;) - { - const char* pz_mach = *(papz_machs++); - - if (pz_mach == (const char*) NULL) - break; - sprintf (pz, "%s%s", pz_sep, pz_mach); - pz += strlen (pz); - pz_sep = " | \\\n"; - } - - /* Now emit the match and not-match actions and the esac */ - - sprintf (pz, esac_fmt, pz_if_true, pz_if_false); - - /* Run the script. - The result will start either with 's' or 'r'. */ - - { - int skip; - pz = run_shell (cmd_buf); - skip = (*pz == 's'); - free ( (void*)pz ); - if (skip) - { - p_fixd->fd_flags |= FD_SKIP_TEST; - return BOOL_FALSE; - } - } - - return BOOL_TRUE; -# else /* is SEPARATE_FIX_PROC */ - const char **papz_machs = p_fixd->papz_machs; - int invert = (p_fixd->fd_flags & FD_MACH_IFNOT) != 0; - for (;;) - { - const char* pz_mach = *(papz_machs++); - - if (pz_mach == (const char*) NULL) - break; - if (strstr (pz_mach, "dos") != NULL && !invert) - return BOOL_TRUE; - } - - p_fixd->fd_flags |= FD_SKIP_TEST; - return BOOL_FALSE; -# endif -} - -/* * * * * * * * * * * * * - - run_compiles run all the regexp compiles for all the fixes once. - */ -void -run_compiles (void) -{ - tFixDesc *p_fixd = fixDescList; - int fix_ct = FIX_COUNT; - regex_t *p_re = xcalloc (REGEX_COUNT, sizeof (regex_t)); - - /* Make sure compile_re does not stumble across invalid data */ - - memset (&incl_quote_re, '\0', sizeof (regex_t)); - - compile_re (incl_quote_pat, &incl_quote_re, 1, - "quoted include", "run_compiles"); - - /* Allow machine name tests to be ignored (testing, mainly) */ - - if (pz_machine && ((*pz_machine == '\0') || (*pz_machine == '*'))) - pz_machine = (char*)NULL; - - /* FOR every fixup, ... */ - do - { - tTestDesc *p_test = p_fixd->p_test_desc; - int 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 - THEN ... */ - - if ( (pz_machine != NULL) - && (p_fixd->papz_machs != (const char**) NULL) - && ! machine_matches (p_fixd) ) - continue; - - /* FOR every test for the fixup, ... */ - - while (--test_ct >= 0) - { - switch (p_test->type) - { - case TT_EGREP: - case TT_NEGREP: - p_test->p_test_regex = p_re++; - compile_re (p_test->pz_test_text, p_test->p_test_regex, 0, - "select test", p_fixd->fix_name); - default: break; - } - p_test++; - } - } - while (p_fixd++, --fix_ct > 0); -} - - -/* * * * * * * * * * * * * - - create_file Create the output modified file. - Input: the name of the file to create - Returns: a file pointer to the new, open file */ - -#if defined(S_IRUSR) && defined(S_IWUSR) && \ - defined(S_IRGRP) && defined(S_IROTH) - -# define S_IRALL (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) -#else -# define S_IRALL 0644 -#endif - -#if defined(S_IRWXU) && defined(S_IRGRP) && defined(S_IXGRP) && \ - defined(S_IROTH) && defined(S_IXOTH) - -# define S_DIRALL (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) -#else -# define S_DIRALL 0755 -#endif - - -static FILE * -create_file (void) -{ - int fd; - FILE *pf; - char fname[MAXPATHLEN]; - - sprintf (fname, "%s/%s", pz_dest_dir, pz_curr_file + find_base_len); - - fd = open (fname, O_WRONLY | O_CREAT | O_TRUNC, S_IRALL); - - /* We may need to create the directories needed... */ - if ((fd < 0) && (errno == ENOENT)) - { - char *pz_dir = strchr (fname + 1, '/'); - struct stat stbf; - - while (pz_dir != (char *) NULL) - { - *pz_dir = NUL; - if (stat (fname, &stbf) < 0) - { - mkdir (fname, S_IFDIR | S_DIRALL); - } - - *pz_dir = '/'; - pz_dir = strchr (pz_dir + 1, '/'); - } - - /* Now, lets try the open again... */ - fd = open (fname, O_WRONLY | O_CREAT | O_TRUNC, S_IRALL); - } - if (fd < 0) - { - fprintf (stderr, "Error %d (%s) creating %s\n", - errno, xstrerror (errno), fname); - exit (EXIT_FAILURE); - } - if (NOT_SILENT) - fprintf (stderr, "Fixed: %s\n", pz_curr_file); - pf = fdopen (fd, "w"); - - /* - * IF pz_machine is NULL, then we are in some sort of test mode. - * Do not insert the current directory name. Use a constant string. - */ - fprintf (pf, z_std_preamble, - (pz_machine == NULL) - ? "fixinc/tests/inc" - : pz_input_dir, - pz_curr_file); - - return pf; -} - - -/* * * * * * * * * * * * * - - test_test make sure a shell-style test expression passes. - Input: a pointer to the descriptor of the test to run and - the name of the file that we might want to fix - Result: APPLY_FIX or SKIP_FIX, depending on the result of the - shell script we run. */ -#ifndef SEPARATE_FIX_PROC -static int -test_test (tTestDesc* p_test, char* pz_test_file) -{ - tSCC cmd_fmt[] = -"file=%s\n\ -if ( test %s ) > /dev/null 2>&1\n\ -then echo TRUE\n\ -else echo FALSE\n\ -fi"; - - char *pz_res; - int res; - - static char cmd_buf[4096]; - - sprintf (cmd_buf, cmd_fmt, pz_test_file, p_test->pz_test_text); - pz_res = run_shell (cmd_buf); - - switch (*pz_res) { - case 'T': - res = APPLY_FIX; - break; - - case 'F': - res = SKIP_FIX; - break; - - default: - fprintf (stderr, "Script yielded bogus result of `%s':\n%s\n\n", - pz_res, cmd_buf ); - res = SKIP_FIX; - } - - free ((void *) pz_res); - return res; -} -#else -/* - * IF we are in MS-DOS land, then whatever shell-type test is required - * will, by definition, fail - */ -#define test_test(t,tf) SKIP_FIX -#endif - -/* * * * * * * * * * * * * - - egrep_test make sure an egrep expression is found in the file text. - Input: a pointer to the descriptor of the test to run and - the pointer to the contents of the file under suspicion - Result: APPLY_FIX if the pattern is found, SKIP_FIX otherwise - - The caller may choose to reverse meaning if the sense of the test - is inverted. */ - -static int -egrep_test (char* pz_data, tTestDesc* p_test) -{ -#ifdef DEBUG - if (p_test->p_test_regex == 0) - fprintf (stderr, "fixincl ERROR RE not compiled: `%s'\n", - p_test->pz_test_text); -#endif - if (xregexec (p_test->p_test_regex, pz_data, 0, 0, 0) == 0) - return APPLY_FIX; - return SKIP_FIX; -} - - -/* * * * * * * * * * * * * - - quoted_file_exists Make sure that a file exists before we emit - the file name. If we emit the name, our invoking shell will try - to copy a non-existing file into the destination directory. */ - -static int -quoted_file_exists (const char* pz_src_path, - const char* pz_file_path, - const char* pz_file) -{ - char z[ MAXPATHLEN ]; - char* pz; - sprintf (z, "%s/%s/", pz_src_path, pz_file_path); - pz = z + strlen ( z ); - - for (;;) { - char ch = *pz_file++; - if (! ISGRAPH( ch )) - return 0; - if (ch == '"') - break; - *pz++ = ch; - } - *pz = '\0'; - { - struct stat s; - if (stat (z, &s) != 0) - return 0; - return S_ISREG( s.st_mode ); - } -} - - -/* * * * * * * * * * * * * - * - extract_quoted_files - - The syntax, `#include "file.h"' specifies that the compiler is to - search the local directory of the current file before the include - list. Consequently, if we have modified a header and stored it in - another directory, any files that are included by that modified - file in that fashion must also be copied into this new directory. - This routine finds those flavors of #include and for each one found - emits a triple of: - - 1. source directory of the original file - 2. the relative path file name of the #includ-ed file - 3. the full destination path for this file - - Input: the text of the file, the file name and a pointer to the - match list where the match information was stored. - Result: internally nothing. The results are written to stdout - for interpretation by the invoking shell */ - - -static void -extract_quoted_files (char* pz_data, - const char* pz_fixed_file, - regmatch_t* p_re_match) -{ - char *pz_dir_end = strrchr (pz_fixed_file, '/'); - char *pz_incl_quot = pz_data; - - if (VLEVEL( VERB_APPLIES )) - fprintf (stderr, "Quoted includes in %s\n", pz_fixed_file); - - /* Set "pz_fixed_file" to point to the containing subdirectory of the source - If there is none, then it is in our current directory, ".". */ - - if (pz_dir_end == (char *) NULL) - pz_fixed_file = "."; - else - *pz_dir_end = '\0'; - - for (;;) - { - pz_incl_quot += p_re_match->rm_so; - - /* Skip forward to the included file name */ - while (*pz_incl_quot != '"') - pz_incl_quot++; - - if (quoted_file_exists (pz_src_dir, pz_fixed_file, pz_incl_quot)) - { - /* Print the source directory and the subdirectory - of the file in question. */ - printf ("%s %s/", pz_src_dir, pz_fixed_file); - pz_dir_end = pz_incl_quot; - - /* Append to the directory the relative path of the desired file */ - while (*pz_incl_quot != '"') - putc (*pz_incl_quot++, stdout); - - /* Now print the destination directory appended with the - relative path of the desired file */ - printf (" %s/%s/", pz_dest_dir, pz_fixed_file); - while (*pz_dir_end != '"') - putc (*pz_dir_end++, stdout); - - /* End of entry */ - putc ('\n', stdout); - } - - /* Find the next entry */ - if (xregexec (&incl_quote_re, pz_incl_quot, 1, p_re_match, 0) != 0) - break; - } -} - - -/* * * * * * * * * * * * * - - Somebody wrote a *_fix subroutine that we must call. - */ -#ifndef SEPARATE_FIX_PROC -static int -internal_fix (int read_fd, tFixDesc* p_fixd) -{ - int fd[2]; - - if (pipe( fd ) != 0) - { - fprintf (stderr, "Error %d on pipe(2) call\n", errno ); - exit (EXIT_FAILURE); - } - - for (;;) - { - pid_t childid = fork(); - - switch (childid) - { - case -1: - break; - - case 0: - close (fd[0]); - goto do_child_task; - - default: - /* - * Parent process - */ - close (read_fd); - close (fd[1]); - return fd[0]; - } - - /* - * Parent in error - */ - fprintf (stderr, z_fork_err, errno, xstrerror (errno), - p_fixd->fix_name); - { - static int failCt = 0; - if ((errno != EAGAIN) || (++failCt > 10)) - exit (EXIT_FAILURE); - sleep (1); - } - } do_child_task:; - - /* - * Close our current stdin and stdout - */ - close (STDIN_FILENO); - close (STDOUT_FILENO); - UNLOAD_DATA(); - - /* - * Make the fd passed in the stdin, and the write end of - * the new pipe become the stdout. - */ - fcntl (fd[1], F_DUPFD, STDOUT_FILENO); - fcntl (read_fd, F_DUPFD, STDIN_FILENO); - - apply_fix (p_fixd, pz_curr_file); - exit (0); -} -#endif /* !SEPARATE_FIX_PROC */ - - -#ifdef SEPARATE_FIX_PROC -static void -fix_with_system (tFixDesc* p_fixd, - tCC* pz_fix_file, - tCC* pz_file_source, - tCC* pz_temp_file) -{ - char* pz_cmd; - char* pz_scan; - size_t argsize; - - if (p_fixd->fd_flags & FD_SUBROUTINE) - { - tSCC z_applyfix_prog[] = "/fixinc/applyfix"; - - argsize = 32 - + strlen( pz_orig_dir ) - + sizeof( z_applyfix_prog ) - + strlen( pz_fix_file ) - + strlen( pz_file_source ) - + strlen( pz_temp_file ); - - pz_cmd = xmalloc (argsize); - - strcpy( pz_cmd, pz_orig_dir ); - pz_scan = pz_cmd + strlen( pz_orig_dir ); - strcpy( pz_scan, z_applyfix_prog ); - pz_scan += sizeof( z_applyfix_prog ) - 1; - *(pz_scan++) = ' '; - - /* - * Now add the fix number and file names that may be needed - */ - sprintf (pz_scan, "%ld \'%s\' \'%s\' \'%s\'", p_fixd - fixDescList, - pz_fix_file, pz_file_source, pz_temp_file); - } - else /* NOT an "internal" fix: */ - { - size_t parg_size; -#ifdef __MSDOS__ - /* Don't use the "src > dstX; rm -f dst; mv -f dstX dst" trick: - dst is a temporary file anyway, so we know there's no other - file by that name; and DOS's system(3) doesn't mind to - clobber existing file in redirection. Besides, with DOS 8+3 - limited file namespace, we can easily lose if dst already has - an extension that is 3 or more characters long. - - I do not think the 8+3 issue is relevant because all the files - we operate on are named "*.h", making 8+2 adequate. Anyway, - the following bizarre use of 'cat' only works on DOS boxes. - It causes the file to be dropped into a temporary file for - 'cat' to read (pipes do not work on DOS). */ - tSCC z_cmd_fmt[] = " \'%s\' | cat > \'%s\'"; -#else - /* Don't use positional formatting arguments because some lame-o - implementations cannot cope :-(. */ - tSCC z_cmd_fmt[] = " %s > %sX ; rm -f %s; mv -f %sX %s"; -#endif - tCC** ppArgs = p_fixd->patch_args; - - argsize = sizeof( z_cmd_fmt ) + strlen( pz_temp_file ) - + strlen( pz_file_source ); - parg_size = argsize; - - - /* - * Compute the size of the command line. Add lotsa extra space - * because some of the args to sed use lotsa single quotes. - * (This requires three extra bytes per quote. Here we allow - * for up to 8 single quotes for each argument, including the - * command name "sed" itself. Nobody will *ever* need more. :) - */ - for (;;) - { - tCC* p_arg = *(ppArgs++); - if (p_arg == NULL) - break; - argsize += 24 + strlen( p_arg ); - } - - /* Estimated buffer size we will need. */ - pz_scan = pz_cmd = xmalloc (argsize); - /* How much of it do we allot to the program name and its - arguments. */ - parg_size = argsize - parg_size; - - ppArgs = p_fixd->patch_args; - - /* - * Copy the program name, unquoted - */ - { - tCC* pArg = *(ppArgs++); - for (;;) - { - char ch = *(pArg++); - if (ch == NUL) - break; - *(pz_scan++) = ch; - } - } - - /* - * Copy the program arguments, quoted - */ - for (;;) - { - tCC* pArg = *(ppArgs++); - char* pz_scan_save; - if (pArg == NULL) - break; - *(pz_scan++) = ' '; - pz_scan = make_raw_shell_str( pz_scan_save = pz_scan, pArg, - parg_size - (pz_scan - pz_cmd) ); - /* - * Make sure we don't overflow the buffer due to sloppy - * size estimation. - */ - while (pz_scan == (char*)NULL) - { - size_t already_filled = pz_scan_save - pz_cmd; - pz_cmd = xrealloc (pz_cmd, argsize += 100); - pz_scan_save = pz_scan = pz_cmd + already_filled; - parg_size += 100; - pz_scan = make_raw_shell_str( pz_scan, pArg, - parg_size - (pz_scan - pz_cmd) ); - } - } - - /* - * add the file machinations. - */ -#ifdef __MSDOS__ - sprintf (pz_scan, z_cmd_fmt, pz_file_source, pz_temp_file ); -#else - sprintf (pz_scan, z_cmd_fmt, pz_file_source, pz_temp_file, - pz_temp_file, pz_temp_file, pz_temp_file); -#endif - } - system( pz_cmd ); - free( (void*)pz_cmd ); -} - -/* * * * * * * * * * * * * - - This loop should only cycle for 1/2 of one loop. - "chain_open" starts a process that uses "read_fd" as - its stdin and returns the new fd this process will use - for stdout. */ - -#else /* is *NOT* SEPARATE_FIX_PROC */ -static int -start_fixer (int read_fd, tFixDesc* p_fixd, char* pz_fix_file) -{ - tCC* pz_cmd_save; - char* pz_cmd; - - if ((p_fixd->fd_flags & FD_SUBROUTINE) != 0) - return internal_fix (read_fd, p_fixd); - - if ((p_fixd->fd_flags & FD_SHELL_SCRIPT) == 0) - { - pz_cmd = NULL; - pz_cmd_save = NULL; - } - else - { - tSCC z_cmd_fmt[] = "file='%s'\n%s"; - pz_cmd = xmalloc (strlen (p_fixd->patch_args[2]) - + sizeof (z_cmd_fmt) + strlen (pz_fix_file)); - sprintf (pz_cmd, z_cmd_fmt, pz_fix_file, p_fixd->patch_args[2]); - pz_cmd_save = p_fixd->patch_args[2]; - p_fixd->patch_args[2] = pz_cmd; - } - - /* Start a fix process, handing off the previous read fd for its - stdin and getting a new fd that reads from the fix process' stdout. - We normally will not loop, but we will up to 10 times if we keep - getting "EAGAIN" errors. - - */ - for (;;) - { - static int failCt = 0; - int fd; - - fd = chain_open (read_fd, - (tCC **) p_fixd->patch_args, - (process_chain_head == -1) - ? &process_chain_head : (pid_t *) NULL); - - if (fd != -1) - { - read_fd = fd; - break; - } - - fprintf (stderr, z_fork_err, errno, xstrerror (errno), - p_fixd->fix_name); - - if ((errno != EAGAIN) || (++failCt > 10)) - exit (EXIT_FAILURE); - sleep (1); - } - - /* IF we allocated a shell script command, - THEN free it and restore the command format to the fix description */ - if (pz_cmd != (char*)NULL) - { - free ((void*)pz_cmd); - p_fixd->patch_args[2] = pz_cmd_save; - } - - return read_fd; -} -#endif - - -/* * * * * * * * * * * * * - - Process the potential fixes for a particular include file. - Input: the original text of the file and the file's name - Result: none. A new file may or may not be created. */ - -static t_bool -fix_applies (tFixDesc* p_fixd) -{ - const char *pz_fname = pz_curr_file; - const char *pz_scan = p_fixd->file_list; - int test_ct; - tTestDesc *p_test; - -# ifdef SEPARATE_FIX_PROC - /* - * There is only one fix that uses a shell script as of this writing. - * I hope to nuke it anyway, it does not apply to DOS and it would - * be painful to implement. Therefore, no "shell" fixes for DOS. - */ - if (p_fixd->fd_flags & (FD_SHELL_SCRIPT | FD_SKIP_TEST)) - return BOOL_FALSE; -# else - if (p_fixd->fd_flags & FD_SKIP_TEST) - return BOOL_FALSE; -# endif - - /* IF there is a file name restriction, - THEN ensure the current file name matches one in the pattern */ - - if (pz_scan != (char *) NULL) - { - size_t name_len; - - while ((pz_fname[0] == '.') && (pz_fname[1] == '/')) - pz_fname += 2; - name_len = strlen (pz_fname); - - for (;;) - { - pz_scan = strstr (pz_scan + 1, pz_fname); - /* IF we can't match the string at all, - THEN bail */ - if (pz_scan == (char *) NULL) - return BOOL_FALSE; - - /* IF the match is surrounded by the '|' markers, - THEN we found a full match -- time to run the tests */ - - if ((pz_scan[-1] == '|') && (pz_scan[name_len] == '|')) - break; - } - } - - /* FOR each test, see if it fails. - IF it does fail, then we go on to the next test */ - - for (p_test = p_fixd->p_test_desc, test_ct = p_fixd->test_ct; - test_ct-- > 0; - p_test++) - { - switch (p_test->type) - { - case TT_TEST: - if (test_test (p_test, pz_curr_file) != APPLY_FIX) { -#ifdef DEBUG - if (VLEVEL( VERB_EVERYTHING )) - fprintf (stderr, z_failed, "TEST", p_fixd->fix_name, - pz_fname, p_fixd->test_ct - test_ct); -#endif - return BOOL_FALSE; - } - break; - - case TT_EGREP: - if (egrep_test (pz_curr_data, p_test) != APPLY_FIX) { -#ifdef DEBUG - if (VLEVEL( VERB_EVERYTHING )) - fprintf (stderr, z_failed, "EGREP", p_fixd->fix_name, - pz_fname, p_fixd->test_ct - test_ct); -#endif - return BOOL_FALSE; - } - break; - - case TT_NEGREP: - if (egrep_test (pz_curr_data, p_test) == APPLY_FIX) { -#ifdef DEBUG - if (VLEVEL( VERB_EVERYTHING )) - fprintf (stderr, z_failed, "NEGREP", p_fixd->fix_name, - pz_fname, p_fixd->test_ct - test_ct); -#endif - /* Negated sense */ - return BOOL_FALSE; - } - break; - - case TT_FUNCTION: - if (run_test (p_test->pz_test_text, pz_curr_file, pz_curr_data) - != APPLY_FIX) { -#ifdef DEBUG - if (VLEVEL( VERB_EVERYTHING )) - fprintf (stderr, z_failed, "FTEST", p_fixd->fix_name, - pz_fname, p_fixd->test_ct - test_ct); -#endif - return BOOL_FALSE; - } - break; - } - } - - return BOOL_TRUE; -} - - -/* * * * * * * * * * * * * - - Write out a replacement file */ - -static void -write_replacement (tFixDesc* p_fixd) -{ - const char* pz_text = p_fixd->patch_args[0]; - - if ((pz_text == (char*)NULL) || (*pz_text == NUL)) - return; - - { - FILE* out_fp = create_file (); - fputs (pz_text, out_fp); - fclose (out_fp); - } -} - - -/* * * * * * * * * * * * * - - We have work to do. Read back in the output - of the filtering chain. Compare each byte as we read it with - the contents of the original file. As soon as we find any - difference, we will create the output file, write out all - the matched text and then copy any remaining data from the - output of the filter chain. - */ -static void -test_for_changes (int read_fd) -{ - FILE *in_fp = fdopen (read_fd, "r"); - FILE *out_fp = (FILE *) NULL; - unsigned char *pz_cmp = (unsigned char*)pz_curr_data; - -#ifdef DO_STATS - fixed_ct++; -#endif - for (;;) - { - int ch; - - ch = getc (in_fp); - if (ch == EOF) - break; - ch &= 0xFF; /* all bytes are 8 bits */ - - /* IF we are emitting the output - THEN emit this character, too. - */ - if (out_fp != (FILE *) NULL) - putc (ch, out_fp); - - /* ELSE if this character does not match the original, - THEN now is the time to start the output. - */ - else if (ch != *pz_cmp) - { - out_fp = create_file (); - -#ifdef DO_STATS - altered_ct++; -#endif - /* IF there are matched data, write the matched part now. */ - if ((char*)pz_cmp != pz_curr_data) - fwrite (pz_curr_data, (size_t)((char*)pz_cmp - pz_curr_data), - 1, out_fp); - - /* Emit the current unmatching character */ - putc (ch, out_fp); - } - else - /* ELSE the character matches. Advance the compare ptr */ - pz_cmp++; - } - - /* IF we created the output file, ... */ - if (out_fp != (FILE *) NULL) - { - regmatch_t match; - - /* Close the file and see if we have to worry about - `#include "file.h"' constructs. */ - fclose (out_fp); - if (xregexec (&incl_quote_re, pz_curr_data, 1, &match, 0) == 0) - extract_quoted_files (pz_curr_data, pz_curr_file, &match); - } - - fclose (in_fp); - close (read_fd); /* probably redundant, but I'm paranoid */ -} - - -/* * * * * * * * * * * * * - - Process the potential fixes for a particular include file. - Input: the original text of the file and the file's name - Result: none. A new file may or may not be created. */ - -void -process (void) -{ - tFixDesc *p_fixd = fixDescList; - int todo_ct = FIX_COUNT; - int read_fd = -1; -# ifndef SEPARATE_FIX_PROC - int num_children = 0; -# else /* is SEPARATE_FIX_PROC */ - char* pz_file_source = pz_curr_file; -# endif - - if (access (pz_curr_file, R_OK) != 0) - { - int erno = errno; - fprintf (stderr, "Cannot access %s from %s\n\terror %d (%s)\n", - pz_curr_file, getcwd ((char *) NULL, MAXPATHLEN), - erno, xstrerror (erno)); - return; - } - - pz_curr_data = load_file (pz_curr_file); - if (pz_curr_data == (char *) NULL) - return; - -#ifdef DO_STATS - process_ct++; -#endif - if (VLEVEL( VERB_PROGRESS ) && have_tty) - fprintf (stderr, "%6lu %-50s \r", - (unsigned long) data_map_size, pz_curr_file); - -# ifndef SEPARATE_FIX_PROC - process_chain_head = NOPROCESS; - - /* For every fix in our fix list, ... */ - for (; todo_ct > 0; p_fixd++, todo_ct--) - { - if (! fix_applies (p_fixd)) - continue; - - if (VLEVEL( VERB_APPLIES )) - fprintf (stderr, "Applying %-24s to %s\n", - p_fixd->fix_name, pz_curr_file); - - if (p_fixd->fd_flags & FD_REPLACEMENT) - { - write_replacement (p_fixd); - UNLOAD_DATA(); - return; - } - - /* IF we do not have a read pointer, - THEN this is the first fix for the current file. - Open the source file. That will be used as stdin for - the first fix. Any subsequent fixes will use the - stdout descriptor of the previous fix for its stdin. */ - - if (read_fd == -1) - { - read_fd = open (pz_curr_file, O_RDONLY); - if (read_fd < 0) - { - fprintf (stderr, "Error %d (%s) opening %s\n", errno, - xstrerror (errno), pz_curr_file); - exit (EXIT_FAILURE); - } - - /* Ensure we do not get duplicate output */ - - fflush (stdout); - } - - read_fd = start_fixer (read_fd, p_fixd, pz_curr_file); - num_children++; - } - - /* IF we have a read-back file descriptor, - THEN check for changes and write output if changed. */ - - if (read_fd >= 0) - { - test_for_changes (read_fd); -#ifdef DO_STATS - apply_ct += num_children; -#endif - /* Wait for child processes created by chain_open() - to avoid leaving zombies. */ - do { - wait ((int *) NULL); - } while (--num_children > 0); - } - -# else /* is SEPARATE_FIX_PROC */ - - for (; todo_ct > 0; p_fixd++, todo_ct--) - { - if (! fix_applies (p_fixd)) - continue; - - if (VLEVEL( VERB_APPLIES )) - fprintf (stderr, "Applying %-24s to %s\n", - p_fixd->fix_name, pz_curr_file); - - if (p_fixd->fd_flags & FD_REPLACEMENT) - { - write_replacement (p_fixd); - UNLOAD_DATA(); - return; - } - fix_with_system (p_fixd, pz_curr_file, pz_file_source, pz_temp_file); - pz_file_source = pz_temp_file; - } - - read_fd = open (pz_temp_file, O_RDONLY); - if (read_fd < 0) - { - if (errno != ENOENT) - fprintf (stderr, "error %d (%s) opening output (%s) for read\n", - errno, xstrerror (errno), pz_temp_file); - } - else - { - test_for_changes (read_fd); - /* Unlinking a file while it is still open is a Bad Idea on - DOS/Windows. */ - close (read_fd); - unlink (pz_temp_file); - } - -# endif - UNLOAD_DATA(); -} diff --git a/gcc/fixinc/fixincl.tpl b/gcc/fixinc/fixincl.tpl deleted file mode 100644 index 420b11d..0000000 --- a/gcc/fixinc/fixincl.tpl +++ /dev/null @@ -1,220 +0,0 @@ -[= AutoGen5 Template -*- Mode: C -*- -x=fixincl.x =] -[= (dne " * " "/* ")=] - */ -/* DO NOT CVS-MERGE THIS FILE, EITHER [=`date`=] - * - * You must regenerate it. Use the ./genfixes script. - * - * - * This is part of the fixincl program used to install modified versions of - * 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 [=(count "fix")=] fixup descriptions. - * - * See README for more information. - * - * inclhack copyright (c) 1998, 1999, 2000, 2001 - * The Free Software Foundation, Inc. - * - [=(define re-ct 0) (define max-mach 0) (define ct 0) - (define HACK "") (define Hack "") (define tmp "") - (gpl "inclhack" " * ")=] - */ -[= - -FOR fix =] -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of [= - (set! Hack (string-capitalize! (get "hackname"))) - (set! HACK (string-upcase! (get "hackname"))) - (if (and (not (exist? "test_text")) (not (exist? "replace"))) - (error (sprintf "include fix '%s' has no test text" Hack )) ) - (. Hack)=] fix - */[= - -# Note that this is not just for debugging purposes, but in case - some C fix wishes to refer to the regexps it is paired with. - See commentary at the top of fixfixes.c. -=] -tSCC z[=(. Hack)=]Name[] = - "[=hackname=]"; - -/* - * File name selection pattern - */[= - - IF (exist? "files")=] -tSCC z[=(. Hack)=]List[] = - "[=FOR files =]|[=files=][=ENDFOR=]|";[= - - ELSE =] -#define z[=(. Hack)=]List (char*)NULL[= - ENDIF (exist? "files") =] -/* - * Machine/OS name selection pattern - */[= - - IF (exist? "mach")=] -tSCC* apz[=(. Hack)=]Machs[] = {[= - (set! ct 0) =][= - - FOR mach =] - [= - (set! tmp (get "mach")) - (set! ct (+ ct (string-length tmp) 5)) - (kr-string tmp)=],[= - ENDFOR=] - (const char*)NULL };[= - - (if (> ct max-mach) (set! max-mach ct)) =][= - - ELSE =] -#define apz[=(. Hack)=]Machs (const char**)NULL[= - ENDIF (exist? "files") =][= - - IF (exist? "select")=] - -/* - * content selection pattern - do fix if pattern found - */[= - FOR select =] -tSCC z[=(. Hack)=]Select[=(for-index)=][] = - [=(kr-string (get "select"))=];[= - ENDFOR select =][= - ENDIF =][= - - IF (exist? "bypass")=] - -/* - * content bypass pattern - skip fix if pattern found - */[= - FOR bypass =] -tSCC z[=(. Hack)=]Bypass[=(for-index)=][] = - [=(kr-string (get "bypass"))=];[= - ENDFOR bypass =][= - ENDIF =][= - - IF (exist? "test")=] - -/* - * perform the 'test' shell command - do fix on success - */[= - FOR test =] -tSCC z[=(. Hack)=]Test[=(for-index)=][] = - [=(kr-string (get "test"))=];[= - ENDFOR =][= - ENDIF =][= - - IF (exist? "c_test")=] - -/* - * perform the C function call test - */[= - FOR c_test =] -tSCC z[=(. Hack)=]FTst[=(for-index)=][] = "[=c_test=]";[= - ENDFOR c_test =][= - ENDIF =][= - - IF (set! ct (+ (count "select") (count "bypass") - (count "test") (count "c_test"))) - - (= ct 0) -=] -#define [=(. HACK)=]_TEST_CT 0 -#define a[=(. Hack)=]Tests (tTestDesc*)NULL[= - ELSE =] - -#define [=(. HACK)=]_TEST_CT [=(. ct)=][= - (set! re-ct (+ re-ct (count "select") (count "bypass"))) =] -static tTestDesc a[=(. Hack)=]Tests[] = {[= - - FOR test =] - { TT_TEST, z[=(. Hack)=]Test[=(for-index)=], 0 /* unused */ },[= - ENDFOR test =][= - - FOR c_test =] - { TT_FUNCTION, z[=(. Hack)=]FTst[=(for-index)=], 0 /* unused */ },[= - ENDFOR c_test =][= - - FOR bypass =] - { TT_NEGREP, z[=(. Hack)=]Bypass[=(for-index)=], (regex_t*)NULL },[= - ENDFOR bypass =][= - - FOR select =] - { TT_EGREP, z[=(. Hack)=]Select[=(for-index)=], (regex_t*)NULL },[= - ENDFOR select =] };[= - ENDIF =] - -/* - * Fix Command Arguments for [=(. Hack)=] - */ -static const char* apz[=(. Hack)=]Patch[] = {[= - IF (exist? "sed")=] "sed"[= - FOR sed=], - "-e", [=(kr-string (get "sed"))=][= - ENDFOR sed=],[= - - ELIF (exist? "shell")=] "sh", "-c", - [=(kr-string (get "shell"))=],[= - - ELIF (exist? "c_fix")=] - [=(kr-string (get "c_fix"))=],[= - - FOR c_fix_arg =] - [=(kr-string (get "c_fix_arg"))=],[= - ENDFOR c_fix_arg =][= - - ELIF (> (len "replace") 0) =] -[=(kr-string (get "replace"))=],[= - - ENDIF=] - (char*)NULL }; -[=ENDFOR fix=] - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * List of all fixes - */[= -# as of this writing, 49 bytes are needed by the case statement format. - We also must allow for the size of the target machine machine name. - This allows for a 79 byte machine name. Better be enough. -=] -#define REGEX_COUNT [= (. re-ct) =] -#define MACH_LIST_SIZE_LIMIT [= (+ 128 max-mach) =] -#define FIX_COUNT [= (count "fix") =] - -/* - * Enumerate the fixes[= # in a way that minimizes diffs :-) =] - */ -typedef enum {[= - -FOR fix "," =] - [=(string-upcase! (get "hackname"))=]_FIXIDX[= -ENDFOR - -=] -} t_fixinc_idx; - -tFixDesc fixDescList[ FIX_COUNT ] = {[= - - -FOR fix ",\n" =][= - (set! Hack (string-capitalize! (get "hackname"))) - (set! HACK (string-upcase! (get "hackname"))) =] - { z[=(. Hack)=]Name, z[=(. Hack)=]List, - apz[=(. Hack)=]Machs, - [=(. HACK)=]_TEST_CT, [= - IF (exist? "not_machine") =]FD_MACH_IFNOT[= - ELSE =]FD_MACH_ONLY[= - ENDIF =][= - IF (exist? "shell") =] | FD_SHELL_SCRIPT[= - ELIF (exist? "c_fix") =] | FD_SUBROUTINE[= - ELIF (exist? "replace") =] | FD_REPLACEMENT[= - ENDIF =], - a[=(. Hack)=]Tests, apz[=(. Hack)=]Patch, 0 }[= - -ENDFOR =] -}; diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x deleted file mode 100644 index d309cfa..0000000 --- a/gcc/fixinc/fixincl.x +++ /dev/null @@ -1,8093 +0,0 @@ -/* -*- buffer-read-only: t -*- vi: set ro: - * - * DO NOT EDIT THIS FILE (fixincl.x) - * - * It has been AutoGen-ed Saturday August 14, 2004 at 05:48:43 PM EDT - * From the definitions inclhack.def - * and the template file fixincl - */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Aug 14 17:48:43 EDT 2004 - * - * You must regenerate it. Use the ./genfixes script. - * - * - * This is part of the fixincl program used to install modified versions of - * 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 177 fixup descriptions. - * - * See README for more information. - * - * inclhack copyright (c) 1998, 1999, 2000, 2001 - * The Free Software Foundation, Inc. - * - * inclhack is free software. - * - * You may redistribute it and/or modify it under the terms of the - * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. - * - * inclhack is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with inclhack. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix - */ -tSCC zAab_Fd_Zero_Asm_Posix_Types_HName[] = - "AAB_fd_zero_asm_posix_types_h"; - -/* - * File name selection pattern - */ -tSCC zAab_Fd_Zero_Asm_Posix_Types_HList[] = - "|asm/posix_types.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Fd_Zero_Asm_Posix_Types_HMachs[] = { - "i[34567]86-*-linux*", - (const char*)NULL }; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zAab_Fd_Zero_Asm_Posix_Types_HBypass0[] = - "} while"; - -#define AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT 1 -static tTestDesc aAab_Fd_Zero_Asm_Posix_Types_HTests[] = { - { TT_NEGREP, zAab_Fd_Zero_Asm_Posix_Types_HBypass0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aab_Fd_Zero_Asm_Posix_Types_H - */ -static const char* apzAab_Fd_Zero_Asm_Posix_Types_HPatch[] = { -"/* This file fixes a bug in the __FD_ZERO macro\n\ - for older versions of the Linux kernel. */\n\ -#ifndef _POSIX_TYPES_H_WRAPPER\n\ -#include <features.h>\n\ - #include_next <asm/posix_types.h>\n\n\ -#if defined(__FD_ZERO) && !defined(__GLIBC__)\n\ -#undef __FD_ZERO\n\ -#define __FD_ZERO(fdsetp) \\\n\ - do { \\\n\ - int __d0, __d1; \\\n\ -__asm__ __volatile__(\"cld ; rep ; stosl\" \\\n\ -: \"=&c\" (__d0), \"=&D\" (__d1) \\\n\ -: \"a\" (0), \"0\" (__FDSET_LONGS), \\\n\ - \"1\" ((__kernel_fd_set *) (fdsetp)) :\"memory\"); \\\n\ - } while (0)\n\ -#endif\n\n\ -#define _POSIX_TYPES_H_WRAPPER\n\ -#endif /* _POSIX_TYPES_H_WRAPPER */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Fd_Zero_Gnu_Types_H fix - */ -tSCC zAab_Fd_Zero_Gnu_Types_HName[] = - "AAB_fd_zero_gnu_types_h"; - -/* - * File name selection pattern - */ -tSCC zAab_Fd_Zero_Gnu_Types_HList[] = - "|gnu/types.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Fd_Zero_Gnu_Types_HMachs[] = { - "i[34567]86-*-linux*", - (const char*)NULL }; -#define AAB_FD_ZERO_GNU_TYPES_H_TEST_CT 0 -#define aAab_Fd_Zero_Gnu_Types_HTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Aab_Fd_Zero_Gnu_Types_H - */ -static const char* apzAab_Fd_Zero_Gnu_Types_HPatch[] = { -"/* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */\n\ -#ifndef _TYPES_H_WRAPPER\n\ -#include <features.h>\n\ -#include_next <gnu/types.h>\n\n\ -#if defined(__FD_ZERO) && !defined(__GLIBC__)\n\ -#undef __FD_ZERO\n\ -# define __FD_ZERO(fdsetp) \\\\\n\ - do { \\\\\n\ - int __d0, __d1; \\\\\n\ -__asm__ __volatile__(\"cld ; rep ; stosl\" \\\\\n\ - \t: \"=&c\" (__d0), \"=&D\" (__d1) \\\\\n\ - \t: \"a\" (0), \"0\" (__FDSET_LONGS), \\\\\n\ - \"1\" ((__fd_set *) (fdsetp)) :\"memory\"); \\\\\n\ - } while (0)\n\ -#endif\n\n\ -#define _TYPES_H_WRAPPER\n\ -#endif /* _TYPES_H_WRAPPER */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Fd_Zero_Selectbits_H fix - */ -tSCC zAab_Fd_Zero_Selectbits_HName[] = - "AAB_fd_zero_selectbits_h"; - -/* - * File name selection pattern - */ -tSCC zAab_Fd_Zero_Selectbits_HList[] = - "|selectbits.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Fd_Zero_Selectbits_HMachs[] = { - "i[34567]86-*-linux*", - (const char*)NULL }; -#define AAB_FD_ZERO_SELECTBITS_H_TEST_CT 0 -#define aAab_Fd_Zero_Selectbits_HTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Aab_Fd_Zero_Selectbits_H - */ -static const char* apzAab_Fd_Zero_Selectbits_HPatch[] = { -"/* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */\n\ -#ifndef _SELECTBITS_H_WRAPPER\n\ - #include <features.h>\n\ - #include_next <selectbits.h>\n\n\ - #if defined(__FD_ZERO) && defined(__GLIBC__) \\\\\n\ - && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\\\\n\ - && __GLIBC_MINOR__ == 0\n\ - #undef __FD_ZERO\n\ - #define __FD_ZERO(fdsetp) \\\\\n\ - do { \\\\\n\ - int __d0, __d1; \\\\\n\ - __asm__ __volatile__ (\"cld; rep; stosl\" \\\\\n\ - : \"=&c\" (__d0), \"=&D\" (__d1) \\\\\n\ - : \"a\" (0), \"0\" (sizeof (__fd_set) \\\\\n\ - / sizeof (__fd_mask)), \\\\\n\ - \"1\" ((__fd_mask *) (fdsetp)) \\\\\n\ - : \"memory\"); \\\\\n\ - } while (0)\n\ - #endif\n\n\ - #define _SELECTBITS_H_WRAPPER\n\ -#endif /* _SELECTBITS_H_WRAPPER */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Solaris_Sys_Varargs_H fix - */ -tSCC zAab_Solaris_Sys_Varargs_HName[] = - "AAB_solaris_sys_varargs_h"; - -/* - * File name selection pattern - */ -tSCC zAab_Solaris_Sys_Varargs_HList[] = - "|sys/varargs.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Solaris_Sys_Varargs_HMachs[] = { - "*-*-solaris*", - (const char*)NULL }; -#define AAB_SOLARIS_SYS_VARARGS_H_TEST_CT 0 -#define aAab_Solaris_Sys_Varargs_HTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Aab_Solaris_Sys_Varargs_H - */ -static const char* apzAab_Solaris_Sys_Varargs_HPatch[] = { -"#ifdef __STDC__\n\ - #include <stdarg.h>\n\ -#else\n\ - #include <varargs.h>\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Sun_Memcpy fix - */ -tSCC zAab_Sun_MemcpyName[] = - "AAB_sun_memcpy"; - -/* - * File name selection pattern - */ -tSCC zAab_Sun_MemcpyList[] = - "|memory.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAab_Sun_MemcpyMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAab_Sun_MemcpySelect0[] = - "/\\*\t@\\(#\\)(head/memory.h\t50.1\t |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2\t)\\*/"; - -#define AAB_SUN_MEMCPY_TEST_CT 1 -static tTestDesc aAab_Sun_MemcpyTests[] = { - { TT_EGREP, zAab_Sun_MemcpySelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aab_Sun_Memcpy - */ -static const char* apzAab_Sun_MemcpyPatch[] = { -"/* This file was generated by fixincludes */\n\ -#ifndef __memory_h__\n\ - #define __memory_h__\n\n\ - #ifdef __STDC__\n\ - extern void *memccpy();\n\ - extern void *memchr();\n\ - extern void *memcpy();\n\ - extern void *memset();\n\ - #else\n\ - extern char *memccpy();\n\ - extern char *memchr();\n\ - extern char *memcpy();\n\ - extern char *memset();\n\ - #endif /* __STDC__ */\n\n\ - extern int memcmp();\n\n\ -#endif /* __memory_h__ */\n\ -_EndOfHeader;\n\ -};\n\n\n\ -/*\n\ - * Completely replace <sys/varargs.h> with a file that includes gcc's\n\ - * stdarg.h or varargs.h files as appropriate.\n\ - */\n\ -#ifdef SVR4\n\ -fix = {\n\ - hackname = AAB_svr4_no_varargs;\n\ - files = sys/varargs.h;\n\ - replace = \"/* This file was generated by fixincludes. */\\n\"\n\ - \"#ifndef _SYS_VARARGS_H\\n\"\n\ - \"#define _SYS_VARARGS_H\\n\\n\"\n\n\ - \"#ifdef __STDC__\\n\"\n\ - \"#include <stdarg.h>\\n\"\n\ - \"#else\\n\"\n\ - \"#include <varargs.h>\\n\"\n\ - \"#endif\\n\\n\"\n\n\ - \"#endif /* _SYS_VARARGS_H */\\n\";\n\ -};\n\ -#endif\n\n\n\ -/*\n\ - * Completely replace <sys/byteorder.h> with a file that implements gcc's\n\ - * optimized byteswapping. (The original probably implemented some\n\ - * incompatible optimized byteswapping.)\n\ - */\n\ -fix = {\n\ - hackname = AAB_svr4_replace_byteorder;\n\ - mach = \"*-*-sysv4*\";\n\ - mach = \"i[34567]86-*-sysv5*\";\n\ - mach = \"i[34567]86-*-sco3.2v5*\";\n\ - mach = \"i[34567]86-*-udk*\";\n\ - mach = \"i[34567]86-*-solaris2.[0-4]\";\n\ - mach = \"powerpcle-*-solaris2.[0-4]\";\n\ - mach = \"sparc-*-solaris2.[0-4]\";\n\ - mach = \"i[34567]86-sequent-ptx*\";\n\ - files = sys/byteorder.h;\n\ - replace = <<- _EndOfHeader_\n\ -#ifndef _SYS_BYTEORDER_H\n\ -#define _SYS_BYTEORDER_H\n\n\ -/* Functions to convert `short' and `long' quantities from host byte order\n\ - to (internet) network byte order (i.e. big-endian).\n\n\ - Written by Ron Guilmette (rfg@ncd.com).\n\n\ - This isn't actually used by GCC. It is installed by fixinc.svr4.\n\n\ - For big-endian machines these functions are essentially no-ops.\n\n\ - For little-endian machines, we define the functions using specialized\n\ - asm sequences in cases where doing so yields better code (e.g. i386). */\n\n\ -#if !defined (__GNUC__) && !defined (__GNUG__)\n\ - #error You lose! This file is only useful with GNU compilers.\n\ -#endif\n\n\ -#ifndef __BYTE_ORDER__\n\ - /* Byte order defines. These are as defined on UnixWare 1.1, but with\n\ - double underscores added at the front and back. */\n\ - #define __LITTLE_ENDIAN__ 1234\n\ - #define __BIG_ENDIAN__ 4321\n\ - #define __PDP_ENDIAN__ 3412\n\ -#endif\n\n\ -#ifdef __STDC__\n\ - static __inline__ unsigned long htonl (unsigned long);\n\ - static __inline__ unsigned short htons (unsigned int);\n\ - static __inline__ unsigned long ntohl (unsigned long);\n\ - static __inline__ unsigned short ntohs (unsigned int);\n\ -#endif /* defined (__STDC__) */\n\n\ -#if defined (__i386__)\n\n\ - #ifndef __BYTE_ORDER__\n\ - #define __BYTE_ORDER__ __LITTLE_ENDIAN__\n\ - #endif\n\n\ - /* Convert a host long to a network long. */\n\n\ - /* We must use a new-style function definition, so that this will also\n\ - be valid for C++. */\n\ - static __inline__ unsigned long\n\ - htonl (unsigned long __arg)\n\ - {\n\ - register unsigned long __result;\n\n\ - __asm__ (\"xchg%B0 %b0,%h0\n\ - ror%L0 $16,%0\n\ - xchg%B0 %b0,%h0\" : \"=q\" (__result) : \"0\" (__arg));\n\ - return __result;\n\ - }\n\n\ - /* Convert a host short to a network short. */\n\n\ - static __inline__ unsigned short\n\ - htons (unsigned int __arg)\n\ - {\n\ - register unsigned short __result;\n\n\ - __asm__ (\"xchg%B0 %b0,%h0\" : \"=q\" (__result) : \"0\" (__arg));\n\ - return __result;\n\ - }\n\n\ -#elif (defined (__ns32k__) || defined (__vax__) || defined (__arm__))\n\n\ - #ifndef __BYTE_ORDER__\n\ - #define __BYTE_ORDER__ __LITTLE_ENDIAN__\n\ - #endif\n\n\ - /* For other little-endian machines, using C code is just as efficient as\n\ - using assembly code. */\n\n\ - /* Convert a host long to a network long. */\n\n\ - static __inline__ unsigned long\n\ - htonl (unsigned long __arg)\n\ - {\n\ - register unsigned long __result;\n\n\ - __result = (__arg >> 24) & 0x000000ff;\n\ - __result |= (__arg >> 8) & 0x0000ff00;\n\ - __result |= (__arg << 8) & 0x00ff0000;\n\ - __result |= (__arg << 24) & 0xff000000;\n\ - return __result;\n\ - }\n\n\ - /* Convert a host short to a network short. */\n\n\ - static __inline__ unsigned short\n\ - htons (unsigned int __arg)\n\ - {\n\ - register unsigned short __result;\n\n\ - __result = (__arg << 8) & 0xff00;\n\ - __result |= (__arg >> 8) & 0x00ff;\n\ - return __result;\n\ - }\n\n\ -#else /* must be a big-endian machine */\n\n\ - #ifndef __BYTE_ORDER__\n\ - #define __BYTE_ORDER__ __BIG_ENDIAN__\n\ - #endif\n\n\ - /* Convert a host long to a network long. */\n\n\ - static __inline__ unsigned long\n\ - htonl (unsigned long __arg)\n\ - {\n\ - return __arg;\n\ - }\n\n\ - /* Convert a host short to a network short. */\n\n\ - static __inline__ unsigned short\n\ - htons (unsigned int __arg)\n\ - {\n\ - return __arg;\n\ - }\n\n\ -#endif /* big-endian */\n\n\ -/* Convert a network long to a host long. */\n\n\ -static __inline__ unsigned long\n\ -ntohl (unsigned long __arg)\n\ -{\n\ - return htonl (__arg);\n\ -}\n\n\ -/* Convert a network short to a host short. */\n\n\ -static __inline__ unsigned short\n\ -ntohs (unsigned int __arg)\n\ -{\n\ - return htons (__arg);\n\ -}\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Ultrix_Ansi_Compat fix - */ -tSCC zAab_Ultrix_Ansi_CompatName[] = - "AAB_ultrix_ansi_compat"; - -/* - * File name selection pattern - */ -tSCC zAab_Ultrix_Ansi_CompatList[] = - "|ansi_compat.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAab_Ultrix_Ansi_CompatMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAab_Ultrix_Ansi_CompatSelect0[] = - "ULTRIX"; - -#define AAB_ULTRIX_ANSI_COMPAT_TEST_CT 1 -static tTestDesc aAab_Ultrix_Ansi_CompatTests[] = { - { TT_EGREP, zAab_Ultrix_Ansi_CompatSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aab_Ultrix_Ansi_Compat - */ -static const char* apzAab_Ultrix_Ansi_CompatPatch[] = { -"/* This file intentionally left blank. */\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Ultrix_Limits fix - */ -tSCC zAab_Ultrix_LimitsName[] = - "AAB_ultrix_limits"; - -/* - * File name selection pattern - */ -tSCC zAab_Ultrix_LimitsList[] = - "|limits.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Ultrix_LimitsMachs[] = { - "*-*-ultrix4.3", - (const char*)NULL }; -#define AAB_ULTRIX_LIMITS_TEST_CT 0 -#define aAab_Ultrix_LimitsTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Aab_Ultrix_Limits - */ -static const char* apzAab_Ultrix_LimitsPatch[] = { -"#ifndef _LIMITS_INCLUDED\n\ - #define _LIMITS_INCLUDED\n\ - #include <sys/limits.h>\n\ -#endif /* _LIMITS_INCLUDED */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Ultrix_Memory fix - */ -tSCC zAab_Ultrix_MemoryName[] = - "AAB_ultrix_memory"; - -/* - * File name selection pattern - */ -tSCC zAab_Ultrix_MemoryList[] = - "|memory.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Ultrix_MemoryMachs[] = { - "*-*-ultrix4.3", - (const char*)NULL }; -#define AAB_ULTRIX_MEMORY_TEST_CT 0 -#define aAab_Ultrix_MemoryTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Aab_Ultrix_Memory - */ -static const char* apzAab_Ultrix_MemoryPatch[] = { -"#ifndef _MEMORY_INCLUDED\n\ - #define _MEMORY_INCLUDED\n\ - #include <strings.h>\n\ -#endif /* _MEMORY_INCLUDED */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Ultrix_String fix - */ -tSCC zAab_Ultrix_StringName[] = - "AAB_ultrix_string"; - -/* - * File name selection pattern - */ -tSCC zAab_Ultrix_StringList[] = - "|string.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Ultrix_StringMachs[] = { - "*-*-ultrix4.3", - (const char*)NULL }; -#define AAB_ULTRIX_STRING_TEST_CT 0 -#define aAab_Ultrix_StringTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Aab_Ultrix_String - */ -static const char* apzAab_Ultrix_StringPatch[] = { -"#ifndef _STRING_INCLUDED\n\ - #define _STRING_INCLUDED\n\ - #include <strings.h>\n\ -#endif /* _STRING_INCLUDED */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aix_Pthread fix - */ -tSCC zAix_PthreadName[] = - "aix_pthread"; - -/* - * File name selection pattern - */ -tSCC zAix_PthreadList[] = - "|pthread.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAix_PthreadMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAix_PthreadSelect0[] = - "(#define [A-Za-z_0-9]+)(\\\\\n\ -[^A-Za-z_0-9 \t\n\ -(])"; - -#define AIX_PTHREAD_TEST_CT 1 -static tTestDesc aAix_PthreadTests[] = { - { TT_EGREP, zAix_PthreadSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aix_Pthread - */ -static const char* apzAix_PthreadPatch[] = { - "format", - "%1 %2", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aix_Sysmachine fix - */ -tSCC zAix_SysmachineName[] = - "aix_sysmachine"; - -/* - * File name selection pattern - */ -tSCC zAix_SysmachineList[] = - "|sys/machine.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAix_SysmachineMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAix_SysmachineSelect0[] = - "\\\\ +\n"; - -#define AIX_SYSMACHINE_TEST_CT 1 -static tTestDesc aAix_SysmachineTests[] = { - { TT_EGREP, zAix_SysmachineSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aix_Sysmachine - */ -static const char* apzAix_SysmachinePatch[] = { - "format", - "\\\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aix_Syswait fix - */ -tSCC zAix_SyswaitName[] = - "aix_syswait"; - -/* - * File name selection pattern - */ -tSCC zAix_SyswaitList[] = - "|sys/wait.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAix_SyswaitMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAix_SyswaitSelect0[] = - "^extern pid_t wait3\\(\\);\n"; -tSCC zAix_SyswaitSelect1[] = - "bos325,"; - -#define AIX_SYSWAIT_TEST_CT 2 -static tTestDesc aAix_SyswaitTests[] = { - { TT_EGREP, zAix_SyswaitSelect0, (regex_t*)NULL }, - { TT_EGREP, zAix_SyswaitSelect1, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aix_Syswait - */ -static const char* apzAix_SyswaitPatch[] = { - "format", - "struct rusage;\n\ -%0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aix_Syswait_2 fix - */ -tSCC zAix_Syswait_2Name[] = - "aix_syswait_2"; - -/* - * File name selection pattern - */ -tSCC zAix_Syswait_2List[] = - "|sys/wait.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAix_Syswait_2Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAix_Syswait_2Select0[] = - "\\? (\\(\\(\\(\\(unsigned[^)]*\\)[^)]*\\) >> [^)]*\\) \\& 0xff\\) : -1)"; - -#define AIX_SYSWAIT_2_TEST_CT 1 -static tTestDesc aAix_Syswait_2Tests[] = { - { TT_EGREP, zAix_Syswait_2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aix_Syswait_2 - */ -static const char* apzAix_Syswait_2Patch[] = { - "format", - "? (int)%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aix_Volatile fix - */ -tSCC zAix_VolatileName[] = - "aix_volatile"; - -/* - * File name selection pattern - */ -tSCC zAix_VolatileList[] = - "|sys/signal.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAix_VolatileMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAix_VolatileSelect0[] = - "typedef volatile int sig_atomic_t"; - -#define AIX_VOLATILE_TEST_CT 1 -static tTestDesc aAix_VolatileTests[] = { - { TT_EGREP, zAix_VolatileSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Aix_Volatile - */ -static const char* apzAix_VolatilePatch[] = { - "format", - "typedef int sig_atomic_t", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha___Assert fix - */ -tSCC zAlpha___AssertName[] = - "alpha___assert"; - -/* - * File name selection pattern - */ -tSCC zAlpha___AssertList[] = - "|assert.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAlpha___AssertMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha___AssertSelect0[] = - "__assert\\(char \\*, char \\*, int\\)"; - -#define ALPHA___ASSERT_TEST_CT 1 -static tTestDesc aAlpha___AssertTests[] = { - { TT_EGREP, zAlpha___AssertSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha___Assert - */ -static const char* apzAlpha___AssertPatch[] = { - "format", - "__assert(const char *, const char *, int)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * 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|"; -/* - * 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|sys/mount.h|"; -/* - * 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[] = - "alpha_assert"; - -/* - * File name selection pattern - */ -tSCC zAlpha_AssertList[] = - "|assert.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAlpha_AssertMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_AssertSelect0[] = - "(#define assert\\(EX\\).*)\\(\\(int\\) \\(EX\\)\\)"; - -#define ALPHA_ASSERT_TEST_CT 1 -static tTestDesc aAlpha_AssertTests[] = { - { TT_EGREP, zAlpha_AssertSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Assert - */ -static const char* apzAlpha_AssertPatch[] = { - "format", - "%1(EX)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * 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", - "-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[] = - "alpha_getopt"; - -/* - * File name selection pattern - */ -tSCC zAlpha_GetoptList[] = - "|stdio.h|stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAlpha_GetoptMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_GetoptSelect0[] = - "getopt\\(int, char \\*\\[\\], *char \\*\\)"; - -#define ALPHA_GETOPT_TEST_CT 1 -static tTestDesc aAlpha_GetoptTests[] = { - { TT_EGREP, zAlpha_GetoptSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Getopt - */ -static const char* apzAlpha_GetoptPatch[] = { - "format", - "getopt(int, char *const[], const char *)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Parens fix - */ -tSCC zAlpha_ParensName[] = - "alpha_parens"; - -/* - * File name selection pattern - */ -tSCC zAlpha_ParensList[] = - "|sym.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAlpha_ParensMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_ParensSelect0[] = - "#ifndef\\(__mips64\\)"; - -#define ALPHA_PARENS_TEST_CT 1 -static tTestDesc aAlpha_ParensTests[] = { - { TT_EGREP, zAlpha_ParensSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Parens - */ -static const char* apzAlpha_ParensPatch[] = { - "format", - "#ifndef __mips64", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Pthread fix - */ -tSCC zAlpha_PthreadName[] = - "alpha_pthread"; - -/* - * File name selection pattern - */ -tSCC zAlpha_PthreadList[] = - "|pthread.h|"; -/* - * 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|"; -/* - * 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_Sbrk fix - */ -tSCC zAlpha_SbrkName[] = - "alpha_sbrk"; - -/* - * File name selection pattern - */ -tSCC zAlpha_SbrkList[] = - "|unistd.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAlpha_SbrkMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_SbrkSelect0[] = - "char[ \t]*\\*[\t ]*sbrk[ \t]*\\("; - -#define ALPHA_SBRK_TEST_CT 1 -static tTestDesc aAlpha_SbrkTests[] = { - { TT_EGREP, zAlpha_SbrkSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Sbrk - */ -static const char* apzAlpha_SbrkPatch[] = { - "format", - "void *sbrk(", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Alpha_Wchar fix - */ -tSCC zAlpha_WcharName[] = - "alpha_wchar"; - -/* - * File name selection pattern - */ -tSCC zAlpha_WcharList[] = - "|wchar.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAlpha_WcharMachs[] = { - "alpha*-dec-osf4*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAlpha_WcharSelect0[] = - "#define wcstok wcstok_r"; - -#define ALPHA_WCHAR_TEST_CT 1 -static tTestDesc aAlpha_WcharTests[] = { - { TT_EGREP, zAlpha_WcharSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Alpha_Wchar - */ -static const char* apzAlpha_WcharPatch[] = { "sed", - "-e", "s@#define wcstok wcstok_r@extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__(\"wcstok_r\");@", - "-e", "s@#define wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Avoid_Bool_Define fix - */ -tSCC zAvoid_Bool_DefineName[] = - "avoid_bool_define"; - -/* - * File name selection pattern - */ -tSCC zAvoid_Bool_DefineList[] = - "|curses.h|curses_colr/curses.h|term.h|tinfo.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAvoid_Bool_DefineMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAvoid_Bool_DefineSelect0[] = - "#[ \t]*define[ \t]+bool[ \t]"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zAvoid_Bool_DefineBypass0[] = - "__cplusplus"; - -#define AVOID_BOOL_DEFINE_TEST_CT 2 -static tTestDesc aAvoid_Bool_DefineTests[] = { - { TT_NEGREP, zAvoid_Bool_DefineBypass0, (regex_t*)NULL }, - { TT_EGREP, zAvoid_Bool_DefineSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Avoid_Bool_Define - */ -static const char* apzAvoid_Bool_DefinePatch[] = { - "format", - "#ifndef __cplusplus\n\ -%0\n\ -#endif", - "^[ \t]*#[ \t]*define[ \t]+bool[ \t].*", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Avoid_Bool_Type fix - */ -tSCC zAvoid_Bool_TypeName[] = - "avoid_bool_type"; - -/* - * File name selection pattern - */ -tSCC zAvoid_Bool_TypeList[] = - "|curses.h|curses_colr/curses.h|term.h|tinfo.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzAvoid_Bool_TypeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAvoid_Bool_TypeSelect0[] = - "^[ \t]*typedef[ \t].*[ \t]bool[ \t]*;"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zAvoid_Bool_TypeBypass0[] = - "__cplusplus"; - -#define AVOID_BOOL_TYPE_TEST_CT 2 -static tTestDesc aAvoid_Bool_TypeTests[] = { - { TT_NEGREP, zAvoid_Bool_TypeBypass0, (regex_t*)NULL }, - { TT_EGREP, zAvoid_Bool_TypeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Avoid_Bool_Type - */ -static const char* apzAvoid_Bool_TypePatch[] = { - "format", - "#ifndef __cplusplus\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Avoid_Wchar_T_Type fix - */ -tSCC zAvoid_Wchar_T_TypeName[] = - "avoid_wchar_t_type"; - -/* - * File name selection pattern - */ -#define zAvoid_Wchar_T_TypeList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzAvoid_Wchar_T_TypeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zAvoid_Wchar_T_TypeSelect0[] = - "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zAvoid_Wchar_T_TypeBypass0[] = - "__cplusplus"; -tSCC zAvoid_Wchar_T_TypeBypass1[] = - "_LINUX_NLS_H"; -tSCC zAvoid_Wchar_T_TypeBypass2[] = - "XFree86: xc/lib/X11/Xlib\\.h"; - -#define AVOID_WCHAR_T_TYPE_TEST_CT 4 -static tTestDesc aAvoid_Wchar_T_TypeTests[] = { - { TT_NEGREP, zAvoid_Wchar_T_TypeBypass0, (regex_t*)NULL }, - { TT_NEGREP, zAvoid_Wchar_T_TypeBypass1, (regex_t*)NULL }, - { TT_NEGREP, zAvoid_Wchar_T_TypeBypass2, (regex_t*)NULL }, - { TT_EGREP, zAvoid_Wchar_T_TypeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Avoid_Wchar_T_Type - */ -static const char* apzAvoid_Wchar_T_TypePatch[] = { - "format", - "#ifndef __cplusplus\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Bad_Struct_Term fix - */ -tSCC zBad_Struct_TermName[] = - "bad_struct_term"; - -/* - * File name selection pattern - */ -tSCC zBad_Struct_TermList[] = - "|curses.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzBad_Struct_TermMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zBad_Struct_TermSelect0[] = - "^[ \t]*typedef[ \t]+struct[ \t]+term[ \t]*;"; - -#define BAD_STRUCT_TERM_TEST_CT 1 -static tTestDesc aBad_Struct_TermTests[] = { - { TT_EGREP, zBad_Struct_TermSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Bad_Struct_Term - */ -static const char* apzBad_Struct_TermPatch[] = { - "format", - "struct term;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Badquote fix - */ -tSCC zBadquoteName[] = - "badquote"; - -/* - * File name selection pattern - */ -tSCC zBadquoteList[] = - "|sundev/vuid_event.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzBadquoteMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zBadquoteSelect0[] = - "doesn't"; - -#define BADQUOTE_TEST_CT 1 -static tTestDesc aBadquoteTests[] = { - { TT_EGREP, zBadquoteSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Badquote - */ -static const char* apzBadquotePatch[] = { - "format", - "does not", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Broken_Assert_Stdio fix - */ -tSCC zBroken_Assert_StdioName[] = - "broken_assert_stdio"; - -/* - * File name selection pattern - */ -tSCC zBroken_Assert_StdioList[] = - "|assert.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzBroken_Assert_StdioMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zBroken_Assert_StdioSelect0[] = - "stderr"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zBroken_Assert_StdioBypass0[] = - "include.*stdio\\.h"; - -#define BROKEN_ASSERT_STDIO_TEST_CT 2 -static tTestDesc aBroken_Assert_StdioTests[] = { - { TT_NEGREP, zBroken_Assert_StdioBypass0, (regex_t*)NULL }, - { TT_EGREP, zBroken_Assert_StdioSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Broken_Assert_Stdio - */ -static const char* apzBroken_Assert_StdioPatch[] = { - "wrap", - "#include <stdio.h>\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Broken_Assert_Stdlib fix - */ -tSCC zBroken_Assert_StdlibName[] = - "broken_assert_stdlib"; - -/* - * File name selection pattern - */ -tSCC zBroken_Assert_StdlibList[] = - "|assert.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzBroken_Assert_StdlibMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zBroken_Assert_StdlibSelect0[] = - "exit *\\(|abort *\\("; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zBroken_Assert_StdlibBypass0[] = - "include.*stdlib\\.h"; - -#define BROKEN_ASSERT_STDLIB_TEST_CT 2 -static tTestDesc aBroken_Assert_StdlibTests[] = { - { TT_NEGREP, zBroken_Assert_StdlibBypass0, (regex_t*)NULL }, - { TT_EGREP, zBroken_Assert_StdlibSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Broken_Assert_Stdlib - */ -static const char* apzBroken_Assert_StdlibPatch[] = { - "wrap", - "#ifdef __cplusplus\n\ -#include <stdlib.h>\n\ -#endif\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Broken_Cabs fix - */ -tSCC zBroken_CabsName[] = - "broken_cabs"; - -/* - * File name selection pattern - */ -tSCC zBroken_CabsList[] = - "|math.h|architecture/ppc/math.h|architecture/i386/math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzBroken_CabsMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zBroken_CabsSelect0[] = - "^extern[ \\t]+double[ \\t]+cabs"; - -#define BROKEN_CABS_TEST_CT 1 -static tTestDesc aBroken_CabsTests[] = { - { TT_EGREP, zBroken_CabsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Broken_Cabs - */ -static const char* apzBroken_CabsPatch[] = { - "format", - "", - "^extern[ \t]+double[ \t]+cabs[ \t]*\\([^\\)]*\\);", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Bsd_Stdio_Attrs_Conflict fix - */ -tSCC zBsd_Stdio_Attrs_ConflictName[] = - "bsd_stdio_attrs_conflict"; - -/* - * File name selection pattern - */ -tSCC zBsd_Stdio_Attrs_ConflictList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzBsd_Stdio_Attrs_ConflictMachs[] = { - "*-*-*bsd*", - "*-*-*darwin*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zBsd_Stdio_Attrs_ConflictSelect0[] = - "^#define[ \t]*vfscanf[ \t]*__svfscanf[ \t]*$"; - -#define BSD_STDIO_ATTRS_CONFLICT_TEST_CT 1 -static tTestDesc aBsd_Stdio_Attrs_ConflictTests[] = { - { TT_EGREP, zBsd_Stdio_Attrs_ConflictSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Bsd_Stdio_Attrs_Conflict - */ -static const char* apzBsd_Stdio_Attrs_ConflictPatch[] = { - "format", - "#define _BSD_STRING(_BSD_X) _BSD_STRINGX(_BSD_X)\n\ -#define _BSD_STRINGX(_BSD_X) #_BSD_X\n\ -int vfscanf(FILE *, const char *, __builtin_va_list) __asm__ (_BSD_STRING(__USER_LABEL_PREFIX__) \"__svfscanf\");", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ctrl_Quotes_Def fix - */ -tSCC zCtrl_Quotes_DefName[] = - "ctrl_quotes_def"; - -/* - * File name selection pattern - */ -#define zCtrl_Quotes_DefList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzCtrl_Quotes_DefMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zCtrl_Quotes_DefSelect0[] = - "define[ \t]+[A-Z0-9_]+CTRL\\([a-zA-Z][,)]"; - -#define CTRL_QUOTES_DEF_TEST_CT 1 -static tTestDesc aCtrl_Quotes_DefTests[] = { - { TT_EGREP, zCtrl_Quotes_DefSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ctrl_Quotes_Def - */ -static const char* apzCtrl_Quotes_DefPatch[] = { - "char_macro_def", - "CTRL", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ctrl_Quotes_Use fix - */ -tSCC zCtrl_Quotes_UseName[] = - "ctrl_quotes_use"; - -/* - * File name selection pattern - */ -#define zCtrl_Quotes_UseList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzCtrl_Quotes_UseMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zCtrl_Quotes_UseSelect0[] = - "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']"; - -#define CTRL_QUOTES_USE_TEST_CT 1 -static tTestDesc aCtrl_Quotes_UseTests[] = { - { TT_EGREP, zCtrl_Quotes_UseSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ctrl_Quotes_Use - */ -static const char* apzCtrl_Quotes_UsePatch[] = { - "char_macro_use", - "CTRL", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Cxx_Unready fix - */ -tSCC zCxx_UnreadyName[] = - "cxx_unready"; - -/* - * File name selection pattern - */ -tSCC zCxx_UnreadyList[] = - "|sys/mman.h|rpc/types.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzCxx_UnreadyMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zCxx_UnreadySelect0[] = - "[^#]+malloc.*;"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zCxx_UnreadyBypass0[] = - "\"C\"|__BEGIN_DECLS"; - -#define CXX_UNREADY_TEST_CT 2 -static tTestDesc aCxx_UnreadyTests[] = { - { TT_NEGREP, zCxx_UnreadyBypass0, (regex_t*)NULL }, - { TT_EGREP, zCxx_UnreadySelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Cxx_Unready - */ -static const char* apzCxx_UnreadyPatch[] = { - "wrap", - "#ifdef __cplusplus\n\ -extern \"C\" {\n\ -#endif\n", - "#ifdef __cplusplus\n\ -}\n\ -#endif\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Darwin_Private_Extern fix - */ -tSCC zDarwin_Private_ExternName[] = - "darwin_private_extern"; - -/* - * File name selection pattern - */ -tSCC zDarwin_Private_ExternList[] = - "|mach-o/dyld.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzDarwin_Private_ExternMachs[] = { - "*-*-darwin*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zDarwin_Private_ExternSelect0[] = - "__private_extern__ [a-z_]+ _dyld_"; - -#define DARWIN_PRIVATE_EXTERN_TEST_CT 1 -static tTestDesc aDarwin_Private_ExternTests[] = { - { TT_EGREP, zDarwin_Private_ExternSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Darwin_Private_Extern - */ -static const char* apzDarwin_Private_ExternPatch[] = { - "format", - "extern", - "__private_extern__", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Dec_Intern_Asm fix - */ -tSCC zDec_Intern_AsmName[] = - "dec_intern_asm"; - -/* - * File name selection pattern - */ -tSCC zDec_Intern_AsmList[] = - "|c_asm.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzDec_Intern_AsmMachs (const char**)NULL -#define DEC_INTERN_ASM_TEST_CT 0 -#define aDec_Intern_AsmTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Dec_Intern_Asm - */ -static const char* apzDec_Intern_AsmPatch[] = { "sed", - "-e", "/^[ \t]*float[ \t]*fasm/i\\\n\ -#ifdef __DECC\n", - "-e", "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n\ -#endif\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Djgpp_Wchar_H fix - */ -tSCC zDjgpp_Wchar_HName[] = - "djgpp_wchar_h"; - -/* - * File name selection pattern - */ -#define zDjgpp_Wchar_HList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzDjgpp_Wchar_HMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zDjgpp_Wchar_HSelect0[] = - "__DJ_wint_t"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zDjgpp_Wchar_HBypass0[] = - "sys/djtypes.h"; - -#define DJGPP_WCHAR_H_TEST_CT 2 -static tTestDesc aDjgpp_Wchar_HTests[] = { - { TT_NEGREP, zDjgpp_Wchar_HBypass0, (regex_t*)NULL }, - { TT_EGREP, zDjgpp_Wchar_HSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Djgpp_Wchar_H - */ -static const char* apzDjgpp_Wchar_HPatch[] = { - "format", - "%0\n\ -#include <sys/djtypes.h>", - "#include <stddef.h>", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ecd_Cursor fix - */ -tSCC zEcd_CursorName[] = - "ecd_cursor"; - -/* - * File name selection pattern - */ -tSCC zEcd_CursorList[] = - "|sunwindow/win_lock.h|sunwindow/win_cursor.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzEcd_CursorMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zEcd_CursorSelect0[] = - "ecd\\.cursor"; - -#define ECD_CURSOR_TEST_CT 1 -static tTestDesc aEcd_CursorTests[] = { - { TT_EGREP, zEcd_CursorSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ecd_Cursor - */ -static const char* apzEcd_CursorPatch[] = { - "format", - "ecd_cursor", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Exception_Structure fix - */ -tSCC zException_StructureName[] = - "exception_structure"; - -/* - * File name selection pattern - */ -tSCC zException_StructureList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzException_StructureMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zException_StructureSelect0[] = - "matherr"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zException_StructureBypass0[] = - "matherr.*(struct exception|__MATH_EXCEPTION)"; - -#define EXCEPTION_STRUCTURE_TEST_CT 2 -static tTestDesc aException_StructureTests[] = { - { TT_NEGREP, zException_StructureBypass0, (regex_t*)NULL }, - { TT_EGREP, zException_StructureSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Exception_Structure - */ -static const char* apzException_StructurePatch[] = { - "wrap", - "struct exception;\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Freebsd_Gcc3_Breakage fix - */ -tSCC zFreebsd_Gcc3_BreakageName[] = - "freebsd_gcc3_breakage"; - -/* - * File name selection pattern - */ -tSCC zFreebsd_Gcc3_BreakageList[] = - "|sys/cdefs.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzFreebsd_Gcc3_BreakageMachs[] = { - "*-*-freebsd*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zFreebsd_Gcc3_BreakageSelect0[] = - "^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zFreebsd_Gcc3_BreakageBypass0[] = - "__GNUC__[ \\t]*([>=]=[ \\t]*[3-9]|>[ \\t]*2)"; - -#define FREEBSD_GCC3_BREAKAGE_TEST_CT 2 -static tTestDesc aFreebsd_Gcc3_BreakageTests[] = { - { TT_NEGREP, zFreebsd_Gcc3_BreakageBypass0, (regex_t*)NULL }, - { TT_EGREP, zFreebsd_Gcc3_BreakageSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Freebsd_Gcc3_Breakage - */ -static const char* apzFreebsd_Gcc3_BreakagePatch[] = { - "format", - "%0 || __GNUC__ >= 3", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Gnu_Types fix - */ -tSCC zGnu_TypesName[] = - "gnu_types"; - -/* - * File name selection pattern - */ -tSCC zGnu_TypesList[] = - "|sys/types.h|stdlib.h|sys/stdtypes.h|stddef.h|memory.h|unistd.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzGnu_TypesMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zGnu_TypesSelect0[] = - "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zGnu_TypesBypass0[] = - "_GCC_(PTRDIFF|SIZE|WCHAR)_T"; - -#define GNU_TYPES_TEST_CT 2 -static tTestDesc aGnu_TypesTests[] = { - { TT_NEGREP, zGnu_TypesBypass0, (regex_t*)NULL }, - { TT_EGREP, zGnu_TypesSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Gnu_Types - */ -static const char* apzGnu_TypesPatch[] = { - "gnu_type", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hp_Inline fix - */ -tSCC zHp_InlineName[] = - "hp_inline"; - -/* - * File name selection pattern - */ -tSCC zHp_InlineList[] = - "|sys/spinlock.h|machine/machparam.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHp_InlineMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHp_InlineSelect0[] = - "[ \t]*#[ \t]*include[ \t]+\"\\.\\./machine/"; - -#define HP_INLINE_TEST_CT 1 -static tTestDesc aHp_InlineTests[] = { - { TT_EGREP, zHp_InlineSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hp_Inline - */ -static const char* apzHp_InlinePatch[] = { - "format", - "%1<machine/%2.h>", - "([ \t]*#[ \t]*include[ \t]+)\"\\.\\./machine/([a-z]+)\\.h\"", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hp_Sysfile fix - */ -tSCC zHp_SysfileName[] = - "hp_sysfile"; - -/* - * File name selection pattern - */ -tSCC zHp_SysfileList[] = - "|sys/file.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHp_SysfileMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHp_SysfileSelect0[] = - "HPUX_SOURCE"; - -#define HP_SYSFILE_TEST_CT 1 -static tTestDesc aHp_SysfileTests[] = { - { TT_EGREP, zHp_SysfileSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hp_Sysfile - */ -static const char* apzHp_SysfilePatch[] = { - "format", - "(struct file *, ...)", - "\\(\\.\\.\\.\\)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux10_Cpp_Pow_Inline fix - */ -tSCC zHpux10_Cpp_Pow_InlineName[] = - "hpux10_cpp_pow_inline"; - -/* - * File name selection pattern - */ -tSCC zHpux10_Cpp_Pow_InlineList[] = - "|fixinc-test-limits.h|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux10_Cpp_Pow_InlineMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux10_Cpp_Pow_InlineSelect0[] = - "^# +ifdef +__cplusplus\n\ - +\\}\n\ - +inline +double +pow\\(double +__d,int +__expon\\) +\\{\n\ -[ \t]+return +pow\\(__d,\\(double\\)__expon\\);\n\ - +\\}\n\ - +extern +\"C\" +\\{\n\ -#else\n\ -# +endif"; - -#define HPUX10_CPP_POW_INLINE_TEST_CT 1 -static tTestDesc aHpux10_Cpp_Pow_InlineTests[] = { - { TT_EGREP, zHpux10_Cpp_Pow_InlineSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux10_Cpp_Pow_Inline - */ -static const char* apzHpux10_Cpp_Pow_InlinePatch[] = { - "format", - "", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux11_Cpp_Pow_Inline fix - */ -tSCC zHpux11_Cpp_Pow_InlineName[] = - "hpux11_cpp_pow_inline"; - -/* - * File name selection pattern - */ -tSCC zHpux11_Cpp_Pow_InlineList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux11_Cpp_Pow_InlineMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_Cpp_Pow_InlineSelect0[] = - " +inline double pow\\(double d,int expon\\) \\{\n\ - +return pow\\(d, \\(double\\)expon\\);\n\ - +\\}\n"; - -#define HPUX11_CPP_POW_INLINE_TEST_CT 1 -static tTestDesc aHpux11_Cpp_Pow_InlineTests[] = { - { TT_EGREP, zHpux11_Cpp_Pow_InlineSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Cpp_Pow_Inline - */ -static const char* apzHpux11_Cpp_Pow_InlinePatch[] = { - "format", - "", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux10_Ctype_Declarations1 fix - */ -tSCC zHpux10_Ctype_Declarations1Name[] = - "hpux10_ctype_declarations1"; - -/* - * File name selection pattern - */ -tSCC zHpux10_Ctype_Declarations1List[] = - "|ctype.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux10_Ctype_Declarations1Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux10_Ctype_Declarations1Select0[] = - "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zHpux10_Ctype_Declarations1Bypass0[] = - "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\("; - -#define HPUX10_CTYPE_DECLARATIONS1_TEST_CT 2 -static tTestDesc aHpux10_Ctype_Declarations1Tests[] = { - { TT_NEGREP, zHpux10_Ctype_Declarations1Bypass0, (regex_t*)NULL }, - { TT_EGREP, zHpux10_Ctype_Declarations1Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux10_Ctype_Declarations1 - */ -static const char* apzHpux10_Ctype_Declarations1Patch[] = { - "format", - "#ifdef _PROTOTYPES\n\ -extern int __tolower(int);\n\ -extern int __toupper(int);\n\ -#else /* NOT _PROTOTYPES */\n\ -extern int __tolower();\n\ -extern int __toupper();\n\ -#endif /* _PROTOTYPES */\n\n\ -%0\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux10_Ctype_Declarations2 fix - */ -tSCC zHpux10_Ctype_Declarations2Name[] = - "hpux10_ctype_declarations2"; - -/* - * File name selection pattern - */ -tSCC zHpux10_Ctype_Declarations2List[] = - "|ctype.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux10_Ctype_Declarations2Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux10_Ctype_Declarations2Select0[] = - "^# if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zHpux10_Ctype_Declarations2Bypass0[] = - "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\("; - -#define HPUX10_CTYPE_DECLARATIONS2_TEST_CT 2 -static tTestDesc aHpux10_Ctype_Declarations2Tests[] = { - { TT_NEGREP, zHpux10_Ctype_Declarations2Bypass0, (regex_t*)NULL }, - { TT_EGREP, zHpux10_Ctype_Declarations2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux10_Ctype_Declarations2 - */ -static const char* apzHpux10_Ctype_Declarations2Patch[] = { - "format", - "%0\n\n\ -#ifdef _PROTOTYPES\n\ - extern int _isalnum(int);\n\ - extern int _isalpha(int);\n\ - extern int _iscntrl(int);\n\ - extern int _isdigit(int);\n\ - extern int _isgraph(int);\n\ - extern int _islower(int);\n\ - extern int _isprint(int);\n\ - extern int _ispunct(int);\n\ - extern int _isspace(int);\n\ - extern int _isupper(int);\n\ - extern int _isxdigit(int);\n\ -# else /* not _PROTOTYPES */\n\ - extern int _isalnum();\n\ - extern int _isalpha();\n\ - extern int _iscntrl();\n\ - extern int _isdigit();\n\ - extern int _isgraph();\n\ - extern int _islower();\n\ - extern int _isprint();\n\ - extern int _ispunct();\n\ - extern int _isspace();\n\ - extern int _isupper();\n\ - extern int _isxdigit();\n\ -#endif /* _PROTOTYPES */\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux10_Stdio_Declarations fix - */ -tSCC zHpux10_Stdio_DeclarationsName[] = - "hpux10_stdio_declarations"; - -/* - * File name selection pattern - */ -tSCC zHpux10_Stdio_DeclarationsList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux10_Stdio_DeclarationsMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux10_Stdio_DeclarationsSelect0[] = - "^#[ \t]*define _iob[ \t]*__iob"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zHpux10_Stdio_DeclarationsBypass0[] = - "^[ \t]*extern[ \t]*int[ \t]*vsnprintf[ \t]*\\("; - -#define HPUX10_STDIO_DECLARATIONS_TEST_CT 2 -static tTestDesc aHpux10_Stdio_DeclarationsTests[] = { - { TT_NEGREP, zHpux10_Stdio_DeclarationsBypass0, (regex_t*)NULL }, - { TT_EGREP, zHpux10_Stdio_DeclarationsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux10_Stdio_Declarations - */ -static const char* apzHpux10_Stdio_DeclarationsPatch[] = { - "format", - "%0\n\n\ -# if defined(__STDC__) || defined(__cplusplus)\n\ - extern int snprintf(char *, size_t, const char *, ...);\n\ - extern int vsnprintf(char *, size_t, const char *, __va_list);\n\ -# else /* not __STDC__) || __cplusplus */\n\ - extern int snprintf();\n\ - extern int vsnprintf();\n\ -# endif /* __STDC__) || __cplusplus */\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux11_Abs fix - */ -tSCC zHpux11_AbsName[] = - "hpux11_abs"; - -/* - * File name selection pattern - */ -tSCC zHpux11_AbsList[] = - "|stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzHpux11_AbsMachs[] = { - "ia64-hp-hpux11*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_AbsSelect0[] = - "ifndef _MATH_INCLUDED"; - -#define HPUX11_ABS_TEST_CT 1 -static tTestDesc aHpux11_AbsTests[] = { - { TT_EGREP, zHpux11_AbsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Abs - */ -static const char* apzHpux11_AbsPatch[] = { - "format", - "if !defined(_MATH_INCLUDED) || defined(__GNUG__)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux11_Fabsf fix - */ -tSCC zHpux11_FabsfName[] = - "hpux11_fabsf"; - -/* - * File name selection pattern - */ -tSCC zHpux11_FabsfList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux11_FabsfMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_FabsfSelect0[] = - "^[ \t]*#[ \t]*define[ \t]+fabsf\\(.*"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zHpux11_FabsfBypass0[] = - "__cplusplus"; - -#define HPUX11_FABSF_TEST_CT 2 -static tTestDesc aHpux11_FabsfTests[] = { - { TT_NEGREP, zHpux11_FabsfBypass0, (regex_t*)NULL }, - { TT_EGREP, zHpux11_FabsfSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Fabsf - */ -static const char* apzHpux11_FabsfPatch[] = { - "format", - "#ifndef __cplusplus\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux11_Size_T fix - */ -tSCC zHpux11_Size_TName[] = - "hpux11_size_t"; - -/* - * File name selection pattern - */ -#define zHpux11_Size_TList (char*)NULL -/* - * Machine/OS name selection pattern - */ -tSCC* apzHpux11_Size_TMachs[] = { - "*-hp-hpux11*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_Size_TSelect0[] = - "__size_t"; - -#define HPUX11_SIZE_T_TEST_CT 1 -static tTestDesc aHpux11_Size_TTests[] = { - { TT_EGREP, zHpux11_Size_TSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Size_T - */ -static const char* apzHpux11_Size_TPatch[] = { - "format", - "_hpux_size_t", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux11_Snprintf fix - */ -tSCC zHpux11_SnprintfName[] = - "hpux11_snprintf"; - -/* - * File name selection pattern - */ -tSCC zHpux11_SnprintfList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux11_SnprintfMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_SnprintfSelect0[] = - "(extern int snprintf *\\(char *\\*, *(|__|_hpux_)size_t,) *(char *\\*, *\\.\\.\\.\\);)"; - -#define HPUX11_SNPRINTF_TEST_CT 1 -static tTestDesc aHpux11_SnprintfTests[] = { - { TT_EGREP, zHpux11_SnprintfSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Snprintf - */ -static const char* apzHpux11_SnprintfPatch[] = { - "format", - "%1 const %3", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux11_Uint32_C fix - */ -tSCC zHpux11_Uint32_CName[] = - "hpux11_uint32_c"; - -/* - * File name selection pattern - */ -tSCC zHpux11_Uint32_CList[] = - "|inttypes.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux11_Uint32_CMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_Uint32_CSelect0[] = - "^#define UINT32_C\\(__c\\)[ \t]*__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)"; - -#define HPUX11_UINT32_C_TEST_CT 1 -static tTestDesc aHpux11_Uint32_CTests[] = { - { TT_EGREP, zHpux11_Uint32_CSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Uint32_C - */ -static const char* apzHpux11_Uint32_CPatch[] = { - "format", - "#define UINT32_C(__c) __CONCAT__(__c,ul)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux11_Vsnprintf fix - */ -tSCC zHpux11_VsnprintfName[] = - "hpux11_vsnprintf"; - -/* - * File name selection pattern - */ -tSCC zHpux11_VsnprintfList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux11_VsnprintfMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux11_VsnprintfSelect0[] = - "(extern int vsnprintf\\(char \\*, _[hpux]*_size_t, const char \\*,) __va__list\\);"; - -#define HPUX11_VSNPRINTF_TEST_CT 1 -static tTestDesc aHpux11_VsnprintfTests[] = { - { TT_EGREP, zHpux11_VsnprintfSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux11_Vsnprintf - */ -static const char* apzHpux11_VsnprintfPatch[] = { - "format", - "%1 __va_list);", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux8_Bogus_Inlines fix - */ -tSCC zHpux8_Bogus_InlinesName[] = - "hpux8_bogus_inlines"; - -/* - * File name selection pattern - */ -tSCC zHpux8_Bogus_InlinesList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux8_Bogus_InlinesMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux8_Bogus_InlinesSelect0[] = - "inline"; - -#define HPUX8_BOGUS_INLINES_TEST_CT 1 -static tTestDesc aHpux8_Bogus_InlinesTests[] = { - { TT_EGREP, zHpux8_Bogus_InlinesSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux8_Bogus_Inlines - */ -static const char* apzHpux8_Bogus_InlinesPatch[] = { "sed", - "-e", "s@inline int abs(int [a-z][a-z]*) {.*}@extern \"C\" int abs(int);@", - "-e", "s@inline double abs(double [a-z][a-z]*) {.*}@@", - "-e", "s@inline int sqr(int [a-z][a-z]*) {.*}@@", - "-e", "s@inline double sqr(double [a-z][a-z]*) {.*}@@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux_Ctype_Macros fix - */ -tSCC zHpux_Ctype_MacrosName[] = - "hpux_ctype_macros"; - -/* - * File name selection pattern - */ -tSCC zHpux_Ctype_MacrosList[] = - "|ctype.h|"; -/* - * 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 }, }; - -/* - * Fix Command Arguments for Hpux_Ctype_Macros - */ -static const char* apzHpux_Ctype_MacrosPatch[] = { - "format", - "%1(int)%3", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux_Long_Double fix - */ -tSCC zHpux_Long_DoubleName[] = - "hpux_long_double"; - -/* - * File name selection pattern - */ -tSCC zHpux_Long_DoubleList[] = - "|stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux_Long_DoubleMachs (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"; - -#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 Hpux_Long_Double - */ -static const char* apzHpux_Long_DoublePatch[] = { "sed", - "-e", "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D", - "-e", "s/long_double/long double/g", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux_Maxint fix - */ -tSCC zHpux_MaxintName[] = - "hpux_maxint"; - -/* - * File name selection pattern - */ -tSCC zHpux_MaxintList[] = - "|sys/param.h|values.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux_MaxintMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux_MaxintSelect0[] = - "^#[ \t]*define[ \t]+MAXINT[ \t]"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zHpux_MaxintBypass0[] = - "^#[ \t]*ifndef[ \t]+MAXINT"; - -/* - * perform the 'test' shell command - do fix on success - */ -tSCC zHpux_MaxintTest0[] = - "-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\""; - -#define HPUX_MAXINT_TEST_CT 3 -static tTestDesc aHpux_MaxintTests[] = { - { TT_TEST, zHpux_MaxintTest0, 0 /* unused */ }, - { TT_NEGREP, zHpux_MaxintBypass0, (regex_t*)NULL }, - { TT_EGREP, zHpux_MaxintSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux_Maxint - */ -static const char* apzHpux_MaxintPatch[] = { - "format", - "#ifndef MAXINT\n\ -%0\n\ -#endif", - "^#[ \t]*define[ \t]+MAXINT[ \t].*", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Hpux_Systime fix - */ -tSCC zHpux_SystimeName[] = - "hpux_systime"; - -/* - * File name selection pattern - */ -tSCC zHpux_SystimeList[] = - "|sys/time.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzHpux_SystimeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zHpux_SystimeSelect0[] = - "^extern struct sigevent;"; - -#define HPUX_SYSTIME_TEST_CT 1 -static tTestDesc aHpux_SystimeTests[] = { - { TT_EGREP, zHpux_SystimeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Hpux_Systime - */ -static const char* apzHpux_SystimePatch[] = { - "format", - "struct sigevent;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Int_Abort_Free_And_Exit fix - */ -tSCC zInt_Abort_Free_And_ExitName[] = - "int_abort_free_and_exit"; - -/* - * File name selection pattern - */ -tSCC zInt_Abort_Free_And_ExitList[] = - "|stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzInt_Abort_Free_And_ExitMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zInt_Abort_Free_And_ExitSelect0[] = - "int[ \t]+(abort|free|exit)[ \t]*\\("; - -#define INT_ABORT_FREE_AND_EXIT_TEST_CT 1 -static tTestDesc aInt_Abort_Free_And_ExitTests[] = { - { TT_EGREP, zInt_Abort_Free_And_ExitSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Int_Abort_Free_And_Exit - */ -static const char* apzInt_Abort_Free_And_ExitPatch[] = { - "format", - "void\t%1(", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Io_Quotes_Def fix - */ -tSCC zIo_Quotes_DefName[] = - "io_quotes_def"; - -/* - * File name selection pattern - */ -#define zIo_Quotes_DefList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzIo_Quotes_DefMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIo_Quotes_DefSelect0[] = - "define[ \t]+[A-Z0-9_]+IO[A-Z]*\\([a-zA-Z][,)]"; - -#define IO_QUOTES_DEF_TEST_CT 1 -static tTestDesc aIo_Quotes_DefTests[] = { - { TT_EGREP, zIo_Quotes_DefSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Io_Quotes_Def - */ -static const char* apzIo_Quotes_DefPatch[] = { - "char_macro_def", - "IO", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Io_Quotes_Use fix - */ -tSCC zIo_Quotes_UseName[] = - "io_quotes_use"; - -/* - * File name selection pattern - */ -#define zIo_Quotes_UseList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzIo_Quotes_UseMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIo_Quotes_UseSelect0[] = - "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*\\( *[^,']"; - -#define IO_QUOTES_USE_TEST_CT 1 -static tTestDesc aIo_Quotes_UseTests[] = { - { TT_EGREP, zIo_Quotes_UseSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Io_Quotes_Use - */ -static const char* apzIo_Quotes_UsePatch[] = { - "char_macro_use", - "IO", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ip_Missing_Semi fix - */ -tSCC zIp_Missing_SemiName[] = - "ip_missing_semi"; - -/* - * File name selection pattern - */ -tSCC zIp_Missing_SemiList[] = - "|netinet/ip.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzIp_Missing_SemiMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIp_Missing_SemiSelect0[] = - "}$"; - -#define IP_MISSING_SEMI_TEST_CT 1 -static tTestDesc aIp_Missing_SemiTests[] = { - { TT_EGREP, zIp_Missing_SemiSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ip_Missing_Semi - */ -static const char* apzIp_Missing_SemiPatch[] = { "sed", - "-e", "/^struct/,/^};/s/}$/};/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix___Restrict fix - */ -tSCC zIrix___RestrictName[] = - "irix___restrict"; - -/* - * File name selection pattern - */ -tSCC zIrix___RestrictList[] = - "|internal/sgimacros.h|"; -/* - * 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|"; -/* - * 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|"; -/* - * 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|"; -/* - * 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_Limits_Const fix - */ -tSCC zIrix_Limits_ConstName[] = - "irix_limits_const"; - -/* - * File name selection pattern - */ -tSCC zIrix_Limits_ConstList[] = - "|fixinc-test-limits.h|limits.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzIrix_Limits_ConstMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Limits_ConstSelect0[] = - "^extern const "; - -#define IRIX_LIMITS_CONST_TEST_CT 1 -static tTestDesc aIrix_Limits_ConstTests[] = { - { TT_EGREP, zIrix_Limits_ConstSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Limits_Const - */ -static const char* apzIrix_Limits_ConstPatch[] = { - "format", - "extern __const ", - (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|"; -/* - * 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_Stdio_Va_List fix - */ -tSCC zIrix_Stdio_Va_ListName[] = - "irix_stdio_va_list"; - -/* - * File name selection pattern - */ -tSCC zIrix_Stdio_Va_ListList[] = - "|stdio.h|internal/stdio_core.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzIrix_Stdio_Va_ListMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIrix_Stdio_Va_ListSelect0[] = - "/\\* va_list \\*/ char \\*"; - -#define IRIX_STDIO_VA_LIST_TEST_CT 1 -static tTestDesc aIrix_Stdio_Va_ListTests[] = { - { TT_EGREP, zIrix_Stdio_Va_ListSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Irix_Stdio_Va_List - */ -static const char* apzIrix_Stdio_Va_ListPatch[] = { - "format", - "__gnuc_va_list", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Irix_Wcsftime fix - */ -tSCC zIrix_WcsftimeName[] = - "irix_wcsftime"; - -/* - * File name selection pattern - */ -tSCC zIrix_WcsftimeList[] = - "|internal/wchar_core.h|"; -/* - * 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 Isc_Fmod fix - */ -tSCC zIsc_FmodName[] = - "isc_fmod"; - -/* - * File name selection pattern - */ -tSCC zIsc_FmodList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzIsc_FmodMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIsc_FmodSelect0[] = - "fmod\\(double\\)"; - -#define ISC_FMOD_TEST_CT 1 -static tTestDesc aIsc_FmodTests[] = { - { TT_EGREP, zIsc_FmodSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Isc_Fmod - */ -static const char* apzIsc_FmodPatch[] = { - "format", - "fmod(double, double)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Isc_Omits_With_Stdc fix - */ -tSCC zIsc_Omits_With_StdcName[] = - "isc_omits_with_stdc"; - -/* - * File name selection pattern - */ -tSCC zIsc_Omits_With_StdcList[] = - "|stdio.h|math.h|ctype.h|sys/limits.h|sys/fcntl.h|sys/dirent.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzIsc_Omits_With_StdcMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zIsc_Omits_With_StdcSelect0[] = - "!defined\\(__STDC__\\) && !defined\\(_POSIX_SOURCE\\)"; - -#define ISC_OMITS_WITH_STDC_TEST_CT 1 -static tTestDesc aIsc_Omits_With_StdcTests[] = { - { TT_EGREP, zIsc_Omits_With_StdcSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Isc_Omits_With_Stdc - */ -static const char* apzIsc_Omits_With_StdcPatch[] = { - "format", - "!defined(_POSIX_SOURCE)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Kandr_Concat fix - */ -tSCC zKandr_ConcatName[] = - "kandr_concat"; - -/* - * File name selection pattern - */ -tSCC zKandr_ConcatList[] = - "|sparc/asm_linkage.h|sun3/asm_linkage.h|sun3x/asm_linkage.h|sun4/asm_linkage.h|sun4c/asm_linkage.h|sun4m/asm_linkage.h|sun4c/debug/asm_linkage.h|sun4m/debug/asm_linkage.h|arm/as_support.h|arm/mc_type.h|arm/xcb.h|dev/chardefmac.h|dev/ps_irq.h|dev/screen.h|dev/scsi.h|sys/tty.h|Xm.acorn/XmP.h|bsd43/bsd43_.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzKandr_ConcatMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zKandr_ConcatSelect0[] = - "/\\*\\*/"; - -#define KANDR_CONCAT_TEST_CT 1 -static tTestDesc aKandr_ConcatTests[] = { - { TT_EGREP, zKandr_ConcatSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Kandr_Concat - */ -static const char* apzKandr_ConcatPatch[] = { - "format", - "##", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Libc1_G_Va_List fix - */ -tSCC zLibc1_G_Va_ListName[] = - "libc1_G_va_list"; - -/* - * File name selection pattern - */ -tSCC zLibc1_G_Va_ListList[] = - "|_G_config.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzLibc1_G_Va_ListMachs[] = { - "*-*-linux*libc1", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zLibc1_G_Va_ListSelect0[] = - "typedef void \\* _G_va_list;"; - -#define LIBC1_G_VA_LIST_TEST_CT 1 -static tTestDesc aLibc1_G_Va_ListTests[] = { - { TT_EGREP, zLibc1_G_Va_ListSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Libc1_G_Va_List - */ -static const char* apzLibc1_G_Va_ListPatch[] = { - "format", - "typedef __builtin_va_list _G_va_list;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Libc1_Ifdefd_Memx fix - */ -tSCC zLibc1_Ifdefd_MemxName[] = - "libc1_ifdefd_memx"; - -/* - * File name selection pattern - */ -tSCC zLibc1_Ifdefd_MemxList[] = - "|testing.h|string.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzLibc1_Ifdefd_MemxMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zLibc1_Ifdefd_MemxSelect0[] = - "' is a built-in function for gcc 2\\.x\\. \\*/"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zLibc1_Ifdefd_MemxBypass0[] = - "__cplusplus"; - -#define LIBC1_IFDEFD_MEMX_TEST_CT 2 -static tTestDesc aLibc1_Ifdefd_MemxTests[] = { - { TT_NEGREP, zLibc1_Ifdefd_MemxBypass0, (regex_t*)NULL }, - { TT_EGREP, zLibc1_Ifdefd_MemxSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Libc1_Ifdefd_Memx - */ -static const char* apzLibc1_Ifdefd_MemxPatch[] = { - "format", - "%1", - "/\\* `mem...' is a built-in function for gcc 2\\.x\\. \\*/\n\ -#if defined\\(__STDC__\\) && __GNUC__ < 2\n\ -(/\\* .* \\*/\n\ -extern [a-z_]+ mem.*(\n\ -[^#].*)*;)\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Limits_Ifndefs fix - */ -tSCC zLimits_IfndefsName[] = - "limits_ifndefs"; - -/* - * File name selection pattern - */ -tSCC zLimits_IfndefsList[] = - "|sys/limits.h|limits.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzLimits_IfndefsMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zLimits_IfndefsSelect0[] = - "^[ \t]*#[ \t]*define[ \t]+((FLT|DBL)_(MIN|MAX|DIG))[ \t].*"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zLimits_IfndefsBypass0[] = - "ifndef[ \t]+FLT_(MIN|MAX)"; - -#define LIMITS_IFNDEFS_TEST_CT 2 -static tTestDesc aLimits_IfndefsTests[] = { - { TT_NEGREP, zLimits_IfndefsBypass0, (regex_t*)NULL }, - { TT_EGREP, zLimits_IfndefsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Limits_Ifndefs - */ -static const char* apzLimits_IfndefsPatch[] = { - "format", - "#ifndef %1\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Lynx_Void_Int fix - */ -tSCC zLynx_Void_IntName[] = - "lynx_void_int"; - -/* - * File name selection pattern - */ -tSCC zLynx_Void_IntList[] = - "|curses.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzLynx_Void_IntMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zLynx_Void_IntSelect0[] = - "#[ \t]*define[ \t]+void[ \t]+int[ \t]*"; - -#define LYNX_VOID_INT_TEST_CT 1 -static tTestDesc aLynx_Void_IntTests[] = { - { TT_EGREP, zLynx_Void_IntSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Lynx_Void_Int - */ -static const char* apzLynx_Void_IntPatch[] = { - "format", - "", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Lynxos_Fcntl_Proto fix - */ -tSCC zLynxos_Fcntl_ProtoName[] = - "lynxos_fcntl_proto"; - -/* - * File name selection pattern - */ -tSCC zLynxos_Fcntl_ProtoList[] = - "|fcntl.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzLynxos_Fcntl_ProtoMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zLynxos_Fcntl_ProtoSelect0[] = - "fcntl[ \t]*\\(int, int, int\\)"; - -#define LYNXOS_FCNTL_PROTO_TEST_CT 1 -static tTestDesc aLynxos_Fcntl_ProtoTests[] = { - { TT_EGREP, zLynxos_Fcntl_ProtoSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Lynxos_Fcntl_Proto - */ -static const char* apzLynxos_Fcntl_ProtoPatch[] = { - "format", - "%1...)", - "(fcntl[ \t]*\\(int, int, )int\\)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Machine_Ansi_H_Va_List fix - */ -tSCC zMachine_Ansi_H_Va_ListName[] = - "machine_ansi_h_va_list"; - -/* - * File name selection pattern - */ -#define zMachine_Ansi_H_Va_ListList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzMachine_Ansi_H_Va_ListMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zMachine_Ansi_H_Va_ListSelect0[] = - "define[ \t]+_BSD_VA_LIST_[ \t]"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zMachine_Ansi_H_Va_ListBypass0[] = - "__builtin_va_list"; - -#define MACHINE_ANSI_H_VA_LIST_TEST_CT 2 -static tTestDesc aMachine_Ansi_H_Va_ListTests[] = { - { TT_NEGREP, zMachine_Ansi_H_Va_ListBypass0, (regex_t*)NULL }, - { TT_EGREP, zMachine_Ansi_H_Va_ListSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Machine_Ansi_H_Va_List - */ -static const char* apzMachine_Ansi_H_Va_ListPatch[] = { - "format", - "%1__builtin_va_list", - "(define[ \t]+_BSD_VA_LIST_[ \t]+).*", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Machine_Name fix - */ -tSCC zMachine_NameName[] = - "machine_name"; - -/* - * File name selection pattern - */ -#define zMachine_NameList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzMachine_NameMachs (const char**)NULL - -/* - * perform the C function call test - */ -tSCC zMachine_NameFTst0[] = "machine_name"; - -#define MACHINE_NAME_TEST_CT 1 -static tTestDesc aMachine_NameTests[] = { - { TT_FUNCTION, zMachine_NameFTst0, 0 /* unused */ }, }; - -/* - * Fix Command Arguments for Machine_Name - */ -static const char* apzMachine_NamePatch[] = { - "machine_name", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Math_Exception fix - */ -tSCC zMath_ExceptionName[] = - "math_exception"; - -/* - * File name selection pattern - */ -tSCC zMath_ExceptionList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzMath_ExceptionMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zMath_ExceptionSelect0[] = - "struct exception"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zMath_ExceptionBypass0[] = - "We have a problem when using C\\+\\+"; - -#define MATH_EXCEPTION_TEST_CT 2 -static tTestDesc aMath_ExceptionTests[] = { - { TT_NEGREP, zMath_ExceptionBypass0, (regex_t*)NULL }, - { TT_EGREP, zMath_ExceptionSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Math_Exception - */ -static const char* apzMath_ExceptionPatch[] = { - "wrap", - "#ifdef __cplusplus\n\ -#define exception __math_exception\n\ -#endif\n", - "#ifdef __cplusplus\n\ -#undef exception\n\ -#endif\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Math_Huge_Val_From_Dbl_Max fix - */ -tSCC zMath_Huge_Val_From_Dbl_MaxName[] = - "math_huge_val_from_dbl_max"; - -/* - * File name selection pattern - */ -tSCC zMath_Huge_Val_From_Dbl_MaxList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzMath_Huge_Val_From_Dbl_MaxMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zMath_Huge_Val_From_Dbl_MaxSelect0[] = - "define[ \t]+HUGE_VAL[ \t]+DBL_MAX"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zMath_Huge_Val_From_Dbl_MaxBypass0[] = - "define[ \t]+DBL_MAX"; - -#define MATH_HUGE_VAL_FROM_DBL_MAX_TEST_CT 2 -static tTestDesc aMath_Huge_Val_From_Dbl_MaxTests[] = { - { TT_NEGREP, zMath_Huge_Val_From_Dbl_MaxBypass0, (regex_t*)NULL }, - { TT_EGREP, zMath_Huge_Val_From_Dbl_MaxSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Math_Huge_Val_From_Dbl_Max - */ -static const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c", - "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h | sed 's/.*DBL_MAX[ \t]*//' 2>/dev/null`\n\n\ -\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n\ -\tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/s@DBL_MAX@'\"$dbl_max_def@\"\n\ -\telse cat\n\ -\tfi", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Math_Huge_Val_Ifndef fix - */ -tSCC zMath_Huge_Val_IfndefName[] = - "math_huge_val_ifndef"; - -/* - * File name selection pattern - */ -tSCC zMath_Huge_Val_IfndefList[] = - "|math.h|math/math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzMath_Huge_Val_IfndefMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zMath_Huge_Val_IfndefSelect0[] = - "define[ \t]+HUGE_VAL"; - -#define MATH_HUGE_VAL_IFNDEF_TEST_CT 1 -static tTestDesc aMath_Huge_Val_IfndefTests[] = { - { TT_EGREP, zMath_Huge_Val_IfndefSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Math_Huge_Val_Ifndef - */ -static const char* apzMath_Huge_Val_IfndefPatch[] = { - "format", - "#ifndef HUGE_VAL\n\ -%0\n\ -#endif", - "^[ \t]*#[ \t]*define[ \t]+HUGE_VAL[ \t].*", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Nested_Auth_Des fix - */ -tSCC zNested_Auth_DesName[] = - "nested_auth_des"; - -/* - * File name selection pattern - */ -tSCC zNested_Auth_DesList[] = - "|rpc/rpc.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzNested_Auth_DesMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNested_Auth_DesSelect0[] = - "(/\\*.*rpc/auth_des\\.h>.*)/\\*"; - -#define NESTED_AUTH_DES_TEST_CT 1 -static tTestDesc aNested_Auth_DesTests[] = { - { TT_EGREP, zNested_Auth_DesSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Nested_Auth_Des - */ -static const char* apzNested_Auth_DesPatch[] = { - "format", - "%1*/ /*", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Nested_Motorola fix - */ -tSCC zNested_MotorolaName[] = - "nested_motorola"; - -/* - * File name selection pattern - */ -tSCC zNested_MotorolaList[] = - "|sys/limits.h|limits.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzNested_MotorolaMachs[] = { - "m68k-motorola-sysv*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNested_MotorolaSelect0[] = - "max # bytes atomic in write|error value returned by Math lib"; - -#define NESTED_MOTOROLA_TEST_CT 1 -static tTestDesc aNested_MotorolaTests[] = { - { TT_EGREP, zNested_MotorolaSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Nested_Motorola - */ -static const char* apzNested_MotorolaPatch[] = { "sed", - "-e", "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*/\\* max # bytes atomic in write to a\\)$@\\1 */@", - "-e", "s@\\(/\\*#define\tHUGE_VAL\t3.[0-9e+]* \\)\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Nested_Sys_Limits fix - */ -tSCC zNested_Sys_LimitsName[] = - "nested_sys_limits"; - -/* - * File name selection pattern - */ -tSCC zNested_Sys_LimitsList[] = - "|sys/limits.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzNested_Sys_LimitsMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNested_Sys_LimitsSelect0[] = - "CHILD_MAX"; - -#define NESTED_SYS_LIMITS_TEST_CT 1 -static tTestDesc aNested_Sys_LimitsTests[] = { - { TT_EGREP, zNested_Sys_LimitsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Nested_Sys_Limits - */ -static const char* apzNested_Sys_LimitsPatch[] = { "sed", - "-e", "/CHILD_MAX/s,/\\* Max, Max,", - "-e", "/OPEN_MAX/s,/\\* Max, Max,", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Netbsd_Extra_Semicolon fix - */ -tSCC zNetbsd_Extra_SemicolonName[] = - "netbsd_extra_semicolon"; - -/* - * File name selection pattern - */ -tSCC zNetbsd_Extra_SemicolonList[] = - "|sys/cdefs.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzNetbsd_Extra_SemicolonMachs[] = { - "*-*-netbsd*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNetbsd_Extra_SemicolonSelect0[] = - "#define[ \t]*__END_DECLS[ \t]*};"; - -#define NETBSD_EXTRA_SEMICOLON_TEST_CT 1 -static tTestDesc aNetbsd_Extra_SemicolonTests[] = { - { TT_EGREP, zNetbsd_Extra_SemicolonSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Netbsd_Extra_Semicolon - */ -static const char* apzNetbsd_Extra_SemicolonPatch[] = { - "format", - "#define __END_DECLS }", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Next_Math_Prefix fix - */ -tSCC zNext_Math_PrefixName[] = - "next_math_prefix"; - -/* - * File name selection pattern - */ -tSCC zNext_Math_PrefixList[] = - "|ansi/math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzNext_Math_PrefixMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNext_Math_PrefixSelect0[] = - "^extern[ \t]+double[ \t]+__const__[ \t]"; - -#define NEXT_MATH_PREFIX_TEST_CT 1 -static tTestDesc aNext_Math_PrefixTests[] = { - { TT_EGREP, zNext_Math_PrefixSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Next_Math_Prefix - */ -static const char* apzNext_Math_PrefixPatch[] = { - "format", - "extern double %1(", - "^extern[ \t]+double[ \t]+__const__[ \t]+([a-z]+)\\(", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Next_Template fix - */ -tSCC zNext_TemplateName[] = - "next_template"; - -/* - * File name selection pattern - */ -tSCC zNext_TemplateList[] = - "|bsd/libc.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzNext_TemplateMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNext_TemplateSelect0[] = - "[ \t]template\\)"; - -#define NEXT_TEMPLATE_TEST_CT 1 -static tTestDesc aNext_TemplateTests[] = { - { TT_EGREP, zNext_TemplateSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Next_Template - */ -static const char* apzNext_TemplatePatch[] = { - "format", - "(%1)", - "\\(([^)]*)[ \t]template\\)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Next_Volitile fix - */ -tSCC zNext_VolitileName[] = - "next_volitile"; - -/* - * File name selection pattern - */ -tSCC zNext_VolitileList[] = - "|ansi/stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzNext_VolitileMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNext_VolitileSelect0[] = - "^extern[ \t]+volatile[ \t]+void[ \t]"; - -#define NEXT_VOLITILE_TEST_CT 1 -static tTestDesc aNext_VolitileTests[] = { - { TT_EGREP, zNext_VolitileSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Next_Volitile - */ -static const char* apzNext_VolitilePatch[] = { - "format", - "extern void %1(", - "^extern[ \t]+volatile[ \t]+void[ \t]+(exit|abort)\\(", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Next_Wait_Union fix - */ -tSCC zNext_Wait_UnionName[] = - "next_wait_union"; - -/* - * File name selection pattern - */ -tSCC zNext_Wait_UnionList[] = - "|sys/wait.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzNext_Wait_UnionMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNext_Wait_UnionSelect0[] = - "wait\\(union wait"; - -#define NEXT_WAIT_UNION_TEST_CT 1 -static tTestDesc aNext_Wait_UnionTests[] = { - { TT_EGREP, zNext_Wait_UnionSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Next_Wait_Union - */ -static const char* apzNext_Wait_UnionPatch[] = { - "format", - "wait(void", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Nodeent_Syntax fix - */ -tSCC zNodeent_SyntaxName[] = - "nodeent_syntax"; - -/* - * File name selection pattern - */ -tSCC zNodeent_SyntaxList[] = - "|netdnet/dnetdb.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzNodeent_SyntaxMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zNodeent_SyntaxSelect0[] = - "char[ \t]*\\*na_addr[ \t]*$"; - -#define NODEENT_SYNTAX_TEST_CT 1 -static tTestDesc aNodeent_SyntaxTests[] = { - { TT_EGREP, zNodeent_SyntaxSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Nodeent_Syntax - */ -static const char* apzNodeent_SyntaxPatch[] = { - "format", - "%0;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Obstack_Lvalue_Cast fix - */ -tSCC zObstack_Lvalue_CastName[] = - "obstack_lvalue_cast"; - -/* - * File name selection pattern - */ -tSCC zObstack_Lvalue_CastList[] = - "|obstack.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzObstack_Lvalue_CastMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zObstack_Lvalue_CastSelect0[] = - "\\*\\(\\(([^()]*)\\*\\)(.*)\\)\\+\\+ = \\(([^()]*)\\)"; - -#define OBSTACK_LVALUE_CAST_TEST_CT 1 -static tTestDesc aObstack_Lvalue_CastTests[] = { - { TT_EGREP, zObstack_Lvalue_CastSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Obstack_Lvalue_Cast - */ -static const char* apzObstack_Lvalue_CastPatch[] = { - "format", - "((*((%1*)%2) = (%3)), (%2 += sizeof (%1)))", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Osf_Namespace_A fix - */ -tSCC zOsf_Namespace_AName[] = - "osf_namespace_a"; - -/* - * File name selection pattern - */ -tSCC zOsf_Namespace_AList[] = - "|reg_types.h|sys/lc_core.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzOsf_Namespace_AMachs (const char**)NULL - -/* - * perform the 'test' shell command - do fix on success - */ -tSCC zOsf_Namespace_ATest0[] = - " -r reg_types.h"; -tSCC zOsf_Namespace_ATest1[] = - " -r sys/lc_core.h"; -tSCC zOsf_Namespace_ATest2[] = - " -n \"`grep '} regex_t;' reg_types.h`\""; -tSCC zOsf_Namespace_ATest3[] = - " -z \"`grep __regex_t regex.h`\""; - -#define OSF_NAMESPACE_A_TEST_CT 4 -static tTestDesc aOsf_Namespace_ATests[] = { - { TT_TEST, zOsf_Namespace_ATest0, 0 /* unused */ }, - { TT_TEST, zOsf_Namespace_ATest1, 0 /* unused */ }, - { TT_TEST, zOsf_Namespace_ATest2, 0 /* unused */ }, - { TT_TEST, zOsf_Namespace_ATest3, 0 /* unused */ }, }; - -/* - * Fix Command Arguments for Osf_Namespace_A - */ -static const char* apzOsf_Namespace_APatch[] = { - "format", - "__%0", - "reg(ex|off|match)_t", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Osf_Namespace_C fix - */ -tSCC zOsf_Namespace_CName[] = - "osf_namespace_c"; - -/* - * File name selection pattern - */ -tSCC zOsf_Namespace_CList[] = - "|regex.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzOsf_Namespace_CMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zOsf_Namespace_CSelect0[] = - "#include <reg_types.h>.*"; - -/* - * perform the 'test' shell command - do fix on success - */ -tSCC zOsf_Namespace_CTest0[] = - " -r reg_types.h"; -tSCC zOsf_Namespace_CTest1[] = - " -r sys/lc_core.h"; -tSCC zOsf_Namespace_CTest2[] = - " -n \"`grep '} regex_t;' reg_types.h`\""; -tSCC zOsf_Namespace_CTest3[] = - " -z \"`grep __regex_t regex.h`\""; - -#define OSF_NAMESPACE_C_TEST_CT 5 -static tTestDesc aOsf_Namespace_CTests[] = { - { TT_TEST, zOsf_Namespace_CTest0, 0 /* unused */ }, - { TT_TEST, zOsf_Namespace_CTest1, 0 /* unused */ }, - { TT_TEST, zOsf_Namespace_CTest2, 0 /* unused */ }, - { TT_TEST, zOsf_Namespace_CTest3, 0 /* unused */ }, - { TT_EGREP, zOsf_Namespace_CSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Osf_Namespace_C - */ -static const char* apzOsf_Namespace_CPatch[] = { - "format", - "%0\n\ -typedef __regex_t\tregex_t;\n\ -typedef __regoff_t\tregoff_t;\n\ -typedef __regmatch_t\tregmatch_t;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Pthread_Page_Size fix - */ -tSCC zPthread_Page_SizeName[] = - "pthread_page_size"; - -/* - * File name selection pattern - */ -tSCC zPthread_Page_SizeList[] = - "|pthread.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzPthread_Page_SizeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zPthread_Page_SizeSelect0[] = - "^int __page_size"; - -#define PTHREAD_PAGE_SIZE_TEST_CT 1 -static tTestDesc aPthread_Page_SizeTests[] = { - { TT_EGREP, zPthread_Page_SizeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Pthread_Page_Size - */ -static const char* apzPthread_Page_SizePatch[] = { - "format", - "extern %0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Read_Ret_Type fix - */ -tSCC zRead_Ret_TypeName[] = - "read_ret_type"; - -/* - * File name selection pattern - */ -tSCC zRead_Ret_TypeList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzRead_Ret_TypeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zRead_Ret_TypeSelect0[] = - "extern int\t.*, fread\\(\\), fwrite\\(\\)"; - -#define READ_RET_TYPE_TEST_CT 1 -static tTestDesc aRead_Ret_TypeTests[] = { - { TT_EGREP, zRead_Ret_TypeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Read_Ret_Type - */ -static const char* apzRead_Ret_TypePatch[] = { - "format", - "extern unsigned int fread(), fwrite();\n\ -%1%2", - "(extern int\t.*), fread\\(\\), fwrite\\(\\)(.*)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Rpc_Xdr_Lvalue_Cast_A fix - */ -tSCC zRpc_Xdr_Lvalue_Cast_AName[] = - "rpc_xdr_lvalue_cast_a"; - -/* - * File name selection pattern - */ -tSCC zRpc_Xdr_Lvalue_Cast_AList[] = - "|rpc/xdr.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzRpc_Xdr_Lvalue_Cast_AMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zRpc_Xdr_Lvalue_Cast_ASelect0[] = - "#define[ \t]*IXDR_GET_LONG.*\\\\\n\ -.*__extension__.*"; - -#define RPC_XDR_LVALUE_CAST_A_TEST_CT 1 -static tTestDesc aRpc_Xdr_Lvalue_Cast_ATests[] = { - { TT_EGREP, zRpc_Xdr_Lvalue_Cast_ASelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Rpc_Xdr_Lvalue_Cast_A - */ -static const char* apzRpc_Xdr_Lvalue_Cast_APatch[] = { - "format", - "#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Rpc_Xdr_Lvalue_Cast_B fix - */ -tSCC zRpc_Xdr_Lvalue_Cast_BName[] = - "rpc_xdr_lvalue_cast_b"; - -/* - * File name selection pattern - */ -tSCC zRpc_Xdr_Lvalue_Cast_BList[] = - "|rpc/xdr.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzRpc_Xdr_Lvalue_Cast_BMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zRpc_Xdr_Lvalue_Cast_BSelect0[] = - "#define[ \t]*IXDR_PUT_LONG.*\\\\\n\ -.*__extension__.*"; - -#define RPC_XDR_LVALUE_CAST_B_TEST_CT 1 -static tTestDesc aRpc_Xdr_Lvalue_Cast_BTests[] = { - { TT_EGREP, zRpc_Xdr_Lvalue_Cast_BSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Rpc_Xdr_Lvalue_Cast_B - */ -static const char* apzRpc_Xdr_Lvalue_Cast_BPatch[] = { - "format", - "#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Rs6000_Double fix - */ -tSCC zRs6000_DoubleName[] = - "rs6000_double"; - -/* - * File name selection pattern - */ -tSCC zRs6000_DoubleList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzRs6000_DoubleMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zRs6000_DoubleSelect0[] = - "[^a-zA-Z_]class\\("; - -#define RS6000_DOUBLE_TEST_CT 1 -static tTestDesc aRs6000_DoubleTests[] = { - { TT_EGREP, zRs6000_DoubleSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Rs6000_Double - */ -static const char* apzRs6000_DoublePatch[] = { - "format", - "#ifndef __cplusplus\n\ -%0\n\ -#endif", - "^.*[^a-zA-Z_]class\\(.*", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Rs6000_Fchmod fix - */ -tSCC zRs6000_FchmodName[] = - "rs6000_fchmod"; - -/* - * File name selection pattern - */ -tSCC zRs6000_FchmodList[] = - "|sys/stat.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzRs6000_FchmodMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zRs6000_FchmodSelect0[] = - "fchmod\\(char \\*"; - -#define RS6000_FCHMOD_TEST_CT 1 -static tTestDesc aRs6000_FchmodTests[] = { - { TT_EGREP, zRs6000_FchmodSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Rs6000_Fchmod - */ -static const char* apzRs6000_FchmodPatch[] = { - "format", - "fchmod(int", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Rs6000_Param fix - */ -tSCC zRs6000_ParamName[] = - "rs6000_param"; - -/* - * File name selection pattern - */ -tSCC zRs6000_ParamList[] = - "|stdio.h|unistd.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzRs6000_ParamMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zRs6000_ParamSelect0[] = - "rename\\(const char \\*old, const char \\*new\\)"; - -#define RS6000_PARAM_TEST_CT 1 -static tTestDesc aRs6000_ParamTests[] = { - { TT_EGREP, zRs6000_ParamSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Rs6000_Param - */ -static const char* apzRs6000_ParamPatch[] = { - "format", - "rename(const char *_old, const char *_new)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sco_Math fix - */ -tSCC zSco_MathName[] = - "sco_math"; - -/* - * File name selection pattern - */ -tSCC zSco_MathList[] = - "|math.h|ansi/math.h|posix/math.h|xpg4/math.h|xpg4v2/math.h|xpg4plus/math.h|ods_30_compat/math.h|oldstyle/math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSco_MathMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSco_MathSelect0[] = - "inline double abs"; - -#define SCO_MATH_TEST_CT 1 -static tTestDesc aSco_MathTests[] = { - { TT_EGREP, zSco_MathSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sco_Math - */ -static const char* apzSco_MathPatch[] = { "sed", - "-e", "/#define.*__fp_class(a) \\\\/i\\\n\ -#ifndef __GNUC__\n", - "-e", "/.*__builtin_generic/a\\\n\ -#else\\\n\ -#define __fp_class(a) \\\\\\\n\ - __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n\ - __fpclassifyl(a), \\\\\\\n\ - __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n\ - __fpclassifyf(a),__fpclassify(a)))\\\n\ -#endif", - "-e", "/extern \"C\\+\\+\"/N;/inline double abs/i\\\n\ -#ifndef __GNUC__\n", - "-e", "/inline long double trunc/N;/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n\ -#endif /* ! __GNUC__ */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sco_Regset fix - */ -tSCC zSco_RegsetName[] = - "sco_regset"; - -/* - * File name selection pattern - */ -tSCC zSco_RegsetList[] = - "|sys/regset.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSco_RegsetMachs[] = { - "*-*-sco3.2v5*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSco_RegsetSelect0[] = - "(struct[ \t]+.*)fpstate"; - -#define SCO_REGSET_TEST_CT 1 -static tTestDesc aSco_RegsetTests[] = { - { TT_EGREP, zSco_RegsetSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sco_Regset - */ -static const char* apzSco_RegsetPatch[] = { - "format", - "%1rsfpstate", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sco_Static_Func fix - */ -tSCC zSco_Static_FuncName[] = - "sco_static_func"; - -/* - * File name selection pattern - */ -tSCC zSco_Static_FuncList[] = - "|sys/stat.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSco_Static_FuncMachs[] = { - "i?86-*-sco3.2*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSco_Static_FuncSelect0[] = - "^static int"; - -#define SCO_STATIC_FUNC_TEST_CT 1 -static tTestDesc aSco_Static_FuncTests[] = { - { TT_EGREP, zSco_Static_FuncSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sco_Static_Func - */ -static const char* apzSco_Static_FuncPatch[] = { "sed", - "-e", "/^static int/i\\\n\ -#if __cplusplus\\\n\ -extern \"C\" {\\\n\ -#endif /* __cplusplus */", - "-e", "/^}$/a\\\n\ -#if __cplusplus\\\n\ - }\\\n\ -#endif /* __cplusplus */", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sco_Utime fix - */ -tSCC zSco_UtimeName[] = - "sco_utime"; - -/* - * File name selection pattern - */ -tSCC zSco_UtimeList[] = - "|sys/times.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSco_UtimeMachs[] = { - "i?86-*-sco3.2v4*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSco_UtimeSelect0[] = - "\\(const char \\*, struct utimbuf \\*\\);"; - -#define SCO_UTIME_TEST_CT 1 -static tTestDesc aSco_UtimeTests[] = { - { TT_EGREP, zSco_UtimeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sco_Utime - */ -static const char* apzSco_UtimePatch[] = { - "format", - "(const char *, const struct utimbuf *);", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Mutex_Init_1 fix - */ -tSCC zSolaris_Mutex_Init_1Name[] = - "solaris_mutex_init_1"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Mutex_Init_1List[] = - "|pthread.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSolaris_Mutex_Init_1Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Mutex_Init_1Select0[] = - "@\\(#\\)pthread.h[ \t]+1.1[0-9][ \t]+9[567]/[0-9/]+ SMI"; - -#define SOLARIS_MUTEX_INIT_1_TEST_CT 1 -static tTestDesc aSolaris_Mutex_Init_1Tests[] = { - { TT_EGREP, zSolaris_Mutex_Init_1Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Mutex_Init_1 - */ -static const char* apzSolaris_Mutex_Init_1Patch[] = { "sed", - "-e", "/define[ \t]*PTHREAD_MUTEX_INI/s/{0, 0,/{{{0}, 0}, {{{0}}},/\n\ -/define[ \t]*PTHREAD_COND_INI/s/{0,/{{{0},0},/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Mutex_Init_2 fix - */ -tSCC zSolaris_Mutex_Init_2Name[] = - "solaris_mutex_init_2"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Mutex_Init_2List[] = - "|pthread.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSolaris_Mutex_Init_2Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Mutex_Init_2Select0[] = - "@\\(#\\)pthread.h[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - -#define SOLARIS_MUTEX_INIT_2_TEST_CT 1 -static tTestDesc aSolaris_Mutex_Init_2Tests[] = { - { TT_EGREP, zSolaris_Mutex_Init_2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Mutex_Init_2 - */ -static const char* apzSolaris_Mutex_Init_2Patch[] = { - "format", - "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n\ -%0\n\ -#else\n\ -%1, {0}}%3\n\ -#endif", - "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+\\{.*),[ \t]*0\\}(|[ \t].*)$", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Socket fix - */ -tSCC zSolaris_SocketName[] = - "solaris_socket"; - -/* - * File name selection pattern - */ -tSCC zSolaris_SocketList[] = - "|sys/socket.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSolaris_SocketMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_SocketSelect0[] = - "@\\(#\\)socket.h[ \t]+1.[123][0-9][ \t]+9[567]/[0-9/]+ SMI"; - -#define SOLARIS_SOCKET_TEST_CT 1 -static tTestDesc aSolaris_SocketTests[] = { - { TT_EGREP, zSolaris_SocketSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Socket - */ -static const char* apzSolaris_SocketPatch[] = { - "format", - "extern int %1(int, %2void *, int, int);", - "^extern int (recv|send)\\(int, (const )*char \\*, int, int\\);", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Stdio_Tag fix - */ -tSCC zSolaris_Stdio_TagName[] = - "solaris_stdio_tag"; - -/* - * File name selection pattern - */ -tSCC zSolaris_Stdio_TagList[] = - "|stdio_tag.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSolaris_Stdio_TagMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_Stdio_TagSelect0[] = - "__cplusplus < 54321L"; - -#define SOLARIS_STDIO_TAG_TEST_CT 1 -static tTestDesc aSolaris_Stdio_TagTests[] = { - { TT_EGREP, zSolaris_Stdio_TagSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Stdio_Tag - */ -static const char* apzSolaris_Stdio_TagPatch[] = { "sed", - "-e", "s/defined(__cplusplus) && (__cplusplus < 54321L)/0/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Unistd fix - */ -tSCC zSolaris_UnistdName[] = - "solaris_unistd"; - -/* - * File name selection pattern - */ -tSCC zSolaris_UnistdList[] = - "|unistd.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSolaris_UnistdMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_UnistdSelect0[] = - "@\\(#\\)unistd.h[ \t]+1.3[0-9][ \t]+9[567]/[0-9/]+ SMI"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSolaris_UnistdBypass0[] = - "getpagesize"; - -#define SOLARIS_UNISTD_TEST_CT 2 -static tTestDesc aSolaris_UnistdTests[] = { - { TT_NEGREP, zSolaris_UnistdBypass0, (regex_t*)NULL }, - { TT_EGREP, zSolaris_UnistdSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Unistd - */ -static const char* apzSolaris_UnistdPatch[] = { - "format", - "extern int getpagesize();\n\ -%0", - "^extern (pid_t|int) getpgid\\(.*\\);", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Solaris_Widec fix - */ -tSCC zSolaris_WidecName[] = - "solaris_widec"; - -/* - * File name selection pattern - */ -tSCC zSolaris_WidecList[] = - "|widec.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSolaris_WidecMachs[] = { - "*-*-solaris2.[0-5]", - "*-*-solaris2.[0-5].*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSolaris_WidecSelect0[] = - "#include <euc.h>"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSolaris_WidecBypass0[] = - "include.*wchar\\.h"; - -#define SOLARIS_WIDEC_TEST_CT 2 -static tTestDesc aSolaris_WidecTests[] = { - { TT_NEGREP, zSolaris_WidecBypass0, (regex_t*)NULL }, - { TT_EGREP, zSolaris_WidecSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Solaris_Widec - */ -static const char* apzSolaris_WidecPatch[] = { - "format", - "%0\n\ -#include <wchar.h>", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Statsswtch fix - */ -tSCC zStatsswtchName[] = - "statsswtch"; - -/* - * File name selection pattern - */ -tSCC zStatsswtchList[] = - "|rpcsvc/rstat.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzStatsswtchMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zStatsswtchSelect0[] = - "boottime$"; - -#define STATSSWTCH_TEST_CT 1 -static tTestDesc aStatsswtchTests[] = { - { TT_EGREP, zStatsswtchSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Statsswtch - */ -static const char* apzStatsswtchPatch[] = { - "format", - "boottime;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Stdio_Stdarg_H fix - */ -tSCC zStdio_Stdarg_HName[] = - "stdio_stdarg_h"; - -/* - * File name selection pattern - */ -tSCC zStdio_Stdarg_HList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzStdio_Stdarg_HMachs (const char**)NULL - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zStdio_Stdarg_HBypass0[] = - "include.*(stdarg.h|machine/ansi.h)"; - -#define STDIO_STDARG_H_TEST_CT 1 -static tTestDesc aStdio_Stdarg_HTests[] = { - { TT_NEGREP, zStdio_Stdarg_HBypass0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Stdio_Stdarg_H - */ -static const char* apzStdio_Stdarg_HPatch[] = { - "wrap", - "#define __need___va_list\n\ -#include <stdarg.h>\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Stdio_Va_List fix - */ -tSCC zStdio_Va_ListName[] = - "stdio_va_list"; - -/* - * File name selection pattern - */ -tSCC zStdio_Va_ListList[] = - "|stdio.h|internal/stdio_core.h|internal/wchar_core.h|com_err.h|cps.h|curses.h|krb5.h|lc_core.h|pfmt.h|wchar.h|curses_colr/curses.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzStdio_Va_ListMachs (const char**)NULL - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zStdio_Va_ListBypass0[] = - "__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list"; - -#define STDIO_VA_LIST_TEST_CT 1 -static tTestDesc aStdio_Va_ListTests[] = { - { TT_NEGREP, zStdio_Va_ListBypass0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Stdio_Va_List - */ -static const char* apzStdio_Va_ListPatch[] = { "sed", - "-e", "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n\ -s@(va_list)&@(__gnuc_va_list)\\&@\n\ -s@ _VA_LIST_));@ __gnuc_va_list));@\n\ -s@ __VA_LIST__));@ __gnuc_va_list));@\n\ -s@ va_list@ __not_va_list__@\n\ -s@\\*va_list@*__not_va_list__@\n\ -s@ __va_list)@ __gnuc_va_list)@\n\ -s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;@typedef \\1 __not_va_list__;@\n\ -s@typedef[ \t]*__va_list__@typedef __gnuc_va_list@\n\ -s@GNUC_VA_LIST@GNUC_Va_LIST@\n\ -s@_VA_LIST_DEFINED@_Va_LIST_DEFINED@\n\ -s@_NEED___VA_LIST@_NEED___Va_LIST@\n\ -s@VA_LIST@DUMMY_VA_LIST@\n\ -s@_Va_LIST@_VA_LIST@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Strict_Ansi_Not fix - */ -tSCC zStrict_Ansi_NotName[] = - "strict_ansi_not"; - -/* - * File name selection pattern - */ -#define zStrict_Ansi_NotList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzStrict_Ansi_NotMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zStrict_Ansi_NotSelect0[] = - "^([ \t]*#[ \t]*if.*)(!__STDC__|__STDC__[ \t]*==[ \t]*0|__STDC__[ \t]*!=[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zStrict_Ansi_NotBypass0[] = - "GNU and MIPS C compilers define __STDC__ differently"; -tSCC zStrict_Ansi_NotBypass1[] = - "__SCO_VERSION__.*__STDC__ != 1"; - -/* - * perform the C function call test - */ -tSCC zStrict_Ansi_NotFTst0[] = "stdc_0_in_system_headers"; - -#define STRICT_ANSI_NOT_TEST_CT 4 -static tTestDesc aStrict_Ansi_NotTests[] = { - { TT_FUNCTION, zStrict_Ansi_NotFTst0, 0 /* unused */ }, - { TT_NEGREP, zStrict_Ansi_NotBypass0, (regex_t*)NULL }, - { TT_NEGREP, zStrict_Ansi_NotBypass1, (regex_t*)NULL }, - { TT_EGREP, zStrict_Ansi_NotSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Strict_Ansi_Not - */ -static const char* apzStrict_Ansi_NotPatch[] = { - "format", - "%1 !defined(__STRICT_ANSI__)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Strict_Ansi_Not_Ctd fix - */ -tSCC zStrict_Ansi_Not_CtdName[] = - "strict_ansi_not_ctd"; - -/* - * File name selection pattern - */ -tSCC zStrict_Ansi_Not_CtdList[] = - "|math.h|limits.h|stdio.h|signal.h|stdlib.h|sys/signal.h|time.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzStrict_Ansi_Not_CtdMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zStrict_Ansi_Not_CtdSelect0[] = - "^([ \t]*(\\(|&&|\\|\\|)([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*[ \t(]*)(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)"; - -/* - * perform the C function call test - */ -tSCC zStrict_Ansi_Not_CtdFTst0[] = "stdc_0_in_system_headers"; - -#define STRICT_ANSI_NOT_CTD_TEST_CT 2 -static tTestDesc aStrict_Ansi_Not_CtdTests[] = { - { TT_FUNCTION, zStrict_Ansi_Not_CtdFTst0, 0 /* unused */ }, - { TT_EGREP, zStrict_Ansi_Not_CtdSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Strict_Ansi_Not_Ctd - */ -static const char* apzStrict_Ansi_Not_CtdPatch[] = { - "format", - "%1 !defined(__STRICT_ANSI__)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Strict_Ansi_Only fix - */ -tSCC zStrict_Ansi_OnlyName[] = - "strict_ansi_only"; - -/* - * File name selection pattern - */ -#define zStrict_Ansi_OnlyList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzStrict_Ansi_OnlyMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zStrict_Ansi_OnlySelect0[] = - "^([ \t]*#[ \t]*if.*)(__STDC__[ \t]*!=[ \t]*0|__STDC__[ \t]*==[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0)"; - -/* - * perform the C function call test - */ -tSCC zStrict_Ansi_OnlyFTst0[] = "stdc_0_in_system_headers"; - -#define STRICT_ANSI_ONLY_TEST_CT 2 -static tTestDesc aStrict_Ansi_OnlyTests[] = { - { TT_FUNCTION, zStrict_Ansi_OnlyFTst0, 0 /* unused */ }, - { TT_EGREP, zStrict_Ansi_OnlySelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Strict_Ansi_Only - */ -static const char* apzStrict_Ansi_OnlyPatch[] = { - "format", - "%1 defined(__STRICT_ANSI__)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Struct_File fix - */ -tSCC zStruct_FileName[] = - "struct_file"; - -/* - * File name selection pattern - */ -tSCC zStruct_FileList[] = - "|rpc/xdr.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzStruct_FileMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zStruct_FileSelect0[] = - "^.*xdrstdio_create.*struct __file_s"; - -#define STRUCT_FILE_TEST_CT 1 -static tTestDesc aStruct_FileTests[] = { - { TT_EGREP, zStruct_FileSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Struct_File - */ -static const char* apzStruct_FilePatch[] = { - "format", - "struct __file_s;\n\ -%0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Struct_Sockaddr fix - */ -tSCC zStruct_SockaddrName[] = - "struct_sockaddr"; - -/* - * File name selection pattern - */ -tSCC zStruct_SockaddrList[] = - "|rpc/auth.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzStruct_SockaddrMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zStruct_SockaddrSelect0[] = - "^.*authdes_create.*struct sockaddr[^_]"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zStruct_SockaddrBypass0[] = - "<sys/socket.h>"; -tSCC zStruct_SockaddrBypass1[] = - "struct sockaddr;\n"; - -#define STRUCT_SOCKADDR_TEST_CT 3 -static tTestDesc aStruct_SockaddrTests[] = { - { TT_NEGREP, zStruct_SockaddrBypass0, (regex_t*)NULL }, - { TT_NEGREP, zStruct_SockaddrBypass1, (regex_t*)NULL }, - { TT_EGREP, zStruct_SockaddrSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Struct_Sockaddr - */ -static const char* apzStruct_SockaddrPatch[] = { - "format", - "struct sockaddr;\n\ -%0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sun_Auth_Proto fix - */ -tSCC zSun_Auth_ProtoName[] = - "sun_auth_proto"; - -/* - * File name selection pattern - */ -tSCC zSun_Auth_ProtoList[] = - "|rpc/auth.h|rpc/clnt.h|rpc/svc.h|rpc/xdr.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSun_Auth_ProtoMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSun_Auth_ProtoSelect0[] = - "\\(\\*[a-z][a-z_]*\\)\\(\\)"; - -#define SUN_AUTH_PROTO_TEST_CT 1 -static tTestDesc aSun_Auth_ProtoTests[] = { - { TT_EGREP, zSun_Auth_ProtoSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sun_Auth_Proto - */ -static const char* apzSun_Auth_ProtoPatch[] = { - "format", - "#ifdef __cplusplus\n\ -%1(...);%2\n\ -#else\n\ -%1();%2\n\ -#endif", - "(.*\\(\\*[a-z][a-z_]*\\))\\(\\);(.*)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sun_Bogus_Ifdef fix - */ -tSCC zSun_Bogus_IfdefName[] = - "sun_bogus_ifdef"; - -/* - * File name selection pattern - */ -tSCC zSun_Bogus_IfdefList[] = - "|hsfs/hsfs_spec.h|hsfs/iso_spec.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSun_Bogus_IfdefMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSun_Bogus_IfdefSelect0[] = - "#ifdef(.*\\|\\|.*)"; - -#define SUN_BOGUS_IFDEF_TEST_CT 1 -static tTestDesc aSun_Bogus_IfdefTests[] = { - { TT_EGREP, zSun_Bogus_IfdefSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sun_Bogus_Ifdef - */ -static const char* apzSun_Bogus_IfdefPatch[] = { - "format", - "#if%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sun_Catmacro fix - */ -tSCC zSun_CatmacroName[] = - "sun_catmacro"; - -/* - * File name selection pattern - */ -tSCC zSun_CatmacroList[] = - "|pixrect/memvar.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSun_CatmacroMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSun_CatmacroSelect0[] = - "^#define[ \t]+CAT\\(a,b\\).*"; - -#define SUN_CATMACRO_TEST_CT 1 -static tTestDesc aSun_CatmacroTests[] = { - { TT_EGREP, zSun_CatmacroSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sun_Catmacro - */ -static const char* apzSun_CatmacroPatch[] = { - "format", - "#ifdef __STDC__\n\ -# define CAT(a,b) a##b\n\ -#else\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sun_Malloc fix - */ -tSCC zSun_MallocName[] = - "sun_malloc"; - -/* - * File name selection pattern - */ -tSCC zSun_MallocList[] = - "|malloc.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSun_MallocMachs (const char**)NULL -#define SUN_MALLOC_TEST_CT 0 -#define aSun_MallocTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Sun_Malloc - */ -static const char* apzSun_MallocPatch[] = { "sed", - "-e", "s/typedef[ \t]char \\*\tmalloc_t/typedef void \\*\tmalloc_t/g", - "-e", "s/int[ \t][ \t]*free/void\tfree/g", - "-e", "s/char\\([ \t]*\\*[ \t]*malloc\\)/void\\1/g", - "-e", "s/char\\([ \t]*\\*[ \t]*realloc\\)/void\\1/g", - "-e", "s/char\\([ \t]*\\*[ \t]*calloc\\)/void\\1/g", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sun_Rusers_Semi fix - */ -tSCC zSun_Rusers_SemiName[] = - "sun_rusers_semi"; - -/* - * File name selection pattern - */ -tSCC zSun_Rusers_SemiList[] = - "|rpcsvc/rusers.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSun_Rusers_SemiMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSun_Rusers_SemiSelect0[] = - "_cnt$"; - -#define SUN_RUSERS_SEMI_TEST_CT 1 -static tTestDesc aSun_Rusers_SemiTests[] = { - { TT_EGREP, zSun_Rusers_SemiSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sun_Rusers_Semi - */ -static const char* apzSun_Rusers_SemiPatch[] = { "sed", - "-e", "/^struct/,/^};/s/_cnt$/_cnt;/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sun_Signal fix - */ -tSCC zSun_SignalName[] = - "sun_signal"; - -/* - * File name selection pattern - */ -tSCC zSun_SignalList[] = - "|sys/signal.h|signal.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSun_SignalMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSun_SignalSelect0[] = - "^void\t\\(\\*signal\\(\\)\\)\\(\\);.*"; - -#define SUN_SIGNAL_TEST_CT 1 -static tTestDesc aSun_SignalTests[] = { - { TT_EGREP, zSun_SignalSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sun_Signal - */ -static const char* apzSun_SignalPatch[] = { - "format", - "#ifdef __cplusplus\n\ -void\t(*signal(...))(...);\n\ -#else\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sunos_Strlen fix - */ -tSCC zSunos_StrlenName[] = - "sunos_strlen"; - -/* - * File name selection pattern - */ -tSCC zSunos_StrlenList[] = - "|strings.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSunos_StrlenMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSunos_StrlenSelect0[] = - "int[ \t]*strlen\\(\\);(.*)"; - -#define SUNOS_STRLEN_TEST_CT 1 -static tTestDesc aSunos_StrlenTests[] = { - { TT_EGREP, zSunos_StrlenSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sunos_Strlen - */ -static const char* apzSunos_StrlenPatch[] = { - "format", - "__SIZE_TYPE__ strlen();%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Svr4__P fix - */ -tSCC zSvr4__PName[] = - "svr4__p"; - -/* - * File name selection pattern - */ -tSCC zSvr4__PList[] = - "|math.h|floatingpoint.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSvr4__PMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSvr4__PSelect0[] = - "^#define[ \t]+__P.*"; - -#define SVR4__P_TEST_CT 1 -static tTestDesc aSvr4__PTests[] = { - { TT_EGREP, zSvr4__PSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Svr4__P - */ -static const char* apzSvr4__PPatch[] = { - "format", - "#ifndef __P\n\ -%0\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Svr4_Disable_Opt fix - */ -tSCC zSvr4_Disable_OptName[] = - "svr4_disable_opt"; - -/* - * File name selection pattern - */ -tSCC zSvr4_Disable_OptList[] = - "|string.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSvr4_Disable_OptMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSvr4_Disable_OptSelect0[] = - "#define.*__std_hdr_"; - -#define SVR4_DISABLE_OPT_TEST_CT 1 -static tTestDesc aSvr4_Disable_OptTests[] = { - { TT_EGREP, zSvr4_Disable_OptSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Svr4_Disable_Opt - */ -static const char* apzSvr4_Disable_OptPatch[] = { "sed", - "-e", "/#define.*__std_hdr_/d", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Svr4_Getcwd fix - */ -tSCC zSvr4_GetcwdName[] = - "svr4_getcwd"; - -/* - * File name selection pattern - */ -tSCC zSvr4_GetcwdList[] = - "|stdlib.h|unistd.h|prototypes.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSvr4_GetcwdMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSvr4_GetcwdSelect0[] = - "getcwd\\(char \\*, int\\)"; - -#define SVR4_GETCWD_TEST_CT 1 -static tTestDesc aSvr4_GetcwdTests[] = { - { TT_EGREP, zSvr4_GetcwdSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Svr4_Getcwd - */ -static const char* apzSvr4_GetcwdPatch[] = { - "format", - "getcwd(char *, size_t)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Svr4_Krnl fix - */ -tSCC zSvr4_KrnlName[] = - "svr4_krnl"; - -/* - * File name selection pattern - */ -tSCC zSvr4_KrnlList[] = - "|fs/rfs/rf_cache.h|sys/erec.h|sys/err.h|sys/char.h|sys/getpages.h|sys/map.h|sys/cmn_err.h|sys/kdebugger.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzSvr4_KrnlMachs[] = { - "*-*-sysv4*", - "i?86-sequent-ptx*", - (const char*)NULL }; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSvr4_KrnlBypass0[] = - "_KERNEL"; - -#define SVR4_KRNL_TEST_CT 1 -static tTestDesc aSvr4_KrnlTests[] = { - { TT_NEGREP, zSvr4_KrnlBypass0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Svr4_Krnl - */ -static const char* apzSvr4_KrnlPatch[] = { - "wrap", - "#ifdef _KERNEL\n", - "#endif /* _KERNEL */\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Svr4_Profil fix - */ -tSCC zSvr4_ProfilName[] = - "svr4_profil"; - -/* - * File name selection pattern - */ -tSCC zSvr4_ProfilList[] = - "|stdlib.h|unistd.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSvr4_ProfilMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -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 -static tTestDesc aSvr4_ProfilTests[] = { - { TT_NEGREP, zSvr4_ProfilBypass0, (regex_t*)NULL }, - { TT_EGREP, zSvr4_ProfilSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Svr4_Profil - */ -static const char* apzSvr4_ProfilPatch[] = { - "format", - "profil(unsigned short *, size_t, int, unsigned int)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Svr4_Sighandler_Type fix - */ -tSCC zSvr4_Sighandler_TypeName[] = - "svr4_sighandler_type"; - -/* - * File name selection pattern - */ -tSCC zSvr4_Sighandler_TypeList[] = - "|sys/signal.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSvr4_Sighandler_TypeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSvr4_Sighandler_TypeSelect0[] = - "void *\\(\\*\\)\\(\\)"; - -#define SVR4_SIGHANDLER_TYPE_TEST_CT 1 -static tTestDesc aSvr4_Sighandler_TypeTests[] = { - { TT_EGREP, zSvr4_Sighandler_TypeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Svr4_Sighandler_Type - */ -static const char* apzSvr4_Sighandler_TypePatch[] = { - "format", - "void (*)(int)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Svr4_Undeclared_Getrnge fix - */ -tSCC zSvr4_Undeclared_GetrngeName[] = - "svr4_undeclared_getrnge"; - -/* - * File name selection pattern - */ -tSCC zSvr4_Undeclared_GetrngeList[] = - "|regexp.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSvr4_Undeclared_GetrngeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSvr4_Undeclared_GetrngeSelect0[] = - "getrnge"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSvr4_Undeclared_GetrngeBypass0[] = - "static void getrnge"; - -#define SVR4_UNDECLARED_GETRNGE_TEST_CT 2 -static tTestDesc aSvr4_Undeclared_GetrngeTests[] = { - { TT_NEGREP, zSvr4_Undeclared_GetrngeBypass0, (regex_t*)NULL }, - { TT_EGREP, zSvr4_Undeclared_GetrngeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Svr4_Undeclared_Getrnge - */ -static const char* apzSvr4_Undeclared_GetrngePatch[] = { - "format", - "%0\n\ -static int getrnge ();", - "^static int[ \t]+size;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sysv68_String fix - */ -tSCC zSysv68_StringName[] = - "sysv68_string"; - -/* - * File name selection pattern - */ -tSCC zSysv68_StringList[] = - "|testing.h|string.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSysv68_StringMachs (const char**)NULL -#define SYSV68_STRING_TEST_CT 0 -#define aSysv68_StringTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Sysv68_String - */ -static const char* apzSysv68_StringPatch[] = { "sed", - "-e", "s/extern[ \t]*int[ \t]*strlen();/extern unsigned int strlen();/", - "-e", "s/extern[ \t]*int[ \t]*ffs[ \t]*(long);/extern int ffs(int);/", - "-e", "s/strdup(char \\*s1);/strdup(const char *s1);/", - "-e", "/^extern char$/N", - "-e", "s/^extern char\\(\\n\t\\*memccpy(),\\)$/extern void\\1/", - "-e", "/^extern int$/N", - "-e", "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/", - "-e", "/^\tstrncmp(),$/N", - "-e", "s/^\\(\tstrncmp()\\),\\n\\(\tstrlen(),\\)$/\\1;\\\n\ -extern unsigned int\\\n\ -\\2/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Sysz_Stdlib_For_Sun fix - */ -tSCC zSysz_Stdlib_For_SunName[] = - "sysz_stdlib_for_sun"; - -/* - * File name selection pattern - */ -tSCC zSysz_Stdlib_For_SunList[] = - "|stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzSysz_Stdlib_For_SunMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSysz_Stdlib_For_SunSelect0[] = - "char[ \t]*\\*[ \t]*(calloc|malloc|realloc|bsearch)[ \t]*\\("; - -#define SYSZ_STDLIB_FOR_SUN_TEST_CT 1 -static tTestDesc aSysz_Stdlib_For_SunTests[] = { - { TT_EGREP, zSysz_Stdlib_For_SunSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sysz_Stdlib_For_Sun - */ -static const char* apzSysz_Stdlib_For_SunPatch[] = { - "format", - "void *\t%1(", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Thread_Keyword fix - */ -tSCC zThread_KeywordName[] = - "thread_keyword"; - -/* - * File name selection pattern - */ -tSCC zThread_KeywordList[] = - "|pthread.h|bits/sigthread.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzThread_KeywordMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zThread_KeywordSelect0[] = - "([* ])__thread([,)])"; - -#define THREAD_KEYWORD_TEST_CT 1 -static tTestDesc aThread_KeywordTests[] = { - { TT_EGREP, zThread_KeywordSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Thread_Keyword - */ -static const char* apzThread_KeywordPatch[] = { - "format", - "%1__thr%2", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Tinfo_Cplusplus fix - */ -tSCC zTinfo_CplusplusName[] = - "tinfo_cplusplus"; - -/* - * File name selection pattern - */ -tSCC zTinfo_CplusplusList[] = - "|tinfo.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzTinfo_CplusplusMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zTinfo_CplusplusSelect0[] = - "[ \t]_cplusplus"; - -#define TINFO_CPLUSPLUS_TEST_CT 1 -static tTestDesc aTinfo_CplusplusTests[] = { - { TT_EGREP, zTinfo_CplusplusSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Tinfo_Cplusplus - */ -static const char* apzTinfo_CplusplusPatch[] = { - "format", - " __cplusplus", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Atexit_Param fix - */ -tSCC zUltrix_Atexit_ParamName[] = - "ultrix_atexit_param"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Atexit_ParamList[] = - "|stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Atexit_ParamMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Atexit_ParamSelect0[] = - "atexit\\(.*\\(\\)"; - -#define ULTRIX_ATEXIT_PARAM_TEST_CT 1 -static tTestDesc aUltrix_Atexit_ParamTests[] = { - { TT_EGREP, zUltrix_Atexit_ParamSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Atexit_Param - */ -static const char* apzUltrix_Atexit_ParamPatch[] = { - "format", - "atexit( void (*__func)( void )", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Atof_Param fix - */ -tSCC zUltrix_Atof_ParamName[] = - "ultrix_atof_param"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Atof_ParamList[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Atof_ParamMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Atof_ParamSelect0[] = - "atof\\([ \t]*char"; - -#define ULTRIX_ATOF_PARAM_TEST_CT 1 -static tTestDesc aUltrix_Atof_ParamTests[] = { - { TT_EGREP, zUltrix_Atof_ParamSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Atof_Param - */ -static const char* apzUltrix_Atof_ParamPatch[] = { - "format", - "atof(const char", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Const fix - */ -tSCC zUltrix_ConstName[] = - "ultrix_const"; - -/* - * File name selection pattern - */ -tSCC zUltrix_ConstList[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_ConstMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_ConstSelect0[] = - "perror\\( char \\*"; - -#define ULTRIX_CONST_TEST_CT 1 -static tTestDesc aUltrix_ConstTests[] = { - { TT_EGREP, zUltrix_ConstSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Const - */ -static const char* apzUltrix_ConstPatch[] = { - "format", - "%1 const %3 *__", - "([ \t*](perror|fputs|fwrite|scanf|fscanf)\\(.*)[ \t]+(char|void) \\*__", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Const2 fix - */ -tSCC zUltrix_Const2Name[] = - "ultrix_const2"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Const2List[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Const2Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Const2Select0[] = - "\\*fopen\\( char \\*"; - -#define ULTRIX_CONST2_TEST_CT 1 -static tTestDesc aUltrix_Const2Tests[] = { - { TT_EGREP, zUltrix_Const2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Const2 - */ -static const char* apzUltrix_Const2Patch[] = { - "format", - "%1( const char *%3, const char *", - "([ \t*](fopen|sscanf|popen|tempnam))\\([ \t]*char[ \t]*\\*([^,]*),[ \t]*char[ \t]*\\*[ \t]*", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Const3 fix - */ -tSCC zUltrix_Const3Name[] = - "ultrix_const3"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Const3List[] = - "|stdio.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Const3Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Const3Select0[] = - "fdopen\\( .*, char \\*"; - -#define ULTRIX_CONST3_TEST_CT 1 -static tTestDesc aUltrix_Const3Tests[] = { - { TT_EGREP, zUltrix_Const3Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Const3 - */ -static const char* apzUltrix_Const3Patch[] = { - "format", - "%1 const %3 *__", - "([ \t*](fdopen)\\(.*)[ \t]+(char|void) \\*__", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Fix_Fixproto fix - */ -tSCC zUltrix_Fix_FixprotoName[] = - "ultrix_fix_fixproto"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Fix_FixprotoList[] = - "|sys/utsname.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Fix_FixprotoMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Fix_FixprotoSelect0[] = - "ULTRIX"; - -#define ULTRIX_FIX_FIXPROTO_TEST_CT 1 -static tTestDesc aUltrix_Fix_FixprotoTests[] = { - { TT_EGREP, zUltrix_Fix_FixprotoSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Fix_Fixproto - */ -static const char* apzUltrix_Fix_FixprotoPatch[] = { - "format", - "struct utsname;\n\ -%0", - "^[ \t]*extern[ \t]*int[ \t]*uname\\(\\);", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Ifdef fix - */ -tSCC zUltrix_IfdefName[] = - "ultrix_ifdef"; - -/* - * File name selection pattern - */ -tSCC zUltrix_IfdefList[] = - "|sys/file.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_IfdefMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_IfdefSelect0[] = - "^#ifdef KERNEL[ \t]+&&"; - -#define ULTRIX_IFDEF_TEST_CT 1 -static tTestDesc aUltrix_IfdefTests[] = { - { TT_EGREP, zUltrix_IfdefSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Ifdef - */ -static const char* apzUltrix_IfdefPatch[] = { - "format", - "#if defined(KERNEL) &&", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Locale fix - */ -tSCC zUltrix_LocaleName[] = - "ultrix_locale"; - -/* - * File name selection pattern - */ -tSCC zUltrix_LocaleList[] = - "|locale.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_LocaleMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_LocaleSelect0[] = - "@\\(#\\)locale\\.h.*6\\.1.*\\(ULTRIX\\)"; - -#define ULTRIX_LOCALE_TEST_CT 1 -static tTestDesc aUltrix_LocaleTests[] = { - { TT_EGREP, zUltrix_LocaleSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Locale - */ -static const char* apzUltrix_LocalePatch[] = { - "wrap", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Math_Ifdef fix - */ -tSCC zUltrix_Math_IfdefName[] = - "ultrix_math_ifdef"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Math_IfdefList[] = - "|sys/limits.h|float.h|math.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Math_IfdefMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Math_IfdefSelect0[] = - "^(#if.*)\\|\\|[ \t]+CC\\$[a-z]+"; - -#define ULTRIX_MATH_IFDEF_TEST_CT 1 -static tTestDesc aUltrix_Math_IfdefTests[] = { - { TT_EGREP, zUltrix_Math_IfdefSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Math_Ifdef - */ -static const char* apzUltrix_Math_IfdefPatch[] = { - "format", - "%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Nested_Ioctl fix - */ -tSCC zUltrix_Nested_IoctlName[] = - "ultrix_nested_ioctl"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Nested_IoctlList[] = - "|sys/ioctl.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Nested_IoctlMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Nested_IoctlSelect0[] = - "^/\\* #define SIOCSCREEN"; - -#define ULTRIX_NESTED_IOCTL_TEST_CT 1 -static tTestDesc aUltrix_Nested_IoctlTests[] = { - { TT_EGREP, zUltrix_Nested_IoctlSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Nested_Ioctl - */ -static const char* apzUltrix_Nested_IoctlPatch[] = { "sed", - "-e", "/^\\/\\* #define SIOCSCREEN/s@/\\* screend@*//* screend@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Nested_Svc fix - */ -tSCC zUltrix_Nested_SvcName[] = - "ultrix_nested_svc"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Nested_SvcList[] = - "|rpc/svc.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Nested_SvcMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Nested_SvcSelect0[] = - "^ \\*[ \t]*int protocol; */\\*"; - -#define ULTRIX_NESTED_SVC_TEST_CT 1 -static tTestDesc aUltrix_Nested_SvcTests[] = { - { TT_EGREP, zUltrix_Nested_SvcSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Nested_Svc - */ -static const char* apzUltrix_Nested_SvcPatch[] = { "sed", - "-e", "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Stat fix - */ -tSCC zUltrix_StatName[] = - "ultrix_stat"; - -/* - * File name selection pattern - */ -tSCC zUltrix_StatList[] = - "|sys/stat.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_StatMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_StatSelect0[] = - "@\\(#\\)stat\\.h.*6\\.1.*\\(ULTRIX\\)"; - -#define ULTRIX_STAT_TEST_CT 1 -static tTestDesc aUltrix_StatTests[] = { - { TT_EGREP, zUltrix_StatSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Stat - */ -static const char* apzUltrix_StatPatch[] = { "sed", - "-e", "/^#define[ \t]S_IFPORT[ \t]*S_IFIFO$/a\\\n\ -\\\n\ -/* macro to test for symbolic link */\\\n\ -#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)\\\n\n", - "-e", "/^[ \t]*fstat(),$/a\\\n\ -\tlstat(),\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Static fix - */ -tSCC zUltrix_StaticName[] = - "ultrix_static"; - -/* - * File name selection pattern - */ -tSCC zUltrix_StaticList[] = - "|machine/cpu.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_StaticMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_StaticSelect0[] = - "#include \"r[34]_cpu"; - -#define ULTRIX_STATIC_TEST_CT 1 -static tTestDesc aUltrix_StaticTests[] = { - { TT_EGREP, zUltrix_StaticSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Static - */ -static const char* apzUltrix_StaticPatch[] = { "sed", - "-e", "s/^static struct tlb_pid_state/struct tlb_pid_state/", - "-e", "s/^#include \"r3_cpu\\.h\"$/#include <machine\\/r3_cpu\\.h>/", - "-e", "s/^#include \"r4_cpu\\.h\"$/#include <machine\\/r4_cpu\\.h>/", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Stdlib fix - */ -tSCC zUltrix_StdlibName[] = - "ultrix_stdlib"; - -/* - * File name selection pattern - */ -tSCC zUltrix_StdlibList[] = - "|stdlib.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_StdlibMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_StdlibSelect0[] = - "@\\(#\\)stdlib\\.h.*6\\.1.*\\(ULTRIX\\)"; - -#define ULTRIX_STDLIB_TEST_CT 1 -static tTestDesc aUltrix_StdlibTests[] = { - { TT_EGREP, zUltrix_StdlibSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Stdlib - */ -static const char* apzUltrix_StdlibPatch[] = { "sed", - "-e", "/^char.*getenv( const char .* );.*$/a\\\n\ -int\t\tsetenv( const char *__name, const char *__val, int __ovrwrt );\\\n\ -void\t\tunsetenv( const char *__name );\\\n\ -int\t\tputenv( char *__s );\n", - "-e", "/^char.*getenv();.*$/a\\\n\ -int\tsetenv();\\\n\ -void\tunsetenv();\\\n\ -int\tputenv();\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Strings fix - */ -tSCC zUltrix_StringsName[] = - "ultrix_strings"; - -/* - * File name selection pattern - */ -tSCC zUltrix_StringsList[] = - "|strings.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_StringsMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_StringsSelect0[] = - "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)"; - -#define ULTRIX_STRINGS_TEST_CT 1 -static tTestDesc aUltrix_StringsTests[] = { - { TT_EGREP, zUltrix_StringsSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Strings - */ -static const char* apzUltrix_StringsPatch[] = { - "wrap", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Strings2 fix - */ -tSCC zUltrix_Strings2Name[] = - "ultrix_strings2"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Strings2List[] = - "|strings.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Strings2Machs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Strings2Select0[] = - "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)"; - -#define ULTRIX_STRINGS2_TEST_CT 1 -static tTestDesc aUltrix_Strings2Tests[] = { - { TT_EGREP, zUltrix_Strings2Select0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Strings2 - */ -static const char* apzUltrix_Strings2Patch[] = { "sed", - "-e", "/^.*strncmp( const .* );.*/a\\\n\ -\\\n\ -extern int\\\n\ -\tstrcasecmp( const char *__s1, const char *__s2),\\\n\ -\tstrncasecmp( const char *__s1, const char *__s2, size_t __n );\n", - "-e", "/^.*strncmp();.*/a\\\n\ -extern int\\\n\ -\tstrcasecmp(),\\\n\ -\tstrncasecmp();\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Sys_Time fix - */ -tSCC zUltrix_Sys_TimeName[] = - "ultrix_sys_time"; - -/* - * File name selection pattern - */ -tSCC zUltrix_Sys_TimeList[] = - "|sys/time.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_Sys_TimeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_Sys_TimeSelect0[] = - "@\\(#\\)time\\.h.*6\\.1.*\\(ULTRIX\\)"; - -#define ULTRIX_SYS_TIME_TEST_CT 1 -static tTestDesc aUltrix_Sys_TimeTests[] = { - { TT_EGREP, zUltrix_Sys_TimeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Sys_Time - */ -static const char* apzUltrix_Sys_TimePatch[] = { "sed", - "-e", "/^extern.*time_t.*time( time_t .* );.*$/a\\\n\ -\\\n\ -extern int adjtime(struct timeval *, struct timeval *);\\\n\ -extern int getitimer(int, struct itimerval *);\\\n\ -extern int setitimer(int, struct itimerval *, struct itimerval *);\\\n\ -extern int gettimeofday(struct timeval *, struct timezone *);\\\n\ -extern int settimeofday(struct timeval *, struct timezone *);\\\n\ -extern void profil(const void *, size_t, size_t, unsigned int);\\\n\ -extern int stime(const time_t *);\\\n\ -extern int utimes(const char *, const struct timeval[2]);\\\n\ -extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);\n", - "-e", "/^extern.*double.*difftime();.*$/a\\\n\ -extern\tint adjtime();\\\n\ -extern\tint getitimer();\\\n\ -extern\tint setitimer();\\\n\ -extern\tint gettimeofday();\\\n\ -extern\tint settimeofday();\\\n\ -extern\tvoid profil();\\\n\ -extern\tint stime();\\\n\ -extern\tint utimes();\\\n\ -extern\tint select();\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Ultrix_Unistd fix - */ -tSCC zUltrix_UnistdName[] = - "ultrix_unistd"; - -/* - * File name selection pattern - */ -tSCC zUltrix_UnistdList[] = - "|unistd.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzUltrix_UnistdMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUltrix_UnistdSelect0[] = - "@\\(#\\)unistd\\.h.*6\\.1.*\\(ULTRIX\\)"; - -#define ULTRIX_UNISTD_TEST_CT 1 -static tTestDesc aUltrix_UnistdTests[] = { - { TT_EGREP, zUltrix_UnistdSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Ultrix_Unistd - */ -static const char* apzUltrix_UnistdPatch[] = { "sed", - "-e", "/^[ \t]*getgroups(),.*$/a\\\n\ -\tgetpagesize(),\n", - "-e", "/^[ \t]*fork(),.*$/a\\\n\ -\tvfork(),\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Undefine_Null fix - */ -tSCC zUndefine_NullName[] = - "undefine_null"; - -/* - * File name selection pattern - */ -#define zUndefine_NullList (char*)NULL -/* - * Machine/OS name selection pattern - */ -#define apzUndefine_NullMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUndefine_NullSelect0[] = - "^#[ \t]*define[ \t]+NULL[ \t]"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zUndefine_NullBypass0[] = - "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])"; - -#define UNDEFINE_NULL_TEST_CT 2 -static tTestDesc aUndefine_NullTests[] = { - { TT_NEGREP, zUndefine_NullBypass0, (regex_t*)NULL }, - { TT_EGREP, zUndefine_NullSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Undefine_Null - */ -static const char* apzUndefine_NullPatch[] = { - "format", - "#ifndef NULL\n\ -#define NULL%1\n\ -#endif\n", - "^#[ \t]*define[ \t]+NULL([^\r\n\ -]+)[\r]*\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Unicosmk_Restrict fix - */ -tSCC zUnicosmk_RestrictName[] = - "unicosmk_restrict"; - -/* - * File name selection pattern - */ -tSCC zUnicosmk_RestrictList[] = - "|stdio.h|stdlib.h|wchar.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzUnicosmk_RestrictMachs[] = { - "*-*-unicosmk*", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUnicosmk_RestrictSelect0[] = - "(\\*[ \t]*)restrict([ \t]+)"; - -#define UNICOSMK_RESTRICT_TEST_CT 1 -static tTestDesc aUnicosmk_RestrictTests[] = { - { TT_EGREP, zUnicosmk_RestrictSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Unicosmk_Restrict - */ -static const char* apzUnicosmk_RestrictPatch[] = { - "format", - "%1__restrict__%2", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Uw7_Byteorder_Fix fix - */ -tSCC zUw7_Byteorder_FixName[] = - "uw7_byteorder_fix"; - -/* - * File name selection pattern - */ -tSCC zUw7_Byteorder_FixList[] = - "|arpa/inet.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzUw7_Byteorder_FixMachs[] = { - "*-*-sysv4*", - "i?86-*-sysv5*", - "i?86-*-udk*", - "i?86-*-solaris2.[0-4]", - "powerpcle-*-solaris2.[0-4]", - "sparc-*-solaris2.[0-4]", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zUw7_Byteorder_FixSelect0[] = - "in_port_t"; - -/* - * perform the 'test' shell command - do fix on success - */ -tSCC zUw7_Byteorder_FixTest0[] = - "-f sys/byteorder.h"; - -#define UW7_BYTEORDER_FIX_TEST_CT 2 -static tTestDesc aUw7_Byteorder_FixTests[] = { - { TT_TEST, zUw7_Byteorder_FixTest0, 0 /* unused */ }, - { TT_EGREP, zUw7_Byteorder_FixSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Uw7_Byteorder_Fix - */ -static const char* apzUw7_Byteorder_FixPatch[] = { - "format", - "", - "^extern.*[ \t](htons|ntohs).*\\(in_port_t\\).*;", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Va_I960_Macro fix - */ -tSCC zVa_I960_MacroName[] = - "va_i960_macro"; - -/* - * File name selection pattern - */ -tSCC zVa_I960_MacroList[] = - "|arch/i960/archI960.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzVa_I960_MacroMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zVa_I960_MacroSelect0[] = - "__(vsiz|vali|vpad|alignof__)"; - -#define VA_I960_MACRO_TEST_CT 1 -static tTestDesc aVa_I960_MacroTests[] = { - { TT_EGREP, zVa_I960_MacroSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Va_I960_Macro - */ -static const char* apzVa_I960_MacroPatch[] = { - "format", - "__vx%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Void_Null fix - */ -tSCC zVoid_NullName[] = - "void_null"; - -/* - * File name selection pattern - */ -tSCC zVoid_NullList[] = - "|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|"; -/* - * Machine/OS name selection pattern - */ -#define apzVoid_NullMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zVoid_NullSelect0[] = - "^#[ \t]*define[ \t]+NULL[ \t]+\\(\\(void[ \t]*\\*\\)0\\)"; - -#define VOID_NULL_TEST_CT 1 -static tTestDesc aVoid_NullTests[] = { - { TT_EGREP, zVoid_NullSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Void_Null - */ -static const char* apzVoid_NullPatch[] = { - "format", - "#define NULL 0", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Vxworks_Gcc_Problem fix - */ -tSCC zVxworks_Gcc_ProblemName[] = - "vxworks_gcc_problem"; - -/* - * File name selection pattern - */ -tSCC zVxworks_Gcc_ProblemList[] = - "|types/vxTypesBase.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzVxworks_Gcc_ProblemMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zVxworks_Gcc_ProblemSelect0[] = - "__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__"; - -#define VXWORKS_GCC_PROBLEM_TEST_CT 1 -static tTestDesc aVxworks_Gcc_ProblemTests[] = { - { TT_EGREP, zVxworks_Gcc_ProblemSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Vxworks_Gcc_Problem - */ -static const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", - "-e", "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/", - "-e", "/[ \t]size_t/i\\\n\ -#ifndef _GCC_SIZE_T\\\n\ -#define _GCC_SIZE_T\n", - "-e", "/[ \t]size_t/a\\\n\ -#endif\n", - "-e", "/[ \t]ptrdiff_t/i\\\n\ -#ifndef _GCC_PTRDIFF_T\\\n\ -#define _GCC_PTRDIFF_T\n", - "-e", "/[ \t]ptrdiff_t/a\\\n\ -#endif\n", - "-e", "/[ \t]wchar_t/i\\\n\ -#ifndef _GCC_WCHAR_T\\\n\ -#define _GCC_WCHAR_T\n", - "-e", "/[ \t]wchar_t/a\\\n\ -#endif\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Vxworks_Needs_Vxtypes fix - */ -tSCC zVxworks_Needs_VxtypesName[] = - "vxworks_needs_vxtypes"; - -/* - * File name selection pattern - */ -tSCC zVxworks_Needs_VxtypesList[] = - "|time.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzVxworks_Needs_VxtypesMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zVxworks_Needs_VxtypesSelect0[] = - "uint_t([ \t]+_clocks_per_sec)"; - -#define VXWORKS_NEEDS_VXTYPES_TEST_CT 1 -static tTestDesc aVxworks_Needs_VxtypesTests[] = { - { TT_EGREP, zVxworks_Needs_VxtypesSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Vxworks_Needs_Vxtypes - */ -static const char* apzVxworks_Needs_VxtypesPatch[] = { - "format", - "unsigned int%1", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Vxworks_Needs_Vxworks fix - */ -tSCC zVxworks_Needs_VxworksName[] = - "vxworks_needs_vxworks"; - -/* - * File name selection pattern - */ -tSCC zVxworks_Needs_VxworksList[] = - "|sys/stat.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzVxworks_Needs_VxworksMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zVxworks_Needs_VxworksSelect0[] = - "#[ \t]define[ \t]+__INCstath"; - -/* - * perform the 'test' shell command - do fix on success - */ -tSCC zVxworks_Needs_VxworksTest0[] = - " -r types/vxTypesOld.h"; -tSCC zVxworks_Needs_VxworksTest1[] = - " -n \"`egrep '#include' $file`\""; -tSCC zVxworks_Needs_VxworksTest2[] = - " -n \"`egrep ULONG $file`\""; - -#define VXWORKS_NEEDS_VXWORKS_TEST_CT 4 -static tTestDesc aVxworks_Needs_VxworksTests[] = { - { TT_TEST, zVxworks_Needs_VxworksTest0, 0 /* unused */ }, - { TT_TEST, zVxworks_Needs_VxworksTest1, 0 /* unused */ }, - { TT_TEST, zVxworks_Needs_VxworksTest2, 0 /* unused */ }, - { TT_EGREP, zVxworks_Needs_VxworksSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Vxworks_Needs_Vxworks - */ -static const char* apzVxworks_Needs_VxworksPatch[] = { "sed", - "-e", "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n\ -#include <types/vxTypesOld.h>\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Vxworks_Time fix - */ -tSCC zVxworks_TimeName[] = - "vxworks_time"; - -/* - * File name selection pattern - */ -tSCC zVxworks_TimeList[] = - "|time.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzVxworks_TimeMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zVxworks_TimeSelect0[] = - "#[ \t]*define[ \t]+VOIDFUNCPTR[ \t].*"; - -/* - * perform the 'test' shell command - do fix on success - */ -tSCC zVxworks_TimeTest0[] = - " -r vxWorks.h"; - -#define VXWORKS_TIME_TEST_CT 2 -static tTestDesc aVxworks_TimeTests[] = { - { TT_TEST, zVxworks_TimeTest0, 0 /* unused */ }, - { TT_EGREP, zVxworks_TimeSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Vxworks_Time - */ -static const char* apzVxworks_TimePatch[] = { - "format", - "#ifndef __gcc_VOIDFUNCPTR_defined\n\ -#ifdef __cplusplus\n\ -typedef void (*__gcc_VOIDFUNCPTR) (...);\n\ -#else\n\ -typedef void (*__gcc_VOIDFUNCPTR) ();\n\ -#endif\n\ -#define __gcc_VOIDFUNCPTR_defined\n\ -#endif\n\ -#define VOIDFUNCPTR __gcc_VOIDFUNCPTR", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Windiss_Math1 fix - */ -tSCC zWindiss_Math1Name[] = - "windiss_math1"; - -/* - * File name selection pattern - */ -tSCC zWindiss_Math1List[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzWindiss_Math1Machs[] = { - "*-*-windiss", - (const char*)NULL }; -#define WINDISS_MATH1_TEST_CT 0 -#define aWindiss_Math1Tests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Windiss_Math1 - */ -static const char* apzWindiss_Math1Patch[] = { "sed", - "-e", "s|inline long double cosl.*|#ifndef __GNUC__|", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Windiss_Math2 fix - */ -tSCC zWindiss_Math2Name[] = - "windiss_math2"; - -/* - * File name selection pattern - */ -tSCC zWindiss_Math2List[] = - "|math.h|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzWindiss_Math2Machs[] = { - "*-*-windiss", - (const char*)NULL }; -#define WINDISS_MATH2_TEST_CT 0 -#define aWindiss_Math2Tests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Windiss_Math2 - */ -static const char* apzWindiss_Math2Patch[] = { "sed", - "-e", "s|/\\* long double declarations \\*/|#endif /* __GNUC__ */|", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Windiss_Valist fix - */ -tSCC zWindiss_ValistName[] = - "windiss_valist"; - -/* - * File name selection pattern - */ -#define zWindiss_ValistList (char*)NULL -/* - * Machine/OS name selection pattern - */ -tSCC* apzWindiss_ValistMachs[] = { - "*-*-windiss", - (const char*)NULL }; - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zWindiss_ValistSelect0[] = - "(#include.*)diab/va_list.h"; - -#define WINDISS_VALIST_TEST_CT 1 -static tTestDesc aWindiss_ValistTests[] = { - { TT_EGREP, zWindiss_ValistSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Windiss_Valist - */ -static const char* apzWindiss_ValistPatch[] = { "sed", - "-e", "s|diab/va_list.h|stdarg.h|", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of X11_Class fix - */ -tSCC zX11_ClassName[] = - "x11_class"; - -/* - * File name selection pattern - */ -tSCC zX11_ClassList[] = - "|X11/ShellP.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzX11_ClassMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zX11_ClassSelect0[] = - "^([ \t]*char \\*)class;(.*)"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zX11_ClassBypass0[] = - "__cplusplus"; - -#define X11_CLASS_TEST_CT 2 -static tTestDesc aX11_ClassTests[] = { - { TT_NEGREP, zX11_ClassBypass0, (regex_t*)NULL }, - { TT_EGREP, zX11_ClassSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for X11_Class - */ -static const char* apzX11_ClassPatch[] = { - "format", - "#ifdef __cplusplus\n\ -%1c_class;%2\n\ -#else\n\ -%1class;%2\n\ -#endif", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of X11_Class_Usage fix - */ -tSCC zX11_Class_UsageName[] = - "x11_class_usage"; - -/* - * File name selection pattern - */ -tSCC zX11_Class_UsageList[] = - "|Xm/BaseClassI.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzX11_Class_UsageMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zX11_Class_UsageSelect0[] = - " class\\)"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zX11_Class_UsageBypass0[] = - "__cplusplus"; - -#define X11_CLASS_USAGE_TEST_CT 2 -static tTestDesc aX11_Class_UsageTests[] = { - { TT_NEGREP, zX11_Class_UsageBypass0, (regex_t*)NULL }, - { TT_EGREP, zX11_Class_UsageSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for X11_Class_Usage - */ -static const char* apzX11_Class_UsagePatch[] = { - "format", - " c_class)", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of X11_New fix - */ -tSCC zX11_NewName[] = - "x11_new"; - -/* - * File name selection pattern - */ -tSCC zX11_NewList[] = - "|Xm/Traversal.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzX11_NewMachs (const char**)NULL - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zX11_NewBypass0[] = - "__cplusplus"; - -#define X11_NEW_TEST_CT 1 -static tTestDesc aX11_NewTests[] = { - { TT_NEGREP, zX11_NewBypass0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for X11_New - */ -static const char* apzX11_NewPatch[] = { "sed", - "-e", "/Widget\told, new;/i\\\n\ -#ifdef __cplusplus\\\n\ -\tWidget\told, c_new;\\\n\ -#else\n", - "-e", "/Widget\told, new;/a\\\n\ -#endif\n", - "-e", "s/Widget new,/Widget c_new,/g", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of X11_Sprintf fix - */ -tSCC zX11_SprintfName[] = - "x11_sprintf"; - -/* - * File name selection pattern - */ -tSCC zX11_SprintfList[] = - "|X11/Xmu.h|X11/Xmu/Xmu.h|"; -/* - * Machine/OS name selection pattern - */ -#define apzX11_SprintfMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zX11_SprintfSelect0[] = - "^extern char \\*\tsprintf\\(\\);$"; - -#define X11_SPRINTF_TEST_CT 1 -static tTestDesc aX11_SprintfTests[] = { - { TT_EGREP, zX11_SprintfSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for X11_Sprintf - */ -static const char* apzX11_SprintfPatch[] = { - "format", - "#ifndef __STDC__\n\ -%0\n\ -#endif /* !defined __STDC__ */", - (char*)NULL }; - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * List of all fixes - */ -#define REGEX_COUNT 199 -#define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 177 - -/* - * Enumerate the fixes - */ -typedef enum { - 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_ULTRIX_ANSI_COMPAT_FIXIDX, - AAB_ULTRIX_LIMITS_FIXIDX, - AAB_ULTRIX_MEMORY_FIXIDX, - AAB_ULTRIX_STRING_FIXIDX, - AIX_PTHREAD_FIXIDX, - AIX_SYSMACHINE_FIXIDX, - AIX_SYSWAIT_FIXIDX, - 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_PARENS_FIXIDX, - ALPHA_PTHREAD_FIXIDX, - ALPHA_PTHREAD_GCC_FIXIDX, - ALPHA_SBRK_FIXIDX, - ALPHA_WCHAR_FIXIDX, - AVOID_BOOL_DEFINE_FIXIDX, - AVOID_BOOL_TYPE_FIXIDX, - AVOID_WCHAR_T_TYPE_FIXIDX, - BAD_STRUCT_TERM_FIXIDX, - BADQUOTE_FIXIDX, - BROKEN_ASSERT_STDIO_FIXIDX, - BROKEN_ASSERT_STDLIB_FIXIDX, - BROKEN_CABS_FIXIDX, - BSD_STDIO_ATTRS_CONFLICT_FIXIDX, - CTRL_QUOTES_DEF_FIXIDX, - CTRL_QUOTES_USE_FIXIDX, - CXX_UNREADY_FIXIDX, - DARWIN_PRIVATE_EXTERN_FIXIDX, - DEC_INTERN_ASM_FIXIDX, - DJGPP_WCHAR_H_FIXIDX, - ECD_CURSOR_FIXIDX, - EXCEPTION_STRUCTURE_FIXIDX, - FREEBSD_GCC3_BREAKAGE_FIXIDX, - GNU_TYPES_FIXIDX, - HP_INLINE_FIXIDX, - HP_SYSFILE_FIXIDX, - HPUX10_CPP_POW_INLINE_FIXIDX, - HPUX11_CPP_POW_INLINE_FIXIDX, - HPUX10_CTYPE_DECLARATIONS1_FIXIDX, - HPUX10_CTYPE_DECLARATIONS2_FIXIDX, - HPUX10_STDIO_DECLARATIONS_FIXIDX, - HPUX11_ABS_FIXIDX, - HPUX11_FABSF_FIXIDX, - HPUX11_SIZE_T_FIXIDX, - HPUX11_SNPRINTF_FIXIDX, - HPUX11_UINT32_C_FIXIDX, - HPUX11_VSNPRINTF_FIXIDX, - HPUX8_BOGUS_INLINES_FIXIDX, - HPUX_CTYPE_MACROS_FIXIDX, - HPUX_LONG_DOUBLE_FIXIDX, - HPUX_MAXINT_FIXIDX, - HPUX_SYSTIME_FIXIDX, - INT_ABORT_FREE_AND_EXIT_FIXIDX, - 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_LIMITS_CONST_FIXIDX, - IRIX_SOCKLEN_T_FIXIDX, - IRIX_STDIO_VA_LIST_FIXIDX, - IRIX_WCSFTIME_FIXIDX, - ISC_FMOD_FIXIDX, - ISC_OMITS_WITH_STDC_FIXIDX, - KANDR_CONCAT_FIXIDX, - LIBC1_G_VA_LIST_FIXIDX, - LIBC1_IFDEFD_MEMX_FIXIDX, - LIMITS_IFNDEFS_FIXIDX, - LYNX_VOID_INT_FIXIDX, - LYNXOS_FCNTL_PROTO_FIXIDX, - MACHINE_ANSI_H_VA_LIST_FIXIDX, - MACHINE_NAME_FIXIDX, - MATH_EXCEPTION_FIXIDX, - MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX, - MATH_HUGE_VAL_IFNDEF_FIXIDX, - NESTED_AUTH_DES_FIXIDX, - NESTED_MOTOROLA_FIXIDX, - NESTED_SYS_LIMITS_FIXIDX, - NETBSD_EXTRA_SEMICOLON_FIXIDX, - NEXT_MATH_PREFIX_FIXIDX, - NEXT_TEMPLATE_FIXIDX, - NEXT_VOLITILE_FIXIDX, - NEXT_WAIT_UNION_FIXIDX, - NODEENT_SYNTAX_FIXIDX, - OBSTACK_LVALUE_CAST_FIXIDX, - OSF_NAMESPACE_A_FIXIDX, - OSF_NAMESPACE_C_FIXIDX, - PTHREAD_PAGE_SIZE_FIXIDX, - READ_RET_TYPE_FIXIDX, - RPC_XDR_LVALUE_CAST_A_FIXIDX, - RPC_XDR_LVALUE_CAST_B_FIXIDX, - RS6000_DOUBLE_FIXIDX, - RS6000_FCHMOD_FIXIDX, - RS6000_PARAM_FIXIDX, - SCO_MATH_FIXIDX, - SCO_REGSET_FIXIDX, - SCO_STATIC_FUNC_FIXIDX, - SCO_UTIME_FIXIDX, - SOLARIS_MUTEX_INIT_1_FIXIDX, - SOLARIS_MUTEX_INIT_2_FIXIDX, - SOLARIS_SOCKET_FIXIDX, - SOLARIS_STDIO_TAG_FIXIDX, - SOLARIS_UNISTD_FIXIDX, - SOLARIS_WIDEC_FIXIDX, - STATSSWTCH_FIXIDX, - STDIO_STDARG_H_FIXIDX, - STDIO_VA_LIST_FIXIDX, - STRICT_ANSI_NOT_FIXIDX, - STRICT_ANSI_NOT_CTD_FIXIDX, - STRICT_ANSI_ONLY_FIXIDX, - STRUCT_FILE_FIXIDX, - STRUCT_SOCKADDR_FIXIDX, - SUN_AUTH_PROTO_FIXIDX, - SUN_BOGUS_IFDEF_FIXIDX, - SUN_CATMACRO_FIXIDX, - SUN_MALLOC_FIXIDX, - SUN_RUSERS_SEMI_FIXIDX, - SUN_SIGNAL_FIXIDX, - SUNOS_STRLEN_FIXIDX, - SVR4__P_FIXIDX, - SVR4_DISABLE_OPT_FIXIDX, - SVR4_GETCWD_FIXIDX, - SVR4_KRNL_FIXIDX, - SVR4_PROFIL_FIXIDX, - SVR4_SIGHANDLER_TYPE_FIXIDX, - SVR4_UNDECLARED_GETRNGE_FIXIDX, - SYSV68_STRING_FIXIDX, - SYSZ_STDLIB_FOR_SUN_FIXIDX, - THREAD_KEYWORD_FIXIDX, - TINFO_CPLUSPLUS_FIXIDX, - ULTRIX_ATEXIT_PARAM_FIXIDX, - ULTRIX_ATOF_PARAM_FIXIDX, - ULTRIX_CONST_FIXIDX, - ULTRIX_CONST2_FIXIDX, - ULTRIX_CONST3_FIXIDX, - ULTRIX_FIX_FIXPROTO_FIXIDX, - ULTRIX_IFDEF_FIXIDX, - ULTRIX_LOCALE_FIXIDX, - ULTRIX_MATH_IFDEF_FIXIDX, - ULTRIX_NESTED_IOCTL_FIXIDX, - ULTRIX_NESTED_SVC_FIXIDX, - ULTRIX_STAT_FIXIDX, - ULTRIX_STATIC_FIXIDX, - ULTRIX_STDLIB_FIXIDX, - ULTRIX_STRINGS_FIXIDX, - ULTRIX_STRINGS2_FIXIDX, - ULTRIX_SYS_TIME_FIXIDX, - ULTRIX_UNISTD_FIXIDX, - UNDEFINE_NULL_FIXIDX, - UNICOSMK_RESTRICT_FIXIDX, - UW7_BYTEORDER_FIX_FIXIDX, - VA_I960_MACRO_FIXIDX, - VOID_NULL_FIXIDX, - VXWORKS_GCC_PROBLEM_FIXIDX, - VXWORKS_NEEDS_VXTYPES_FIXIDX, - VXWORKS_NEEDS_VXWORKS_FIXIDX, - VXWORKS_TIME_FIXIDX, - WINDISS_MATH1_FIXIDX, - WINDISS_MATH2_FIXIDX, - WINDISS_VALIST_FIXIDX, - X11_CLASS_FIXIDX, - X11_CLASS_USAGE_FIXIDX, - X11_NEW_FIXIDX, - X11_SPRINTF_FIXIDX -} t_fixinc_idx; - -tFixDesc fixDescList[ FIX_COUNT ] = { - { 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, - aAab_Fd_Zero_Asm_Posix_Types_HTests, apzAab_Fd_Zero_Asm_Posix_Types_HPatch, 0 }, - - { zAab_Fd_Zero_Gnu_Types_HName, zAab_Fd_Zero_Gnu_Types_HList, - apzAab_Fd_Zero_Gnu_Types_HMachs, - AAB_FD_ZERO_GNU_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Fd_Zero_Gnu_Types_HTests, apzAab_Fd_Zero_Gnu_Types_HPatch, 0 }, - - { zAab_Fd_Zero_Selectbits_HName, zAab_Fd_Zero_Selectbits_HList, - apzAab_Fd_Zero_Selectbits_HMachs, - AAB_FD_ZERO_SELECTBITS_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Fd_Zero_Selectbits_HTests, apzAab_Fd_Zero_Selectbits_HPatch, 0 }, - - { zAab_Solaris_Sys_Varargs_HName, zAab_Solaris_Sys_Varargs_HList, - apzAab_Solaris_Sys_Varargs_HMachs, - AAB_SOLARIS_SYS_VARARGS_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Solaris_Sys_Varargs_HTests, apzAab_Solaris_Sys_Varargs_HPatch, 0 }, - - { zAab_Sun_MemcpyName, zAab_Sun_MemcpyList, - apzAab_Sun_MemcpyMachs, - AAB_SUN_MEMCPY_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Sun_MemcpyTests, apzAab_Sun_MemcpyPatch, 0 }, - - { zAab_Ultrix_Ansi_CompatName, zAab_Ultrix_Ansi_CompatList, - apzAab_Ultrix_Ansi_CompatMachs, - AAB_ULTRIX_ANSI_COMPAT_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Ultrix_Ansi_CompatTests, apzAab_Ultrix_Ansi_CompatPatch, 0 }, - - { zAab_Ultrix_LimitsName, zAab_Ultrix_LimitsList, - apzAab_Ultrix_LimitsMachs, - AAB_ULTRIX_LIMITS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Ultrix_LimitsTests, apzAab_Ultrix_LimitsPatch, 0 }, - - { zAab_Ultrix_MemoryName, zAab_Ultrix_MemoryList, - apzAab_Ultrix_MemoryMachs, - AAB_ULTRIX_MEMORY_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Ultrix_MemoryTests, apzAab_Ultrix_MemoryPatch, 0 }, - - { zAab_Ultrix_StringName, zAab_Ultrix_StringList, - apzAab_Ultrix_StringMachs, - AAB_ULTRIX_STRING_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Ultrix_StringTests, apzAab_Ultrix_StringPatch, 0 }, - - { zAix_PthreadName, zAix_PthreadList, - apzAix_PthreadMachs, - AIX_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAix_PthreadTests, apzAix_PthreadPatch, 0 }, - - { zAix_SysmachineName, zAix_SysmachineList, - apzAix_SysmachineMachs, - AIX_SYSMACHINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAix_SysmachineTests, apzAix_SysmachinePatch, 0 }, - - { zAix_SyswaitName, zAix_SyswaitList, - apzAix_SyswaitMachs, - AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAix_SyswaitTests, apzAix_SyswaitPatch, 0 }, - - { zAix_Syswait_2Name, zAix_Syswait_2List, - apzAix_Syswait_2Machs, - AIX_SYSWAIT_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAix_Syswait_2Tests, apzAix_Syswait_2Patch, 0 }, - - { zAix_VolatileName, zAix_VolatileList, - apzAix_VolatileMachs, - AIX_VOLATILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAix_VolatileTests, apzAix_VolatilePatch, 0 }, - - { zAlpha___AssertName, zAlpha___AssertList, - apzAlpha___AssertMachs, - 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, - aAlpha_GetoptTests, apzAlpha_GetoptPatch, 0 }, - - { zAlpha_ParensName, zAlpha_ParensList, - apzAlpha_ParensMachs, - 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_SbrkName, zAlpha_SbrkList, - apzAlpha_SbrkMachs, - ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAlpha_SbrkTests, apzAlpha_SbrkPatch, 0 }, - - { zAlpha_WcharName, zAlpha_WcharList, - apzAlpha_WcharMachs, - ALPHA_WCHAR_TEST_CT, FD_MACH_ONLY, - aAlpha_WcharTests, apzAlpha_WcharPatch, 0 }, - - { zAvoid_Bool_DefineName, zAvoid_Bool_DefineList, - apzAvoid_Bool_DefineMachs, - AVOID_BOOL_DEFINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAvoid_Bool_DefineTests, apzAvoid_Bool_DefinePatch, 0 }, - - { zAvoid_Bool_TypeName, zAvoid_Bool_TypeList, - apzAvoid_Bool_TypeMachs, - AVOID_BOOL_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAvoid_Bool_TypeTests, apzAvoid_Bool_TypePatch, 0 }, - - { zAvoid_Wchar_T_TypeName, zAvoid_Wchar_T_TypeList, - apzAvoid_Wchar_T_TypeMachs, - AVOID_WCHAR_T_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aAvoid_Wchar_T_TypeTests, apzAvoid_Wchar_T_TypePatch, 0 }, - - { zBad_Struct_TermName, zBad_Struct_TermList, - apzBad_Struct_TermMachs, - BAD_STRUCT_TERM_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aBad_Struct_TermTests, apzBad_Struct_TermPatch, 0 }, - - { zBadquoteName, zBadquoteList, - apzBadquoteMachs, - BADQUOTE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aBadquoteTests, apzBadquotePatch, 0 }, - - { zBroken_Assert_StdioName, zBroken_Assert_StdioList, - apzBroken_Assert_StdioMachs, - BROKEN_ASSERT_STDIO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aBroken_Assert_StdioTests, apzBroken_Assert_StdioPatch, 0 }, - - { zBroken_Assert_StdlibName, zBroken_Assert_StdlibList, - apzBroken_Assert_StdlibMachs, - BROKEN_ASSERT_STDLIB_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aBroken_Assert_StdlibTests, apzBroken_Assert_StdlibPatch, 0 }, - - { zBroken_CabsName, zBroken_CabsList, - apzBroken_CabsMachs, - BROKEN_CABS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aBroken_CabsTests, apzBroken_CabsPatch, 0 }, - - { zBsd_Stdio_Attrs_ConflictName, zBsd_Stdio_Attrs_ConflictList, - apzBsd_Stdio_Attrs_ConflictMachs, - BSD_STDIO_ATTRS_CONFLICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aBsd_Stdio_Attrs_ConflictTests, apzBsd_Stdio_Attrs_ConflictPatch, 0 }, - - { zCtrl_Quotes_DefName, zCtrl_Quotes_DefList, - apzCtrl_Quotes_DefMachs, - CTRL_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aCtrl_Quotes_DefTests, apzCtrl_Quotes_DefPatch, 0 }, - - { zCtrl_Quotes_UseName, zCtrl_Quotes_UseList, - apzCtrl_Quotes_UseMachs, - CTRL_QUOTES_USE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aCtrl_Quotes_UseTests, apzCtrl_Quotes_UsePatch, 0 }, - - { zCxx_UnreadyName, zCxx_UnreadyList, - apzCxx_UnreadyMachs, - CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 }, - - { zDarwin_Private_ExternName, zDarwin_Private_ExternList, - apzDarwin_Private_ExternMachs, - DARWIN_PRIVATE_EXTERN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aDarwin_Private_ExternTests, apzDarwin_Private_ExternPatch, 0 }, - - { zDec_Intern_AsmName, zDec_Intern_AsmList, - apzDec_Intern_AsmMachs, - DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY, - aDec_Intern_AsmTests, apzDec_Intern_AsmPatch, 0 }, - - { zDjgpp_Wchar_HName, zDjgpp_Wchar_HList, - apzDjgpp_Wchar_HMachs, - DJGPP_WCHAR_H_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aDjgpp_Wchar_HTests, apzDjgpp_Wchar_HPatch, 0 }, - - { zEcd_CursorName, zEcd_CursorList, - apzEcd_CursorMachs, - ECD_CURSOR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aEcd_CursorTests, apzEcd_CursorPatch, 0 }, - - { zException_StructureName, zException_StructureList, - apzException_StructureMachs, - EXCEPTION_STRUCTURE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aException_StructureTests, apzException_StructurePatch, 0 }, - - { zFreebsd_Gcc3_BreakageName, zFreebsd_Gcc3_BreakageList, - apzFreebsd_Gcc3_BreakageMachs, - FREEBSD_GCC3_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aFreebsd_Gcc3_BreakageTests, apzFreebsd_Gcc3_BreakagePatch, 0 }, - - { zGnu_TypesName, zGnu_TypesList, - apzGnu_TypesMachs, - GNU_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aGnu_TypesTests, apzGnu_TypesPatch, 0 }, - - { zHp_InlineName, zHp_InlineList, - apzHp_InlineMachs, - HP_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHp_InlineTests, apzHp_InlinePatch, 0 }, - - { zHp_SysfileName, zHp_SysfileList, - apzHp_SysfileMachs, - HP_SYSFILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHp_SysfileTests, apzHp_SysfilePatch, 0 }, - - { zHpux10_Cpp_Pow_InlineName, zHpux10_Cpp_Pow_InlineList, - apzHpux10_Cpp_Pow_InlineMachs, - HPUX10_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux10_Cpp_Pow_InlineTests, apzHpux10_Cpp_Pow_InlinePatch, 0 }, - - { zHpux11_Cpp_Pow_InlineName, zHpux11_Cpp_Pow_InlineList, - apzHpux11_Cpp_Pow_InlineMachs, - HPUX11_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_Cpp_Pow_InlineTests, apzHpux11_Cpp_Pow_InlinePatch, 0 }, - - { zHpux10_Ctype_Declarations1Name, zHpux10_Ctype_Declarations1List, - apzHpux10_Ctype_Declarations1Machs, - HPUX10_CTYPE_DECLARATIONS1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux10_Ctype_Declarations1Tests, apzHpux10_Ctype_Declarations1Patch, 0 }, - - { zHpux10_Ctype_Declarations2Name, zHpux10_Ctype_Declarations2List, - apzHpux10_Ctype_Declarations2Machs, - HPUX10_CTYPE_DECLARATIONS2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux10_Ctype_Declarations2Tests, apzHpux10_Ctype_Declarations2Patch, 0 }, - - { zHpux10_Stdio_DeclarationsName, zHpux10_Stdio_DeclarationsList, - apzHpux10_Stdio_DeclarationsMachs, - HPUX10_STDIO_DECLARATIONS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux10_Stdio_DeclarationsTests, apzHpux10_Stdio_DeclarationsPatch, 0 }, - - { zHpux11_AbsName, zHpux11_AbsList, - apzHpux11_AbsMachs, - HPUX11_ABS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_AbsTests, apzHpux11_AbsPatch, 0 }, - - { zHpux11_FabsfName, zHpux11_FabsfList, - apzHpux11_FabsfMachs, - HPUX11_FABSF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_FabsfTests, apzHpux11_FabsfPatch, 0 }, - - { zHpux11_Size_TName, zHpux11_Size_TList, - apzHpux11_Size_TMachs, - HPUX11_SIZE_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_Size_TTests, apzHpux11_Size_TPatch, 0 }, - - { zHpux11_SnprintfName, zHpux11_SnprintfList, - apzHpux11_SnprintfMachs, - HPUX11_SNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_SnprintfTests, apzHpux11_SnprintfPatch, 0 }, - - { zHpux11_Uint32_CName, zHpux11_Uint32_CList, - apzHpux11_Uint32_CMachs, - HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_Uint32_CTests, apzHpux11_Uint32_CPatch, 0 }, - - { zHpux11_VsnprintfName, zHpux11_VsnprintfList, - apzHpux11_VsnprintfMachs, - HPUX11_VSNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux11_VsnprintfTests, apzHpux11_VsnprintfPatch, 0 }, - - { zHpux8_Bogus_InlinesName, zHpux8_Bogus_InlinesList, - apzHpux8_Bogus_InlinesMachs, - HPUX8_BOGUS_INLINES_TEST_CT, FD_MACH_ONLY, - aHpux8_Bogus_InlinesTests, apzHpux8_Bogus_InlinesPatch, 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_Long_DoubleName, zHpux_Long_DoubleList, - apzHpux_Long_DoubleMachs, - HPUX_LONG_DOUBLE_TEST_CT, FD_MACH_ONLY, - aHpux_Long_DoubleTests, apzHpux_Long_DoublePatch, 0 }, - - { zHpux_MaxintName, zHpux_MaxintList, - apzHpux_MaxintMachs, - HPUX_MAXINT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux_MaxintTests, apzHpux_MaxintPatch, 0 }, - - { zHpux_SystimeName, zHpux_SystimeList, - apzHpux_SystimeMachs, - HPUX_SYSTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aHpux_SystimeTests, apzHpux_SystimePatch, 0 }, - - { zInt_Abort_Free_And_ExitName, zInt_Abort_Free_And_ExitList, - apzInt_Abort_Free_And_ExitMachs, - INT_ABORT_FREE_AND_EXIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aInt_Abort_Free_And_ExitTests, apzInt_Abort_Free_And_ExitPatch, 0 }, - - { zIo_Quotes_DefName, zIo_Quotes_DefList, - apzIo_Quotes_DefMachs, - IO_QUOTES_DEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIo_Quotes_DefTests, apzIo_Quotes_DefPatch, 0 }, - - { zIo_Quotes_UseName, zIo_Quotes_UseList, - apzIo_Quotes_UseMachs, - IO_QUOTES_USE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIo_Quotes_UseTests, apzIo_Quotes_UsePatch, 0 }, - - { zIp_Missing_SemiName, zIp_Missing_SemiList, - apzIp_Missing_SemiMachs, - 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_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_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_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 }, - - { zIsc_FmodName, zIsc_FmodList, - apzIsc_FmodMachs, - ISC_FMOD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIsc_FmodTests, apzIsc_FmodPatch, 0 }, - - { zIsc_Omits_With_StdcName, zIsc_Omits_With_StdcList, - apzIsc_Omits_With_StdcMachs, - ISC_OMITS_WITH_STDC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aIsc_Omits_With_StdcTests, apzIsc_Omits_With_StdcPatch, 0 }, - - { zKandr_ConcatName, zKandr_ConcatList, - apzKandr_ConcatMachs, - KANDR_CONCAT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aKandr_ConcatTests, apzKandr_ConcatPatch, 0 }, - - { zLibc1_G_Va_ListName, zLibc1_G_Va_ListList, - apzLibc1_G_Va_ListMachs, - LIBC1_G_VA_LIST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aLibc1_G_Va_ListTests, apzLibc1_G_Va_ListPatch, 0 }, - - { zLibc1_Ifdefd_MemxName, zLibc1_Ifdefd_MemxList, - apzLibc1_Ifdefd_MemxMachs, - LIBC1_IFDEFD_MEMX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aLibc1_Ifdefd_MemxTests, apzLibc1_Ifdefd_MemxPatch, 0 }, - - { zLimits_IfndefsName, zLimits_IfndefsList, - apzLimits_IfndefsMachs, - LIMITS_IFNDEFS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aLimits_IfndefsTests, apzLimits_IfndefsPatch, 0 }, - - { zLynx_Void_IntName, zLynx_Void_IntList, - apzLynx_Void_IntMachs, - LYNX_VOID_INT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aLynx_Void_IntTests, apzLynx_Void_IntPatch, 0 }, - - { zLynxos_Fcntl_ProtoName, zLynxos_Fcntl_ProtoList, - apzLynxos_Fcntl_ProtoMachs, - LYNXOS_FCNTL_PROTO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aLynxos_Fcntl_ProtoTests, apzLynxos_Fcntl_ProtoPatch, 0 }, - - { zMachine_Ansi_H_Va_ListName, zMachine_Ansi_H_Va_ListList, - apzMachine_Ansi_H_Va_ListMachs, - MACHINE_ANSI_H_VA_LIST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aMachine_Ansi_H_Va_ListTests, apzMachine_Ansi_H_Va_ListPatch, 0 }, - - { zMachine_NameName, zMachine_NameList, - apzMachine_NameMachs, - MACHINE_NAME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aMachine_NameTests, apzMachine_NamePatch, 0 }, - - { zMath_ExceptionName, zMath_ExceptionList, - apzMath_ExceptionMachs, - MATH_EXCEPTION_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aMath_ExceptionTests, apzMath_ExceptionPatch, 0 }, - - { zMath_Huge_Val_From_Dbl_MaxName, zMath_Huge_Val_From_Dbl_MaxList, - apzMath_Huge_Val_From_Dbl_MaxMachs, - MATH_HUGE_VAL_FROM_DBL_MAX_TEST_CT, FD_MACH_ONLY | FD_SHELL_SCRIPT, - aMath_Huge_Val_From_Dbl_MaxTests, apzMath_Huge_Val_From_Dbl_MaxPatch, 0 }, - - { zMath_Huge_Val_IfndefName, zMath_Huge_Val_IfndefList, - apzMath_Huge_Val_IfndefMachs, - MATH_HUGE_VAL_IFNDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aMath_Huge_Val_IfndefTests, apzMath_Huge_Val_IfndefPatch, 0 }, - - { zNested_Auth_DesName, zNested_Auth_DesList, - apzNested_Auth_DesMachs, - NESTED_AUTH_DES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aNested_Auth_DesTests, apzNested_Auth_DesPatch, 0 }, - - { zNested_MotorolaName, zNested_MotorolaList, - apzNested_MotorolaMachs, - NESTED_MOTOROLA_TEST_CT, FD_MACH_ONLY, - aNested_MotorolaTests, apzNested_MotorolaPatch, 0 }, - - { zNested_Sys_LimitsName, zNested_Sys_LimitsList, - apzNested_Sys_LimitsMachs, - NESTED_SYS_LIMITS_TEST_CT, FD_MACH_ONLY, - aNested_Sys_LimitsTests, apzNested_Sys_LimitsPatch, 0 }, - - { zNetbsd_Extra_SemicolonName, zNetbsd_Extra_SemicolonList, - apzNetbsd_Extra_SemicolonMachs, - NETBSD_EXTRA_SEMICOLON_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aNetbsd_Extra_SemicolonTests, apzNetbsd_Extra_SemicolonPatch, 0 }, - - { zNext_Math_PrefixName, zNext_Math_PrefixList, - apzNext_Math_PrefixMachs, - NEXT_MATH_PREFIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aNext_Math_PrefixTests, apzNext_Math_PrefixPatch, 0 }, - - { zNext_TemplateName, zNext_TemplateList, - apzNext_TemplateMachs, - NEXT_TEMPLATE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aNext_TemplateTests, apzNext_TemplatePatch, 0 }, - - { zNext_VolitileName, zNext_VolitileList, - apzNext_VolitileMachs, - NEXT_VOLITILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aNext_VolitileTests, apzNext_VolitilePatch, 0 }, - - { zNext_Wait_UnionName, zNext_Wait_UnionList, - apzNext_Wait_UnionMachs, - NEXT_WAIT_UNION_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aNext_Wait_UnionTests, apzNext_Wait_UnionPatch, 0 }, - - { zNodeent_SyntaxName, zNodeent_SyntaxList, - apzNodeent_SyntaxMachs, - NODEENT_SYNTAX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aNodeent_SyntaxTests, apzNodeent_SyntaxPatch, 0 }, - - { zObstack_Lvalue_CastName, zObstack_Lvalue_CastList, - apzObstack_Lvalue_CastMachs, - OBSTACK_LVALUE_CAST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aObstack_Lvalue_CastTests, apzObstack_Lvalue_CastPatch, 0 }, - - { zOsf_Namespace_AName, zOsf_Namespace_AList, - apzOsf_Namespace_AMachs, - OSF_NAMESPACE_A_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aOsf_Namespace_ATests, apzOsf_Namespace_APatch, 0 }, - - { zOsf_Namespace_CName, zOsf_Namespace_CList, - apzOsf_Namespace_CMachs, - OSF_NAMESPACE_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aOsf_Namespace_CTests, apzOsf_Namespace_CPatch, 0 }, - - { zPthread_Page_SizeName, zPthread_Page_SizeList, - apzPthread_Page_SizeMachs, - PTHREAD_PAGE_SIZE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aPthread_Page_SizeTests, apzPthread_Page_SizePatch, 0 }, - - { zRead_Ret_TypeName, zRead_Ret_TypeList, - apzRead_Ret_TypeMachs, - READ_RET_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aRead_Ret_TypeTests, apzRead_Ret_TypePatch, 0 }, - - { zRpc_Xdr_Lvalue_Cast_AName, zRpc_Xdr_Lvalue_Cast_AList, - apzRpc_Xdr_Lvalue_Cast_AMachs, - RPC_XDR_LVALUE_CAST_A_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aRpc_Xdr_Lvalue_Cast_ATests, apzRpc_Xdr_Lvalue_Cast_APatch, 0 }, - - { zRpc_Xdr_Lvalue_Cast_BName, zRpc_Xdr_Lvalue_Cast_BList, - apzRpc_Xdr_Lvalue_Cast_BMachs, - RPC_XDR_LVALUE_CAST_B_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aRpc_Xdr_Lvalue_Cast_BTests, apzRpc_Xdr_Lvalue_Cast_BPatch, 0 }, - - { zRs6000_DoubleName, zRs6000_DoubleList, - apzRs6000_DoubleMachs, - RS6000_DOUBLE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aRs6000_DoubleTests, apzRs6000_DoublePatch, 0 }, - - { zRs6000_FchmodName, zRs6000_FchmodList, - apzRs6000_FchmodMachs, - RS6000_FCHMOD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aRs6000_FchmodTests, apzRs6000_FchmodPatch, 0 }, - - { zRs6000_ParamName, zRs6000_ParamList, - apzRs6000_ParamMachs, - RS6000_PARAM_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aRs6000_ParamTests, apzRs6000_ParamPatch, 0 }, - - { zSco_MathName, zSco_MathList, - apzSco_MathMachs, - SCO_MATH_TEST_CT, FD_MACH_ONLY, - aSco_MathTests, apzSco_MathPatch, 0 }, - - { zSco_RegsetName, zSco_RegsetList, - apzSco_RegsetMachs, - SCO_REGSET_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSco_RegsetTests, apzSco_RegsetPatch, 0 }, - - { zSco_Static_FuncName, zSco_Static_FuncList, - apzSco_Static_FuncMachs, - SCO_STATIC_FUNC_TEST_CT, FD_MACH_ONLY, - aSco_Static_FuncTests, apzSco_Static_FuncPatch, 0 }, - - { zSco_UtimeName, zSco_UtimeList, - apzSco_UtimeMachs, - SCO_UTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSco_UtimeTests, apzSco_UtimePatch, 0 }, - - { zSolaris_Mutex_Init_1Name, zSolaris_Mutex_Init_1List, - apzSolaris_Mutex_Init_1Machs, - SOLARIS_MUTEX_INIT_1_TEST_CT, FD_MACH_ONLY, - aSolaris_Mutex_Init_1Tests, apzSolaris_Mutex_Init_1Patch, 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_SocketName, zSolaris_SocketList, - apzSolaris_SocketMachs, - SOLARIS_SOCKET_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_SocketTests, apzSolaris_SocketPatch, 0 }, - - { zSolaris_Stdio_TagName, zSolaris_Stdio_TagList, - apzSolaris_Stdio_TagMachs, - SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY, - aSolaris_Stdio_TagTests, apzSolaris_Stdio_TagPatch, 0 }, - - { zSolaris_UnistdName, zSolaris_UnistdList, - apzSolaris_UnistdMachs, - SOLARIS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_UnistdTests, apzSolaris_UnistdPatch, 0 }, - - { zSolaris_WidecName, zSolaris_WidecList, - apzSolaris_WidecMachs, - SOLARIS_WIDEC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSolaris_WidecTests, apzSolaris_WidecPatch, 0 }, - - { zStatsswtchName, zStatsswtchList, - apzStatsswtchMachs, - STATSSWTCH_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aStatsswtchTests, apzStatsswtchPatch, 0 }, - - { zStdio_Stdarg_HName, zStdio_Stdarg_HList, - apzStdio_Stdarg_HMachs, - STDIO_STDARG_H_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aStdio_Stdarg_HTests, apzStdio_Stdarg_HPatch, 0 }, - - { zStdio_Va_ListName, zStdio_Va_ListList, - apzStdio_Va_ListMachs, - STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY, - aStdio_Va_ListTests, apzStdio_Va_ListPatch, 0 }, - - { zStrict_Ansi_NotName, zStrict_Ansi_NotList, - apzStrict_Ansi_NotMachs, - STRICT_ANSI_NOT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aStrict_Ansi_NotTests, apzStrict_Ansi_NotPatch, 0 }, - - { zStrict_Ansi_Not_CtdName, zStrict_Ansi_Not_CtdList, - apzStrict_Ansi_Not_CtdMachs, - STRICT_ANSI_NOT_CTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aStrict_Ansi_Not_CtdTests, apzStrict_Ansi_Not_CtdPatch, 0 }, - - { zStrict_Ansi_OnlyName, zStrict_Ansi_OnlyList, - apzStrict_Ansi_OnlyMachs, - STRICT_ANSI_ONLY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aStrict_Ansi_OnlyTests, apzStrict_Ansi_OnlyPatch, 0 }, - - { zStruct_FileName, zStruct_FileList, - apzStruct_FileMachs, - STRUCT_FILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aStruct_FileTests, apzStruct_FilePatch, 0 }, - - { zStruct_SockaddrName, zStruct_SockaddrList, - apzStruct_SockaddrMachs, - STRUCT_SOCKADDR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aStruct_SockaddrTests, apzStruct_SockaddrPatch, 0 }, - - { zSun_Auth_ProtoName, zSun_Auth_ProtoList, - apzSun_Auth_ProtoMachs, - SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSun_Auth_ProtoTests, apzSun_Auth_ProtoPatch, 0 }, - - { zSun_Bogus_IfdefName, zSun_Bogus_IfdefList, - apzSun_Bogus_IfdefMachs, - SUN_BOGUS_IFDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSun_Bogus_IfdefTests, apzSun_Bogus_IfdefPatch, 0 }, - - { zSun_CatmacroName, zSun_CatmacroList, - apzSun_CatmacroMachs, - SUN_CATMACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSun_CatmacroTests, apzSun_CatmacroPatch, 0 }, - - { zSun_MallocName, zSun_MallocList, - apzSun_MallocMachs, - SUN_MALLOC_TEST_CT, FD_MACH_ONLY, - aSun_MallocTests, apzSun_MallocPatch, 0 }, - - { zSun_Rusers_SemiName, zSun_Rusers_SemiList, - apzSun_Rusers_SemiMachs, - SUN_RUSERS_SEMI_TEST_CT, FD_MACH_ONLY, - aSun_Rusers_SemiTests, apzSun_Rusers_SemiPatch, 0 }, - - { zSun_SignalName, zSun_SignalList, - apzSun_SignalMachs, - SUN_SIGNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSun_SignalTests, apzSun_SignalPatch, 0 }, - - { zSunos_StrlenName, zSunos_StrlenList, - apzSunos_StrlenMachs, - SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSunos_StrlenTests, apzSunos_StrlenPatch, 0 }, - - { zSvr4__PName, zSvr4__PList, - apzSvr4__PMachs, - SVR4__P_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSvr4__PTests, apzSvr4__PPatch, 0 }, - - { zSvr4_Disable_OptName, zSvr4_Disable_OptList, - apzSvr4_Disable_OptMachs, - SVR4_DISABLE_OPT_TEST_CT, FD_MACH_ONLY, - aSvr4_Disable_OptTests, apzSvr4_Disable_OptPatch, 0 }, - - { zSvr4_GetcwdName, zSvr4_GetcwdList, - apzSvr4_GetcwdMachs, - SVR4_GETCWD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSvr4_GetcwdTests, apzSvr4_GetcwdPatch, 0 }, - - { zSvr4_KrnlName, zSvr4_KrnlList, - apzSvr4_KrnlMachs, - SVR4_KRNL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSvr4_KrnlTests, apzSvr4_KrnlPatch, 0 }, - - { zSvr4_ProfilName, zSvr4_ProfilList, - apzSvr4_ProfilMachs, - SVR4_PROFIL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSvr4_ProfilTests, apzSvr4_ProfilPatch, 0 }, - - { zSvr4_Sighandler_TypeName, zSvr4_Sighandler_TypeList, - apzSvr4_Sighandler_TypeMachs, - SVR4_SIGHANDLER_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSvr4_Sighandler_TypeTests, apzSvr4_Sighandler_TypePatch, 0 }, - - { zSvr4_Undeclared_GetrngeName, zSvr4_Undeclared_GetrngeList, - apzSvr4_Undeclared_GetrngeMachs, - SVR4_UNDECLARED_GETRNGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSvr4_Undeclared_GetrngeTests, apzSvr4_Undeclared_GetrngePatch, 0 }, - - { zSysv68_StringName, zSysv68_StringList, - apzSysv68_StringMachs, - SYSV68_STRING_TEST_CT, FD_MACH_ONLY, - aSysv68_StringTests, apzSysv68_StringPatch, 0 }, - - { zSysz_Stdlib_For_SunName, zSysz_Stdlib_For_SunList, - apzSysz_Stdlib_For_SunMachs, - SYSZ_STDLIB_FOR_SUN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aSysz_Stdlib_For_SunTests, apzSysz_Stdlib_For_SunPatch, 0 }, - - { zThread_KeywordName, zThread_KeywordList, - apzThread_KeywordMachs, - THREAD_KEYWORD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aThread_KeywordTests, apzThread_KeywordPatch, 0 }, - - { zTinfo_CplusplusName, zTinfo_CplusplusList, - apzTinfo_CplusplusMachs, - TINFO_CPLUSPLUS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aTinfo_CplusplusTests, apzTinfo_CplusplusPatch, 0 }, - - { zUltrix_Atexit_ParamName, zUltrix_Atexit_ParamList, - apzUltrix_Atexit_ParamMachs, - ULTRIX_ATEXIT_PARAM_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_Atexit_ParamTests, apzUltrix_Atexit_ParamPatch, 0 }, - - { zUltrix_Atof_ParamName, zUltrix_Atof_ParamList, - apzUltrix_Atof_ParamMachs, - ULTRIX_ATOF_PARAM_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_Atof_ParamTests, apzUltrix_Atof_ParamPatch, 0 }, - - { zUltrix_ConstName, zUltrix_ConstList, - apzUltrix_ConstMachs, - ULTRIX_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_ConstTests, apzUltrix_ConstPatch, 0 }, - - { zUltrix_Const2Name, zUltrix_Const2List, - apzUltrix_Const2Machs, - ULTRIX_CONST2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_Const2Tests, apzUltrix_Const2Patch, 0 }, - - { zUltrix_Const3Name, zUltrix_Const3List, - apzUltrix_Const3Machs, - ULTRIX_CONST3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_Const3Tests, apzUltrix_Const3Patch, 0 }, - - { zUltrix_Fix_FixprotoName, zUltrix_Fix_FixprotoList, - apzUltrix_Fix_FixprotoMachs, - ULTRIX_FIX_FIXPROTO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_Fix_FixprotoTests, apzUltrix_Fix_FixprotoPatch, 0 }, - - { zUltrix_IfdefName, zUltrix_IfdefList, - apzUltrix_IfdefMachs, - ULTRIX_IFDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_IfdefTests, apzUltrix_IfdefPatch, 0 }, - - { zUltrix_LocaleName, zUltrix_LocaleList, - apzUltrix_LocaleMachs, - ULTRIX_LOCALE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_LocaleTests, apzUltrix_LocalePatch, 0 }, - - { zUltrix_Math_IfdefName, zUltrix_Math_IfdefList, - apzUltrix_Math_IfdefMachs, - ULTRIX_MATH_IFDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_Math_IfdefTests, apzUltrix_Math_IfdefPatch, 0 }, - - { zUltrix_Nested_IoctlName, zUltrix_Nested_IoctlList, - apzUltrix_Nested_IoctlMachs, - ULTRIX_NESTED_IOCTL_TEST_CT, FD_MACH_ONLY, - aUltrix_Nested_IoctlTests, apzUltrix_Nested_IoctlPatch, 0 }, - - { zUltrix_Nested_SvcName, zUltrix_Nested_SvcList, - apzUltrix_Nested_SvcMachs, - ULTRIX_NESTED_SVC_TEST_CT, FD_MACH_ONLY, - aUltrix_Nested_SvcTests, apzUltrix_Nested_SvcPatch, 0 }, - - { zUltrix_StatName, zUltrix_StatList, - apzUltrix_StatMachs, - ULTRIX_STAT_TEST_CT, FD_MACH_ONLY, - aUltrix_StatTests, apzUltrix_StatPatch, 0 }, - - { zUltrix_StaticName, zUltrix_StaticList, - apzUltrix_StaticMachs, - ULTRIX_STATIC_TEST_CT, FD_MACH_ONLY, - aUltrix_StaticTests, apzUltrix_StaticPatch, 0 }, - - { zUltrix_StdlibName, zUltrix_StdlibList, - apzUltrix_StdlibMachs, - ULTRIX_STDLIB_TEST_CT, FD_MACH_ONLY, - aUltrix_StdlibTests, apzUltrix_StdlibPatch, 0 }, - - { zUltrix_StringsName, zUltrix_StringsList, - apzUltrix_StringsMachs, - ULTRIX_STRINGS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUltrix_StringsTests, apzUltrix_StringsPatch, 0 }, - - { zUltrix_Strings2Name, zUltrix_Strings2List, - apzUltrix_Strings2Machs, - ULTRIX_STRINGS2_TEST_CT, FD_MACH_ONLY, - aUltrix_Strings2Tests, apzUltrix_Strings2Patch, 0 }, - - { zUltrix_Sys_TimeName, zUltrix_Sys_TimeList, - apzUltrix_Sys_TimeMachs, - ULTRIX_SYS_TIME_TEST_CT, FD_MACH_ONLY, - aUltrix_Sys_TimeTests, apzUltrix_Sys_TimePatch, 0 }, - - { zUltrix_UnistdName, zUltrix_UnistdList, - apzUltrix_UnistdMachs, - ULTRIX_UNISTD_TEST_CT, FD_MACH_ONLY, - aUltrix_UnistdTests, apzUltrix_UnistdPatch, 0 }, - - { zUndefine_NullName, zUndefine_NullList, - apzUndefine_NullMachs, - UNDEFINE_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUndefine_NullTests, apzUndefine_NullPatch, 0 }, - - { zUnicosmk_RestrictName, zUnicosmk_RestrictList, - apzUnicosmk_RestrictMachs, - UNICOSMK_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUnicosmk_RestrictTests, apzUnicosmk_RestrictPatch, 0 }, - - { zUw7_Byteorder_FixName, zUw7_Byteorder_FixList, - apzUw7_Byteorder_FixMachs, - UW7_BYTEORDER_FIX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aUw7_Byteorder_FixTests, apzUw7_Byteorder_FixPatch, 0 }, - - { zVa_I960_MacroName, zVa_I960_MacroList, - apzVa_I960_MacroMachs, - VA_I960_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aVa_I960_MacroTests, apzVa_I960_MacroPatch, 0 }, - - { zVoid_NullName, zVoid_NullList, - apzVoid_NullMachs, - VOID_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aVoid_NullTests, apzVoid_NullPatch, 0 }, - - { zVxworks_Gcc_ProblemName, zVxworks_Gcc_ProblemList, - apzVxworks_Gcc_ProblemMachs, - VXWORKS_GCC_PROBLEM_TEST_CT, FD_MACH_ONLY, - aVxworks_Gcc_ProblemTests, apzVxworks_Gcc_ProblemPatch, 0 }, - - { zVxworks_Needs_VxtypesName, zVxworks_Needs_VxtypesList, - apzVxworks_Needs_VxtypesMachs, - VXWORKS_NEEDS_VXTYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aVxworks_Needs_VxtypesTests, apzVxworks_Needs_VxtypesPatch, 0 }, - - { zVxworks_Needs_VxworksName, zVxworks_Needs_VxworksList, - apzVxworks_Needs_VxworksMachs, - VXWORKS_NEEDS_VXWORKS_TEST_CT, FD_MACH_ONLY, - aVxworks_Needs_VxworksTests, apzVxworks_Needs_VxworksPatch, 0 }, - - { zVxworks_TimeName, zVxworks_TimeList, - apzVxworks_TimeMachs, - VXWORKS_TIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aVxworks_TimeTests, apzVxworks_TimePatch, 0 }, - - { zWindiss_Math1Name, zWindiss_Math1List, - apzWindiss_Math1Machs, - WINDISS_MATH1_TEST_CT, FD_MACH_ONLY, - aWindiss_Math1Tests, apzWindiss_Math1Patch, 0 }, - - { zWindiss_Math2Name, zWindiss_Math2List, - apzWindiss_Math2Machs, - WINDISS_MATH2_TEST_CT, FD_MACH_ONLY, - aWindiss_Math2Tests, apzWindiss_Math2Patch, 0 }, - - { zWindiss_ValistName, zWindiss_ValistList, - apzWindiss_ValistMachs, - WINDISS_VALIST_TEST_CT, FD_MACH_ONLY, - aWindiss_ValistTests, apzWindiss_ValistPatch, 0 }, - - { zX11_ClassName, zX11_ClassList, - apzX11_ClassMachs, - X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aX11_ClassTests, apzX11_ClassPatch, 0 }, - - { zX11_Class_UsageName, zX11_Class_UsageList, - apzX11_Class_UsageMachs, - X11_CLASS_USAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aX11_Class_UsageTests, apzX11_Class_UsagePatch, 0 }, - - { zX11_NewName, zX11_NewList, - apzX11_NewMachs, - X11_NEW_TEST_CT, FD_MACH_ONLY, - aX11_NewTests, apzX11_NewPatch, 0 }, - - { zX11_SprintfName, zX11_SprintfList, - apzX11_SprintfMachs, - X11_SPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aX11_SprintfTests, apzX11_SprintfPatch, 0 } -}; diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c deleted file mode 100644 index e0fa94a..0000000 --- a/gcc/fixinc/fixlib.c +++ /dev/null @@ -1,281 +0,0 @@ - -/* Install modified versions of certain ANSI-incompatible system header - files which are fixed to work correctly with ANSI C and placed in a - directory that GCC will search. - - Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include "fixlib.h" - -/* * * * * * * * * * * * * - - load_file_data loads all the contents of a file into malloc-ed memory. - Its argument is the file pointer of the file to read in; the returned - result is the NUL terminated contents of the file. The file - is presumed to be an ASCII text file containing no NULs. */ - -char * -load_file_data (FILE* fp) -{ - char *pz_data = (char*)NULL; - int space_left = -1; /* allow for terminating NUL */ - size_t space_used = 0; - - if (fp == (FILE*)NULL) - return pz_data; - - do - { - size_t size_read; - - if (space_left < 1024) - { - space_left += 4096; - pz_data = xrealloc (pz_data, space_left + space_used + 1 ); - } - size_read = fread (pz_data + space_used, 1, space_left, fp); - - if (size_read == 0) - { - if (feof (fp)) - break; - - if (ferror (fp)) - { - int err = errno; - if (err != EISDIR) - fprintf (stderr, "error %d (%s) reading input\n", err, - xstrerror (err)); - free ((void *) pz_data); - return (char *) NULL; - } - } - - space_left -= size_read; - space_used += size_read; - } while (! feof (fp)); - - pz_data = xrealloc (pz_data, space_used+1 ); - pz_data[ space_used ] = NUL; - - return pz_data; -} - -#ifdef IS_CXX_HEADER_NEEDED -t_bool -is_cxx_header (tCC* fname, tCC* text) -{ - /* First, check to see if the file is in a C++ directory */ - for (;;) - { - switch (*(fname++)) - { - case 'C': /* check for "CC/" */ - if ((fname[0] == 'C') && (fname[1] == '/')) - return BOOL_TRUE; - break; - - case 'x': /* check for "xx/" */ - if ((fname[0] == 'x') && (fname[1] == '/')) - return BOOL_TRUE; - break; - - case '+': /* check for "++" */ - if (fname[0] == '+') - return BOOL_TRUE; - break; - - case NUL: - goto not_cxx_name; - } - } not_cxx_name:; - - /* Or it might contain one of several phrases which indicate C++ code. - Currently recognized are: - extern "C++" - -*- (Mode: )? C++ -*- (emacs mode marker) - template < - */ - { - tSCC cxxpat[] = "\ -extern[ \t]*\"C\\+\\+\"|\ --\\*-[ \t]*([mM]ode:[ \t]*)?[cC]\\+\\+[; \t]*-\\*-|\ -template[ \t]*<|\ -^[ \t]*class[ \t]|\ -(public|private|protected):|\ -^[ \t]*#[ \t]*pragma[ \t]+(interface|implementation)\ -"; - static regex_t cxxre; - static int compiled; - - if (!compiled) - compile_re (cxxpat, &cxxre, 0, "contents check", "is_cxx_header"); - - if (xregexec (&cxxre, text, 0, 0, 0) == 0) - return BOOL_TRUE; - } - - return BOOL_FALSE; -} -#endif /* CXX_TYPE_NEEDED */ - -#ifdef SKIP_QUOTE_NEEDED -/* - * Skip over a quoted string. Single quote strings may - * contain multiple characters if the first character is - * a backslash. Especially a backslash followed by octal digits. - * We are not doing a correctness syntax check here. - */ -tCC* -skip_quote(char q, char* text ) -{ - for (;;) - { - char ch = *(text++); - switch (ch) - { - case '\\': - text++; /* skip over whatever character follows */ - break; - - case '"': - case '\'': - if (ch != q) - break; - /*FALLTHROUGH*/ - - case '\n': - case NUL: - goto skip_done; - } - } skip_done:; - - return text; -} -#endif /* SKIP_QUOTE_NEEDED */ - -/* * * * * * * * * * * * * - - Compile one regular expression pattern for later use. PAT contains - the pattern, RE points to a regex_t structure (which should have - been bzeroed). MATCH is 1 if we need to know where the regex - matched, 0 if not. If xregcomp fails, prints an error message and - aborts; E1 and E2 are strings to shove into the error message. - - The patterns we search for are all egrep patterns. - REG_EXTENDED|REG_NEWLINE produces identical regex syntax/semantics - to egrep (verified from 4.4BSD Programmer's Reference Manual). */ -void -compile_re( tCC* pat, regex_t* re, int match, tCC* e1, tCC* e2 ) -{ - tSCC z_bad_comp[] = "fixincl ERROR: cannot compile %s regex for %s\n\ -\texpr = `%s'\n\terror %s\n"; - int flags, err; - - flags = (match ? REG_EXTENDED|REG_NEWLINE - : REG_EXTENDED|REG_NEWLINE|REG_NOSUB); - err = xregcomp (re, pat, flags); - - if (err) - { - char rerrbuf[1024]; - regerror (err, re, rerrbuf, 1024); - fprintf (stderr, z_bad_comp, e1, e2, pat, rerrbuf); - exit (EXIT_FAILURE); - } -} - -/* * * * * * * * * * * * * - - Helper routine and data for the machine_name test and fix. */ - -tSCC mn_label_pat[] = "^[ \t]*#[ \t]*(if|ifdef|ifndef)[ \t]+"; -static regex_t mn_label_re; -static regex_t mn_name_re; - -static int mn_compiled = 0; - -t_bool -mn_get_regexps(regex_t** label_re, regex_t** name_re, tCC* who ) -{ - if (! pz_mn_name_pat) - return BOOL_FALSE; - - if (! mn_compiled) - { - compile_re (mn_label_pat, &mn_label_re, 1, "label pattern", who); - compile_re (pz_mn_name_pat, &mn_name_re, 1, "name pattern", who); - mn_compiled++; - } - *label_re = &mn_label_re; - *name_re = &mn_name_re; - return BOOL_TRUE; -} - - -#ifdef SEPARATE_FIX_PROC - -char* -make_raw_shell_str( char* pz_d, tCC* pz_s, size_t smax ) -{ - tSCC zQ[] = "'\\''"; - size_t dtaSize; - char* pz_d_start = pz_d; - - smax--; /* adjust for trailing NUL */ - - dtaSize = strlen( pz_s ) + 3; - - { - const char* pz = pz_s - 1; - - for (;;) { - pz = strchr( pz+1, '\'' ); - if (pz == (char*)NULL) - break; - dtaSize += sizeof( zQ )-1; - } - } - if (dtaSize > smax) - return (char*)NULL; - - *(pz_d++) = '\''; - - for (;;) { - if (pz_d - pz_d_start >= smax) - return (char*)NULL; - switch (*(pz_d++) = *(pz_s++)) { - case NUL: - goto loopDone; - - case '\'': - if (pz_d - pz_d_start >= smax - sizeof( zQ )-1) - return (char*)NULL; - strcpy( pz_d-1, zQ ); - pz_d += sizeof( zQ )-2; - } - } loopDone:; - pz_d[-1] = '\''; - *pz_d = NUL; - - return pz_d; -} - -#endif diff --git a/gcc/fixinc/fixlib.h b/gcc/fixinc/fixlib.h deleted file mode 100644 index 1cce4a5..0000000 --- a/gcc/fixinc/fixlib.h +++ /dev/null @@ -1,229 +0,0 @@ - -/* Install modified versions of certain ANSI-incompatible system header - 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 - Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#ifndef GCC_FIXLIB_H -#define GCC_FIXLIB_H - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include <signal.h> - -#include "xregex.h" -#include "libiberty.h" - -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif - -typedef int t_success; - -#define FAILURE (-1) -#define SUCCESS 0 -#define PROBLEM 1 - -#define SUCCEEDED(p) ((p) == SUCCESS) -#define SUCCESSFUL(p) SUCCEEDED (p) -#define FAILED(p) ((p) < SUCCESS) -#define HADGLITCH(p) ((p) > SUCCESS) - -#ifndef DEBUG -# define STATIC static -#else -# define STATIC -#endif - -#define tSCC static const char -#define tCC const char -#define tSC static char - -/* If this particular system's header files define the macro `MAXPATHLEN', - we happily take advantage of it; otherwise we use a value which ought - to be large enough. */ -#ifndef MAXPATHLEN -# define MAXPATHLEN 4096 -#endif - -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - -#define EXIT_BROKEN 3 - -#define NUL '\0' - -#ifndef NOPROCESS -#define NOPROCESS ((pid_t) -1) -#define NULLPROCESS ((pid_t)0) - -#define EXIT_PANIC 99 -#endif /* NOPROCESS */ - -#define IGNORE_ARG(a) ((void)(a)) - -typedef enum t_bool -{ - BOOL_FALSE, BOOL_TRUE -} t_bool; - -typedef int apply_fix_p_t; /* Apply Fix Predicate Type */ - -#define APPLY_FIX 0 -#define SKIP_FIX 1 - -#define ENV_TABLE \ - _ENV_( pz_machine, BOOL_TRUE, "TARGET_MACHINE", \ - "output from config.guess" ) \ - \ - _ENV_( pz_orig_dir, BOOL_TRUE, "ORIGDIR", \ - "directory of fixincl and applyfix" ) \ - \ - _ENV_( pz_src_dir, BOOL_TRUE, "SRCDIR", \ - "directory of original files" ) \ - \ - _ENV_( pz_input_dir, BOOL_TRUE, "INPUT", \ - "current directory for fixincl" ) \ - \ - _ENV_( pz_dest_dir, BOOL_TRUE, "DESTDIR", \ - "output directory" ) \ - \ - _ENV_( pz_mn_name_pat, BOOL_FALSE, "MN_NAME_PAT", \ - "regex matching forbidden identifiers" ) \ - \ - _ENV_( pz_verbose, BOOL_FALSE, "VERBOSE", \ - "amount of user entertainment" ) \ - \ - _ENV_( pz_find_base, BOOL_TRUE, "FIND_BASE", \ - "leader to trim from file names" ) - -#define _ENV_(v,m,n,t) extern tCC* v; -ENV_TABLE -#undef _ENV_ - -/* Test Descriptor - - Each fix may have associated tests that determine - whether the fix needs to be applied or not. - Each test has a type (from the te_test_type enumeration); - associated test text; and, if the test is TT_EGREP or - the negated form TT_NEGREP, a pointer to the compiled - version of the text string. - - */ -typedef enum -{ - TT_TEST, TT_EGREP, TT_NEGREP, TT_FUNCTION -} te_test_type; - -typedef struct test_desc tTestDesc; - -struct test_desc -{ - te_test_type type; - const char *pz_test_text; - regex_t *p_test_regex; -}; - -typedef struct patch_desc tPatchDesc; - -/* Fix Descriptor - - Everything you ever wanted to know about how to apply - a particular fix (which files, how to qualify them, - how to actually make the fix, etc...) - - NB: the FD_ defines are BIT FLAGS, even though - some are mutually exclusive - - */ -#define FD_MACH_ONLY 0x0000 -#define FD_MACH_IFNOT 0x0001 -#define FD_SHELL_SCRIPT 0x0002 -#define FD_SUBROUTINE 0x0004 -#define FD_REPLACEMENT 0x0008 -#define FD_SKIP_TEST 0x8000 - -typedef struct fix_desc tFixDesc; -struct fix_desc -{ - tCC* fix_name; /* Name of the fix */ - tCC* file_list; /* List of files it applies to */ - tCC** papz_machs; /* List of machine/os-es it applies to */ - int test_ct; - int fd_flags; - tTestDesc* p_test_desc; - tCC** patch_args; - long unused; -}; - -typedef struct { - int type_name_len; - tCC* pz_type; - tCC* pz_TYPE; - tCC* pz_gtype; -} t_gnu_type_map; - -extern int gnu_type_map_ct; - -#ifdef HAVE_MMAP_FILE -#define UNLOAD_DATA() do { if (curr_data_mapped) { \ - munmap ((void*)pz_curr_data, data_map_size); close (data_map_fd); } \ - else free ((void*)pz_curr_data); } while(0) -#else -#define UNLOAD_DATA() free ((void*)pz_curr_data) -#endif - -/* - * Exported procedures - */ -char * load_file_data ( FILE* fp ); - -#ifdef IS_CXX_HEADER_NEEDED -t_bool is_cxx_header ( tCC* filename, tCC* filetext ); -#endif /* IS_CXX_HEADER_NEEDED */ - -#ifdef SKIP_QUOTE_NEEDED -tCC* skip_quote ( char q, char* text ); -#endif - -void compile_re ( tCC* pat, regex_t* re, int match, tCC *e1, tCC *e2 ); - -void apply_fix ( tFixDesc* p_fixd, tCC* filname ); -apply_fix_p_t - run_test ( tCC* t_name, tCC* f_name, tCC* text ); - -#ifdef SEPARATE_FIX_PROC -char* make_raw_shell_str ( char* pz_d, tCC* pz_s, size_t smax ); -#endif - -t_bool mn_get_regexps ( regex_t** label_re, regex_t** name_re, tCC *who ); -#endif /* ! GCC_FIXLIB_H */ diff --git a/gcc/fixinc/fixtests.c b/gcc/fixinc/fixtests.c deleted file mode 100644 index 44ef972..0000000 --- a/gcc/fixinc/fixtests.c +++ /dev/null @@ -1,155 +0,0 @@ - -/* - - Test to see if a particular fix should be applied to a header file. - - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - -= = = = = = = = = = = = = = = = = = = = = = = = = - -NOTE TO DEVELOPERS - -The routines you write here must work closely with fixincl.c. - -Here are the rules: - -1. Every test procedure name must be suffixed with "_test". - These routines will be referenced from inclhack.def, sans the suffix. - -2. Use the "TEST_FOR_FIX_PROC_HEAD()" macro _with_ the "_test" suffix - (I cannot use the ## magic from ANSI C) for defining your entry point. - -3. Put your test name into the FIX_TEST_TABLE - -4. Do not write anything to stdout. It may be closed. - -5. Write to stderr only in the event of a reportable error - In such an event, call "exit(1)". - -= = = = = = = = = = = = = = = = = = = = = = = = = - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -#include "fixlib.h" - -#define _ENV_(v,m,n,t) extern tCC* v; -ENV_TABLE -#undef _ENV_ - -typedef apply_fix_p_t t_test_proc ( tCC* file, tCC* text ); - -typedef struct { - tCC* test_name; - t_test_proc* test_proc; -} test_entry_t; - -#define FIX_TEST_TABLE \ - _FT_( "machine_name", machine_name_test ) \ - _FT_( "stdc_0_in_system_headers", stdc_0_in_system_headers_test ) - -#define TEST_FOR_FIX_PROC_HEAD( test ) \ -static apply_fix_p_t test ( tCC* fname ATTRIBUTE_UNUSED, \ - tCC* text ATTRIBUTE_UNUSED ) - -TEST_FOR_FIX_PROC_HEAD( machine_name_test ) -{ - regex_t *label_re, *name_re; - regmatch_t match[2]; - tCC *base, *limit; - IGNORE_ARG(fname); - - if (!mn_get_regexps (&label_re, &name_re, "machine_name_test")) - return SKIP_FIX; - - for (base = text; - xregexec (label_re, base, 2, match, 0) == 0; - base = limit) - { - base += match[0].rm_eo; - /* We're looking at an #if or #ifdef. Scan forward for the - next non-escaped newline. */ - limit = base; - do - { - limit++; - limit = strchr (limit, '\n'); - if (!limit) - return SKIP_FIX; - } - while (limit[-1] == '\\'); - - /* If the 'name_pat' matches in between base and limit, we have - a bogon. It is not worth the hassle of excluding comments, - because comments on #if/#ifdef/#ifndef lines are rare, - and strings on such lines are illegal. - - REG_NOTBOL means 'base' is not at the beginning of a line, which - shouldn't matter since the name_re has no ^ anchor, but let's - be accurate anyway. */ - - if (xregexec (name_re, base, 1, match, REG_NOTBOL)) - return SKIP_FIX; /* No match in file - no fix needed */ - - /* Match; is it on the line? */ - if (match[0].rm_eo <= limit - base) - return APPLY_FIX; /* Yup */ - - /* Otherwise, keep looking... */ - } - return SKIP_FIX; -} - - -TEST_FOR_FIX_PROC_HEAD( stdc_0_in_system_headers_test ) -{ -#ifdef STDC_0_IN_SYSTEM_HEADERS - return (pz_machine == NULL) ? APPLY_FIX : SKIP_FIX; -#else - return APPLY_FIX; -#endif -} - - -/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = - - test for fix selector - - THIS IS THE ONLY EXPORTED ROUTINE - -*/ -apply_fix_p_t -run_test( tCC* tname, tCC* fname, tCC* text ) -{ -#define _FT_(n,p) { n, p }, - static test_entry_t test_table[] = { FIX_TEST_TABLE { NULL, NULL }}; -#undef _FT_ -#define TEST_TABLE_CT (ARRAY_SIZE (test_table)-1) - - int ct = TEST_TABLE_CT; - test_entry_t* pte = test_table; - - do - { - if (strcmp( pte->test_name, tname ) == 0) - return (*pte->test_proc)( fname, text ); - pte++; - } while (--ct > 0); - fprintf( stderr, "fixincludes error: the `%s' fix test is unknown\n", - tname ); - exit( 3 ); -} diff --git a/gcc/fixinc/genfixes b/gcc/fixinc/genfixes deleted file mode 100755 index b151153..0000000 --- a/gcc/fixinc/genfixes +++ /dev/null @@ -1,77 +0,0 @@ -#! /bin/sh - -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. -# This file is part of GCC. - -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# GCC is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING. If not, write to -# the Free Software Foundation, 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -SHELL=/bin/sh -export SHELL -if [ $# -eq 0 ] ; then - not_done=false -else - not_done=true -fi - -while $not_done -do - case "$1" in - -D ) - shift - if [ $# -eq 0 ] ; then - not_done=false - else - AG="$AG -D$1" - shift - fi - ;; - - -D* ) - AG="$AG $1" - shift - ;; - - '-?' ) - echo "USAGE: gendefs [ -D<def-name> ... ]" - echo "WHERE: '<def-name>' specifies a #define test name from inclhack.def" - exit 0 - ;; - - * ) - not_done=false - ;; - esac -done - -if [ $# -eq 0 ] ; then - set -- fixincl.x -fi - -AG="autogen $AG" -set -e - -if [ -z "`${AG} -v | fgrep 'Ver. 5.'`" ] -then - echo "AutoGen appears to be out of date or not correctly installed." - echo "Please download and install:" - echo " ftp://gcc.gnu.org/pub/gcc/infrastructure/autogen.tar.gz" - touch fixincl.x -else - echo AutoGen-ing fixincl.x - $AG inclhack.def -fi - -exit 0 diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def deleted file mode 100644 index b6c9795..0000000 --- a/gcc/fixinc/inclhack.def +++ /dev/null @@ -1,4130 +0,0 @@ -/* -*- Mode: C -*- */ - -autogen definitions fixincl; - -/* Define all the fixes we know about for repairing damaged headers. - Please see the README before adding or changing entries in this file. - - This is the sort command: - - blocksort output=inclhack.sorted \ - pattern='^/\*$' \ - trailer='^/\*EOF\*[/]' \ - input=inclhack.def \ - key='hackname[ ]*=[ ]*(.*);' - - Set up a debug test so we can make the templates emit special - code while debugging these fixes: */ - -#ifdef DEBUG -FIXINC_DEBUG = yes; -#endif - -/* - * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) - */ -fix = { - hackname = AAB_fd_zero_asm_posix_types_h; - files = asm/posix_types.h; - mach = 'i[34567]86-*-linux*'; - bypass = '} while'; - - /* - * Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not - * the start, so that if #include_next gets another instance of - * the wrapper, this will follow the #include_next chain until - * we arrive at the real <asm/posix_types.h>. - */ - replace = <<- _EndOfHeader_ - /* This file fixes a bug in the __FD_ZERO macro - for older versions of the Linux kernel. */ - #ifndef _POSIX_TYPES_H_WRAPPER - #include <features.h> - #include_next <asm/posix_types.h> - - #if defined(__FD_ZERO) && !defined(__GLIBC__) - #undef __FD_ZERO - #define __FD_ZERO(fdsetp) \ - do { \ - int __d0, __d1; \ - __asm__ __volatile__("cld ; rep ; stosl" \ - : "=&c" (__d0), "=&D" (__d1) \ - : "a" (0), "0" (__FDSET_LONGS), \ - "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \ - } while (0) - #endif - - #define _POSIX_TYPES_H_WRAPPER - #endif /* _POSIX_TYPES_H_WRAPPER */ - _EndOfHeader_; -}; - - -/* - * This fixes __FD_ZERO bug for glibc-1.x - */ -fix = { - hackname = AAB_fd_zero_gnu_types_h; - files = gnu/types.h; - mach = 'i[34567]86-*-linux*'; - - /* - * Define _TYPES_H_WRAPPER at the end of the wrapper, not - * the start, so that if #include_next gets another instance of - * the wrapper, this will follow the #include_next chain until - * we arrive at the real <gnu/types.h>. - */ - replace = <<- _EndOfHeader_ - /* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */ - #ifndef _TYPES_H_WRAPPER - #include <features.h> - #include_next <gnu/types.h> - - #if defined(__FD_ZERO) && !defined(__GLIBC__) - #undef __FD_ZERO - # define __FD_ZERO(fdsetp) \\ - do { \\ - int __d0, __d1; \\ - __asm__ __volatile__("cld ; rep ; stosl" \\ - : "=&c" (__d0), "=&D" (__d1) \\ - : "a" (0), "0" (__FDSET_LONGS), \\ - "1" ((__fd_set *) (fdsetp)) :"memory"); \\ - } while (0) - #endif - - #define _TYPES_H_WRAPPER - #endif /* _TYPES_H_WRAPPER */ - _EndOfHeader_; -}; - - -/* - * This fixes __FD_ZERO bug for glibc-2.0.x - */ -fix = { - hackname = AAB_fd_zero_selectbits_h; - files = selectbits.h; - mach = 'i[34567]86-*-linux*'; - - /* - * Define _SELECTBITS_H_WRAPPER at the end of the wrapper, not - * the start, so that if #include_next gets another instance of - * the wrapper, this will follow the #include_next chain until - * we arrive at the real <selectbits.h>. - */ - replace = <<- _EndOfHeader_ - /* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */ - #ifndef _SELECTBITS_H_WRAPPER - #include <features.h> - #include_next <selectbits.h> - - #if defined(__FD_ZERO) && defined(__GLIBC__) \\ - && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\ - && __GLIBC_MINOR__ == 0 - #undef __FD_ZERO - #define __FD_ZERO(fdsetp) \\ - do { \\ - int __d0, __d1; \\ - __asm__ __volatile__ ("cld; rep; stosl" \\ - : "=&c" (__d0), "=&D" (__d1) \\ - : "a" (0), "0" (sizeof (__fd_set) \\ - / sizeof (__fd_mask)), \\ - "1" ((__fd_mask *) (fdsetp)) \\ - : "memory"); \\ - } while (0) - #endif - - #define _SELECTBITS_H_WRAPPER - #endif /* _SELECTBITS_H_WRAPPER */ - _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 - * used the standard header. - */ -fix = { - hackname = AAB_solaris_sys_varargs_h; - files = "sys/varargs.h"; - mach = '*-*-solaris*'; - replace = <<- _EndOfHeader_ - #ifdef __STDC__ - #include <stdarg.h> - #else - #include <varargs.h> - #endif - _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 - * many other systems have similar text but correct versions of the file. - * To ensure only Sun's is fixed, we grep for a likely unique string. - * Fix also on sysV68 R3V7.1 (head/memory.h\t50.1\t ) - */ -fix = { - hackname = AAB_sun_memcpy; - files = memory.h; - select = "/\\*\t@\\(#\\)" - "(head/memory.h\t50.1\t " - "|memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2\t)\\*/"; - - replace = <<- _EndOfHeader_ - /* This file was generated by fixincludes */ - #ifndef __memory_h__ - #define __memory_h__ - - #ifdef __STDC__ - extern void *memccpy(); - extern void *memchr(); - extern void *memcpy(); - extern void *memset(); - #else - extern char *memccpy(); - extern char *memchr(); - extern char *memcpy(); - extern char *memset(); - #endif /* __STDC__ */ - - extern int memcmp(); - - #endif /* __memory_h__ */ - _EndOfHeader; -}; - - -/* - * Completely replace <sys/varargs.h> with a file that includes gcc's - * stdarg.h or varargs.h files as appropriate. - */ -#ifdef SVR4 -fix = { - hackname = AAB_svr4_no_varargs; - files = sys/varargs.h; - replace = "/* This file was generated by fixincludes. */\n" - "#ifndef _SYS_VARARGS_H\n" - "#define _SYS_VARARGS_H\n\n" - - "#ifdef __STDC__\n" - "#include <stdarg.h>\n" - "#else\n" - "#include <varargs.h>\n" - "#endif\n\n" - - "#endif /* _SYS_VARARGS_H */\n"; -}; -#endif - - -/* - * Completely replace <sys/byteorder.h> with a file that implements gcc's - * optimized byteswapping. (The original probably implemented some - * incompatible optimized byteswapping.) - */ -fix = { - hackname = AAB_svr4_replace_byteorder; - mach = "*-*-sysv4*"; - mach = "i[34567]86-*-sysv5*"; - mach = "i[34567]86-*-sco3.2v5*"; - mach = "i[34567]86-*-udk*"; - mach = "i[34567]86-*-solaris2.[0-4]"; - mach = "powerpcle-*-solaris2.[0-4]"; - mach = "sparc-*-solaris2.[0-4]"; - mach = "i[34567]86-sequent-ptx*"; - files = sys/byteorder.h; - replace = <<- _EndOfHeader_ - #ifndef _SYS_BYTEORDER_H - #define _SYS_BYTEORDER_H - - /* Functions to convert `short' and `long' quantities from host byte order - to (internet) network byte order (i.e. big-endian). - - Written by Ron Guilmette (rfg@ncd.com). - - This isn't actually used by GCC. It is installed by fixinc.svr4. - - For big-endian machines these functions are essentially no-ops. - - For little-endian machines, we define the functions using specialized - asm sequences in cases where doing so yields better code (e.g. i386). */ - - #if !defined (__GNUC__) && !defined (__GNUG__) - #error You lose! This file is only useful with GNU compilers. - #endif - - #ifndef __BYTE_ORDER__ - /* Byte order defines. These are as defined on UnixWare 1.1, but with - double underscores added at the front and back. */ - #define __LITTLE_ENDIAN__ 1234 - #define __BIG_ENDIAN__ 4321 - #define __PDP_ENDIAN__ 3412 - #endif - - #ifdef __STDC__ - static __inline__ unsigned long htonl (unsigned long); - static __inline__ unsigned short htons (unsigned int); - static __inline__ unsigned long ntohl (unsigned long); - static __inline__ unsigned short ntohs (unsigned int); - #endif /* defined (__STDC__) */ - - #if defined (__i386__) - - #ifndef __BYTE_ORDER__ - #define __BYTE_ORDER__ __LITTLE_ENDIAN__ - #endif - - /* Convert a host long to a network long. */ - - /* We must use a new-style function definition, so that this will also - be valid for C++. */ - static __inline__ unsigned long - htonl (unsigned long __arg) - { - register unsigned long __result; - - __asm__ ("xchg%B0 %b0,%h0 - ror%L0 $16,%0 - xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg)); - return __result; - } - - /* Convert a host short to a network short. */ - - static __inline__ unsigned short - htons (unsigned int __arg) - { - register unsigned short __result; - - __asm__ ("xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg)); - return __result; - } - - #elif (defined (__ns32k__) || defined (__vax__) || defined (__arm__)) - - #ifndef __BYTE_ORDER__ - #define __BYTE_ORDER__ __LITTLE_ENDIAN__ - #endif - - /* For other little-endian machines, using C code is just as efficient as - using assembly code. */ - - /* Convert a host long to a network long. */ - - static __inline__ unsigned long - htonl (unsigned long __arg) - { - register unsigned long __result; - - __result = (__arg >> 24) & 0x000000ff; - __result |= (__arg >> 8) & 0x0000ff00; - __result |= (__arg << 8) & 0x00ff0000; - __result |= (__arg << 24) & 0xff000000; - return __result; - } - - /* Convert a host short to a network short. */ - - static __inline__ unsigned short - htons (unsigned int __arg) - { - register unsigned short __result; - - __result = (__arg << 8) & 0xff00; - __result |= (__arg >> 8) & 0x00ff; - return __result; - } - - #else /* must be a big-endian machine */ - - #ifndef __BYTE_ORDER__ - #define __BYTE_ORDER__ __BIG_ENDIAN__ - #endif - - /* Convert a host long to a network long. */ - - static __inline__ unsigned long - htonl (unsigned long __arg) - { - return __arg; - } - - /* Convert a host short to a network short. */ - - static __inline__ unsigned short - htons (unsigned int __arg) - { - return __arg; - } - - #endif /* big-endian */ - - /* Convert a network long to a host long. */ - - static __inline__ unsigned long - ntohl (unsigned long __arg) - { - return htonl (__arg); - } - - /* Convert a network short to a host short. */ - - static __inline__ unsigned short - ntohs (unsigned int __arg) - { - return htons (__arg); - } - #endif - _EndOfHeader_; -}; - - -/* - * Cancel out ansi_compat.h on Ultrix. Replace it with an empty file. - */ -fix = { - hackname = AAB_ultrix_ansi_compat; - files = ansi_compat.h; - select = ULTRIX; - replace = "/* This file intentionally left blank. */\n"; -}; - - -/* - * The Ultrix 4.3 file limits.h is a symbolic link to sys/limits.h. - * Replace limits.h with a file that includes sys/limits.h. - */ -fix = { - hackname = AAB_ultrix_limits; - files = limits.h; - mach = "*-*-ultrix4.3"; - replace = <<- _EndOfHeader_ - #ifndef _LIMITS_INCLUDED - #define _LIMITS_INCLUDED - #include <sys/limits.h> - #endif /* _LIMITS_INCLUDED */ - _EndOfHeader_; -}; - - -/* - * The ULTRIX 4.3 version of memory.h duplicates definitions - * present in strings.h. Replace memory.h with a file that includes - * strings.h to prevent problems from multiple inclusion. - */ -fix = { - hackname = AAB_ultrix_memory; - files = memory.h; - mach = "*-*-ultrix4.3"; - replace = <<- _EndOfHeader_ - #ifndef _MEMORY_INCLUDED - #define _MEMORY_INCLUDED - #include <strings.h> - #endif /* _MEMORY_INCLUDED */ - _EndOfHeader_; -}; - - -/* - * The Ultrix 4.3 file string.h is a symbolic link to strings.h. - * Replace string.h link with a file that includes strings.h to prevent - * problems from multiple inclusion. - */ -fix = { - hackname = AAB_ultrix_string; - files = string.h; - mach = "*-*-ultrix4.3"; - replace = <<- _EndOfHeader_ - #ifndef _STRING_INCLUDED - #define _STRING_INCLUDED - #include <strings.h> - #endif /* _STRING_INCLUDED */ - _EndOfHeader_; -}; - - -/* - * pthread.h on AIX 4.3.3 tries to define a macro without whitspace - * which violates a requirement of ISO C. - */ -fix = { - hackname = aix_pthread; - files = "pthread.h"; - select = "(#define [A-Za-z_0-9]+)(\\\\\n[^A-Za-z_0-9 \t\n(])"; - c_fix = format; - c_fix_arg = "%1 %2"; - test_text = "#define PTHREAD_MUTEX_INITIALIZER\\\\\n" - "{...init stuff...}"; -}; - - -/* - * sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline - * in an otherwise harmless (and #ifed out) macro definition - */ -fix = { - hackname = aix_sysmachine; - files = sys/machine.h; - select = "\\\\ +\n"; - c_fix = format; - c_fix_arg = "\\\n"; - test_text = "#define FOO \\\n" - " bar \\ \n baz \\ \n bat"; -}; - - -/* - * sys/wait.h on AIX 3.2.5 puts the declaration of wait3 before the - * definition of struct rusage, so the prototype added by fixproto fails. - */ -fix = { - hackname = aix_syswait; - files = sys/wait.h; - select = "^extern pid_t wait3\\(\\);\n"; - select = "bos325,"; - c_fix = format; - c_fix_arg = "struct rusage;\n%0"; - test_text = "/* bos325, */\n" - "extern pid_t wait3();\n" - "\t/* pid_t wait3(int *, int, struct rusage *); */"; -}; - - -/* - * sys/wait.h on AIX 5.2 defines macros that have both signed and - * unsigned types in conditional expressions. - */ -fix = { - hackname = aix_syswait_2; - files = sys/wait.h; - 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)"; -}; - - -/* - * 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 - * volatile when a sig_atomic_t variable is declared volatile, as - * required by ANSI C. - */ -fix = { - hackname = aix_volatile; - files = sys/signal.h; - select = "typedef volatile int sig_atomic_t"; - c_fix = format; - c_fix_arg = "typedef int sig_atomic_t"; - test_text = "typedef volatile int sig_atomic_t;"; -}; - - -/* - * Fix __assert declaration in assert.h on Alpha OSF/1. - */ -fix = { - hackname = alpha___assert; - files = "assert.h"; - select = '__assert\(char \*, char \*, int\)'; - c_fix = format; - c_fix_arg = "__assert(const char *, const char *, int)"; - 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++. - */ -fix = { - hackname = alpha_assert; - files = "assert.h"; - select = '(#define assert\(EX\).*)\(\(int\) \(EX\)\)'; - c_fix = format; - c_fix_arg = "%1(EX)"; - test_text = '#define assert(EX) (((int) (EX)) ? (void)0 : __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. - */ -fix = { - hackname = alpha_getopt; - files = "stdio.h"; - files = "stdlib.h"; - select = 'getopt\(int, char \*\[\], *char \*\)'; - c_fix = format; - c_fix_arg = "getopt(int, char *const[], const char *)"; - test_text = 'extern int getopt(int, char *[], char *);'; -}; - - -/* - * Remove erroneous parentheses in sym.h on Alpha OSF/1. - */ -fix = { - hackname = alpha_parens; - files = sym.h; - select = '#ifndef\(__mips64\)'; - c_fix = format; - c_fix_arg = "#ifndef __mips64"; - 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"; -}; - - -/* - * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0 - * And OpenBSD. - */ -fix = { - hackname = alpha_sbrk; - files = unistd.h; - select = "char[ \t]*\\*[\t ]*sbrk[ \t]*\\("; - c_fix = format; - c_fix_arg = "void *sbrk("; - test_text = "extern char* sbrk(ptrdiff_t increment);"; -}; - - -/* - * Change external names of wcstok/wcsftime via asm instead of macros on - * Tru64 UNIX V4.0. - */ -fix = { - hackname = alpha_wchar; - files = wchar.h; - - mach = "alpha*-dec-osf4*"; - select = "#define wcstok wcstok_r"; - sed = "s@#define wcstok wcstok_r@extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__(\"wcstok_r\");@"; - sed = "s@#define wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@"; - test_text = "#define wcstok wcstok_r\n" - "#define wcsftime __wcsftime_isoc"; -}; - - -/* - * For C++, avoid any typedef or macro definition of bool, - * and use the built in type instead. - * HP/UX 10.20 also has it in curses_colr/curses.h. - */ -fix = { - hackname = avoid_bool_define; - files = curses.h; - files = curses_colr/curses.h; - files = term.h; - files = tinfo.h; - - select = "#[ \t]*define[ \t]+bool[ \t]"; - bypass = "__cplusplus"; - - c_fix = format; - c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; - c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+bool[ \t].*"; - - test_text = "# define bool\t char \n"; -}; - - -fix = { - hackname = avoid_bool_type; - files = curses.h; - files = curses_colr/curses.h; - files = term.h; - files = tinfo.h; - - select = "^[ \t]*typedef[ \t].*[ \t]bool[ \t]*;"; - bypass = "__cplusplus"; - - c_fix = format; - c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; - - 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. - * Don't do this for headers that are smart enough to do the right - * thing (recent [n]curses.h and Xlib.h). - * Don't do it for <linux/nls.h> which is never used from C++ anyway, - * and will be broken by the edit. - */ - -fix = { - hackname = avoid_wchar_t_type; - - select = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;"; - bypass = "__cplusplus"; - bypass = "_LINUX_NLS_H"; - bypass = "XFree86: xc/lib/X11/Xlib\\.h"; - - c_fix = format; - c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; - - test_text = "typedef unsigned short\twchar_t \t; /* wchar_t\n type */"; -}; - - -/* - * Fix `typedef struct term;' on hppa1.1-hp-hpux9. - */ -fix = { - hackname = bad_struct_term; - files = curses.h; - select = "^[ \t]*typedef[ \t]+struct[ \t]+term[ \t]*;"; - c_fix = format; - c_fix_arg = "struct term;"; - - test_text = 'typedef struct term;'; -}; - - -/* - * Fix one other error in this file: - * a mismatched quote not inside a C comment. - */ -fix = { - hackname = badquote; - files = sundev/vuid_event.h; - select = "doesn't"; - c_fix = format; - c_fix_arg = "does not"; - - test_text = "/* doesn't have matched single quotes */"; -}; - - -/* - * check for broken assert.h that needs stdio.h - */ -fix = { - hackname = broken_assert_stdio; - files = assert.h; - select = stderr; - bypass = "include.*stdio\\.h"; - c_fix = wrap; - c_fix_arg = "#include <stdio.h>\n"; - test_text = "extern FILE* stderr;"; -}; - - -/* - * check for broken assert.h that needs stdlib.h - */ -fix = { - hackname = broken_assert_stdlib; - files = assert.h; - select = 'exit *\(|abort *\('; - bypass = "include.*stdlib\\.h"; - c_fix = wrap; - c_fix_arg = "#ifdef __cplusplus\n" - "#include <stdlib.h>\n" - "#endif\n"; - test_text = "extern void exit ( int );"; -}; - - -/* - * Remove `extern double cabs' declarations from math.h. - * This conflicts with C99. Discovered on AIX. - * 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 = { - hackname = broken_cabs; - files = "math.h"; - files = "architecture/ppc/math.h"; - files = "architecture/i386/math.h"; - select = '^extern[ \t]+double[ \t]+cabs'; - - c_fix = format; - c_fix_arg = ""; - c_fix_arg = "^extern[ \t]+double[ \t]+cabs[ \t]*\\([^\\)]*\\);"; - - test_text = "#ifdef __STDC__\n" - "extern double cabs(struct dbl_hypot);\n" - "#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. */"; -}; - - -/* - * Various systems derived from BSD4.4 contain a macro definition - * for vfscanf that interacts badly with requirements of builtin-attrs.def. - * Known to be fixed in FreeBSD 5 system headers. - */ -fix = { - hackname = bsd_stdio_attrs_conflict; - mach = *-*-*bsd*; - mach = *-*-*darwin*; - files = stdio.h; - select = "^#define[ \t]*vfscanf[ \t]*__svfscanf[ \t]*$"; - c_fix = format; - c_fix_arg = '#define _BSD_STRING(_BSD_X) _BSD_STRINGX(_BSD_X)' "\n" - '#define _BSD_STRINGX(_BSD_X) #_BSD_X' "\n" - 'int vfscanf(FILE *, const char *, __builtin_va_list) ' - '__asm__ (_BSD_STRING(__USER_LABEL_PREFIX__) "__svfscanf");'; - test_text = '#define vfscanf __svfscanf'; -}; - - -/* - * Fix various macros used to define ioctl numbers. - * The traditional syntax was: - * - * #define _CTRL(n, x) (('n'<<8)+x) - * #define TCTRLCFOO _CTRL(T, 1) - * - * but this does not work with the C standard, which disallows macro - * expansion inside strings. We have to rewrite it thus: - * - * #define _CTRL(n, x) ((n<<8)+x) - * #define TCTRLCFOO _CTRL('T', 1) - * - * The select expressions match too much, but the c_fix code is cautious. - * - * CTRL might be: CTRL _CTRL ISCTRL BSD43_CTRL ... - */ -fix = { - hackname = ctrl_quotes_def; - select = "define[ \t]+[A-Z0-9_]+CTRL\\([a-zA-Z][,)]"; - c_fix = char_macro_def; - c_fix_arg = "CTRL"; - - /* - * This is two tests in order to ensure that the "CTRL(c)" can - * be selected in isolation from the multi-arg format - */ - test_text = "#define BSD43_CTRL(n, x) (('n'<<8)+x)\n"; - test_text = "#define _CTRL(c) ('c'&037)"; -}; - -fix = { - hackname = ctrl_quotes_use; - select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']"; - c_fix = char_macro_use; - c_fix_arg = "CTRL"; - 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. - * - * rpc/types.h on OSF1/2.0 is not C++ ready, - * even though NO_IMPLICIT_EXTERN_C is defined for the alpha. - * - * The problem is the declaration of malloc. - */ -fix = { - hackname = cxx_unready; - files = sys/mman.h; - files = rpc/types.h; - select = '[^#]+malloc.*;'; /* Catch any form of declaration - not within a macro. */ - bypass = '"C"|__BEGIN_DECLS'; - - c_fix = wrap; - c_fix_arg = "#ifdef __cplusplus\n" - "extern \"C\" {\n" - "#endif\n"; - c_fix_arg = "#ifdef __cplusplus\n" - "}\n" - "#endif\n"; - test_text = "extern void* malloc( size_t );"; -}; - - -/* - * __private_extern__ doesn't exist in FSF GCC. Even if it did, - * why would you ever put it in a system header file? - */ -fix = { - hackname = darwin_private_extern; - mach = "*-*-darwin*"; - files = mach-o/dyld.h; - select = "__private_extern__ [a-z_]+ _dyld_"; - c_fix = format; - c_fix_arg = "extern"; - c_fix_arg = "__private_extern__"; - test_text = "__private_extern__ int _dyld_func_lookup(\n" - "const char *dyld_func_name,\n" - "unsigned long *address);\n"; -}; - - -/* - * Fix <c_asm.h> on Digital UNIX V4.0: - * It contains a prototype for a DEC C internal asm() function, - * clashing with gcc's asm keyword. So protect this with __DECC. - */ -fix = { - hackname = dec_intern_asm; - files = c_asm.h; - sed = "/^[ \t]*float[ \t]*fasm/i\\\n#ifdef __DECC\n"; - sed = "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n" - "#endif\n"; - test_text = - "float fasm {\n" - " ... asm stuff ...\n" - "};\n#pragma intrinsic( dasm )\n/* END ASM TEST*/"; -}; - - -/* - * Fix typo in <wchar.h> on DJGPP 2.03. - */ -fix = { - hackname = djgpp_wchar_h; - file = wchar.h; - select = "__DJ_wint_t"; - bypass = "sys/djtypes.h"; - c_fix = format; - c_fix_arg = "%0\n#include <sys/djtypes.h>"; - c_fix_arg = "#include <stddef.h>"; - test_text = "#include <stddef.h>\n" - "extern __DJ_wint_t x;\n"; -}; - - -/* - * Fix these Sun OS files to avoid an invalid identifier in an #ifdef. - */ -fix = { - hackname = ecd_cursor; - files = "sunwindow/win_lock.h"; - files = "sunwindow/win_cursor.h"; - select = 'ecd\.cursor'; - c_fix = format; - c_fix_arg = 'ecd_cursor'; - - test_text = "#ifdef ecd.cursor\n#error bogus\n#endif /* ecd+cursor */"; -}; - - -/* - * math.h on SunOS 4 puts the declaration of matherr before the definition - * of struct exception, so the prototype (added by fixproto) causes havoc. - * This must appear before the math_exception fix. - */ -fix = { - hackname = exception_structure; - files = math.h; - - /* If matherr has a prototype already, the header needs no fix. */ - bypass = 'matherr.*(struct exception|__MATH_EXCEPTION)'; - select = matherr; - - c_fix = wrap; - c_fix_arg = "struct exception;\n"; - - test_text = "extern int matherr();"; -}; - - -/* - * Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume - * neither the existence of GCC 3 nor its exact feature set yet break - * (by design?) when __GNUC__ is set beyond 2. - */ -fix = { - hackname = freebsd_gcc3_breakage; - mach = *-*-freebsd*; - files = sys/cdefs.h; - select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$'; - bypass = '__GNUC__[ \t]*([>=]=[ \t]*[3-9]|>[ \t]*2)'; - c_fix = format; - c_fix_arg = '%0 || __GNUC__ >= 3'; - test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7'; -}; - - -/* - * Fix these files to use the types we think they should for - * ptrdiff_t, size_t, and wchar_t. - * - * This defines the types in terms of macros predefined by our 'cpp'. - * This is supposedly necessary for glibc's handling of these types. - * It's probably not necessary for anyone else, but it doesn't hurt. - */ -fix = { - hackname = gnu_types; - files = "sys/types.h"; - files = "stdlib.h"; - files = "sys/stdtypes.h"; - files = "stddef.h"; - files = "memory.h"; - files = "unistd.h"; - bypass = '_GCC_(PTRDIFF|SIZE|WCHAR)_T'; - select = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;"; - c_fix = gnu_type; - - test_text = "typedef long int ptrdiff_t; /* long int */\n" - "typedef uint_t size_t; /* uint_t */\n" - "typedef ushort_t wchar_t; /* ushort_t */"; -}; - - -/* - * Fix HP & Sony's use of "../machine/xxx.h" - * to refer to: <machine/xxx.h> - */ -fix = { - hackname = hp_inline; - files = sys/spinlock.h; - files = machine/machparam.h; - select = "[ \t]*#[ \t]*include[ \t]+" '"\.\./machine/'; - - c_fix = format; - c_fix_arg = "%1<machine/%2.h>"; - - c_fix_arg = "([ \t]*#[ \t]*include[ \t]+)" '"\.\./machine/' - '([a-z]+)\.h"'; - - test_text = ' # include "../machine/mumble.h"'; -}; - - -/* - * Check for (...) in C++ code in HP/UX sys/file.h. - */ -fix = { - hackname = hp_sysfile; - files = sys/file.h; - select = "HPUX_SOURCE"; - - c_fix = format; - c_fix_arg = "(struct file *, ...)"; - c_fix_arg = '\(\.\.\.\)'; - - test_text = "extern void foo(...); /* HPUX_SOURCE - bad varargs */"; -}; - - -/* - * 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. - */ -fix = { - hackname = hpux10_cpp_pow_inline; - files = fixinc-test-limits.h, math.h; - select = <<- END_POW_INLINE - ^# +ifdef +__cplusplus - +\} - +inline +double +pow\(double +__d,int +__expon\) +\{ - [ ]+return +pow\(__d,\(double\)__expon\); - +\} - +extern +"C" +\{ - #else - # +endif - END_POW_INLINE; - - c_fix = format; - c_fix_arg = ""; - - test_text = - "# ifdef __cplusplus\n" - " }\n" - " inline double pow(double __d,int __expon) {\n" - "\t return pow(__d,(double)__expon);\n" - " }\n" - ' extern "C"' " {\n" - "#else\n" - "# endif"; -}; - -fix = { - hackname = hpux11_cpp_pow_inline; - files = math.h; - select = " +inline double pow\\(double d,int expon\\) \\{\n" - " +return pow\\(d, \\(double\\)expon\\);\n" - " +\\}\n"; - c_fix = format; - c_fix_arg = ""; - - test_text = - " inline double pow(double d,int expon) {\n" - " return pow(d, (double)expon);\n" - " }\n"; -}; - - -/* - * Fix hpux 10.X missing ctype declarations 1 - */ -fix = { - hackname = hpux10_ctype_declarations1; - files = ctype.h; - select = "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)"; - bypass = "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\("; - c_fix = format; - c_fix_arg = "#ifdef _PROTOTYPES\n" - "extern int __tolower(int);\n" - "extern int __toupper(int);\n" - "#else /* NOT _PROTOTYPES */\n" - "extern int __tolower();\n" - "extern int __toupper();\n" - "#endif /* _PROTOTYPES */\n\n" - "%0\n"; - - test_text = "# define _toupper(__c) __toupper(__c)\n"; -}; - - -/* - * Fix hpux 10.X missing ctype declarations 2 - */ -fix = { - hackname = hpux10_ctype_declarations2; - files = ctype.h; - select = "^# if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)"; - bypass = "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\("; - c_fix = format; - c_fix_arg = "%0\n\n" - "#ifdef _PROTOTYPES\n" - " extern int _isalnum(int);\n" - " extern int _isalpha(int);\n" - " extern int _iscntrl(int);\n" - " extern int _isdigit(int);\n" - " extern int _isgraph(int);\n" - " extern int _islower(int);\n" - " extern int _isprint(int);\n" - " extern int _ispunct(int);\n" - " extern int _isspace(int);\n" - " extern int _isupper(int);\n" - " extern int _isxdigit(int);\n" - "# else /* not _PROTOTYPES */\n" - " extern int _isalnum();\n" - " extern int _isalpha();\n" - " extern int _iscntrl();\n" - " extern int _isdigit();\n" - " extern int _isgraph();\n" - " extern int _islower();\n" - " extern int _isprint();\n" - " extern int _ispunct();\n" - " extern int _isspace();\n" - " extern int _isupper();\n" - " extern int _isxdigit();\n" - "#endif /* _PROTOTYPES */\n"; - - test_text = "# if defined(_SB_CTYPE_MACROS) && !defined(__lint)\n" - " extern unsigned int *__SB_masks;\n"; -}; - - -/* - * Fix hpux 10.X missing stdio declarations - */ -fix = { - hackname = hpux10_stdio_declarations; - files = stdio.h; - select = "^#[ \t]*define _iob[ \t]*__iob"; - bypass = "^[ \t]*extern[ \t]*int[ \t]*vsnprintf[ \t]*\\("; - c_fix = format; - c_fix_arg = "%0\n\n" - "# if defined(__STDC__) || defined(__cplusplus)\n" - " extern int snprintf(char *, size_t, const char *, ...);\n" - " extern int vsnprintf(char *, size_t, const char *, __va_list);\n" - "# else /* not __STDC__) || __cplusplus */\n" - " extern int snprintf();\n" - " extern int vsnprintf();\n" - "# endif /* __STDC__) || __cplusplus */\n"; - - test_text = "# define _iob __iob\n"; -}; - - -/* - * Make sure hpux defines abs in header. - */ -fix = { - hackname = hpux11_abs; - mach = ia64-hp-hpux11*; - files = stdlib.h; - select = "ifndef _MATH_INCLUDED"; - c_fix = format; - c_fix_arg = "if !defined(_MATH_INCLUDED) || defined(__GNUG__)"; -// sed = "s/ifndef _MATH_INCLUDED/if !defined(_MATH_INCLUDED) || defined(__GNUG__)/"; - test_text = "#ifndef _MATH_INCLUDED"; -}; - - -/* - * Keep HP-UX 11 from stomping on C++ math namespace - * with defines for fabsf. - */ -fix = { - hackname = hpux11_fabsf; - files = math.h; - select = "^[ \t]*#[ \t]*define[ \t]+fabsf\\(.*"; - bypass = "__cplusplus"; - - c_fix = format; - c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; - - test_text = - "#ifdef _PA_RISC\n" - "# define fabsf(x) ((float)fabs((double)(float)(x)))\n" - "#endif"; -}; - - -/* - * Prevent HP-UX 11 from defining __size_t and preventing size_t from - * being defined by having it define _hpux_size_t instead. - */ -fix = { - hackname = hpux11_size_t; - mach = "*-hp-hpux11*"; - select = "__size_t"; - - c_fix = format; - c_fix_arg = "_hpux_size_t"; - - test_text = - "#define __size_t size_t\n" - " 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 - * spurious warnings with -Wwrite-strings or in C++). - */ -fix = { - hackname = hpux11_snprintf; - files = stdio.h; - select = '(extern int snprintf *\(char *\*, *(|__|_hpux_)size_t,)' - ' *(char *\*, *\.\.\.\);)'; - c_fix = format; - c_fix_arg = '%1 const %3'; - - test_text = "extern int snprintf(char *, size_t, char *, ...);\n" - "extern int snprintf(char *, __size_t, char *, ...);\n" - "extern int snprintf(char *, _hpux_size_t, char *, ...);"; -}; - - -/* - * In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition - * of UINT32_C has undefined behavior according to ISO/ANSI: - * the arguments to __CONCAT__ are not macro expanded before the - * concatination happens so the trailing ')' in the first argument - * is concatinated with the 'l' in the second argument creating an - * invalid pp token. The behavior of invalid pp tokens is undefined. - * GCC does not handle these invalid tokens the way the HP compiler does. - * This problem will potentially occur anytime macros are used in the - * arguments to __CONCAT__. A general solution to this problem would be to - * insert another layer of macro between __CONCAT__ and its use - * in UINT32_C. An example of this solution can be found in the C standard. - * A more specific solution, the one used here, is to change the UINT32_C - * macro to not used macros in the arguments to __CONCAT__. - */ -fix = { - hackname = hpux11_uint32_c; - files = inttypes.h; - select = "^#define UINT32_C\\(__c\\)[ \t]*" - "__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)"; - c_fix = format; - c_fix_arg = '#define UINT32_C(__c) __CONCAT__(__c,ul)'; - test_text = - "#define CONCAT_U__(__c)\t__CONCAT__(__c,u)\n" - "#define UINT32_C(__c)\t__CONCAT__(__CONCAT_U__(__c),l)"; -}; - - -/* - * Fix hpux 11.00 broken vsnprintf declaration - */ -fix = { - hackname = hpux11_vsnprintf; - files = stdio.h; - select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, ' - 'const char \*,) __va__list\);'; - c_fix = format; - c_fix_arg = "%1 __va_list);"; - - test_text = 'extern int vsnprintf(char *, _hpux_size_t, const char *,' - ' __va__list);'; -}; - - -/* - * get rid of bogus inline definitions in HP-UX 8.0 - */ -fix = { - hackname = hpux8_bogus_inlines; - files = math.h; - select = inline; - sed = "s@inline int abs(int [a-z][a-z]*) {.*}" - "@extern \"C\" int abs(int);@"; - sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@"; - sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@"; - sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@"; - test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n" - "inline double sqr(double v) { return v**0.5; }"; -}; - - -/* - * Fix hpux broken ctype macros - */ -fix = { - hackname = hpux_ctype_macros; - files = ctype.h; - select = '((: |\()__SB_masks \? )' - '(__SB_masks\[__(alnum|c)\] & _IS)'; - c_fix = format; - c_fix_arg = "%1(int)%3"; - - test_text = ": __SB_masks ? __SB_masks[__alnum] & _ISCNTRL\n" - "# define isalpha(__c) (__SB_masks ? __SB_masks[__c] & _IS\n"; -}; - - -/* - * HP-UX long_double - */ -fix = { - hackname = hpux_long_double; - files = stdlib.h; - select = "extern[ \t]long_double[ \t]strtold"; - bypass = "long_double_t"; - sed = "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D"; - sed = "s/long_double/long double/g"; - - test_text = "# ifndef _LONG_DOUBLE\n" - "# define _LONG_DOUBLE\n" - " typedef struct {\n" - " unsigned int word1, word2, word3, word4;\n" - " } long_double;\n" - "# endif /* _LONG_DOUBLE */\n" - "extern long_double strtold(const char *, char **);\n"; -}; - - -/* - * HPUX 10.x sys/param.h defines MAXINT which clashes with values.h - */ -fix = { - hackname = hpux_maxint; - files = sys/param.h; - files = values.h; - select = "^#[ \t]*define[ \t]+MAXINT[ \t]"; - bypass = "^#[ \t]*ifndef[ \t]+MAXINT"; - test = - "-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\""; - - c_fix = format; - c_fix_arg = "#ifndef MAXINT\n%0\n#endif"; - c_fix_arg = "^#[ \t]*define[ \t]+MAXINT[ \t].*"; - - test_text = '#define MAXINT 0x7FFFFFFF'; -}; - - -/* - * 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;'; -}; - - -/* - * Fix return type of abort and free - */ -fix = { - hackname = int_abort_free_and_exit; - files = stdlib.h; - select = "int[ \t]+(abort|free|exit)[ \t]*\\("; - - c_fix = format; - c_fix_arg = "void\t%1("; - - test_text = "extern int abort(int);\n" - "extern int free(void*);\n" - "extern int exit(void*);"; -}; - - -/* - * Fix various macros used to define ioctl numbers. - * The traditional syntax was: - * - * #define _IO(n, x) (('n'<<8)+x) - * #define TIOCFOO _IO(T, 1) - * - * but this does not work with the C standard, which disallows macro - * expansion inside strings. We have to rewrite it thus: - * - * #define _IO(n, x) ((n<<8)+x) - * #define TIOCFOO _IO('T', 1) - * - * The select expressions match too much, but the c_fix code is cautious. - * - * _IO might be: _IO DESIO BSD43__IO with W, R, WR, C, ... suffixes. - */ -fix = { - hackname = io_quotes_def; - select = "define[ \t]+[A-Z0-9_]+IO[A-Z]*\\([a-zA-Z][,)]"; - c_fix = char_macro_def; - c_fix_arg = "IO"; - test_text = - "#define BSD43__IOWR(n, x) (('n'<<8)+x)\n" - "#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)\n" - "#define _IO(x,y) ('x'<<8|y)"; - test_text = - "#define XX_IO(x) ('x'<<8|256)"; -}; - -fix = { - hackname = io_quotes_use; - select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*" - "\\( *[^,']"; - c_fix = char_macro_use; - c_fix_arg = "IO"; - test_text = "#define TIOCFOO BSD43__IOWR(T, 1)\n" - "#define TIOCFOO \\\\\n" - "BSD43__IOWR(T, 1) /* Some are multi-line */"; -}; - - -/* - * Check for missing ';' in struct - */ -fix = { - hackname = ip_missing_semi; - files = netinet/ip.h; - select = "}$"; - sed = "/^struct/,/^};/s/}$/};/"; - test_text= - "struct mumble {\n" - " union {\n" - " int x;\n" - " }\n" - "}; /* 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"; -}; - - -/* - * Non-traditional "const" declaration in Irix's limits.h. - */ -fix = { - hackname = irix_limits_const; - files = fixinc-test-limits.h, limits.h; - select = "^extern const "; - c_fix = format; - c_fix_arg = "extern __const "; - test_text = "extern const char limit; /* test limits */"; -}; - - -/* - * 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 5.x's stdio.h and IRIX 6.5's internal/stdio_core.h declare - * 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; - c_fix_arg = "__gnuc_va_list"; - test_text = - "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 *);"; -}; - -/* - * Fixing ISC fmod declaration - */ -fix = { - hackname = isc_fmod; - files = math.h; - select = 'fmod\(double\)'; - c_fix = format; - c_fix_arg = "fmod(double, double)"; - test_text = "extern double fmod(double);"; -}; - - -/* - * On Interactive Unix 2.2, certain traditional Unix definitions - * (notably getc and putc in stdio.h) are omitted if __STDC__ is - * defined, not just if _POSIX_SOURCE is defined. This makes it - * impossible to compile any nontrivial program except with -posix. - */ -fix = { - hackname = isc_omits_with_stdc; - - files = "stdio.h"; - files = "math.h"; - files = "ctype.h"; - files = "sys/limits.h"; - files = "sys/fcntl.h"; - files = "sys/dirent.h"; - - select = '!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)'; - c_fix = format; - c_fix_arg = '!defined(_POSIX_SOURCE)'; - test_text = "#if !defined(__STDC__) && !defined(_POSIX_SOURCE) /* ? ! */" - "\nint foo;\n#endif"; -}; - - -/* - * These files in Sun OS 4.x and ARM/RISCiX and BSD4.3 - * use / * * / to concatenate tokens. - */ -fix = { - hackname = kandr_concat; - files = "sparc/asm_linkage.h"; - files = "sun3/asm_linkage.h"; - files = "sun3x/asm_linkage.h"; - files = "sun4/asm_linkage.h"; - files = "sun4c/asm_linkage.h"; - files = "sun4m/asm_linkage.h"; - files = "sun4c/debug/asm_linkage.h"; - files = "sun4m/debug/asm_linkage.h"; - files = "arm/as_support.h"; - files = "arm/mc_type.h"; - files = "arm/xcb.h"; - files = "dev/chardefmac.h"; - files = "dev/ps_irq.h"; - files = "dev/screen.h"; - files = "dev/scsi.h"; - files = "sys/tty.h"; - files = "Xm.acorn/XmP.h"; - files = bsd43/bsd43_.h; - select = '/\*\*/'; - c_fix = format; - c_fix_arg = '##'; - test_text = "#define __CONCAT__(a,b) a/**/b"; -}; - - -/* - * Fix libc1 _G_va_list definition, used in declarations of several - * more-or-less standard functions, for example vasprintf. - */ -fix = { - hackname = libc1_G_va_list; - files = _G_config.h; - mach = '*-*-linux*libc1'; - select = 'typedef void \* _G_va_list;'; - c_fix = format; - c_fix_arg = "typedef __builtin_va_list _G_va_list;"; - test_text = 'typedef void * _G_va_list;'; -}; - - -/* - * GNU libc1 string.h does not prototype memcpy and memcmp for gcc - * versions > 1. This fix will open up the declaration for all - * versions of GCC and for g++. - */ -fix = { - hackname = libc1_ifdefd_memx; - - /* The string.h result is overwritten by AAB_ultrix_string when doing - "make check" and will fail. Therefore, we add the following kludgery - to insert the test_text into the special testing header. :-} */ - files = testing.h; - files = string.h; - - c_fix = format; - select = "' is a built-in function for gcc 2\\.x\\. \\*/"; - bypass = __cplusplus; - c_fix_arg = "%1"; - c_fix_arg = - '/\* `mem...\' is a built-in function for gcc 2\.x\. \*/' "\n" - '#if defined\(__STDC__\) && __GNUC__ < 2' "\n" - "(/\\* .* \\*/\n" - "extern [a-z_]+ mem.*(\n[^#].*)*;)\n" - "#endif"; - - test_text = - "/* \\`memcpy' is a built-in function for gcc 2.x. */\n" - "#if defined(__STDC__) && __GNUC__ < 2\n" - "/* Copy N bytes of SRC to DEST. */\n" - "extern __ptr_t memcpy __P ((__ptr_t __dest, __const __ptr_t __src,\n" - " size_t __n));\n" - "#endif"; -}; - - -/* - * In limits.h, put #ifndefs around things that are supposed to be defined - * in float.h to avoid redefinition errors if float.h is included first. - * On HP/UX this patch does not work, because on HP/UX limits.h uses - * multi line comments and the inserted #endif winds up inside the - * comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if - * we find a #ifndef FLT_MIN we assume that all the required #ifndefs - * are there, and we do not add them ourselves. - * - * QNX Software Systems also guards the defines, but doesn't define - * FLT_MIN. Therefore, bypass the fix for *either* guarded FLT_MIN - * or guarded FLT_MAX. - */ -fix = { - hackname = limits_ifndefs; - files = "sys/limits.h"; - files = "limits.h"; - select = "^[ \t]*#[ \t]*define[ \t]+" - "((FLT|DBL)_(MIN|MAX|DIG))[ \t].*"; - bypass = "ifndef[ \t]+FLT_(MIN|MAX)"; - - c_fix = format; - c_fix_arg = "#ifndef %1\n%0\n#endif"; - /* Second arg is select expression */ - test_text = " #\tdefine\tDBL_DIG \t 0 /* somthin' */"; -}; - - -/* - * Apparently some SVR4 systems typedef longlong_t to long ? - */ -#ifdef SVR4 -fix = { - hackname = longlong_t; - select = "typedef[ \t]+(unsigned[ \t]+)?long[ \t]+(u_)?longlong_t"; - c_fix = format; - c_fix_arg = "typedef %1long long %2longlong_t"; - test_text = "typedef long longlong_t\n" - "typedef unsigned long u_longlong_t"; -}; -#endif - - -/* - * Delete the '#define void int' line from curses.h on Lynx - */ -fix = { - hackname = lynx_void_int; - files = curses.h; - select = "#[ \t]*define[ \t]+void[ \t]+int[ \t]*"; - c_fix = format; - c_fix_arg = ""; - test_text = "# define\tvoid\tint \t/* curses foiled again */"; -}; - - -/* - * Fix fcntl prototype in fcntl.h on LynxOS. - */ -fix = { - hackname = lynxos_fcntl_proto; - files = fcntl.h; - select = "fcntl[ \t]*" '\(int, int, int\)'; - c_fix = format; - c_fix_arg = '%1...)'; - c_fix_arg = "(fcntl[ \t]*" '\(int, int, )int\)'; - test_text = "extern int fcntl(int, int, int);"; -}; - - -/* - * Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_. - * - * On NetBSD, machine is a symbolic link to an architecture specific - * directory name, so we can't match a specific file name here. - */ -fix = { - hackname = machine_ansi_h_va_list; - select = "define[ \t]+_BSD_VA_LIST_[ \t]"; - bypass = '__builtin_va_list'; - - c_fix = format; - c_fix_arg = "%1__builtin_va_list"; - c_fix_arg = "(define[ \t]+_BSD_VA_LIST_[ \t]+).*"; - - test_text = " # define _BSD_VA_LIST_\tchar**"; -}; - - -/* - * Fix non-ansi machine name defines - */ -fix = { - hackname = machine_name; - c_test = machine_name; - c_fix = machine_name; - - test_text = "/* MACH_DIFF: */\n" - "#if defined( i386 ) || defined( sparc ) || defined( vax )" - "\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 - * in the C++ file std/stdexcept.h. We redefine it to __math_exception. - * This is not a great fix, but I haven't been able to think of anything - * better. Note that we have to put the #ifdef/#endif blocks at beginning - * and end of file, because fixproto runs after us and may insert - * additional references to struct exception. - */ -fix = { - hackname = math_exception; - files = math.h; - select = "struct exception"; - /* - * This should be bypassed on __cplusplus, but some supposedly C++ 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. - */ - bypass = 'We have a problem when using C\+\+'; - c_fix = wrap; - - c_fix_arg = "#ifdef __cplusplus\n" - "#define exception __math_exception\n" - "#endif\n"; - - c_fix_arg = "#ifdef __cplusplus\n" - "#undef exception\n" - "#endif\n"; - - 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 - * the value portion. Can't figure out how to write a test case - * for this either :-( - */ -fix = { - hackname = math_huge_val_from_dbl_max; - files = math.h; - - /* - * IF HUGE_VAL is defined to be DBL_MAX *and* DBL_MAX is _not_ defined - * in math.h, this fix applies. - */ - select = "define[ \t]+HUGE_VAL[ \t]+DBL_MAX"; - bypass = "define[ \t]+DBL_MAX"; - - shell = - /* - * See if we have a definition for DBL_MAX in float.h. - * If we do, we will replace the one in math.h with that one. - */ - - "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h " - "| sed 's/.*DBL_MAX[ \t]*//' 2>/dev/null`\n\n" - - "\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n" - "\tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/" - "s@DBL_MAX@'\"$dbl_max_def@\"\n" - "\telse cat\n" - "\tfi"; - - test_text = - "`echo '#define DBL_MAX\t3.1415e+9 /* really big */' >> float.h`\n" - "#define HUGE_VAL DBL_MAX"; -}; - - -/* - * In any case, put #ifndef .. #endif around #define HUGE_VAL in math.h. - */ -fix = { - hackname = math_huge_val_ifndef; - files = math.h; - files = math/math.h; - select = "define[ \t]+HUGE_VAL"; - - c_fix = format; - c_fix_arg = "#ifndef HUGE_VAL\n%0\n#endif"; - c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+HUGE_VAL[ \t].*"; - - test_text = "# define\tHUGE_VAL 3.4e+40"; -}; - - -/* - * nested comment - */ -fix = { - hackname = nested_auth_des; - files = rpc/rpc.h; - select = '(/\*.*rpc/auth_des\.h>.*)/\*'; - c_fix = format; - c_fix_arg = "%1*/ /*"; - test_text = "/*#include <rpc/auth_des.h> /* skip this */"; -}; - - -/* - * Fix nested comments in Motorola's <limits.h> and <sys/limits.h> - */ -fix = { - hackname = nested_motorola; - mach = "m68k-motorola-sysv*"; - files = sys/limits.h; - files = limits.h; - select = "max # bytes atomic in write|error value returned by Math lib"; - - sed = "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*" - "/\\* max # bytes atomic in write to a\\)$@\\1 */@"; - sed = "s@\\(/\\*#define\tHUGE_VAL\t3.[0-9e+]* \\)" - "\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@"; - - test_text = - "#undef PIPE_BUF /* max # bytes atomic in write to a\n" - "\t\t/* PIPE */\n" - "/*#define\tHUGE_VAL\t3.9e+9 /*error value returned by Math lib*/"; -}; - - -/* - * Fixing nested comments in ISC <sys/limits.h> - */ -fix = { - hackname = nested_sys_limits; - files = sys/limits.h; - select = CHILD_MAX; - sed = "/CHILD_MAX/s,/\\* Max, Max,"; - sed = "/OPEN_MAX/s,/\\* Max, Max,"; - test_text = "/*\n#define CHILD_MAX 20 /* Max, Max, ... */ /*\n" - "#define OPEN_MAX 20 /* Max, Max, ... */\n"; -}; - - -/* - * NetBSD has a semicolon after the ending '}' for some extern "C". - */ -fix = { - hackname = netbsd_extra_semicolon; - mach = *-*-netbsd*; - files = sys/cdefs.h; - select = "#define[ \t]*__END_DECLS[ \t]*};"; - - c_fix = format; - c_fix_arg = "#define __END_DECLS }"; - - test_text = "#define __END_DECLS };"; -}; - - -/* - * NeXT 3.2 adds const prefix to some math functions. - * These conflict with the built-in functions. - */ -fix = { - hackname = next_math_prefix; - files = ansi/math.h; - select = "^extern[ \t]+double[ \t]+__const__[ \t]"; - - c_fix = format; - c_fix_arg = "extern double %1("; - c_fix_arg = "^extern[ \t]+double[ \t]+__const__[ \t]+([a-z]+)\\("; - - 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 - * with the built-in functions. - */ -fix = { - hackname = next_template; - files = bsd/libc.h; - select = "[ \t]template\\)"; - - c_fix = format; - c_fix_arg = "(%1)"; - c_fix_arg = "\\(([^)]*)[ \t]template\\)"; - 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. - */ -fix = { - hackname = next_volitile; - files = ansi/stdlib.h; - select = "^extern[ \t]+volatile[ \t]+void[ \t]"; - - c_fix = format; - c_fix_arg = "extern void %1("; - c_fix_arg = "^extern[ \t]+volatile[ \t]+void[ \t]+(exit|abort)\\("; - - 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, - * so that this code won't do anything. But wait.h in version 3 has a - * conditional, so it doesn't need this fix. So everything is okay. - */ -fix = { - hackname = next_wait_union; - files = sys/wait.h; - - select = 'wait\(union wait'; - c_fix = format; - c_fix_arg = "wait(void"; - test_text = "extern pid_d wait(union wait*);"; -}; - - -/* - * a missing semi-colon at the end of the nodeent structure definition. - */ -fix = { - hackname = nodeent_syntax; - files = netdnet/dnetdb.h; - select = "char[ \t]*\\*na_addr[ \t]*$"; - c_fix = format; - c_fix_arg = "%0;"; - test_text = "char *na_addr\t"; -}; - - -/* - * obstack.h used casts as lvalues. - * - * We need to change postincrements of casted pointers (which are - * then dereferenced and assigned into) of the form - * - * *((TYPE*)PTRVAR)++ = (VALUE) - * - * into expressions like - * - * ((*((TYPE*)PTRVAR) = (VALUE)), (PTRVAR += sizeof (TYPE))) - * - * which is correct for the cases used in obstack.h since PTRVAR is - * of type char * and the value of the expression is not used. - */ -fix = { - hackname = obstack_lvalue_cast; - files = obstack.h; - select = '\*\(\(([^()]*)\*\)(.*)\)\+\+ = \(([^()]*)\)'; - c_fix = format; - c_fix_arg = "((*((%1*)%2) = (%3)), (%2 += sizeof (%1)))"; - test_text = "*((void **) (h)->next_free)++ = (aptr)"; -}; - - -/* - * sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by - * defining regex.h related types. This causes libg++ build and usage - * failures. Fixing this correctly requires checking and modifying 3 files. - */ -fix = { - hackname = osf_namespace_a; - files = reg_types.h; - files = sys/lc_core.h; - test = " -r reg_types.h"; - test = " -r sys/lc_core.h"; - test = " -n \"`grep '} regex_t;' reg_types.h`\""; - test = " -z \"`grep __regex_t regex.h`\""; - - c_fix = format; - c_fix_arg = "__%0"; - c_fix_arg = "reg(ex|off|match)_t"; - - test_text = "`touch sys/lc_core.h`" - "typedef struct {\n int stuff, mo_suff;\n} regex_t;\n" - "extern regex_t re;\n" - "extern regoff_t ro;\n" - "extern regmatch_t rm;\n"; -}; - -fix = { - hackname = osf_namespace_c; - files = regex.h; - test = " -r reg_types.h"; - test = " -r sys/lc_core.h"; - test = " -n \"`grep '} regex_t;' reg_types.h`\""; - test = " -z \"`grep __regex_t regex.h`\""; - - select = "#include <reg_types\.h>.*"; - c_fix = format; - c_fix_arg = "%0\n" - "typedef __regex_t\tregex_t;\n" - "typedef __regoff_t\tregoff_t;\n" - "typedef __regmatch_t\tregmatch_t;"; - - test_text = "#include <reg_types.h>"; -}; - - -/* - * Fix __page_size* declarations in pthread.h AIX 4.1.[34]. - * The original ones fail if uninitialized externs are not common. - * This is the default for all ANSI standard C++ compilers. - */ -fix = { - hackname = pthread_page_size; - files = pthread.h; - select = "^int __page_size"; - c_fix = format; - c_fix_arg = "extern %0"; - test_text = "int __page_size;"; -}; - - -/* - * On DYNIX/ptx, sys/mc_param.h has an embedded asm for the cpuid instruction - * on the P5. This is not used by anything else so we ifdef it out. - * Current GCC doesn't seem to complain about the asm, though. - */ -#ifdef PTX -fix = { - hackname = ptx_sys_mc_param_h; - files = sys/mc_param.h; - sed = "/__asm/,/}/{" - "/__asm/i\\\n" - "#if !defined (__GNUC__) && !defined (__GNUG__)\n" - "/}/a\\\n" - "#endif\n" - "}"; - test_text = "__asm\n" - "int _CPUID()\n" - "{\n" - " non-GNU assembly here\n" - "}"; -}; -#endif - - -/* - * Fix return type of fread and fwrite on sysV68 - */ -fix = { - hackname = read_ret_type; - files = stdio.h; - select = "extern int\t.*, fread\\(\\), fwrite\\(\\)"; - c_fix = format; - c_fix_arg = "extern unsigned int fread(), fwrite();\n%1%2"; - c_fix_arg = "(extern int\t.*), fread\\(\\), fwrite\\(\\)(.*)"; - - test_text = "extern int\tfclose(), fflush(), fread(), fwrite(), foo();"; -}; - - -/* - * Fix casts as lvalues in glibc's <rpc/xdr.h>. - */ -fix = { - hackname = rpc_xdr_lvalue_cast_a; - files = rpc/xdr.h; - select = "#define[ \t]*IXDR_GET_LONG.*\\\\\n.*__extension__.*"; - c_fix = format; - c_fix_arg = "#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))"; - test_text = "#define IXDR_GET_LONG(buf) \\\\\n" - "\t((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))"; -}; - - -fix = { - hackname = rpc_xdr_lvalue_cast_b; - files = rpc/xdr.h; - select = "#define[ \t]*IXDR_PUT_LONG.*\\\\\n.*__extension__.*"; - c_fix = format; - c_fix_arg = "#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))"; - test_text = "#define IXDR_PUT_LONG(buf, v) \\\\\n" - "\t(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))"; -}; - - -/* - * function class(double x) conflicts with C++ keyword on rs/6000 - */ -fix = { - hackname = rs6000_double; - files = math.h; - select = '[^a-zA-Z_]class\('; - - c_fix = format; - c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; - c_fix_arg = '^.*[^a-zA-Z_]class\(.*'; - - test_text = "extern int class();"; -}; - - -/* - * Wrong fchmod prototype on RS/6000. - */ -fix = { - hackname = rs6000_fchmod; - files = sys/stat.h; - select = 'fchmod\(char \*'; - c_fix = format; - c_fix_arg = "fchmod(int"; - test_text = "extern int fchmod(char *, mode_t);"; -}; - - -/* - * parameters conflict with C++ new on rs/6000 - */ -fix = { - hackname = rs6000_param; - files = "stdio.h"; - files = "unistd.h"; - - select = 'rename\(const char \*old, const char \*new\)'; - c_fix = format; - c_fix_arg = 'rename(const char *_old, const char *_new)'; - - test_text = 'extern int rename(const char *old, const char *new);'; -}; - - -/* - * On OpenServer and on UnixWare 7, <math.h> uses the native compiler - * __builtin_generic. We fix that usage to use the GCC equivalent. - * It also has a plethora of inline functions that conflict with libstdc++. - */ -fix = { - hackname = sco_math; - files = math.h; - files = ansi/math.h; - files = posix/math.h; - files = xpg4/math.h; - files = xpg4v2/math.h; - files = xpg4plus/math.h; - files = ods_30_compat/math.h; - files = oldstyle/math.h; - select = "inline double abs"; - sed = "/#define.*__fp_class(a) \\\\/i\\\n" - "#ifndef __GNUC__\n"; - sed = -"/.*__builtin_generic/a\\\n" -"#else\\\n" -"#define __fp_class(a) \\\\\\\n" -" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n" -" __fpclassifyl(a), \\\\\\\n" -" __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n" -" __fpclassifyf(a),__fpclassify(a)))\\\n" -"#endif"; - - sed = "/extern \"C\\+\\+\"/N;" - "/inline double abs/i\\\n" - "#ifndef __GNUC__\n"; - sed = "/inline long double trunc/N;" - "/inline long double trunc.*}.*extern \"C\\+\\+\"/a\\\n" - "#endif /* ! __GNUC__ */"; - - test_text = - "#define __fp_class(a) \\\\\n" - " __builtin_generic(a,\"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify\")\n"; - -}; - - -/* - * On SCO OpenServer prior to 5.0.7UP1, <sys/regset.h> and <ieeefp.h> - * have a clash on struct _fpstate and struct fpstate. - */ -fix = { - hackname = sco_regset; - files = sys/regset.h; - mach = "*-*-sco3.2v5*"; - select = "(struct[ \t]+.*)fpstate"; - c_fix = format; - c_fix_arg = "%1rsfpstate"; - - test_text = - "union u_fps {\n" - " struct\tfpstate\n" - " {\n" - " int whatever;\n" - " }\n" - "};\n" - "union _u_fps {\n" - " struct _fpstate\n" - " {\n" - " int whatever;\n" - " }\n" - "};\n"; -}; - - -/* - * The static functions lstat() and fchmod() in <sys/stat.h> - * cause G++ grief since they're not wrapped in "if __cplusplus". - * - * On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains - * tiny static wrappers that aren't C++ safe. - */ -fix = { - hackname = sco_static_func; - files = sys/stat.h; - mach = "i?86-*-sco3.2*"; - select = "^static int"; - - sed = "/^static int/i\\\n" - "#if __cplusplus\\\n" - "extern \"C\" {\\\n" - "#endif /* __cplusplus */"; - - sed = "/^}$/a\\\n" - "#if __cplusplus\\\n" - " }\\\n" - "#endif /* __cplusplus */"; - - test_text = - "#ifdef __STDC__\n" - "static int\tstat(const char *__f, struct stat *__p) {\n" - "\treturn __stat32(__f, __p);\n" - "}\n\n# else /* !__STDC__ THIS FAILS ON BSD SYSTEMS */\n" - - "static int\tstat(__f, __p)\n" - "\tchar *__f;\n" - "\tstruct stat *__p;\n" - "{\n" - "\treturn __stat32(__f, __p);\n" - "}\n" - "#endif"; -}; - - -/* - * Fix prototype declaration of utime in sys/times.h. - * In 3.2v4.0 the const is missing. - */ -fix = { - hackname = sco_utime; - files = sys/times.h; - mach = "i?86-*-sco3.2v4*"; - - select = '\(const char \*, struct utimbuf \*\);'; - c_fix = format; - c_fix_arg = '(const char *, const struct utimbuf *);'; - - test_text = "extern int utime(const char *, struct utimbuf *);"; -}; - - -/* - * Sun Solaris 2.5.1, 2.6 defines PTHREAD_{MUTEX|COND}_INITIALIZER - * incorrectly, so we replace them with versions that correspond to - * the definition. We also explicitly name this fix "1" and the next - * fix "2" because this one does not deal with the last field. This - * fix needs to run before the next. - */ -fix = { - hackname = solaris_mutex_init_1; - select = '@\(#\)pthread.h' "[ \t]+1.1[0-9][ \t]+9[567]/[0-9/]+ SMI"; - files = pthread.h; - sed = "/define[ \t]*PTHREAD_MUTEX_INI/s/{0, 0,/{{{0}, 0}, {{{0}}},/\n" - "/define[ \t]*PTHREAD_COND_INI/s/{0,/{{{0},0},/"; - test_text = - '#ident "@(#)pthread.h 1.16 97/05/05 SMI"'"\n" - "#define PTHREAD_MUTEX_INITIALIZER\t{0, 0, 0}\n" - "#define PTHREAD_COND_INITIALIZER\t{0, 0} /* */\n"; -}; - - -/* - * 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 - * __STDC__ defined (e.g. by -ansi) it is a union. So change the - * initializer to "{0}" instead - */ -fix = { - hackname = solaris_mutex_init_2; - select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; - files = pthread.h; - c_fix = format; - c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n" - "%0\n" - "#else\n" - "%1, {0}}%3\n" - "#endif"; - c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+\\{.*)" - ",[ \t]*0\\}" "(|[ \t].*)$"; - test_text = - '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n" - "#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n" - "#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n" - "#define PTHREAD_RWLOCK_INITIALIZER\t" - "{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}"; -}; - - -/* - * Solaris 2.5.1 and 2.6 use an outdated prototype for send & recv - * in sys/socket.h. This is corrected in Solaris 7 and up. - */ -fix = { - hackname = solaris_socket; - files = sys/socket.h; - select = '@\(#\)socket.h' "[ \t]+1.[123][0-9][ \t]+9[567]/[0-9/]+ SMI"; - c_fix = format; - c_fix_arg = "extern int %1(int, %2void *, int, int);"; - c_fix_arg = '^extern int (recv|send)\(int,' - ' (const )*char ' - '\*, int, int\);'; - - test_text = '#ident "@(#)socket.h 1.30 97/01/20 SMI"'"\n" - "extern int recv(int, char *, int, int);\n" - "extern int send(int, const char *, int, int);"; -}; - - -/* - * Solaris 2.8 has what appears to be some gross workaround for - * some old version of their c++ compiler. G++ doesn't want it - * either, but doesn't want to be tied to SunPRO version numbers. - */ -fix = { - hackname = solaris_stdio_tag; - files = stdio_tag.h; - - select = '__cplusplus < 54321L'; - sed = 's/defined(__cplusplus) && (__cplusplus < 54321L)/0/'; - - test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)"; -}; - - -/* - * Sun Solaris 2.5.1 doesn't define 'getpagesize' in <unistd.h>, as is done - * on Solaris 2.6 and up. - */ -fix = { - hackname = solaris_unistd; - files = unistd.h; - select = '@\(#\)unistd.h' "[ \t]+1.3[0-9][ \t]+9[567]/[0-9/]+ SMI"; - bypass = "getpagesize"; - c_fix = format; - c_fix_arg = "extern int getpagesize();\n%0"; - c_fix_arg = '^extern (pid_t|int) getpgid\(.*\);'; - test_text = '#ident "@(#)unistd.h 1.33 95/08/28 SMI"'"\n" - "extern pid_t getpgid(pid_t);\n" - "extern int getpgid();"; -}; - - -/* - * <widec.h> until Solaris 2.5.1 defines macros for a couple of <wchar.h> - * functions, breaking their prototypes if that file is included afterwards. - * Include <wchar.h> early to avoid this issue, as is done on Solaris 2.6 - * and up. - */ -fix = { - hackname = solaris_widec; - files = widec.h; - mach = '*-*-solaris2.[0-5]'; - mach = '*-*-solaris2.[0-5].*'; - bypass = "include.*wchar\\.h"; - select = "#include <euc.h>"; - c_fix = format; - c_fix_arg = "%0\n#include <wchar.h>"; - test_text = "#include <euc.h>"; -}; - - -/* - * a missing semi-colon at the end of the statsswtch structure definition. - */ -fix = { - hackname = statsswtch; - files = rpcsvc/rstat.h; - select = "boottime$"; - c_fix = format; - c_fix_arg = "boottime;"; - 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 - * OK too. - */ -fix = { - hackname = stdio_stdarg_h; - files = stdio.h; - bypass = "include.*(stdarg\.h|machine/ansi\.h)"; - - c_fix = wrap; - - c_fix_arg = "#define __need___va_list\n#include <stdarg.h>\n"; - - test_text = ""; -}; - - -/* - * Don't use or define the name va_list in stdio.h. - * This is for ANSI and also to interoperate properly with gcc's - * varargs.h. 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. - */ -fix = { - hackname = stdio_va_list; - files = stdio.h; - files = internal/stdio_core.h; - files = internal/wchar_core.h; - files = com_err.h; - files = cps.h; - files = curses.h; - files = krb5.h; - files = lc_core.h; - files = pfmt.h; - files = wchar.h; - files = curses_colr/curses.h; - bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list'; - - /* - * Use __gnuc_va_list in arg types in place of va_list. - * On 386BSD use __gnuc_va_list instead of _VA_LIST_. On Tru64 UNIX V5.1A - * use __gnuc_va_list instead of __VA_LIST__. We're hoping the - * trailing parentheses and semicolon save all other systems from this. - * Define __not_va_list__ (something harmless and unused) - * instead of va_list. - * Don't claim to have defined va_list. - */ - sed = "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n" - "s@(va_list)&@(__gnuc_va_list)\\&@\n" - "s@ _VA_LIST_));@ __gnuc_va_list));@\n" - "s@ __VA_LIST__));@ __gnuc_va_list));@\n" - "s@ va_list@ __not_va_list__@\n" - "s@\\*va_list@*__not_va_list__@\n" - "s@ __va_list)@ __gnuc_va_list)@\n" - "s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;" - "@typedef \\1 __not_va_list__;@\n" - "s@typedef[ \t]*__va_list__@typedef __gnuc_va_list@\n" - "s@GNUC_VA_LIST@GNUC_Va_LIST@\n" - "s@_VA_LIST_DEFINED@_Va_LIST_DEFINED@\n" - "s@_NEED___VA_LIST@_NEED___Va_LIST@\n" - "s@VA_LIST@DUMMY_VA_LIST@\n" - "s@_Va_LIST@_VA_LIST@"; - test_text = "extern void mumble( va_list);"; -}; - - -/* - * "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0" - * is "!defined( __STRICT_ANSI__ )" - */ -fix = { - hackname = strict_ansi_not; - select = "^([ \t]*#[ \t]*if.*)" - "(!__STDC__" - "|__STDC__[ \t]*==[ \t]*0" - "|__STDC__[ \t]*!=[ \t]*1" - "|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)"; - /* Tru64 UNIX V4.0F/V5.1 <standards.h> supports GCC usage of __STDC__. */ - bypass = 'GNU and MIPS C compilers define __STDC__ differently'; - /* GNU gmp.h uses "__STDC__ != 1" only if __SCO_VERSION__, which - is not defined by GCC, so it is safe. */ - bypass = '__SCO_VERSION__.*__STDC__ != 1'; - c_test = stdc_0_in_system_headers; - - c_fix = format; - c_fix_arg = "%1 !defined(__STRICT_ANSI__)"; - - test_text = "#if !__STDC__ \n" - "#if __STDC__ == 0\n" - "#if __STDC__ != 1\n" - "#if __STDC__ - 0 == 0" - "/* not std C */\nint foo;\n" - "\n#end-end-end-end-if :-)"; -}; - -/* - * "__STDC__-0==0" - * is "!defined( __STRICT_ANSI__ )" on continued #if-s - */ -fix = { - hackname = strict_ansi_not_ctd; - files = math.h, limits.h, stdio.h, signal.h, - stdlib.h, sys/signal.h, time.h; - /* - * Starting at the beginning of a line, skip white space and - * a leading "(" or "&&" or "||". One of those must be found. - * Then, zero, one or more copies of a "defined(_FOO_BAR_) &&" - * expression. If these are nested, then they must accumulate - * because we won't match any closing parentheses. Finally, - * after skipping over all that, we must then match our suspect - * phrase: "__STDC__-0==0" with or without white space. - */ - select = "^([ \t]*" '(\(|&&|\|\|)' - "([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*" - "[ \t(]*)" - "(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)"; - c_test = stdc_0_in_system_headers; - - c_fix = format; - c_fix_arg = "%1 !defined(__STRICT_ANSI__)"; - - test_text = "#if 1 && \\\\\n" - "&& defined(mumbling) |& (__STDC__ - 0 == 0) \\\\\n" - "( __STDC__ == 0 && !defined(_XOPEN_SOURCE) \\\\\n" - "|| __STDC__ - 0 == 0 ) /* not std C */\n" - "int foo;\n#endif"; -}; - - -/* - * "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1" - * is "defined( __STRICT_ANSI__ )" - */ -fix = { - hackname = strict_ansi_only; - select = "^([ \t]*#[ \t]*if.*)" - "(__STDC__[ \t]*!=[ \t]*0" - "|__STDC__[ \t]*==[ \t]*1" - "|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1" - "|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0)"; - c_test = stdc_0_in_system_headers; - - c_fix = format; - c_fix_arg = "%1 defined(__STRICT_ANSI__)"; - - 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. - */ -fix = { - hackname = struct_file; - files = rpc/xdr.h; - select = '^.*xdrstdio_create.*struct __file_s'; - c_fix = format; - c_fix_arg = "struct __file_s;\n%0"; - test_text = "extern void xdrstdio_create( struct __file_s* );"; -}; - - -/* - * IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr - * in prototype without previous definition. - * - * Don't fix OpenBSD, which uses struct sockaddr_in prototyping the same - * function, and does define it. - */ -fix = { - hackname = struct_sockaddr; - files = rpc/auth.h; - select = "^.*authdes_create.*struct sockaddr[^_]"; - bypass = "<sys/socket\.h>"; - bypass = "struct sockaddr;\n"; - c_fix = format; - c_fix_arg = "struct sockaddr;\n%0"; - test_text = "extern AUTH* authdes_create( struct sockaddr* );"; -}; - - -/* - * Apply fix this to all OSs since this problem seems to effect - * more than just SunOS. - */ -fix = { - hackname = sun_auth_proto; - files = rpc/auth.h; - files = rpc/clnt.h; - files = rpc/svc.h; - files = rpc/xdr.h; - /* - * Select those files containing '(*name)()'. - */ - select = '\(\*[a-z][a-z_]*\)\(\)'; - - c_fix = format; - c_fix_arg = "#ifdef __cplusplus\n%1(...);%2\n" - "#else\n%1();%2\n#endif"; - c_fix_arg = '(.*\(\*[a-z][a-z_]*\))\(\);(.*)'; - - test_text = - "struct auth_t {\n" - " int (*name)(); /* C++ bad */\n" - "};"; -}; - - -/* - * Fix bogus #ifdef on SunOS 4.1. - */ -fix = { - hackname = sun_bogus_ifdef; - files = "hsfs/hsfs_spec.h"; - files = "hsfs/iso_spec.h"; - select = '#ifdef(.*\|\|.*)'; - c_fix = format; - c_fix_arg = "#if%1"; - - test_text = "#ifdef __i386__ || __vax__ || __sun4c__"; -}; - - -/* - * Fix the CAT macro in SunOS memvar.h. - */ -fix = { - hackname = sun_catmacro; - files = pixrect/memvar.h; - select = "^#define[ \t]+CAT\\(a,b\\).*"; - c_fix = format; - - c_fix_arg = - "#ifdef __STDC__\n" - "# define CAT(a,b) a##b\n" - "#else\n%0\n#endif"; - - test_text = - "#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 - */ -fix = { - hackname = sun_malloc; - files = malloc.h; - - sed = "s/typedef[ \t]char \\*\tmalloc_t/typedef void \\*\tmalloc_t/g"; - sed = "s/int[ \t][ \t]*free/void\tfree/g"; - sed = "s/char\\([ \t]*\\*[ \t]*malloc\\)/void\\1/g"; - sed = "s/char\\([ \t]*\\*[ \t]*realloc\\)/void\\1/g"; - sed = "s/char\\([ \t]*\\*[ \t]*calloc\\)/void\\1/g"; - - test_text = - "typedef char *\tmalloc_t;\n" - "int \tfree();\n" - "char*\tmalloc();\n" - "char*\tcalloc();\n" - "char*\trealloc();"; -}; - - -/* - * Check for yet more missing ';' in struct (in SunOS 4.0.x) - */ -fix = { - hackname = sun_rusers_semi; - files = rpcsvc/rusers.h; - select = "_cnt$"; - sed = "/^struct/,/^};/s/_cnt$/_cnt;/"; - test_text = "struct mumble\n int _cnt\n};"; -}; - - -/* - * signal.h on SunOS defines signal using (), - * which causes trouble when compiling with g++ -pedantic. - */ -fix = { - hackname = sun_signal; - files = sys/signal.h; - files = signal.h; - select = "^void\t" '\(\*signal\(\)\)\(\);.*'; - - c_fix = format; - c_fix_arg = - "#ifdef __cplusplus\n" - "void\t(*signal(...))(...);\n" - "#else\n%0\n#endif"; - - test_text = "void\t(*signal())();"; -}; - - -/* - * Correct the return type for strlen in strings.h in SunOS 4. - */ -fix = { - hackname = sunos_strlen; - files = strings.h; - select = "int[ \t]*strlen\\(\\);(.*)"; - c_fix = format; - c_fix_arg = "__SIZE_TYPE__ strlen();%1"; - test_text = " int\tstrlen(); /* string length */"; -}; - - -/* - * Solaris math.h and floatingpoint.h define __P without protection, - * which conflicts with the fixproto definition. The fixproto - * definition and the Solaris definition are used the same way. - */ -fix = { - hackname = svr4__p; - files = math.h; - files = floatingpoint.h; - select = "^#define[ \t]+__P.*"; - c_fix = format; - c_fix_arg = "#ifndef __P\n%0\n#endif"; - - test_text = "#define __P(a) a"; -}; - - -/* - * Disable apparent native compiler optimization cruft in SVR4.2 <string.h> - * that is visible to any ANSI compiler using this include. Simply - * delete the lines that #define some string functions to internal forms. - */ -fix = { - hackname = svr4_disable_opt; - files = string.h; - select = '#define.*__std_hdr_'; - sed = '/#define.*__std_hdr_/d'; - test_text = "#define strlen __std_hdr_strlen\n"; -}; - - -/* - * Conditionalize some of <sys/endian.h> on __GNUC__ and __GNUG__. - * On some systems (UnixWare 2, UnixWare 7), the file is byteorder.h - * but we still "hijack" it and redirect it to the GNU byteorder.h.. - */ -#ifdef SVR5 -fix = { - hackname = svr4_endian; - files = sys/endian.h; -#ifdef LATER - /* - * since we emit our own sys/byteorder.h, - * this fix can never be applied to that file. - */ - files = sys/byteorder.h; -#endif - bypass = '__GNUC__'; - - sed = "/#\tifdef\t__STDC__/i\\\n" - "# if !defined (__GNUC__) && !defined (__GNUG__)\n"; - - sed = "/#\t\tinclude\t<sys\\/byteorder.h>/s/\t\t/ /"; - - sed = "/# include\t<sys\\/byteorder.h>/i\\\n" - "# endif /* !defined (__GNUC__) && !defined (__GNUG__) */\n"; -}; -#endif /* SVR5 */ - - -/* - * Remove useless extern keyword from struct forward declarations - * in <sys/stream.h> and <sys/strsubr.h> - */ -#ifdef SVR4 -fix = { - hackname = svr4_extern_struct; - files = sys/stream.h; - files = sys/strsubr.h; - select = 'extern struct [a-z_]*;'; - sed = 's/extern struct \([a-z][a-z_]*\)/struct \1/'; -}; -#endif - -/* - * Fix declarations of `ftw' and `nftw' in <ftw.h>. On some/most SVR4 - * systems the file <ftw.h> contains extern declarations of these - * functions followed by explicitly `static' definitions of these - * functions... and that's not allowed according to ANSI C. (Note - * however that on Solaris, this header file glitch has been pre-fixed by - * Sun. In the Solaris version of <ftw.h> there are no static - * definitions of any function so we don't need to do any of this stuff - * when on Solaris. - */ -#ifdef SVR4 -#ifndef SOLARIS -fix = { - hackname = svr4_ftw; - files = ftw.h; - select = '^extern int ftw\(const'; - - sed = '/^extern int ftw(const/i' "\\\n" - "#if !defined(_STYPES)\\\n" - "static\\\n" - "#else\\\n" - "extern\\\n" - "#endif"; - sed = 's/extern \(int ftw(const.*\)$/\1/'; - sed = "/^extern int nftw/i\\\n" - "#if defined(_STYPES)\\\n" - "static\\\n" - "#else\\\n" - "extern\\\n" - "#endif"; - sed = 's/extern \(int nftw.*\)$/\1/'; - sed = "/^extern int ftw(),/c\\\n" - "#if !defined(_STYPES)\\\n" - "static\\\n" - "#else\\\n" - "extern\\\n" - "#endif\\\n" - " int ftw();\\\n" - "#if defined(_STYPES)\\\n" - "static\\\n" - "#else\\\n" - "extern\\\n" - "#endif\\\n" - " int nftw();"; -}; -#endif -#endif - - -/* - * Fix broken decl of getcwd present on some svr4 systems. - */ -fix = { - hackname = svr4_getcwd; - files = stdlib.h; - files = unistd.h; - files = prototypes.h; - select = 'getcwd\(char \*, int\)'; - - c_fix = format; - c_fix_arg = "getcwd(char *, size_t)"; - - test_text = "extern char* getcwd(char *, int);"; -}; - - -/* - * Wrap some files on System V r4 and DYNIX/ptx systems with - * #ifdef _KERNEL, presumably to prevent kernel headers from - * leaking into userspace. This may not be necessary at all, - * but it was in the old scripts, so it seems safest to keep it for now. - */ -fix = { - /* Can't name this with _kernel, or the test case will hit the bypass! */ - hackname = svr4_krnl; - /* Since I'm rather unsure about the validity of this, limit it - * to the specific systems it was operating on before. It should - * also be bypassed for i?86-*-sysv4.3uw2, by that rule, but I didn't - * see an easy way to do that. Hopefully it will be harmless - * in any case. -- Nathanael */ - mach = '*-*-sysv4*'; - mach = 'i?86-sequent-ptx*'; - files = fs/rfs/rf_cache.h; - files = sys/erec.h; - files = sys/err.h; - files = sys/char.h; - files = sys/getpages.h; - files = sys/map.h; - files = sys/cmn_err.h; - files = sys/kdebugger.h; - - /* This bypass will match _KERNEL, __KERNEL, __KERNEL__, etc. - * It will also match SVR4_KERNEL_CHECK, which means that the - * testsuite case will always be bypassed. Which is fine with me. */ - bypass = '_KERNEL'; - - c_fix = wrap; - c_fix_arg = "#ifdef _KERNEL\n"; - c_fix_arg = "#endif /* _KERNEL */\n"; - - /* There's no reasonable test for this given that we don't know exactly - * what problem inspired it in the first place. */ - test_text = ""; -}; - - -/* - * Delete any #defines of `__i386' which may be present in <ieeefp.h>. They - * tend to conflict with the compiler's own definition of this symbol. (We - * will use the compiler's definition.) - * Likewise __sparc, for Solaris, and __i860, and a few others - * (guessing it is necessary for all of them). - */ -#ifdef SVR4 -fix = { - hackname = svr4_mach_defines; - files = ieeefp.h; - select = "#define[ \t]*__(i386|mips|sparc|m88k|m68k)[ \t]"; - sed = "/#define[ \t]*__\\(i386|mips|sparc|m88k|m68k\\)[ \t]/d"; -}; -#endif - - -/* - * Fix declarations of `makedev', `major', and `minor' in <sys/mkdev.h>. - * They are declared as non-static then immediately redeclared as static. - */ -#ifdef SVR5 -fix = { - hackname = svr4_mkdev; - files = sys/mkdev.h; - select = '^static'; - - sed = "/^dev_t makedev(/s/^/static /"; - sed = "/^major_t major(/s/^/static /"; - sed = "/^minor_t minor(/s/^/static /"; -}; -#endif /* SVR5 */ - - -/* - * Fix reference to NC_NPI_RAW in <sys/netcspace.h>. - * Also fix types of array initializers. - */ -#ifdef SVR4 -fix = { - hackname = svr4_netcspace; - files = sys/netcspace.h; - select = 'NC_NPI_RAW'; - sed = 's/NC_NPI_RAW/NC_TPI_RAW/g'; - sed = 's/NC_/(unsigned long) NC_/'; -}; -#endif - -/* - * Fix reference to NMSZ in <sys/adv.h>. - */ -#ifdef SVR4 -fix = { - hackname = svr4_nmsz; - files = sys/adv.h; - select = '\[NMSZ\]'; - sed = 's/\[NMSZ\]/\[RFS_NMSZ\]/g'; -}; -#endif - - -/* - * Some SVR4 systems supposedly use these non-ANSI preprocessor directives. - */ -#ifdef SVR4 -fix = { - hackname = svr4_preproc_lint_on; - select = '#lint\(on\)'; - c_fix = format; - c_fix_arg = 'defined(lint)'; - test_text = "#if #lint(on)"; -}; -fix = { - hackname = svr4_preproc_lint_off; - select = '#lint\(off\)'; - c_fix = format; - c_fix_arg = '!defined(lint)'; - test_text = "#if #lint(off)"; -}; -fix = { - hackname = svr4_preproc_machine; - select = '#(machine|system|cpu)\(([^)]*)\)'; - c_fix = format; - c_fix_arg = 'defined(__%1__)'; - test_text = "#if #machine(i386) || #system(vax) || #cpu(sparc)"; -}; -#endif - - -/* - * Fix broken decl of profil present on some svr4 systems. - */ -fix = { - hackname = svr4_profil; - files = stdlib.h; - files = unistd.h; - - 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)'; - - test_text = - 'profil(unsigned short *, unsigned int, unsigned int, unsigned int);'; -}; - - -/* - * Convert functions to prototype form, and fix arg names in <sys/stat.h>. - */ -#ifdef SVR4 -fix = { - hackname = svr4_proto_form; - files = sys/stat.h; - select = 'const extern'; - - sed = "/^stat([ \t]*[^c]/ {\nN\nN\n" - "s/(.*)\\n/( /\n" - "s/;\\n/, /\n" - "s/;$/)/\n" "}"; - - sed = "/^lstat([ \t]*[^c]/ {\nN\nN\n" - "s/(.*)\\n/( /\n" - "s/;\\n/, /\n" - "s/;$/)/\n" "}"; - - sed = "/^fstat([ \t]*[^i]/ {\nN\nN\n" - "s/(.*)\\n/( /\n" - "s/;\\n/, /\n" - "s/;$/)/\n" "}"; - - sed = "/^mknod([ \t]*[^c]/{\nN\nN\nN\n" - "s/(.*)\\n/( /\n" - "s/;\\n/, /g\n" - "s/;$/)/\n" "}"; - - sed = "1,$s/\\([^A-Za-z]\\)path\\([^A-Za-z]\\)/\\1__path\\2/g"; - sed = "1,$s/\\([^A-Za-z]\\)buf\\([^A-Za-z]\\)/\\1__buf\\2/g"; - sed = "1,$s/\\([^A-Za-z]\\)fd\\([^A-Za-z]\\)/\\1__fd\\2/g"; - sed = "1,$s/ret\\([^u]\\)/__ret\\1/g"; - sed = "1,$s/\\([^_]\\)mode\\([^_]\\)/\\1__mode\\2/g"; - sed = "1,$s/\\([^_r]\\)dev\\([^_]\\)/\\1__dev\\2/g"; -}; -#endif - -/* - * Add a prototyped declaration of mmap to <sys/mman.h>. - */ -#ifdef SVR4 -fix = { - hackname = svr4_proto_mmap; - files = sys/mman.h; - select = '^extern caddr_t mmap();$'; - sed = '/^extern caddr_t mmap();$/c' "\\\n" - "#ifdef __STDC__\\\n" - "extern caddr_t mmap (caddr_t, size_t, int, int, int, off_t);\\\n" - "#else /* !defined(__STDC__) */\\\n" - "extern caddr_t mmap ();\\\n" - "#endif /* !defined(__STDC__) */\\\n"; -}; -#endif - -/* - * Add a #define of _SIGACTION_ into <sys/signal.h>. - */ -#ifdef SVR4 -fix = { - hackname = svr4_sigaction; - files = sys/signal.h; - sed = "/^struct sigaction {/i\\\n" - "#define _SIGACTION_"; - sed = 's/(void *(\*)())/(void (*)(int))/'; -}; -#endif - - -/* - * Correct types for signal handler constants like SIG_DFL; they might be - * void (*) (), and should be void (*) (int). C++ doesn't like the - * old style. - */ -fix = { - hackname = svr4_sighandler_type; - files = sys/signal.h; - select = 'void *\(\*\)\(\)'; - c_fix = format; - c_fix_arg = "void (*)(int)"; - test_text = "#define SIG_DFL (void(*)())0\n" - "#define SIG_IGN (void (*)())0\n"; -}; - -/* - * Put storage class at start of decl, to avoid warning. - */ -#ifdef SVR4 -fix = { - hackname = svr4_storage_class; - files = rpc/types.h; - select = 'const extern'; - sed = 's/const extern/extern const/g'; -}; -#endif - - -/* - * Some SysV r4 systems, including Sequent's DYNIX/ptx, use the local - * function 'getrnge' in <regexp.h> before they declare it. For these - * systems add a 'static int' declaration of 'getrnge' into <regexp.h> - * early on. - * - * 'getrnge' traditionally manipulates a file-scope global called 'size', - * so put the declaration right after the declaration of 'size'. - * - * Don't do this if there is already a `static void getrnge' declaration - * present, since this would cause a redeclaration error. Solaris 2.x has - * such a declaration. - */ -fix = { - hackname = svr4_undeclared_getrnge; - files = regexp.h; - select = "getrnge"; - bypass = "static void getrnge"; - c_fix = format; - c_fix_arg = "%0\n" - "static int getrnge ();"; - c_fix_arg = "^static int[ \t]+size;"; - test_text = "static int size;\n" - "/* stuff which calls getrnge() */\n" - "static getrnge()\n" - "{}"; -}; - - -/* - * Like svr4_mach_defines, but with newfangled syntax. - * Source lines are of #define __i386 #machine(i386). Delete them. - */ -#ifdef SVR5 -fix = { - hackname = svr5_mach_defines; - files = ieeefp.h; - select = "#define[ \t]*__i386.*\(i386\)"; - sed = "/#define[ \t]*__i386.*/d"; -}; -#endif /* SVR5 */ - - -/* - * Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn} - * in string.h on sysV68 - * Correct the return type for strlen in string.h on Lynx. - * Correct the argument type for ffs in string.h on Alpha OSF/1 V2.0. - * Add missing const for strdup on OSF/1 V3.0. - * On sysV88 layout is slightly different. - */ -fix = { - hackname = sysv68_string; - files = testing.h; - files = string.h; - - sed = "s/extern[ \t]*int[ \t]*strlen();/extern unsigned int strlen();/"; - sed = "s/extern[ \t]*int[ \t]*ffs[ \t]*(long);/extern int ffs(int);/"; - sed = "s/strdup(char \\*s1);/strdup(const char *s1);/"; - - sed = "/^extern char$/N"; - sed = "s/^extern char\\(\\n\t\\*memccpy(),\\)$/extern void\\1/"; - - sed = "/^extern int$/N"; - sed = "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/"; - - sed = "/^\tstrncmp(),$/N"; - sed = 's/^\(' "\t" 'strncmp()\),\n\(' "\t" 'strlen(),\)$/' - '\1;' "\\\nextern unsigned int\\\n\\2/"; - - test_text = - "extern int strlen();\n" - - "extern int ffs(long);\n" - - "extern char\n" - "\t*memccpy(),\n" - "\tmemcpy();\n" - - "extern int\n" - "\tstrcmp(),\n" - "\tstrncmp(),\n" - "\tstrlen(),\n" - "\tstrspn();\n" - - "extern int\n" - "\tstrlen(), strspn();"; -}; - - -/* - * Fix return type of calloc, malloc, realloc, bsearch and exit - */ -fix = { - hackname = sysz_stdlib_for_sun; - files = stdlib.h; - - select = "char[ \t]*\\*[ \t]*(calloc|malloc|realloc|bsearch)[ \t]*\\("; - c_fix = format; - c_fix_arg = "void *\t%1("; - - test_text = - "extern char*\tcalloc(size_t);\n" - "extern char*\tmalloc(size_t);\n" - "extern char*\trealloc(void*,size_t);\n" - "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"; - select = "([* ])__thread([,)])"; - c_fix = format; - c_fix_arg = "%1__thr%2"; - - test_text = - "extern int pthread_create (pthread_t *__restrict __thread,\n" - "extern int pthread_kill (pthread_t __thread, int __signo);\n" - "extern int pthread_cancel (pthread_t __thread);"; -}; - -/* - * if the #if says _cplusplus, not the double underscore __cplusplus - * that it should be - */ -fix = { - hackname = tinfo_cplusplus; - files = tinfo.h; - select = "[ \t]_cplusplus"; - - c_fix = format; - c_fix_arg = " __cplusplus"; - test_text = "#ifdef _cplusplus\nint bogus;\n#endif"; -}; - - -/* - * function parameter to atexit is missing "void" on VAX Ultrix 4.3. - */ -fix = { - hackname = ultrix_atexit_param; - files = stdlib.h; - select = 'atexit\(.*\(\)'; - - c_fix = format; - c_fix_arg = "atexit( void (*__func)( void )"; - - test_text = "int atexit( void (*__func)() );\n"; -}; - - -/* - * parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R. - */ -fix = { - hackname = ultrix_atof_param; - files = math.h; - select = "atof\\([ \t]*char"; - - c_fix = format; - c_fix_arg = "atof(const char"; - - test_text = "extern double atof( char *__nptr);\n"; -}; - - -/* - * parameters not const on DECstation Ultrix V4.0 and OSF/1. - */ -fix = { - hackname = ultrix_const; - files = stdio.h; - select = 'perror\( char \*'; - - c_fix = format; - c_fix_arg = "%1 const %3 *__"; - c_fix_arg = "([ \t*](perror|fputs|fwrite|scanf|fscanf)\\(.*)" - "[ \t]+(char|void) \\*__"; - - test_text = - "extern void perror( char *__s );\n" - "extern int fputs( char *__s, FILE *);\n" - "extern size_t fwrite( void *__ptr, size_t, size_t, FILE *);\n" - "extern int fscanf( FILE *__stream, char *__format, ...);\n" - "extern int scanf( char *__format, ...);\n"; -}; - - -/* - * parameters not const on DECstation Ultrix V4.0 and OSF/1. - */ -fix = { - hackname = ultrix_const2; - files = stdio.h; - - select = '\*fopen\( char \*'; - c_fix = format; - c_fix_arg = "%1( const char *%3, const char *"; - c_fix_arg = "([ \t*](fopen|sscanf|popen|tempnam))\\(" - "[ \t]*char[ \t]*\\*([^,]*)," - "[ \t]*char[ \t]*\\*[ \t]*"; - - test_text = - "extern FILE *fopen( char *__filename, char *__type );\n" - "extern int sscanf( char *__s, char *__format, ...);\n" - "extern FILE *popen(char *, char *);\n" - "extern char *tempnam(char*,char*);\n"; -}; - - -/* - * parameters not const on Ultrix V4.3. - */ -fix = { - hackname = ultrix_const3; - files = stdio.h; - select = 'fdopen\( .*, char \*'; - - c_fix = format; - c_fix_arg = "%1 const %3 *__"; - c_fix_arg = "([ \t*](fdopen)\\(.*)" - "[ \t]+(char|void) \\*__"; - - test_text = - "extern FILE * fdopen( int __filedes, char *__type );\n"; -}; - - -/* - * Ultrix V4.[35] puts the declaration of uname before the definition - * of struct utsname, so the prototype (added by fixproto) causes havoc. - */ -fix = { - hackname = ultrix_fix_fixproto; - files = sys/utsname.h; - select = ULTRIX; - - c_fix = format; - c_fix_arg = "struct utsname;\n%0"; - c_fix_arg = "^[ \t]*extern[ \t]*int[ \t]*uname\\(\\);"; - - test_text = - "/* ULTRIX's uname */\nextern\tint\tuname();"; -}; - - -/* - * Check for bad #ifdef line (in Ultrix 4.1) - */ -fix = { - hackname = ultrix_ifdef; - select = "^#ifdef KERNEL[ \t]+&&"; - files = sys/file.h; - - c_fix = format; - c_fix_arg = "#if defined(KERNEL) &&"; - - test_text = - "#ifdef KERNEL\t&& defined( mumbojumbo )\nint oops;\n#endif"; -}; - - -/* - * Add once-only latch to Ultrix V4.3 locale.h. - */ -fix = { - hackname = ultrix_locale; - files = locale.h; - select = "@\\(#\\)locale\\.h.*6\\.1.*\\(ULTRIX\\)"; - c_fix = wrap; - test_text = - "@(#)locale.h 6.1 (ULTRIX)\n"; -}; - - -/* - * Strip "|| CC$gfloat" from Ultrix math headers. - */ -fix = { - hackname = ultrix_math_ifdef; - files = sys/limits.h; - files = float.h; - files = math.h; - select = "^(#if.*)\\|\\|[ \t]+CC\\$[a-z]+"; - c_fix = format; - c_fix_arg = "%1"; - - test_text = '#if defined(__GFLOAT) || CC\$gfloat'; -}; - - -/* - * Avoid nested comments on Ultrix 4.3. - */ -fix = { - hackname = ultrix_nested_ioctl; - files = sys/ioctl.h; - select = "^/\\* #define SIOCSCREEN"; - sed = "/^\\/\\* #define SIOCSCREEN/s@/\\* screend@*//* screend@"; - test_text = - "/* #define SIOCSCREENON _IOWR('i', 49, int)" - "/* screend, net/gw_screen.h */\n"; -}; - - -fix = { - hackname = ultrix_nested_svc; - files = rpc/svc.h; - select = "^ \\*[ \t]*int protocol; */\\*"; - sed = "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@"; - test_text = - " *\tint protocol; /* like TCP or UDP\n"; -}; - - -/* - * Add missing prototype for lstat and define for S_ISLNK - * in Ultrix V4.3 sys/stat.h. - */ -fix = { - hackname = ultrix_stat; - files = sys/stat.h; - select = "@\\(#\\)stat\\.h.*6\\.1.*\\(ULTRIX\\)"; - sed = "/^#define[ \t]S_IFPORT[ \t]*S_IFIFO$/a\\\n" - "\\\n" - "/* macro to test for symbolic link */\\\n" - "#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)\\\n" - "\n"; - sed = "/^[ \t]*fstat(),$/a\\\n" - "\tlstat(),\n"; - test_text = - "@(#)stat.h 6.1 (ULTRIX)\n" - "#define S_IFPORT S_IFIFO\n" - "\tfstat(),\n/* THE INSERTION LINE FAILS ON BSD SYSTEMS */"; -}; - - -/* - * Check for superfluous `static' (in Ultrix 4.2) - * On Ultrix 4.3, includes of other files (r3_cpu.h,r4_cpu.h) is broken. - */ -fix = { - hackname = ultrix_static; - files = machine/cpu.h; - select = '#include "r[34]_cpu'; - sed = "s/^static struct tlb_pid_state/struct tlb_pid_state/"; - sed = 's/^#include "r3_cpu\.h"$/#include <machine\/r3_cpu\.h>/'; - sed = 's/^#include "r4_cpu\.h"$/#include <machine\/r4_cpu\.h>/'; - test_text = - "static struct tlb_pid_state {\n" - "#include \"r3_cpu.h\"\n"; -}; - - -/* - * Add missing declarations to Ultrix V4.3 stdlib.h. - */ -fix = { - hackname = ultrix_stdlib; - files = stdlib.h; - select = "@\\(#\\)stdlib\\.h.*6\\.1.*\\(ULTRIX\\)"; - - sed = "/^char.*getenv( const char .* );.*$/a\\\n" - "int\t\tsetenv( const char *__name, const char *__val, int __ovrwrt );\\\n" - "void\t\tunsetenv( const char *__name );\\\n" - "int\t\tputenv( char *__s );\n"; - - sed = "/^char.*getenv();.*$/a\\\n" - "int\tsetenv();\\\n" - "void\tunsetenv();\\\n" - "int\tputenv();\n"; - - test_text = - "@(#)stdlib.h 6.1 (ULTRIX)\n" - "char * getenv( const char *__name );\n" - "char *getenv();\n"; -}; - - -/* - * Add once-only latch to Ultrix V4.3 strings.h. - */ -fix = { - hackname = ultrix_strings; - files = strings.h; - select = "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)"; - c_fix = wrap; - test_text = - "@(#)strings.h 6.1 (ULTRIX)\n"; -}; - - -/* - * Add missing declarations to Ultrix V4.3 strings.h. - */ -fix = { - hackname = ultrix_strings2; - files = strings.h; - select = "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)"; - - sed = "/^.*strncmp( const .* );.*/a\\\n" - "\\\n" - "extern int\\\n" - "\tstrcasecmp( const char *__s1, const char *__s2),\\\n" - "\tstrncasecmp( const char *__s1, const char *__s2, size_t __n );\n"; - - sed = "/^.*strncmp();.*/a\\\n" - "extern int\\\n" - "\tstrcasecmp(),\\\n" - "\tstrncasecmp();\n"; - - test_text = - "@(#)strings.h 6.1 (ULTRIX)\n" - "\tstrncmp( const char *__s1, const char *__s2, size_t __n );\n" - "\tstrncmp();\n"; -}; - - -/* - * Add missing declarations to Ultrix V4.3 sys/time.h. - */ -fix = { - hackname = ultrix_sys_time; - files = sys/time.h; - select = "@\\(#\\)time\\.h.*6\\.1.*\\(ULTRIX\\)"; - - sed = "/^extern.*time_t.*time( time_t .* );.*$/a\\\n" - "\\\n" - "extern int adjtime(struct timeval *, struct timeval *);\\\n" - "extern int getitimer(int, struct itimerval *);\\\n" - "extern int setitimer(int, struct itimerval *, struct itimerval *);\\\n" - "extern int gettimeofday(struct timeval *, struct timezone *);\\\n" - "extern int settimeofday(struct timeval *, struct timezone *);\\\n" - "extern void profil(const void *, size_t, size_t, unsigned int);\\\n" - "extern int stime(const time_t *);\\\n" - "extern int utimes(const char *, const struct timeval[2]);\\\n" - "extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);\n"; - - sed = "/^extern.*double.*difftime();.*$/a\\\n" - "extern\tint adjtime();\\\n" - "extern\tint getitimer();\\\n" - "extern\tint setitimer();\\\n" - "extern\tint gettimeofday();\\\n" - "extern\tint settimeofday();\\\n" - "extern\tvoid profil();\\\n" - "extern\tint stime();\\\n" - "extern\tint utimes();\\\n" - "extern\tint select();\n"; - - test_text = - "@(#)time.h 6.1 (ULTRIX)\n" - "extern time_t time( time_t *__tloc );\n" - "extern double difftime();\n"; -}; - - -/* - * Add missing declarations to Ultrix V4.3 unistd.h. - */ -fix = { - hackname = ultrix_unistd; - files = unistd.h; - select = "@\\(#\\)unistd\\.h.*6\\.1.*\\(ULTRIX\\)"; - - sed = "/^[ \t]*getgroups(),.*$/a\\\n" - "\tgetpagesize(),\n"; - - sed = "/^[ \t]*fork(),.*$/a\\\n" - "\tvfork(),\n"; - - test_text = - "@(#)unistd.h 6.1 (ULTRIX)\n" - "\tgetgroups(),\n" - "\tfork(),\n"; -}; - - -/* - * Fix multiple defines for NULL. Sometimes, we stumble into \r\n - * terminated lines, so accommodate these. Test both ways. - * Don't bother to reproduce the \r\n termination, as GCC has to - * recognize \n termination anyway. - */ -fix = { - hackname = undefine_null; - select = "^#[ \t]*define[ \t]+NULL[ \t]"; - bypass = "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])"; - - c_fix = format; - c_fix_arg = "#ifndef NULL\n#define NULL%1\n#endif\n"; - c_fix_arg = "^#[ \t]*define[ \t]+NULL([^\r\n]+)[\r]*\n"; - - test_text = "#define NULL 0UL\r\n" - "#define NULL\t((void*)0)\n"; -}; - -/* - * On Cray Unicos/Mk some standard headers use the C99 keyword "restrict" - * which must be replaced by __restrict__ for GCC. - */ -fix = { - hackname = unicosmk_restrict; - files = stdio.h; - files = stdlib.h; - files = wchar.h; - mach = "*-*-unicosmk*"; - select = "(\\*[ \t]*)restrict([ \t]+)"; - - c_fix = format; - c_fix_arg = "%1__restrict__%2"; - - test_text = "void f (char * restrict x);"; -}; - -/* - * If arpa/inet.h prototypes are incompatible with the ones we just - * installed in <sys/byteorder.h>, just remove the protos. - * Because of this close association, this patch must be applied only - * on those systems where the replacement byteorder header is installed. - */ -fix = { - hackname = uw7_byteorder_fix; - files = arpa/inet.h; - select = "in_port_t"; - test = "-f sys/byteorder.h"; -#ifndef SVR5 - mach = "*-*-sysv4*"; - mach = "i?86-*-sysv5*"; - mach = "i?86-*-udk*"; - mach = "i?86-*-solaris2.[0-4]"; - mach = "powerpcle-*-solaris2.[0-4]"; - mach = "sparc-*-solaris2.[0-4]"; -#endif /* SVR5 */ - - c_fix = format; - c_fix_arg = ""; - c_fix_arg = "^extern.*[ \t](htons|ntohs).*\\(in_port_t\\).*;"; - - test_text = "extern in_port_t\thtons __P((in_port_t));\n" - "extern in_port_t\tntohs __P((in_port_t));" - "`[ ! -d $DESTDIR/sys ] && mkdir $DESTDIR/sys\n" - "echo '/* DUMMY */' >> sys/byteorder.h`"; -}; - - -/* - * Fix definitions of macros used by va-i960.h in VxWorks header file. - */ -fix = { - hackname = va_i960_macro; - files = arch/i960/archI960.h; - select = "__(vsiz|vali|vpad|alignof__)"; - - c_fix = format; - c_fix_arg = "__vx%1"; - - test_text = - "extern int __vsiz vsiz;\n" - "extern int __vali vali;\n" - "extern int __vpad vpad;\n" - "#define __alignof__(x) ..."; -}; - - -/* - * AIX and Interix headers define NULL to be cast to a void pointer, - * which is illegal in ANSI C++. - */ -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; - select = "^#[ \t]*define[ \t]+NULL[ \t]+\\(\\(void[ \t]*\\*\\)0\\)"; - c_fix = format; - c_fix_arg = "#define NULL 0"; - test_text = "# define\tNULL \t((void *)0) /* typed NULL */"; -}; - - -/* - * Make VxWorks header which is almost gcc ready fully gcc ready. - */ -fix = { - hackname = vxworks_gcc_problem; - files = types/vxTypesBase.h; - select = "__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__"; - - sed = "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/" - "#if 1/"; - - sed = "/[ \t]size_t/i\\\n" - "#ifndef _GCC_SIZE_T\\\n" - "#define _GCC_SIZE_T\n"; - - sed = "/[ \t]size_t/a\\\n" - "#endif\n"; - - sed = "/[ \t]ptrdiff_t/i\\\n" - "#ifndef _GCC_PTRDIFF_T\\\n" - "#define _GCC_PTRDIFF_T\n"; - - sed = "/[ \t]ptrdiff_t/a\\\n" - "#endif\n"; - - sed = "/[ \t]wchar_t/i\\\n" - "#ifndef _GCC_WCHAR_T\\\n" - "#define _GCC_WCHAR_T\n"; - - sed = "/[ \t]wchar_t/a\\\n" - "#endif\n"; - - test_text = - "#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__\n" - "typedef unsigned int size_t;\n" - "typedef long ptrdiff_t;\n" - "typedef unsigned short wchar_t;\n" - "#endif /* __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__ */\n"; -}; - - -/* - * Fix VxWorks <time.h> to not require including <vxTypes.h>. - */ -fix = { - hackname = vxworks_needs_vxtypes; - files = time.h; - select = "uint_t([ \t]+_clocks_per_sec)"; - c_fix = format; - c_fix_arg = "unsigned int%1"; - test_text = "uint_t\t_clocks_per_sec;"; -}; - - -/* - * Fix VxWorks <sys/stat.h> to not require including <vxWorks.h>. - */ -fix = { - hackname = vxworks_needs_vxworks; - files = sys/stat.h; - test = " -r types/vxTypesOld.h"; - test = " -n \"`egrep '#include' $file`\""; - test = " -n \"`egrep ULONG $file`\""; - select = "#[ \t]define[ \t]+__INCstath"; - - sed = "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n" - "#include <types/vxTypesOld.h>\n"; - - test_text = "`touch types/vxTypesOld.h`" - "#include </dev/null> /* ULONG */\n" - "# define\t__INCstath <sys/stat.h>"; -}; - - -/* - * Another bad dependency in VxWorks 5.2 <time.h>. - */ -fix = { - hackname = vxworks_time; - files = time.h; - test = " -r vxWorks.h"; - - select = "#[ \t]*define[ \t]+VOIDFUNCPTR[ \t].*"; - c_fix = format; - - c_fix_arg = - "#ifndef __gcc_VOIDFUNCPTR_defined\n" - "#ifdef __cplusplus\n" - "typedef void (*__gcc_VOIDFUNCPTR) (...);\n" - "#else\n" - "typedef void (*__gcc_VOIDFUNCPTR) ();\n" - "#endif\n" - "#define __gcc_VOIDFUNCPTR_defined\n" - "#endif\n" - "#define VOIDFUNCPTR __gcc_VOIDFUNCPTR"; - - test_text = "`touch vxWorks.h`" - "#define VOIDFUNCPTR (void(*)())"; -}; - - -/* - * WindISS math.h headers include bogus extern declarations of - * numerous math functions that conflict with libstdc++-v3. - */ -fix = { - hackname = windiss_math1; - files = math.h; - mach = "*-*-windiss"; - sed = "s|inline long double cosl.*|#ifndef __GNUC__|"; - - test_text = "inline long double cosl(long double);"; -}; - -fix = { - hackname = windiss_math2; - files = math.h; - mach = "*-*-windiss"; - sed = "s|/\\* long double declarations \\*/|" - "#endif /* __GNUC__ */|"; - - test_text = "/* long double declarations */"; -}; - -/* - * WindISS headers include "diab/va_list.h" instead of "stdarg.h" - */ -fix = { - select = '(#include.*)diab/va_list.h'; - hackname = windiss_valist; - sed = "s|diab/va_list.h|stdarg.h|"; - mach = "*-*-windiss"; - - test_text = "#include <diab/va_list.h>"; -}; - -/* - * There are several name conflicts with C++ reserved words in X11 header - * files. These are fixed in some versions, so don't do the fixes if - * we find __cplusplus in the file. These were found on the RS/6000. - */ -fix = { - hackname = x11_class; - files = X11/ShellP.h; - bypass = __cplusplus; - select = "^([ \t]*char \\*)class;(.*)"; - c_fix = format; - c_fix_arg = "#ifdef __cplusplus\n%1c_class;%2\n" - "#else\n%1class;%2\n#endif"; - test_text = - "struct {\n" - " char *class;\n" - "} mumble;\n"; -}; - - -/* - * class in Xm/BaseClassI.h - */ -fix = { - hackname = x11_class_usage; - files = Xm/BaseClassI.h; - bypass = "__cplusplus"; - - select = " class\\)"; - c_fix = format; - c_fix_arg = " c_class)"; - - test_text = "extern mumble (int class);\n"; -}; - - -/* - * new in Xm/Traversal.h - */ -fix = { - hackname = x11_new; - files = Xm/Traversal.h; - bypass = __cplusplus; - - sed = "/Widget\told, new;/i\\\n" - "#ifdef __cplusplus\\\n" - "\tWidget\told, c_new;\\\n" - "#else\n"; - - sed = "/Widget\told, new;/a\\\n" - "#endif\n"; - - sed = "s/Widget new,/Widget c_new,/g"; - test_text = - "struct wedge {\n" - " Widget\told, new; /* fixinc check FAILS ON BSD */\n" - "};\nextern Wedged( Widget new, Widget old );"; -}; - - -/* - * Incorrect sprintf declaration in X11/Xmu.h - */ -fix = { - hackname = x11_sprintf; - files = X11/Xmu.h; - files = X11/Xmu/Xmu.h; - select = "^extern char \\*\tsprintf\\(\\);$"; - - c_fix = format; - c_fix_arg = "#ifndef __STDC__\n%0\n#endif /* !defined __STDC__ */"; - - test_text = "extern char *\tsprintf();"; -}; - -/*EOF*/ diff --git a/gcc/fixinc/mkfixinc.sh b/gcc/fixinc/mkfixinc.sh deleted file mode 100755 index a3700cc..0000000 --- a/gcc/fixinc/mkfixinc.sh +++ /dev/null @@ -1,78 +0,0 @@ -#! /bin/sh - -if [ $# -ne 2 ] -then - echo "Usage: $0 <build-mach-triplet> <target-mach-triplet>" - exit 1 -fi - -build=$1 -machine=$2 -target=../fixinc.sh - -echo constructing ${target} for $machine to run on $build -fixincludes="${machine}" - -# Choose one or two-process fix methodology. Systems that cannot handle -# bi-directional pipes must use the two process method. -# -case $build in - i?86-*-msdosdjgpp* | \ - *-*-beos* ) - MAKE="${MAKE} TARGETS=twoprocess" - CFLAGS="${CFLAGS} -DSEPARATE_FIX_PROC" - ;; - - vax-dec-bsd* ) - CFLAGS="${CFLAGS} -Dexit=xexit -Datexit=xatexit" - MAKE="${MAKE} TARGETS=oneprocess" - ;; - - * ) - MAKE="${MAKE} TARGETS=oneprocess" - ;; -esac - -# Check for special fix rules for particular targets -case $machine in - alpha*-dec-*vms* | \ - arm-semi-aof | \ - hppa1.1-*-osf* | \ - hppa1.1-*-bsd* | \ - i370-*-openedition | \ - i?86-moss-msdos* | \ - i?86-*-moss* | \ - i?86-*-pe | \ - i?86-*-cygwin* | \ - i?86-*-mingw32* | \ - i?86-*-uwin* | \ - i?86-*-interix* | \ - powerpc-*-eabiaix* | \ - powerpc-*-eabisim* | \ - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ - powerpcle-*-eabi* ) - # Don't do any fixing. - # - fixincludes= - ;; -esac - -# IF there is no include fixing, -# THEN create a no-op fixer and exit -# -if test -z "$fixincludes" -then - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} - chmod 755 ${target} - exit 0 -fi - -# OK. We gotta make the thing. -# make and install either the binary or the default script - -defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" LIBERTY=\"$LIBERTY\"" -cmd="$MAKE ${defs} install-bin" -echo $cmd -eval $cmd diff --git a/gcc/fixinc/procopen.c b/gcc/fixinc/procopen.c deleted file mode 100644 index 6fdb24f..0000000 --- a/gcc/fixinc/procopen.c +++ /dev/null @@ -1,218 +0,0 @@ - -/* - * server.c Set up and handle communications with a server process. - * - * Server Handling copyright 1992-1999 The Free Software Foundation - * - * Server Handling is free software. - * You may redistribute it and/or modify it under the terms of the - * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. - * - * Server Handling is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Server Handling. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * As a special exception, The Free Software Foundation gives - * permission for additional uses of the text contained in his release - * of ServerHandler. - * - * The exception is that, if you link the ServerHandler library with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the ServerHandler library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by The Free - * Software Foundation under the name ServerHandler. If you copy code - * from other sources under the General Public License into a copy of - * ServerHandler, as the General Public License permits, the exception - * does not apply to the code that you add in this way. To avoid - * misleading anyone as to the status of such modified files, you must - * delete this exception notice from them. - * - * If you write modifications of your own for ServerHandler, it is your - * choice whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - */ - -#include "fixlib.h" -#include "server.h" - -STATIC const char* def_args[] = -{ (char *) NULL, (char *) NULL }; - -/* - * chain_open - * - * Given an FD for an inferior process to use as stdin, - * start that process and return a NEW FD that that process - * will use for its stdout. Requires the argument vector - * for the new process and, optionally, a pointer to a place - * to store the child's process id. - */ -int -chain_open (int stdin_fd, tCC** pp_args, pid_t* p_child) -{ - t_fd_pair stdout_pair; - pid_t ch_id; - tCC *pz_cmd; - - stdout_pair.read_fd = stdout_pair.write_fd = -1; - - /* - * Create a pipe it will be the child process' stdout, - * and the parent will read from it. - */ - if (pipe ((int *) &stdout_pair) < 0) - { - if (p_child != (pid_t *) NULL) - *p_child = NOPROCESS; - return -1; - } - - /* - * If we did not get an arg list, use the default - */ - if (pp_args == (tCC **) NULL) - pp_args = def_args; - - /* - * If the arg list does not have a program, - * assume the "SHELL" from the environment, or, failing - * that, then sh. Set argv[0] to whatever we decided on. - */ - if (pz_cmd = *pp_args, - (pz_cmd == (char *) NULL) || (*pz_cmd == '\0')) - { - - pz_cmd = getenv ("SHELL"); - if (pz_cmd == (char *) NULL) - pz_cmd = "sh"; - } - -#ifdef DEBUG_PRINT - printf ("START: %s\n", pz_cmd); - { - int idx = 0; - - while (pp_args[++idx] != (char *) NULL) - printf (" ARG %2d: %s\n", idx, pp_args[idx]); - } -#endif - - /* - * Call fork() and see which process we become - */ - ch_id = fork (); - switch (ch_id) - { - case NOPROCESS: /* parent - error in call */ - close (stdout_pair.read_fd); - close (stdout_pair.write_fd); - if (p_child != (pid_t *) NULL) - *p_child = NOPROCESS; - return -1; - - default: /* parent - return opposite FD's */ - if (p_child != (pid_t *) NULL) - *p_child = ch_id; -#ifdef DEBUG_PRINT - printf ("for pid %d: stdin from %d, stdout to %d\n" - "for parent: read from %d\n", - ch_id, stdin_fd, stdout_pair.write_fd, stdout_pair.read_fd); -#endif - close (stdin_fd); - close (stdout_pair.write_fd); - return stdout_pair.read_fd; - - case NULLPROCESS: /* child - continue processing */ - break; - } - - /* - * Close the pipe end handed back to the parent process - */ - close (stdout_pair.read_fd); - - /* - * Close our current stdin and stdout - */ - close (STDIN_FILENO); - close (STDOUT_FILENO); - - /* - * Make the fd passed in the stdin, and the write end of - * the new pipe become the stdout. - */ - fcntl (stdout_pair.write_fd, F_DUPFD, STDOUT_FILENO); - fcntl (stdin_fd, F_DUPFD, STDIN_FILENO); - - if (*pp_args == (char *) NULL) - *pp_args = pz_cmd; - - execvp (pz_cmd, (char**)pp_args); - fprintf (stderr, "Error %d: Could not execvp( '%s', ... ): %s\n", - errno, pz_cmd, xstrerror (errno)); - exit (EXIT_PANIC); -} - - -/* - * proc2_open - * - * Given a pointer to an argument vector, start a process and - * place its stdin and stdout file descriptors into an fd pair - * structure. The "write_fd" connects to the inferior process - * stdin, and the "read_fd" connects to its stdout. The calling - * process should write to "write_fd" and read from "read_fd". - * The return value is the process id of the created process. - */ -pid_t -proc2_open (t_fd_pair* p_pair, tCC** pp_args) -{ - pid_t ch_id; - - /* Create a bi-directional pipe. Writes on 0 arrive on 1 and vice - versa, so the parent and child processes will read and write to - opposite FD's. */ - if (pipe ((int *) p_pair) < 0) - return NOPROCESS; - - p_pair->read_fd = chain_open (p_pair->read_fd, pp_args, &ch_id); - if (ch_id == NOPROCESS) - close (p_pair->write_fd); - - return ch_id; -} - - -/* - * proc2_fopen - * - * Identical to "proc2_open()", except that the "fd"'s are - * "fdopen(3)"-ed into file pointers instead. - */ -pid_t -proc2_fopen (t_pf_pair* pf_pair, tCC** pp_args) -{ - t_fd_pair fd_pair; - pid_t ch_id = proc2_open (&fd_pair, pp_args); - - if (ch_id == NOPROCESS) - return ch_id; - - pf_pair->pf_read = fdopen (fd_pair.read_fd, "r"); - pf_pair->pf_write = fdopen (fd_pair.write_fd, "w"); - return ch_id; -} diff --git a/gcc/fixinc/server.c b/gcc/fixinc/server.c deleted file mode 100644 index 902fda1..0000000 --- a/gcc/fixinc/server.c +++ /dev/null @@ -1,305 +0,0 @@ - -/* - * server.c Set up and handle communications with a server process. - * - * Server Handling copyright 1992-1999, 2001 The Free Software Foundation - * - * Server Handling is free software. - * You may redistribute it and/or modify it under the terms of the - * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. - * - * Server Handling is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Server Handling. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * As a special exception, The Free Software Foundation gives - * permission for additional uses of the text contained in his release - * of ServerHandler. - * - * The exception is that, if you link the ServerHandler library with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the ServerHandler library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by The Free - * Software Foundation under the name ServerHandler. If you copy code - * from other sources under the General Public License into a copy of - * ServerHandler, as the General Public License permits, the exception - * does not apply to the code that you add in this way. To avoid - * misleading anyone as to the status of such modified files, you must - * delete this exception notice from them. - * - * If you write modifications of your own for ServerHandler, it is your - * choice whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - */ - -#include "fixlib.h" -#include "server.h" - -STATIC volatile enum t_bool read_pipe_timeout; -STATIC pid_t server_master_pid = NOPROCESS; - -tSCC* def_args[] = -{ (char *) NULL, (char *) NULL }; -STATIC t_pf_pair server_pair = -{ (FILE *) NULL, (FILE *) NULL }; -STATIC pid_t server_id = NULLPROCESS; -/* - * Arbitrary text that should not be found in the shell output. - * It must be a single line and appear verbatim at the start of - * the terminating output line. - */ -tSCC z_done[] = "ShElL-OuTpUt-HaS-bEeN-cOmPlEtEd"; -tSCC* p_cur_dir = (char *) NULL; - -/* - * load_data - * - * Read data from a file pointer (a pipe to a process in this context) - * until we either get EOF or we get a marker line back. - * The read data are stored in a malloc-ed string that is truncated - * to size at the end. Input is assumed to be an ASCII string. - */ -static char * -load_data (FILE* fp) -{ - char *pz_text; - size_t text_size; - char *pz_scan; - char z_line[1024]; - t_bool got_done = BOOL_FALSE; - - text_size = sizeof (z_line) * 2; - pz_scan = pz_text = xmalloc (text_size); - - for (;;) - { - size_t used_ct; - - alarm (10); - read_pipe_timeout = BOOL_FALSE; - if (fgets (z_line, sizeof (z_line), fp) == (char *) NULL) - break; - - if (strncmp (z_line, z_done, sizeof (z_done) - 1) == 0) - { - got_done = BOOL_TRUE; - break; - } - - strcpy (pz_scan, z_line); - pz_scan += strlen (z_line); - used_ct = (size_t) (pz_scan - pz_text); - - if (text_size - used_ct < sizeof (z_line)) - { - size_t off = (size_t) (pz_scan - pz_text); - - text_size += 4096; - pz_text = xrealloc (pz_text, text_size); - pz_scan = pz_text + off; - } - } - - alarm (0); - if (read_pipe_timeout || ! got_done) - { - free ((void *) pz_text); - return (char *) NULL; - } - - while ((pz_scan > pz_text) && ISSPACE (pz_scan[-1])) - pz_scan--; - *pz_scan = NUL; - return xrealloc (pz_text, strlen (pz_text) + 1); -} - - -/* - * close_server - * - * Make certain the server process is dead, close the - * pipes to it and from it, finally NULL out the file pointers - */ -void -close_server (void) -{ - if ( (server_id != NULLPROCESS) - && (server_master_pid == getpid ())) - { - kill ((pid_t) server_id, SIGKILL); - server_id = NULLPROCESS; - server_master_pid = NOPROCESS; - fclose (server_pair.pf_read); - fclose (server_pair.pf_write); - server_pair.pf_read = server_pair.pf_write = (FILE *) NULL; - } -} - -/* - * sig_handler really only handles the timeout and pipe signals. - * This ensures that we do not wait forever on a request - * to our server, and also that if the server dies, we do not - * die from a sigpipe problem. - */ -static void -sig_handler (int signo ATTRIBUTE_UNUSED) -{ -#ifdef DEBUG - /* FIXME: this is illegal to do in a signal handler. */ - fprintf (stderr, - "fixincl ERROR: sig_handler: killed pid %ld due to %s\n", - (long) server_id, signo == SIGPIPE ? "SIGPIPE" : "SIGALRM"); -#endif - close_server (); - read_pipe_timeout = BOOL_TRUE; -} - - -/* - * server_setup Establish the signal handler for PIPE and ALARM. - * Also establishes the current directory to give to the - * server process at the start of every server command. - */ -static void -server_setup (void) -{ - static int atexit_done = 0; - char buff [MAXPATHLEN + 1]; - - if (atexit_done++ == 0) - atexit (close_server); - else - fputs ("NOTE: server restarted\n", stderr); - - server_master_pid = getpid (); - - signal (SIGPIPE, sig_handler); - signal (SIGALRM, sig_handler); - - fputs ("trap : 1\n", server_pair.pf_write); - fflush (server_pair.pf_write); - getcwd (buff, MAXPATHLEN + 1); - p_cur_dir = xstrdup (buff); -} - -/* - * find_shell - * - * Locate a shell suitable for use. For various reasons - * (like the use of "trap" in server_setup(), it must be a - * Bourne-like shell. - * - * Most of the time, /bin/sh is preferred, but sometimes - * it's quite broken (like on Ultrix). autoconf lets you - * override with $CONFIG_SHELL, so we do the same. - */ - -static const char * -find_shell (void) -{ - char * shell = getenv ("CONFIG_SHELL"); - if (shell) - return shell; - - return "/bin/sh"; -} - - -/* - * run_shell - * - * Run a shell command on the server. The command string - * passed in is wrapped inside the sequence: - * - * cd <original directory> - * <command string> - * echo - * echo <end-of-command-marker> - * - * This ensures that all commands start at a known place in - * the directory structure, that any incomplete output lines - * are completed and that our special marker sequence appears on - * a line by itself. We have chosen a marker that is - * excessively unlikely to be reproduced in normal output: - * - * "ShElL-OuTpUt-HaS-bEeN-cOmPlEtEd" - */ -char * -run_shell (const char* pz_cmd) -{ - tSCC zNoServer[] = "Server not running, cannot run:\n%s\n\n"; - t_bool retry = BOOL_TRUE; - - do_retry: - /* IF the shell server process is not running yet, - THEN try to start it. */ - if (server_id == NULLPROCESS) - { - def_args[0] = find_shell (); - - server_id = proc2_fopen (&server_pair, def_args); - if (server_id > 0) - server_setup (); - } - - /* IF it is still not running, THEN return the nil string. */ - if (server_id <= 0) - { - fprintf (stderr, zNoServer, pz_cmd); - return xcalloc (1, 1); - } - - /* Make sure the process will pay attention to us, send the - supplied command, and then have it output a special marker that - we can find. */ - fprintf (server_pair.pf_write, "cd %s\n%s\n\necho\necho %s\n", - p_cur_dir, pz_cmd, z_done); - fflush (server_pair.pf_write); - - /* IF the server died and we received a SIGPIPE, - THEN return an empty string. */ - if (server_id == NULLPROCESS) - { - fprintf (stderr, zNoServer, pz_cmd); - return xcalloc (1, 1); - } - - /* Now try to read back all the data. If we fail due to either a - sigpipe or sigalrm (timeout), we will return the nil string. */ - { - char *pz = load_data (server_pair.pf_read); - - if (pz == (char *) NULL) - { - close_server (); - - if (retry) - { - retry = BOOL_FALSE; - goto do_retry; - } - - fprintf (stderr, "CLOSING SHELL SERVER - command failure:\n\t%s\n", - pz_cmd); - pz = xcalloc (1, 1); - } -#ifdef DEBUG - fprintf( stderr, "run_shell command success: %s\n", pz ); -#endif - return pz; - } -} diff --git a/gcc/fixinc/server.h b/gcc/fixinc/server.h deleted file mode 100644 index 30de054..0000000 --- a/gcc/fixinc/server.h +++ /dev/null @@ -1,74 +0,0 @@ - -/* - * server.c Set up and handle communications with a server process. - * - * Server Handling copyright 1992-1999 The Free Software Foundation - * - * Server Handling is free software. - * You may redistribute it and/or modify it under the terms of the - * GNU General Public License, as published by the Free Software - * Foundation; either version 2, or (at your option) any later version. - * - * Server Handling is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Server Handling. See the file "COPYING". If not, - * write to: The Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * As a special exception, The Free Software Foundation gives - * permission for additional uses of the text contained in his release - * of ServerHandler. - * - * The exception is that, if you link the ServerHandler library with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the ServerHandler library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by The Free - * Software Foundation under the name ServerHandler. If you copy code - * from other sources under the General Public License into a copy of - * ServerHandler, as the General Public License permits, the exception - * does not apply to the code that you add in this way. To avoid - * misleading anyone as to the status of such modified files, you must - * delete this exception notice from them. - * - * If you write modifications of your own for ServerHandler, it is your - * choice whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - */ - -#ifndef GCC_SERVER_H -#define GCC_SERVER_H - -/* - * Dual pipe opening of a child process - */ - -typedef struct -{ - int read_fd; - int write_fd; -} t_fd_pair; - -typedef struct -{ - FILE *pf_read; /* parent read fp */ - FILE *pf_write; /* parent write fp */ -} t_pf_pair; - -char* run_shell( const char* pzCmd ); -pid_t proc2_fopen( t_pf_pair* p_pair, tCC** pp_args ); -pid_t proc2_open( t_fd_pair* p_pair, tCC** pp_args ); -int chain_open( int in_fd, tCC** pp_args, pid_t* p_child ); -void close_server( void ); - -#endif /* ! GCC_SERVER_H */ diff --git a/gcc/fixinc/tests/base/X11/ShellP.h b/gcc/fixinc/tests/base/X11/ShellP.h deleted file mode 100644 index 45e8e1f..0000000 --- a/gcc/fixinc/tests/base/X11/ShellP.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/X11/ShellP.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( X11_CLASS_CHECK ) -struct { -#ifdef __cplusplus - char *c_class; -#else - char *class; -#endif -} mumble; - -#endif /* X11_CLASS_CHECK */ diff --git a/gcc/fixinc/tests/base/X11/Xmu.h b/gcc/fixinc/tests/base/X11/Xmu.h deleted file mode 100644 index 5fac5db..0000000 --- a/gcc/fixinc/tests/base/X11/Xmu.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/X11/Xmu.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( X11_SPRINTF_CHECK ) -#ifndef __STDC__ -extern char * sprintf(); -#endif /* !defined __STDC__ */ -#endif /* X11_SPRINTF_CHECK */ diff --git a/gcc/fixinc/tests/base/Xm/BaseClassI.h b/gcc/fixinc/tests/base/Xm/BaseClassI.h deleted file mode 100644 index afc3a89..0000000 --- a/gcc/fixinc/tests/base/Xm/BaseClassI.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/Xm/BaseClassI.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( X11_CLASS_USAGE_CHECK ) -extern mumble (int c_class); - -#endif /* X11_CLASS_USAGE_CHECK */ diff --git a/gcc/fixinc/tests/base/Xm/Traversal.h b/gcc/fixinc/tests/base/Xm/Traversal.h deleted file mode 100644 index 61e6df1..0000000 --- a/gcc/fixinc/tests/base/Xm/Traversal.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/Xm/Traversal.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( X11_NEW_CHECK ) -struct wedge { -#ifdef __cplusplus - Widget old, c_new; -#else - Widget old, new; /* fixinc check FAILS ON BSD */ -#endif -}; -extern Wedged( Widget c_new, Widget old ); -#endif /* X11_NEW_CHECK */ diff --git a/gcc/fixinc/tests/base/_G_config.h b/gcc/fixinc/tests/base/_G_config.h deleted file mode 100644 index 99f0c82..0000000 --- a/gcc/fixinc/tests/base/_G_config.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/_G_config.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( LIBC1_G_VA_LIST_CHECK ) -typedef __builtin_va_list _G_va_list; -#endif /* LIBC1_G_VA_LIST_CHECK */ diff --git a/gcc/fixinc/tests/base/ansi/math.h b/gcc/fixinc/tests/base/ansi/math.h deleted file mode 100644 index c8a9ca2..0000000 --- a/gcc/fixinc/tests/base/ansi/math.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/ansi/math.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( NEXT_MATH_PREFIX_CHECK ) -extern double mumble(); -#endif /* NEXT_MATH_PREFIX_CHECK */ diff --git a/gcc/fixinc/tests/base/ansi/stdlib.h b/gcc/fixinc/tests/base/ansi/stdlib.h deleted file mode 100644 index e47d49c..0000000 --- a/gcc/fixinc/tests/base/ansi/stdlib.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/ansi/stdlib.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( NEXT_VOLITILE_CHECK ) -extern void abort(); -#endif /* NEXT_VOLITILE_CHECK */ diff --git a/gcc/fixinc/tests/base/arch/i960/archI960.h b/gcc/fixinc/tests/base/arch/i960/archI960.h deleted file mode 100644 index b886700..0000000 --- a/gcc/fixinc/tests/base/arch/i960/archI960.h +++ /dev/null @@ -1,17 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/arch/i960/archI960.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( VA_I960_MACRO_CHECK ) -extern int __vxvsiz vsiz; -extern int __vxvali vali; -extern int __vxvpad vpad; -#define __vxalignof__(x) ... -#endif /* VA_I960_MACRO_CHECK */ diff --git a/gcc/fixinc/tests/base/arpa/inet.h b/gcc/fixinc/tests/base/arpa/inet.h deleted file mode 100644 index acd8ed5..0000000 --- a/gcc/fixinc/tests/base/arpa/inet.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/arpa/inet.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( UW7_BYTEORDER_FIX_CHECK ) - - -#endif /* UW7_BYTEORDER_FIX_CHECK */ diff --git a/gcc/fixinc/tests/base/assert.h b/gcc/fixinc/tests/base/assert.h deleted file mode 100644 index 2642cbe..0000000 --- a/gcc/fixinc/tests/base/assert.h +++ /dev/null @@ -1,43 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/assert.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef FIXINC_WRAP_ASSERT_H_BROKEN_ASSERT_STDLIB -#define FIXINC_WRAP_ASSERT_H_BROKEN_ASSERT_STDLIB 1 - -#ifdef __cplusplus -#include <stdlib.h> -#endif -#ifndef FIXINC_WRAP_ASSERT_H_BROKEN_ASSERT_STDIO -#define FIXINC_WRAP_ASSERT_H_BROKEN_ASSERT_STDIO 1 - -#include <stdio.h> - - -#if defined( ALPHA___ASSERT_CHECK ) -extern void __assert(const char *, const char *, int); -#endif /* ALPHA___ASSERT_CHECK */ - - -#if defined( ALPHA_ASSERT_CHECK ) -#define assert(EX) ((EX) ? (void)0 : __assert(#EX, __FILE__, __LINE__)) -#endif /* ALPHA_ASSERT_CHECK */ - - -#if defined( BROKEN_ASSERT_STDIO_CHECK ) -extern FILE* stderr; -#endif /* BROKEN_ASSERT_STDIO_CHECK */ - - -#if defined( BROKEN_ASSERT_STDLIB_CHECK ) -extern void exit ( int ); -#endif /* BROKEN_ASSERT_STDLIB_CHECK */ - -#endif /* FIXINC_WRAP_ASSERT_H_BROKEN_ASSERT_STDIO */ - -#endif /* FIXINC_WRAP_ASSERT_H_BROKEN_ASSERT_STDLIB */ diff --git a/gcc/fixinc/tests/base/bsd/libc.h b/gcc/fixinc/tests/base/bsd/libc.h deleted file mode 100644 index 939a5b1..0000000 --- a/gcc/fixinc/tests/base/bsd/libc.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/bsd/libc.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( NEXT_TEMPLATE_CHECK ) -extern mumble( char *); /* fix */ -#endif /* NEXT_TEMPLATE_CHECK */ diff --git a/gcc/fixinc/tests/base/c_asm.h b/gcc/fixinc/tests/base/c_asm.h deleted file mode 100644 index f3e0daa..0000000 --- a/gcc/fixinc/tests/base/c_asm.h +++ /dev/null @@ -1,20 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/c_asm.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( DEC_INTERN_ASM_CHECK ) -#ifdef __DECC -float fasm { - ... asm stuff ... -}; -#pragma intrinsic( dasm ) -#endif -/* END ASM TEST*/ -#endif /* DEC_INTERN_ASM_CHECK */ diff --git a/gcc/fixinc/tests/base/ctrl-quotes-def-1.h b/gcc/fixinc/tests/base/ctrl-quotes-def-1.h deleted file mode 100644 index 16b18dc..0000000 --- a/gcc/fixinc/tests/base/ctrl-quotes-def-1.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/ctrl-quotes-def-1.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( CTRL_QUOTES_DEF_CHECK_1 ) -#define _CTRL(c) (c&037) -#endif /* CTRL_QUOTES_DEF_CHECK_1 */ diff --git a/gcc/fixinc/tests/base/ctype.h b/gcc/fixinc/tests/base/ctype.h deleted file mode 100644 index deabd5e..0000000 --- a/gcc/fixinc/tests/base/ctype.h +++ /dev/null @@ -1,65 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/ctype.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HPUX10_CTYPE_DECLARATIONS1_CHECK ) -#ifdef _PROTOTYPES -extern int __tolower(int); -extern int __toupper(int); -#else /* NOT _PROTOTYPES */ -extern int __tolower(); -extern int __toupper(); -#endif /* _PROTOTYPES */ - -# define _toupper(__c) __toupper(__c) - - -#endif /* HPUX10_CTYPE_DECLARATIONS1_CHECK */ - - -#if defined( HPUX10_CTYPE_DECLARATIONS2_CHECK ) -# if defined(_SB_CTYPE_MACROS) && !defined(__lint) - -#ifdef _PROTOTYPES - extern int _isalnum(int); - extern int _isalpha(int); - extern int _iscntrl(int); - extern int _isdigit(int); - extern int _isgraph(int); - extern int _islower(int); - extern int _isprint(int); - extern int _ispunct(int); - extern int _isspace(int); - extern int _isupper(int); - extern int _isxdigit(int); -# else /* not _PROTOTYPES */ - extern int _isalnum(); - extern int _isalpha(); - extern int _iscntrl(); - extern int _isdigit(); - extern int _isgraph(); - extern int _islower(); - extern int _isprint(); - extern int _ispunct(); - extern int _isspace(); - extern int _isupper(); - extern int _isxdigit(); -#endif /* _PROTOTYPES */ - - extern unsigned int *__SB_masks; - -#endif /* HPUX10_CTYPE_DECLARATIONS2_CHECK */ - - -#if defined( HPUX_CTYPE_MACROS_CHECK ) -: __SB_masks ? (int)__SB_masks[__alnum] & _ISCNTRL -# define isalpha(__c) (__SB_masks ? (int)__SB_masks[__c] & _IS - -#endif /* HPUX_CTYPE_MACROS_CHECK */ diff --git a/gcc/fixinc/tests/base/curses.h b/gcc/fixinc/tests/base/curses.h deleted file mode 100644 index ba2db24..0000000 --- a/gcc/fixinc/tests/base/curses.h +++ /dev/null @@ -1,42 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/curses.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( AVOID_BOOL_DEFINE_CHECK ) -#ifndef __cplusplus -# define bool char -#endif - -#endif /* AVOID_BOOL_DEFINE_CHECK */ - - -#if defined( AVOID_BOOL_TYPE_CHECK ) -#ifndef __cplusplus -typedef unsigned int bool ; -#endif /* bool - type */ -#endif /* AVOID_BOOL_TYPE_CHECK */ - - -#if defined( BAD_STRUCT_TERM_CHECK ) -struct term; -#endif /* BAD_STRUCT_TERM_CHECK */ - - -#if defined( LYNX_VOID_INT_CHECK ) -/* curses foiled again */ -#endif /* LYNX_VOID_INT_CHECK */ - - -#if defined( VOID_NULL_CHECK ) -#ifndef NULL -#define NULL 0 /* typed NULL */ -#endif -#endif /* VOID_NULL_CHECK */ diff --git a/gcc/fixinc/tests/base/fcntl.h b/gcc/fixinc/tests/base/fcntl.h deleted file mode 100644 index ad6c8c9..0000000 --- a/gcc/fixinc/tests/base/fcntl.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/fcntl.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( LYNXOS_FCNTL_PROTO_CHECK ) -extern int fcntl(int, int, ...); -#endif /* LYNXOS_FCNTL_PROTO_CHECK */ diff --git a/gcc/fixinc/tests/base/fixinc-test-limits.h b/gcc/fixinc/tests/base/fixinc-test-limits.h deleted file mode 100644 index 0422d09..0000000 --- a/gcc/fixinc/tests/base/fixinc-test-limits.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/fixinc-test-limits.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HPUX10_CPP_POW_INLINE_CHECK ) - -#endif /* HPUX10_CPP_POW_INLINE_CHECK */ - - -#if defined( IRIX_LIMITS_CONST_CHECK ) -extern __const char limit; /* test limits */ -#endif /* IRIX_LIMITS_CONST_CHECK */ diff --git a/gcc/fixinc/tests/base/fs/rfs/rf_cache.h b/gcc/fixinc/tests/base/fs/rfs/rf_cache.h deleted file mode 100644 index 45fec63..0000000 --- a/gcc/fixinc/tests/base/fs/rfs/rf_cache.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/fs/rfs/rf_cache.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef FIXINC_WRAP_FS_RFS_RF_CACHE_H_SVR4_KRNL -#define FIXINC_WRAP_FS_RFS_RF_CACHE_H_SVR4_KRNL 1 - -#ifdef _KERNEL - - -#if defined( SVR4_KRNL_CHECK ) - -#endif /* SVR4_KRNL_CHECK */ -#endif /* _KERNEL */ - -#endif /* FIXINC_WRAP_FS_RFS_RF_CACHE_H_SVR4_KRNL */ diff --git a/gcc/fixinc/tests/base/hsfs/hsfs_spec.h b/gcc/fixinc/tests/base/hsfs/hsfs_spec.h deleted file mode 100644 index 2c67852..0000000 --- a/gcc/fixinc/tests/base/hsfs/hsfs_spec.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/hsfs/hsfs_spec.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SUN_BOGUS_IFDEF_CHECK ) -#if __i386__ || __vax__ || __sun4c__ -#endif /* SUN_BOGUS_IFDEF_CHECK */ diff --git a/gcc/fixinc/tests/base/internal/math_core.h b/gcc/fixinc/tests/base/internal/math_core.h deleted file mode 100644 index f39ac3f..0000000 --- a/gcc/fixinc/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/gcc/fixinc/tests/base/internal/sgimacros.h b/gcc/fixinc/tests/base/internal/sgimacros.h deleted file mode 100644 index a491e865..0000000 --- a/gcc/fixinc/tests/base/internal/sgimacros.h +++ /dev/null @@ -1,17 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/internal/sgimacros.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 */ diff --git a/gcc/fixinc/tests/base/internal/wchar_core.h b/gcc/fixinc/tests/base/internal/wchar_core.h deleted file mode 100644 index 5b358a3..0000000 --- a/gcc/fixinc/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/gcc/fixinc/tests/base/inttypes.h b/gcc/fixinc/tests/base/inttypes.h deleted file mode 100644 index 06d7ebd..0000000 --- a/gcc/fixinc/tests/base/inttypes.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/inttypes.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HPUX11_UINT32_C_CHECK ) -#define CONCAT_U__(__c) __CONCAT__(__c,u) -#define UINT32_C(__c) __CONCAT__(__c,ul) -#endif /* HPUX11_UINT32_C_CHECK */ diff --git a/gcc/fixinc/tests/base/io-quotes-def-1.h b/gcc/fixinc/tests/base/io-quotes-def-1.h deleted file mode 100644 index 383ff08..0000000 --- a/gcc/fixinc/tests/base/io-quotes-def-1.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/io-quotes-def-1.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IO_QUOTES_DEF_CHECK_1 ) -#define XX_IO(x) (x<<8|256) -#endif /* IO_QUOTES_DEF_CHECK_1 */ diff --git a/gcc/fixinc/tests/base/locale.h b/gcc/fixinc/tests/base/locale.h deleted file mode 100644 index 3b079e5..0000000 --- a/gcc/fixinc/tests/base/locale.h +++ /dev/null @@ -1,20 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/locale.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef FIXINC_WRAP_LOCALE_H_ULTRIX_LOCALE -#define FIXINC_WRAP_LOCALE_H_ULTRIX_LOCALE 1 - - - -#if defined( ULTRIX_LOCALE_CHECK ) -@(#)locale.h 6.1 (ULTRIX) - -#endif /* ULTRIX_LOCALE_CHECK */ - -#endif /* FIXINC_WRAP_LOCALE_H_ULTRIX_LOCALE */ diff --git a/gcc/fixinc/tests/base/mach-o/dyld.h b/gcc/fixinc/tests/base/mach-o/dyld.h deleted file mode 100644 index c062031..0000000 --- a/gcc/fixinc/tests/base/mach-o/dyld.h +++ /dev/null @@ -1,17 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/mach-o/dyld.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( DARWIN_PRIVATE_EXTERN_CHECK ) -extern int _dyld_func_lookup( -const char *dyld_func_name, -unsigned long *address); - -#endif /* DARWIN_PRIVATE_EXTERN_CHECK */ diff --git a/gcc/fixinc/tests/base/machine/cpu.h b/gcc/fixinc/tests/base/machine/cpu.h deleted file mode 100644 index 5662d29..0000000 --- a/gcc/fixinc/tests/base/machine/cpu.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/machine/cpu.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ULTRIX_STATIC_CHECK ) -struct tlb_pid_state { -#include <machine/r3_cpu.h> - -#endif /* ULTRIX_STATIC_CHECK */ diff --git a/gcc/fixinc/tests/base/malloc.h b/gcc/fixinc/tests/base/malloc.h deleted file mode 100644 index 3866af8..0000000 --- a/gcc/fixinc/tests/base/malloc.h +++ /dev/null @@ -1,18 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/malloc.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SUN_MALLOC_CHECK ) -typedef void * malloc_t; -void free(); -void* malloc(); -void* calloc(); -void* realloc(); -#endif /* SUN_MALLOC_CHECK */ diff --git a/gcc/fixinc/tests/base/math.h b/gcc/fixinc/tests/base/math.h deleted file mode 100644 index 52fa3f3..0000000 --- a/gcc/fixinc/tests/base/math.h +++ /dev/null @@ -1,135 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/math.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef FIXINC_WRAP_MATH_H_MATH_EXCEPTION -#define FIXINC_WRAP_MATH_H_MATH_EXCEPTION 1 - -#ifdef __cplusplus -#define exception __math_exception -#endif -#ifndef FIXINC_WRAP_MATH_H_EXCEPTION_STRUCTURE -#define FIXINC_WRAP_MATH_H_EXCEPTION_STRUCTURE 1 - -struct exception; - - -#if defined( BROKEN_CABS_CHECK ) -#ifdef __STDC__ - -#else - -#endif - - /* This is a comment - and it ends here. */ -#endif /* BROKEN_CABS_CHECK */ - - -#if defined( EXCEPTION_STRUCTURE_CHECK ) -extern int matherr(); -#endif /* EXCEPTION_STRUCTURE_CHECK */ - - -#if defined( HPUX11_CPP_POW_INLINE_CHECK ) - -#endif /* HPUX11_CPP_POW_INLINE_CHECK */ - - -#if defined( HPUX11_FABSF_CHECK ) -#ifdef _PA_RISC -#ifndef __cplusplus -# define fabsf(x) ((float)fabs((double)(float)(x))) -#endif -#endif -#endif /* HPUX11_FABSF_CHECK */ - - -#if defined( HPUX8_BOGUS_INLINES_CHECK ) -extern "C" int abs(int); - -#endif /* HPUX8_BOGUS_INLINES_CHECK */ - - -#if defined( ISC_FMOD_CHECK ) -extern double fmod(double, double); -#endif /* ISC_FMOD_CHECK */ - - -#if defined( MATH_EXCEPTION_CHECK ) -typedef struct exception t_math_exception; -#endif /* MATH_EXCEPTION_CHECK */ - - -#if defined( MATH_HUGE_VAL_FROM_DBL_MAX_CHECK ) - -#ifndef HUGE_VAL -#define HUGE_VAL 3.1415e+9 /* really big */ -#endif -#endif /* MATH_HUGE_VAL_FROM_DBL_MAX_CHECK */ - - -#if defined( MATH_HUGE_VAL_IFNDEF_CHECK ) -#ifndef HUGE_VAL -# define HUGE_VAL 3.4e+40 -#endif -#endif /* MATH_HUGE_VAL_IFNDEF_CHECK */ - - -#if defined( RS6000_DOUBLE_CHECK ) -#ifndef __cplusplus -extern int class(); -#endif -#endif /* RS6000_DOUBLE_CHECK */ - - -#if defined( SCO_MATH_CHECK ) -#define __fp_class(a) \ - __builtin_generic(a,"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify") - -#endif /* SCO_MATH_CHECK */ - - -#if defined( STRICT_ANSI_NOT_CTD_CHECK ) -#if 1 && \ -&& defined(mumbling) |& ( !defined(__STRICT_ANSI__)) \ -( !defined(__STRICT_ANSI__) && !defined(_XOPEN_SOURCE) \ -|| !defined(__STRICT_ANSI__) ) /* not std C */ -int foo; -#endif -#endif /* STRICT_ANSI_NOT_CTD_CHECK */ - - -#if defined( SVR4__P_CHECK ) -#ifndef __P -#define __P(a) a -#endif -#endif /* SVR4__P_CHECK */ - - -#if defined( ULTRIX_ATOF_PARAM_CHECK ) -extern double atof(const char *__nptr); - -#endif /* ULTRIX_ATOF_PARAM_CHECK */ - - -#if defined( WINDISS_MATH1_CHECK ) -#ifndef __GNUC__ -#endif /* WINDISS_MATH1_CHECK */ - - -#if defined( WINDISS_MATH2_CHECK ) -#endif /* __GNUC__ */ -#endif /* WINDISS_MATH2_CHECK */ - -#endif /* FIXINC_WRAP_MATH_H_EXCEPTION_STRUCTURE */ -#ifdef __cplusplus -#undef exception -#endif - -#endif /* FIXINC_WRAP_MATH_H_MATH_EXCEPTION */ diff --git a/gcc/fixinc/tests/base/netdnet/dnetdb.h b/gcc/fixinc/tests/base/netdnet/dnetdb.h deleted file mode 100644 index e506c6e..0000000 --- a/gcc/fixinc/tests/base/netdnet/dnetdb.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/netdnet/dnetdb.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( NODEENT_SYNTAX_CHECK ) -char *na_addr ; -#endif /* NODEENT_SYNTAX_CHECK */ diff --git a/gcc/fixinc/tests/base/netinet/ip.h b/gcc/fixinc/tests/base/netinet/ip.h deleted file mode 100644 index 7b29903..0000000 --- a/gcc/fixinc/tests/base/netinet/ip.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/netinet/ip.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( IP_MISSING_SEMI_CHECK ) -struct mumble { - union { - int x; - }; -}; /* mumbled struct */ - -#endif /* IP_MISSING_SEMI_CHECK */ diff --git a/gcc/fixinc/tests/base/obstack.h b/gcc/fixinc/tests/base/obstack.h deleted file mode 100644 index ea8e8dd..0000000 --- a/gcc/fixinc/tests/base/obstack.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/obstack.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( OBSTACK_LVALUE_CAST_CHECK ) -((*((void **) (h)->next_free) = (aptr)), ( (h)->next_free += sizeof (void *))) -#endif /* OBSTACK_LVALUE_CAST_CHECK */ diff --git a/gcc/fixinc/tests/base/pixrect/memvar.h b/gcc/fixinc/tests/base/pixrect/memvar.h deleted file mode 100644 index 19230cb..0000000 --- a/gcc/fixinc/tests/base/pixrect/memvar.h +++ /dev/null @@ -1,18 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/pixrect/memvar.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SUN_CATMACRO_CHECK ) -#ifdef __STDC__ -# define CAT(a,b) a##b -#else -#define CAT(a,b) a/**/b -#endif -#endif /* SUN_CATMACRO_CHECK */ diff --git a/gcc/fixinc/tests/base/pthread.h b/gcc/fixinc/tests/base/pthread.h deleted file mode 100644 index 385c055..0000000 --- a/gcc/fixinc/tests/base/pthread.h +++ /dev/null @@ -1,79 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/pthread.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( AIX_PTHREAD_CHECK ) -#define PTHREAD_MUTEX_INITIALIZER \ -{...init stuff...} -#endif /* AIX_PTHREAD_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( 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( PTHREAD_PAGE_SIZE_CHECK ) -extern int __page_size; -#endif /* PTHREAD_PAGE_SIZE_CHECK */ - - -#if defined( SOLARIS_MUTEX_INIT_1_CHECK ) -#ident "@(#)pthread.h 1.16 97/05/05 SMI" -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_MUTEX_INITIALIZER {{{0}, 0}, {{{0}}}, 0} -#else -#define PTHREAD_MUTEX_INITIALIZER {{{0}, 0}, {{{0}}}, {0}} -#endif -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_COND_INITIALIZER {{{0},0}, 0} /* */ -#else -#define PTHREAD_COND_INITIALIZER {{{0},0}, {0}} /* */ -#endif - -#endif /* SOLARIS_MUTEX_INIT_1_CHECK */ - - -#if defined( SOLARIS_MUTEX_INIT_2_CHECK ) -#ident "@(#)pthread.h 1.26 98/04/12 SMI" -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, 0} -#else -#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, {0}} -#endif -#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG) -#define PTHREAD_COND_INITIALIZER {{{0}, 0}, 0} /* DEFAULTCV */ -#else -#define PTHREAD_COND_INITIALIZER {{{0}, 0}, {0}} /* DEFAULTCV */ -#endif -#define PTHREAD_RWLOCK_INITIALIZER {0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}} -#endif /* SOLARIS_MUTEX_INIT_2_CHECK */ - - -#if defined( THREAD_KEYWORD_CHECK ) -extern int pthread_create (pthread_t *__restrict __thr, -extern int pthread_kill (pthread_t __thr, int __signo); -extern int pthread_cancel (pthread_t __thr); -#endif /* THREAD_KEYWORD_CHECK */ diff --git a/gcc/fixinc/tests/base/reg_types.h b/gcc/fixinc/tests/base/reg_types.h deleted file mode 100644 index 950dabb..0000000 --- a/gcc/fixinc/tests/base/reg_types.h +++ /dev/null @@ -1,20 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/reg_types.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( OSF_NAMESPACE_A_CHECK ) -typedef struct { - int stuff, mo_suff; -} __regex_t; -extern __regex_t re; -extern __regoff_t ro; -extern __regmatch_t rm; - -#endif /* OSF_NAMESPACE_A_CHECK */ diff --git a/gcc/fixinc/tests/base/regex.h b/gcc/fixinc/tests/base/regex.h deleted file mode 100644 index 304b790..0000000 --- a/gcc/fixinc/tests/base/regex.h +++ /dev/null @@ -1,17 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/regex.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( OSF_NAMESPACE_C_CHECK ) -#include <reg_types.h> -typedef __regex_t regex_t; -typedef __regoff_t regoff_t; -typedef __regmatch_t regmatch_t; -#endif /* OSF_NAMESPACE_C_CHECK */ diff --git a/gcc/fixinc/tests/base/regexp.h b/gcc/fixinc/tests/base/regexp.h deleted file mode 100644 index 35ec049..0000000 --- a/gcc/fixinc/tests/base/regexp.h +++ /dev/null @@ -1,18 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/regexp.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SVR4_UNDECLARED_GETRNGE_CHECK ) -static int size; -static int getrnge (); -/* stuff which calls getrnge() */ -static getrnge() -{} -#endif /* SVR4_UNDECLARED_GETRNGE_CHECK */ diff --git a/gcc/fixinc/tests/base/rpc/auth.h b/gcc/fixinc/tests/base/rpc/auth.h deleted file mode 100644 index 42ba847..0000000 --- a/gcc/fixinc/tests/base/rpc/auth.h +++ /dev/null @@ -1,26 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/rpc/auth.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( STRUCT_SOCKADDR_CHECK ) -struct sockaddr; -extern AUTH* authdes_create( struct sockaddr* ); -#endif /* STRUCT_SOCKADDR_CHECK */ - - -#if defined( SUN_AUTH_PROTO_CHECK ) -struct auth_t { -#ifdef __cplusplus - int (*name)(...); /* C++ bad */ -#else - int (*name)(); /* C++ bad */ -#endif -}; -#endif /* SUN_AUTH_PROTO_CHECK */ diff --git a/gcc/fixinc/tests/base/rpc/rpc.h b/gcc/fixinc/tests/base/rpc/rpc.h deleted file mode 100644 index 2e78478..0000000 --- a/gcc/fixinc/tests/base/rpc/rpc.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/rpc/rpc.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( NESTED_AUTH_DES_CHECK ) -/*#include <rpc/auth_des.h> */ /* skip this */ -#endif /* NESTED_AUTH_DES_CHECK */ diff --git a/gcc/fixinc/tests/base/rpc/svc.h b/gcc/fixinc/tests/base/rpc/svc.h deleted file mode 100644 index 4e1245f..0000000 --- a/gcc/fixinc/tests/base/rpc/svc.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/rpc/svc.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ULTRIX_NESTED_SVC_CHECK ) - * int protocol; */ /* like TCP or UDP - -#endif /* ULTRIX_NESTED_SVC_CHECK */ diff --git a/gcc/fixinc/tests/base/rpc/xdr.h b/gcc/fixinc/tests/base/rpc/xdr.h deleted file mode 100644 index 7b9f9ba..0000000 --- a/gcc/fixinc/tests/base/rpc/xdr.h +++ /dev/null @@ -1,25 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/rpc/xdr.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( RPC_XDR_LVALUE_CAST_A_CHECK ) -#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf)) -#endif /* RPC_XDR_LVALUE_CAST_A_CHECK */ - - -#if defined( RPC_XDR_LVALUE_CAST_B_CHECK ) -#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v))) -#endif /* RPC_XDR_LVALUE_CAST_B_CHECK */ - - -#if defined( STRUCT_FILE_CHECK ) -struct __file_s; -extern void xdrstdio_create( struct __file_s* ); -#endif /* STRUCT_FILE_CHECK */ diff --git a/gcc/fixinc/tests/base/rpcsvc/rstat.h b/gcc/fixinc/tests/base/rpcsvc/rstat.h deleted file mode 100644 index 05dc65b..0000000 --- a/gcc/fixinc/tests/base/rpcsvc/rstat.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/rpcsvc/rstat.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( STATSSWTCH_CHECK ) -struct statswtch { - int boottime; -}; -#endif /* STATSSWTCH_CHECK */ diff --git a/gcc/fixinc/tests/base/rpcsvc/rusers.h b/gcc/fixinc/tests/base/rpcsvc/rusers.h deleted file mode 100644 index 727c409..0000000 --- a/gcc/fixinc/tests/base/rpcsvc/rusers.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/rpcsvc/rusers.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SUN_RUSERS_SEMI_CHECK ) -struct mumble - int _cnt; -}; -#endif /* SUN_RUSERS_SEMI_CHECK */ diff --git a/gcc/fixinc/tests/base/sparc/asm_linkage.h b/gcc/fixinc/tests/base/sparc/asm_linkage.h deleted file mode 100644 index 5690f77..0000000 --- a/gcc/fixinc/tests/base/sparc/asm_linkage.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sparc/asm_linkage.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( KANDR_CONCAT_CHECK ) -#define __CONCAT__(a,b) a##b -#endif /* KANDR_CONCAT_CHECK */ diff --git a/gcc/fixinc/tests/base/standards.h b/gcc/fixinc/tests/base/standards.h deleted file mode 100644 index fccf806..0000000 --- a/gcc/fixinc/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/gcc/fixinc/tests/base/stdio.h b/gcc/fixinc/tests/base/stdio.h deleted file mode 100644 index ea2c001..0000000 --- a/gcc/fixinc/tests/base/stdio.h +++ /dev/null @@ -1,109 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/stdio.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef FIXINC_WRAP_STDIO_H_STDIO_STDARG_H -#define FIXINC_WRAP_STDIO_H_STDIO_STDARG_H 1 - -#define __need___va_list -#include <stdarg.h> - - -#if defined( ALPHA_GETOPT_CHECK ) -extern int getopt(int, char *const[], const char *); -#endif /* ALPHA_GETOPT_CHECK */ - - -#if defined( BSD_STDIO_ATTRS_CONFLICT_CHECK ) -#define _BSD_STRING(_BSD_X) _BSD_STRINGX(_BSD_X) -#define _BSD_STRINGX(_BSD_X) #_BSD_X -int vfscanf(FILE *, const char *, __builtin_va_list) __asm__ (_BSD_STRING(__USER_LABEL_PREFIX__) "__svfscanf"); -#endif /* BSD_STDIO_ATTRS_CONFLICT_CHECK */ - - -#if defined( HPUX10_STDIO_DECLARATIONS_CHECK ) -# define _iob __iob - -#endif /* HPUX10_STDIO_DECLARATIONS_CHECK */ - - -#if defined( HPUX11_SNPRINTF_CHECK ) -extern int snprintf(char *, size_t, const char *, ...); -extern int snprintf(char *, _hpux_size_t, const char *, ...); -extern int snprintf(char *, _hpux_size_t, const char *, ...); -#endif /* HPUX11_SNPRINTF_CHECK */ - - -#if defined( HPUX11_VSNPRINTF_CHECK ) -extern int vsnprintf(char *, _hpux_size_t, const char *, __gnuc_va_list); -#endif /* HPUX11_VSNPRINTF_CHECK */ - - -#if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK ) -extern int printf( const char *, __gnuc_va_list ); -#endif /* IRIX_STDIO_DUMMY_VA_LIST_CHECK */ - - -#if defined( ISC_OMITS_WITH_STDC_CHECK ) -#if !defined(_POSIX_SOURCE) /* ? ! */ -int foo; -#endif -#endif /* ISC_OMITS_WITH_STDC_CHECK */ - - -#if defined( READ_RET_TYPE_CHECK ) -extern unsigned int fread(), fwrite(); -extern int fclose(), fflush(), foo(); -#endif /* READ_RET_TYPE_CHECK */ - - -#if defined( RS6000_PARAM_CHECK ) -extern int rename(const char *_old, const char *_new); -#endif /* RS6000_PARAM_CHECK */ - - -#if defined( STDIO_STDARG_H_CHECK ) - -#endif /* STDIO_STDARG_H_CHECK */ - - -#if defined( STDIO_DUMMY_VA_LIST_CHECK ) -extern void mumble( __gnuc_va_list); -#endif /* STDIO_DUMMY_VA_LIST_CHECK */ - - -#if defined( ULTRIX_CONST_CHECK ) -extern void perror( const char *__s ); -extern int fputs( const char *__s, FILE *); -extern size_t fwrite( const void *__ptr, size_t, size_t, FILE *); -extern int fscanf( FILE *__stream, const char *__format, ...); -extern int scanf( const char *__format, ...); - -#endif /* ULTRIX_CONST_CHECK */ - - -#if defined( ULTRIX_CONST2_CHECK ) -extern FILE *fopen( const char *__filename, const char *__type ); -extern int sscanf( const char *__s, const char *__format, ...); -extern FILE *popen( const char *, const char *); -extern char *tempnam( const char *, const char *); - -#endif /* ULTRIX_CONST2_CHECK */ - - -#if defined( ULTRIX_CONST3_CHECK ) -extern FILE * fdopen( int __filedes, const char *__type ); - -#endif /* ULTRIX_CONST3_CHECK */ - - -#if defined( UNICOSMK_RESTRICT_CHECK ) -void f (char * __restrict__ x); -#endif /* UNICOSMK_RESTRICT_CHECK */ - -#endif /* FIXINC_WRAP_STDIO_H_STDIO_STDARG_H */ diff --git a/gcc/fixinc/tests/base/stdio_tag.h b/gcc/fixinc/tests/base/stdio_tag.h deleted file mode 100644 index 788de24..0000000 --- a/gcc/fixinc/tests/base/stdio_tag.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/stdio_tag.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SOLARIS_STDIO_TAG_CHECK ) -#if 0 -#endif /* SOLARIS_STDIO_TAG_CHECK */ diff --git a/gcc/fixinc/tests/base/stdlib.h b/gcc/fixinc/tests/base/stdlib.h deleted file mode 100644 index 0e1e59c..0000000 --- a/gcc/fixinc/tests/base/stdlib.h +++ /dev/null @@ -1,66 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/stdlib.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HPUX11_ABS_CHECK ) -#if !defined(_MATH_INCLUDED) || defined(__GNUG__) -#endif /* HPUX11_ABS_CHECK */ - - -#if defined( HPUX_LONG_DOUBLE_CHECK ) -extern long double strtold(const char *, char **); - -#endif /* HPUX_LONG_DOUBLE_CHECK */ - - -#if defined( INT_ABORT_FREE_AND_EXIT_CHECK ) -extern void abort(int); -extern void free(void*); -extern void exit(void*); -#endif /* INT_ABORT_FREE_AND_EXIT_CHECK */ - - -#if defined( SVR4_GETCWD_CHECK ) -extern char* getcwd(char *, size_t); -#endif /* SVR4_GETCWD_CHECK */ - - -#if defined( SVR4_PROFIL_CHECK ) -profil(unsigned short *, size_t, int, unsigned int); -#endif /* SVR4_PROFIL_CHECK */ - - -#if defined( SYSZ_STDLIB_FOR_SUN_CHECK ) -extern void * calloc(size_t); -extern void * malloc(size_t); -extern void * realloc(void*,size_t); -extern void * bsearch(void*,size_t,size_t); - -#endif /* SYSZ_STDLIB_FOR_SUN_CHECK */ - - -#if defined( ULTRIX_ATEXIT_PARAM_CHECK ) -int atexit( void (*__func)( void ) ); - -#endif /* ULTRIX_ATEXIT_PARAM_CHECK */ - - -#if defined( ULTRIX_STDLIB_CHECK ) -@(#)stdlib.h 6.1 (ULTRIX) -char * getenv( const char *__name ); -int setenv( const char *__name, const char *__val, int __ovrwrt ); -void unsetenv( const char *__name ); -int putenv( char *__s ); -char *getenv(); -int setenv(); -void unsetenv(); -int putenv(); - -#endif /* ULTRIX_STDLIB_CHECK */ diff --git a/gcc/fixinc/tests/base/string.h b/gcc/fixinc/tests/base/string.h deleted file mode 100644 index d70f9e0..0000000 --- a/gcc/fixinc/tests/base/string.h +++ /dev/null @@ -1,13 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/string.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef _STRING_INCLUDED - #define _STRING_INCLUDED - #include <strings.h> -#endif /* _STRING_INCLUDED */
\ No newline at end of file diff --git a/gcc/fixinc/tests/base/strings.h b/gcc/fixinc/tests/base/strings.h deleted file mode 100644 index f17d3f8..0000000 --- a/gcc/fixinc/tests/base/strings.h +++ /dev/null @@ -1,40 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/strings.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef FIXINC_WRAP_STRINGS_H_ULTRIX_STRINGS -#define FIXINC_WRAP_STRINGS_H_ULTRIX_STRINGS 1 - - - -#if defined( SUNOS_STRLEN_CHECK ) - __SIZE_TYPE__ strlen(); /* string length */ -#endif /* SUNOS_STRLEN_CHECK */ - - -#if defined( ULTRIX_STRINGS_CHECK ) -@(#)strings.h 6.1 (ULTRIX) - -#endif /* ULTRIX_STRINGS_CHECK */ - - -#if defined( ULTRIX_STRINGS2_CHECK ) -@(#)strings.h 6.1 (ULTRIX) - strncmp( const char *__s1, const char *__s2, size_t __n ); - -extern int - strcasecmp( const char *__s1, const char *__s2), - strncasecmp( const char *__s1, const char *__s2, size_t __n ); - strncmp(); -extern int - strcasecmp(), - strncasecmp(); - -#endif /* ULTRIX_STRINGS2_CHECK */ - -#endif /* FIXINC_WRAP_STRINGS_H_ULTRIX_STRINGS */ diff --git a/gcc/fixinc/tests/base/sundev/vuid_event.h b/gcc/fixinc/tests/base/sundev/vuid_event.h deleted file mode 100644 index 0f35cb8..0000000 --- a/gcc/fixinc/tests/base/sundev/vuid_event.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sundev/vuid_event.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( BADQUOTE_CHECK ) -/* does not have matched single quotes */ -#endif /* BADQUOTE_CHECK */ diff --git a/gcc/fixinc/tests/base/sunwindow/win_lock.h b/gcc/fixinc/tests/base/sunwindow/win_lock.h deleted file mode 100644 index 8cd0b19..0000000 --- a/gcc/fixinc/tests/base/sunwindow/win_lock.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sunwindow/win_lock.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ECD_CURSOR_CHECK ) -#ifdef ecd_cursor -#error bogus -#endif /* ecd+cursor */ -#endif /* ECD_CURSOR_CHECK */ diff --git a/gcc/fixinc/tests/base/sym.h b/gcc/fixinc/tests/base/sym.h deleted file mode 100644 index 0c811a3..0000000 --- a/gcc/fixinc/tests/base/sym.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sym.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ALPHA_PARENS_CHECK ) -#ifndef __mips64 /* bogus */ -extern int foo; -#endif -#endif /* ALPHA_PARENS_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/asm.h b/gcc/fixinc/tests/base/sys/asm.h deleted file mode 100644 index 658830a..0000000 --- a/gcc/fixinc/tests/base/sys/asm.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/asm.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 */ diff --git a/gcc/fixinc/tests/base/sys/cdefs.h b/gcc/fixinc/tests/base/sys/cdefs.h deleted file mode 100644 index 8d95282..0000000 --- a/gcc/fixinc/tests/base/sys/cdefs.h +++ /dev/null @@ -1,19 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/cdefs.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( FREEBSD_GCC3_BREAKAGE_CHECK ) -#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3 -#endif /* FREEBSD_GCC3_BREAKAGE_CHECK */ - - -#if defined( NETBSD_EXTRA_SEMICOLON_CHECK ) -#define __END_DECLS } -#endif /* NETBSD_EXTRA_SEMICOLON_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/file.h b/gcc/fixinc/tests/base/sys/file.h deleted file mode 100644 index c5016a4..0000000 --- a/gcc/fixinc/tests/base/sys/file.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/file.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HP_SYSFILE_CHECK ) -extern void foo(struct file *, ...); /* HPUX_SOURCE - bad varargs */ -#endif /* HP_SYSFILE_CHECK */ - - -#if defined( ULTRIX_IFDEF_CHECK ) -#if defined(KERNEL) && defined( mumbojumbo ) -int oops; -#endif -#endif /* ULTRIX_IFDEF_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/ioctl.h b/gcc/fixinc/tests/base/sys/ioctl.h deleted file mode 100644 index 8e260a5..0000000 --- a/gcc/fixinc/tests/base/sys/ioctl.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/ioctl.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ULTRIX_NESTED_IOCTL_CHECK ) -/* #define SIOCSCREENON _IOWR('i', 49, int)*//* screend, net/gw_screen.h */ - -#endif /* ULTRIX_NESTED_IOCTL_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/limits.h b/gcc/fixinc/tests/base/sys/limits.h deleted file mode 100644 index cd8ba2a..0000000 --- a/gcc/fixinc/tests/base/sys/limits.h +++ /dev/null @@ -1,36 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/limits.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( LIMITS_IFNDEFS_CHECK ) -#ifndef DBL_DIG - # define DBL_DIG 0 /* somthin' */ -#endif -#endif /* LIMITS_IFNDEFS_CHECK */ - - -#if defined( NESTED_MOTOROLA_CHECK ) -#undef PIPE_BUF /* max # bytes atomic in write to a */ - /* PIPE */ -/*#define HUGE_VAL 3.9e+9 */ /*error value returned by Math lib*/ -#endif /* NESTED_MOTOROLA_CHECK */ - - -#if defined( NESTED_SYS_LIMITS_CHECK ) -/* -#define CHILD_MAX 20 Max, Max, ... */ /* -#define OPEN_MAX 20 Max, Max, ... */ - -#endif /* NESTED_SYS_LIMITS_CHECK */ - - -#if defined( ULTRIX_MATH_IFDEF_CHECK ) -#if defined(__GFLOAT) -#endif /* ULTRIX_MATH_IFDEF_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/machine.h b/gcc/fixinc/tests/base/sys/machine.h deleted file mode 100644 index a037413..0000000 --- a/gcc/fixinc/tests/base/sys/machine.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/machine.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( AIX_SYSMACHINE_CHECK ) -#define FOO bar \ - baz \ - bat -#endif /* AIX_SYSMACHINE_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/mman.h b/gcc/fixinc/tests/base/sys/mman.h deleted file mode 100644 index 8fa2fb1..0000000 --- a/gcc/fixinc/tests/base/sys/mman.h +++ /dev/null @@ -1,25 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/mman.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - -#ifndef FIXINC_WRAP_SYS_MMAN_H_CXX_UNREADY -#define FIXINC_WRAP_SYS_MMAN_H_CXX_UNREADY 1 - -#ifdef __cplusplus -extern "C" { -#endif - - -#if defined( CXX_UNREADY_CHECK ) -extern void* malloc( size_t ); -#endif /* CXX_UNREADY_CHECK */ -#ifdef __cplusplus -} -#endif - -#endif /* FIXINC_WRAP_SYS_MMAN_H_CXX_UNREADY */ diff --git a/gcc/fixinc/tests/base/sys/param.h b/gcc/fixinc/tests/base/sys/param.h deleted file mode 100644 index 4126924..0000000 --- a/gcc/fixinc/tests/base/sys/param.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/param.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HPUX_MAXINT_CHECK ) -#ifndef MAXINT -#define MAXINT 0x7FFFFFFF -#endif -#endif /* HPUX_MAXINT_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/regset.h b/gcc/fixinc/tests/base/sys/regset.h deleted file mode 100644 index 6723427..0000000 --- a/gcc/fixinc/tests/base/sys/regset.h +++ /dev/null @@ -1,26 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/regset.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SCO_REGSET_CHECK ) -union u_fps { - struct rsfpstate - { - int whatever; - } -}; -union _u_fps { - struct _rsfpstate - { - int whatever; - } -}; - -#endif /* SCO_REGSET_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/signal.h b/gcc/fixinc/tests/base/sys/signal.h deleted file mode 100644 index 7a9ecb1..0000000 --- a/gcc/fixinc/tests/base/sys/signal.h +++ /dev/null @@ -1,30 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/signal.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( AIX_VOLATILE_CHECK ) -typedef int sig_atomic_t; -#endif /* AIX_VOLATILE_CHECK */ - - -#if defined( SUN_SIGNAL_CHECK ) -#ifdef __cplusplus -void (*signal(...))(...); -#else -void (*signal())(); -#endif -#endif /* SUN_SIGNAL_CHECK */ - - -#if defined( SVR4_SIGHANDLER_TYPE_CHECK ) -#define SIG_DFL (void (*)(int))0 -#define SIG_IGN (void (*)(int))0 - -#endif /* SVR4_SIGHANDLER_TYPE_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/socket.h b/gcc/fixinc/tests/base/sys/socket.h deleted file mode 100644 index 0898ed0..0000000 --- a/gcc/fixinc/tests/base/sys/socket.h +++ /dev/null @@ -1,26 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/socket.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#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 */ - - -#if defined( SOLARIS_SOCKET_CHECK ) -#ident "@(#)socket.h 1.30 97/01/20 SMI" -extern int recv(int, void *, int, int); -extern int send(int, const void *, int, int); -#endif /* SOLARIS_SOCKET_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/spinlock.h b/gcc/fixinc/tests/base/sys/spinlock.h deleted file mode 100644 index a25f650..0000000 --- a/gcc/fixinc/tests/base/sys/spinlock.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/spinlock.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HP_INLINE_CHECK ) - # include <machine/mumble.h> -#endif /* HP_INLINE_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/stat.h b/gcc/fixinc/tests/base/sys/stat.h deleted file mode 100644 index c2b2fb6..0000000 --- a/gcc/fixinc/tests/base/sys/stat.h +++ /dev/null @@ -1,68 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/stat.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK ) -# if defined(__DECC) || defined(__PRAGMA_EXTERN_PREFIX) -#endif /* ALPHA___EXTERN_PREFIX_SYS_STAT_CHECK */ - - -#if defined( RS6000_FCHMOD_CHECK ) -extern int fchmod(int, mode_t); -#endif /* RS6000_FCHMOD_CHECK */ - - -#if defined( SCO_STATIC_FUNC_CHECK ) -#ifdef __STDC__ -#if __cplusplus -extern "C" { -#endif /* __cplusplus */ -static int stat(const char *__f, struct stat *__p) { - return __stat32(__f, __p); -} -#if __cplusplus - } -#endif /* __cplusplus */ - -# else /* !__STDC__ THIS FAILS ON BSD SYSTEMS */ -#if __cplusplus -extern "C" { -#endif /* __cplusplus */ -static int stat(__f, __p) - char *__f; - struct stat *__p; -{ - return __stat32(__f, __p); -} -#if __cplusplus - } -#endif /* __cplusplus */ -#endif -#endif /* SCO_STATIC_FUNC_CHECK */ - - -#if defined( ULTRIX_STAT_CHECK ) -@(#)stat.h 6.1 (ULTRIX) -#define S_IFPORT S_IFIFO - -/* macro to test for symbolic link */ -#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) - - fstat(), - lstat(), -/* THE INSERTION LINE FAILS ON BSD SYSTEMS */ -#endif /* ULTRIX_STAT_CHECK */ - - -#if defined( VXWORKS_NEEDS_VXWORKS_CHECK ) -#include </dev/null> /* ULONG */ -# define __INCstath <sys/stat.h> -#include <types/vxTypesOld.h> -#endif /* VXWORKS_NEEDS_VXWORKS_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/time.h b/gcc/fixinc/tests/base/sys/time.h deleted file mode 100644 index f009f7e..0000000 --- a/gcc/fixinc/tests/base/sys/time.h +++ /dev/null @@ -1,41 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/time.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( HPUX_SYSTIME_CHECK ) -struct sigevent; -#endif /* HPUX_SYSTIME_CHECK */ - - -#if defined( ULTRIX_SYS_TIME_CHECK ) -@(#)time.h 6.1 (ULTRIX) -extern time_t time( time_t *__tloc ); - -extern int adjtime(struct timeval *, struct timeval *); -extern int getitimer(int, struct itimerval *); -extern int setitimer(int, struct itimerval *, struct itimerval *); -extern int gettimeofday(struct timeval *, struct timezone *); -extern int settimeofday(struct timeval *, struct timezone *); -extern void profil(const void *, size_t, size_t, unsigned int); -extern int stime(const time_t *); -extern int utimes(const char *, const struct timeval[2]); -extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -extern double difftime(); -extern int adjtime(); -extern int getitimer(); -extern int setitimer(); -extern int gettimeofday(); -extern int settimeofday(); -extern void profil(); -extern int stime(); -extern int utimes(); -extern int select(); - -#endif /* ULTRIX_SYS_TIME_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/times.h b/gcc/fixinc/tests/base/sys/times.h deleted file mode 100644 index 2de7d78..0000000 --- a/gcc/fixinc/tests/base/sys/times.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/times.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SCO_UTIME_CHECK ) -extern int utime(const char *, const struct utimbuf *); -#endif /* SCO_UTIME_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/types.h b/gcc/fixinc/tests/base/sys/types.h deleted file mode 100644 index 683b5e9..0000000 --- a/gcc/fixinc/tests/base/sys/types.h +++ /dev/null @@ -1,30 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/types.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( GNU_TYPES_CHECK ) -#if !defined(_GCC_PTRDIFF_T) -#define _GCC_PTRDIFF_T -typedef __PTRDIFF_TYPE__ ptrdiff_t; -#endif - /* long int */ -#if !defined(_GCC_SIZE_T) -#define _GCC_SIZE_T -typedef __SIZE_TYPE__ size_t; -#endif - /* uint_t */ -#ifndef __cplusplus -#if !defined(_GCC_WCHAR_T) && ! defined(__cplusplus) -#define _GCC_WCHAR_T -typedef __WCHAR_TYPE__ wchar_t; -#endif - -#endif /* ushort_t */ -#endif /* GNU_TYPES_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/utsname.h b/gcc/fixinc/tests/base/sys/utsname.h deleted file mode 100644 index 5f06415..0000000 --- a/gcc/fixinc/tests/base/sys/utsname.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/utsname.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ULTRIX_FIX_FIXPROTO_CHECK ) -/* ULTRIX's uname */ -struct utsname; -extern int uname(); -#endif /* ULTRIX_FIX_FIXPROTO_CHECK */ diff --git a/gcc/fixinc/tests/base/sys/wait.h b/gcc/fixinc/tests/base/sys/wait.h deleted file mode 100644 index a0311c6..0000000 --- a/gcc/fixinc/tests/base/sys/wait.h +++ /dev/null @@ -1,27 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/sys/wait.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( AIX_SYSWAIT_CHECK ) -/* bos325, */ -struct rusage; -extern pid_t wait3(); - /* pid_t wait3(int *, int, struct rusage *); */ -#endif /* AIX_SYSWAIT_CHECK */ - - -#if defined( AIX_SYSWAIT_2_CHECK ) -#define WSTOPSIG(__x) (int)(WIFSTOPPED(__x) ? (int)((((unsigned int)__x) >> 8) & 0xff) : -1) -#endif /* AIX_SYSWAIT_2_CHECK */ - - -#if defined( NEXT_WAIT_UNION_CHECK ) -extern pid_d wait(void*); -#endif /* NEXT_WAIT_UNION_CHECK */ diff --git a/gcc/fixinc/tests/base/testing.h b/gcc/fixinc/tests/base/testing.h deleted file mode 100644 index 0530cdf..0000000 --- a/gcc/fixinc/tests/base/testing.h +++ /dev/null @@ -1,145 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/testing.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#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 ; -#endif /* wchar_t - type */ -#endif /* AVOID_WCHAR_T_TYPE_CHECK */ - - -#if defined( CTRL_QUOTES_DEF_CHECK ) -#define BSD43_CTRL(n, x) ((n<<8)+x) - -#endif /* CTRL_QUOTES_DEF_CHECK */ - - -#if defined( CTRL_QUOTES_USE_CHECK ) -#define TCTRLFOO BSD43_CTRL('T', 1) -#endif /* CTRL_QUOTES_USE_CHECK */ - - -#if defined( DJGPP_WCHAR_H_CHECK ) -#include <stddef.h> -#include <sys/djtypes.h> -extern __DJ_wint_t x; - -#endif /* DJGPP_WCHAR_H_CHECK */ - - -#if defined( HPUX11_SIZE_T_CHECK ) -#define _hpux_size_t size_t - extern int getpwuid_r( char *, _hpux_size_t, struct passwd **); - -#endif /* HPUX11_SIZE_T_CHECK */ - - -#if defined( IO_QUOTES_DEF_CHECK ) -#define BSD43__IOWR(n, x) ((n<<8)+x) -#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IO(x,y) (x<<8|y) -#endif /* IO_QUOTES_DEF_CHECK */ - - -#if defined( IO_QUOTES_USE_CHECK ) -#define TIOCFOO BSD43__IOWR('T', 1) -#define TIOCFOO \ -BSD43__IOWR('T', 1) /* Some are multi-line */ -#endif /* IO_QUOTES_USE_CHECK */ - - -#if defined( LIBC1_IFDEFD_MEMX_CHECK ) -/* Copy N bytes of SRC to DEST. */ -extern __ptr_t memcpy __P ((__ptr_t __dest, __const __ptr_t __src, - size_t __n)); -#endif /* LIBC1_IFDEFD_MEMX_CHECK */ - - -#if defined( MACHINE_ANSI_H_VA_LIST_CHECK ) - # define _BSD_VA_LIST_ __builtin_va_list -#endif /* MACHINE_ANSI_H_VA_LIST_CHECK */ - - -#if defined( MACHINE_NAME_CHECK ) -/* MACH_DIFF: */ -#if defined( i386 ) || defined( sparc ) || defined( vax ) -/* no uniform test, so be careful :-) */ -#endif /* MACHINE_NAME_CHECK */ - - -#if defined( STRICT_ANSI_NOT_CHECK ) -#if !defined(__STRICT_ANSI__) -#if !defined(__STRICT_ANSI__) -#if !defined(__STRICT_ANSI__) -#if !defined(__STRICT_ANSI__)/* not std C */ -int foo; - -#end-end-end-end-if :-) -#endif /* STRICT_ANSI_NOT_CHECK */ - - -#if defined( STRICT_ANSI_ONLY_CHECK ) -#if defined(__STRICT_ANSI__) /* is std C - */ -int foo; -#endif -#endif /* STRICT_ANSI_ONLY_CHECK */ - - -#if defined( SYSV68_STRING_CHECK ) -extern unsigned int strlen(); -extern int ffs(int); -extern void - *memccpy(), - memcpy(); -extern int - strcmp(), - strncmp(); -extern unsigned int - strlen(), - strspn(); -extern size_t - strlen(), strspn(); -#endif /* SYSV68_STRING_CHECK */ - - -#if defined( UNDEFINE_NULL_CHECK ) -#ifndef NULL -#define NULL 0UL -#endif -#ifndef NULL -#define NULL ((void*)0) -#endif - -#endif /* UNDEFINE_NULL_CHECK */ - - -#if defined( WINDISS_VALIST_CHECK ) -#include <stdarg.h> -#endif /* WINDISS_VALIST_CHECK */ diff --git a/gcc/fixinc/tests/base/time.h b/gcc/fixinc/tests/base/time.h deleted file mode 100644 index cf22e20..0000000 --- a/gcc/fixinc/tests/base/time.h +++ /dev/null @@ -1,27 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/time.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( VXWORKS_NEEDS_VXTYPES_CHECK ) -unsigned int _clocks_per_sec; -#endif /* VXWORKS_NEEDS_VXTYPES_CHECK */ - - -#if defined( VXWORKS_TIME_CHECK ) -#ifndef __gcc_VOIDFUNCPTR_defined -#ifdef __cplusplus -typedef void (*__gcc_VOIDFUNCPTR) (...); -#else -typedef void (*__gcc_VOIDFUNCPTR) (); -#endif -#define __gcc_VOIDFUNCPTR_defined -#endif -#define VOIDFUNCPTR __gcc_VOIDFUNCPTR -#endif /* VXWORKS_TIME_CHECK */ diff --git a/gcc/fixinc/tests/base/tinfo.h b/gcc/fixinc/tests/base/tinfo.h deleted file mode 100644 index 46bc611..0000000 --- a/gcc/fixinc/tests/base/tinfo.h +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/tinfo.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( TINFO_CPLUSPLUS_CHECK ) -#ifdef __cplusplus -int bogus; -#endif -#endif /* TINFO_CPLUSPLUS_CHECK */ diff --git a/gcc/fixinc/tests/base/types/vxTypesBase.h b/gcc/fixinc/tests/base/types/vxTypesBase.h deleted file mode 100644 index 76a9338..0000000 --- a/gcc/fixinc/tests/base/types/vxTypesBase.h +++ /dev/null @@ -1,30 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/types/vxTypesBase.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( VXWORKS_GCC_PROBLEM_CHECK ) -#if 1 -#ifndef _GCC_SIZE_T -#define _GCC_SIZE_T -typedef unsigned int size_t; -#endif -#ifndef _GCC_PTRDIFF_T -#define _GCC_PTRDIFF_T -typedef long ptrdiff_t; -#endif -#ifndef __cplusplus -#ifndef _GCC_WCHAR_T -#define _GCC_WCHAR_T -typedef unsigned short wchar_t; -#endif -#endif -#endif /* __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__ */ - -#endif /* VXWORKS_GCC_PROBLEM_CHECK */ diff --git a/gcc/fixinc/tests/base/unistd.h b/gcc/fixinc/tests/base/unistd.h deleted file mode 100644 index 98e8c34..0000000 --- a/gcc/fixinc/tests/base/unistd.h +++ /dev/null @@ -1,33 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/unistd.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ALPHA_SBRK_CHECK ) -extern void *sbrk(ptrdiff_t increment); -#endif /* ALPHA_SBRK_CHECK */ - - -#if defined( SOLARIS_UNISTD_CHECK ) -#ident "@(#)unistd.h 1.33 95/08/28 SMI" -extern int getpagesize(); -extern pid_t getpgid(pid_t); -extern int getpagesize(); -extern int getpgid(); -#endif /* SOLARIS_UNISTD_CHECK */ - - -#if defined( ULTRIX_UNISTD_CHECK ) -@(#)unistd.h 6.1 (ULTRIX) - getgroups(), - getpagesize(), - fork(), - vfork(), - -#endif /* ULTRIX_UNISTD_CHECK */ diff --git a/gcc/fixinc/tests/base/wchar.h b/gcc/fixinc/tests/base/wchar.h deleted file mode 100644 index 5c0b9df..0000000 --- a/gcc/fixinc/tests/base/wchar.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/wchar.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( ALPHA_WCHAR_CHECK ) -extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__("wcstok_r"); -extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__("__wcsftime_isoc"); -#endif /* ALPHA_WCHAR_CHECK */ diff --git a/gcc/fixinc/tests/base/widec.h b/gcc/fixinc/tests/base/widec.h deleted file mode 100644 index e3c17ff..0000000 --- a/gcc/fixinc/tests/base/widec.h +++ /dev/null @@ -1,15 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/widec.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( SOLARIS_WIDEC_CHECK ) -#include <euc.h> -#include <wchar.h> -#endif /* SOLARIS_WIDEC_CHECK */ diff --git a/gcc/mkfixinc.sh b/gcc/mkfixinc.sh new file mode 100755 index 0000000..509aa35 --- /dev/null +++ b/gcc/mkfixinc.sh @@ -0,0 +1,44 @@ +#! /bin/sh + +if [ $# -ne 2 ] +then + echo "Usage: $0 <build-mach-triplet> <target-mach-triplet>" + exit 1 +fi + +build=$1 +machine=$2 +target=fixinc.sh + +# Check for special fix rules for particular targets +case $machine in + alpha*-dec-*vms* | \ + arm-semi-aof | \ + hppa1.1-*-osf* | \ + hppa1.1-*-bsd* | \ + i370-*-openedition | \ + i?86-moss-msdos* | \ + i?86-*-moss* | \ + i?86-*-pe | \ + i?86-*-cygwin* | \ + i?86-*-mingw32* | \ + i?86-*-uwin* | \ + i?86-*-interix* | \ + powerpc-*-eabiaix* | \ + powerpc-*-eabisim* | \ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ + powerpcle-*-eabi* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} + ;; + + *) + ../${build_subdir}/fixincludes/fixincl -v < /dev/null + sed "s,@FIXINCL@,\${ORIGDIR}/../${build_subdir}/fixincludes/fixincl,g" \ + ${srcdir}/fixinc.in > ${target} + ;; +esac +chmod 755 ${target} |