-2004-08-26 Paolo Bonzini <bonzini@gnu.org>
+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.
+
+2004-08-30 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (bootstrap stages): Add 'lean' parameter.
* Makefile.tpl (configure-stageN-*, all-stageN-*): Turned into
build_modules= { module= flex; };
build_modules= { module= m4; };
build_modules= { module= texinfo; };
+build_modules= { module= fixincludes;
+ extra_configure_args='--target=$(target)'; };
host_modules= { module= ash; };
host_modules= { module= autoconf; };
dependencies = { module=all-build-flex; on=all-build-m4; };
dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
dependencies = { module=all-build-m4; on=all-build-texinfo; };
+dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
// Host modules specific to gcc.
dependencies = { module=configure-gcc; on=configure-intl; };
dependencies = { module=all-gcc; on=all-build-bison; };
dependencies = { module=all-gcc; on=all-build-byacc; };
dependencies = { module=all-gcc; on=all-build-flex; };
+dependencies = { module=all-gcc; on=all-build-libiberty; };
+dependencies = { module=all-gcc; on=all-build-fixincludes; };
dependencies = { module=all-gcc; on=all-binutils; };
dependencies = { module=all-gcc; on=all-gas; };
dependencies = { module=all-gcc; on=all-ld; };
maybe-all-build-byacc \
maybe-all-build-flex \
maybe-all-build-m4 \
- maybe-all-build-texinfo
+ maybe-all-build-texinfo \
+ maybe-all-build-fixincludes
.PHONY: all-host
all-host: \
maybe-all-ash \
$(MAKE) $(TARGET-build-texinfo))
@endif build-texinfo
+.PHONY: configure-build-fixincludes maybe-configure-build-fixincludes
+maybe-configure-build-fixincludes:
+@if build-fixincludes
+maybe-configure-build-fixincludes: configure-build-fixincludes
+configure-build-fixincludes:
+ @test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/fixincludes; \
+ cd "$(BUILD_SUBDIR)/fixincludes" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/fixincludes "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/fixincludes"; \
+ libsrcdir="$$s/fixincludes"; \
+ fi; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)" \
+ || exit 1
+@endif build-fixincludes
+
+.PHONY: all-build-fixincludes maybe-all-build-fixincludes
+maybe-all-build-fixincludes:
+@if build-fixincludes
+TARGET-build-fixincludes=all
+maybe-all-build-fixincludes: all-build-fixincludes
+all-build-fixincludes: configure-build-fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/fixincludes && \
+ $(MAKE) $(TARGET-build-fixincludes))
+@endif build-fixincludes
+
# --------------------------------------
# Modules which run on the host machine
all-build-flex: maybe-all-build-m4
all-build-libiberty: maybe-all-build-texinfo
all-build-m4: maybe-all-build-texinfo
+all-build-fixincludes: maybe-all-build-libiberty
configure-gcc: maybe-configure-intl
configure-stage1-gcc: maybe-configure-stage1-intl
all-stageprofile-gcc: maybe-all-build-flex
all-stagefeedback-gcc: maybe-all-build-flex
all-prebootstrap: maybe-all-build-flex
+all-gcc: maybe-all-build-libiberty
+
+all-stage1-gcc: maybe-all-build-libiberty
+all-stage2-gcc: maybe-all-build-libiberty
+all-stage3-gcc: maybe-all-build-libiberty
+all-stage4-gcc: maybe-all-build-libiberty
+all-stageprofile-gcc: maybe-all-build-libiberty
+all-stagefeedback-gcc: maybe-all-build-libiberty
+all-prebootstrap: maybe-all-build-libiberty
+all-gcc: maybe-all-build-fixincludes
+
+all-stage1-gcc: maybe-all-build-fixincludes
+all-stage2-gcc: maybe-all-build-fixincludes
+all-stage3-gcc: maybe-all-build-fixincludes
+all-stage4-gcc: maybe-all-build-fixincludes
+all-stageprofile-gcc: maybe-all-build-fixincludes
+all-stagefeedback-gcc: maybe-all-build-fixincludes
+all-prebootstrap: maybe-all-build-fixincludes
all-gcc: maybe-all-binutils
all-stage1-gcc: maybe-all-stage1-binutils
build_libs="build-libiberty"
# these tools are built for the build environment
-build_tools="build-texinfo build-byacc build-flex build-bison build-m4"
+build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
# these libraries are used by various programs built for the host environment
#
## ${target_configdirs} is directories we build using the target tools.
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
-
-# Only make build libraries if build != host.
-if test ${host_alias} != ${build_alias} ; then
- build_configdirs=`echo ${build_libs} ${build_tools}`
-else
- build_configdirs=`echo ${build_tools}`
-fi
+build_configdirs=`echo ${build_libs} ${build_tools}`
################################################################################
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1795: checking for $ac_word" >&5
+echo "configure:1789: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1825: checking for $ac_word" >&5
+echo "configure:1819: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1876: checking for $ac_word" >&5
+echo "configure:1870: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1908: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cat > conftest.$ac_ext << EOF
-#line 1919 "configure"
+#line 1913 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1950: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1955: checking whether we are using GNU C" >&5
+echo "configure:1949: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1983: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1977: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2050: checking for $ac_word" >&5
+echo "configure:2044: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2082: checking for $ac_word" >&5
+echo "configure:2076: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
-echo "configure:2115: checking whether compiler driver understands Ada" >&5
+echo "configure:2109: checking whether compiler driver understands Ada" >&5
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
-echo "configure:2148: checking how to compare bootstrapped objects" >&5
+echo "configure:2142: checking how to compare bootstrapped objects" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
-echo "configure:2246: checking for correct version of gmp.h" >&5
+echo "configure:2240: checking for correct version of gmp.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2248 "configure"
+#line 2242 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
if test x"$have_gmp" = xyes; then
echo $ac_n "checking for MPFR""... $ac_c" 1>&6
-echo "configure:2272: checking for MPFR" >&5
+echo "configure:2266: checking for MPFR" >&5
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
cat > conftest.$ac_ext <<EOF
-#line 2277 "configure"
+#line 2271 "configure"
#include "confdefs.h"
#include <gmp.h>
#include <mpfr.h>
mpfr_t n; mpfr_init(n);
; return 0; }
EOF
-if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2769: checking for $ac_word" >&5
+echo "configure:2763: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2804: checking for $ac_word" >&5
+echo "configure:2798: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2839: checking for $ac_word" >&5
+echo "configure:2833: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2874: checking for $ac_word" >&5
+echo "configure:2868: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2909: checking for $ac_word" >&5
+echo "configure:2903: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2944: checking for $ac_word" >&5
+echo "configure:2938: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3578: checking for $ac_word" >&5
+echo "configure:3572: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3611: checking for $ac_word" >&5
+echo "configure:3605: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3650: checking for $ac_word" >&5
+echo "configure:3644: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3683: checking for $ac_word" >&5
+echo "configure:3677: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3722: checking for $ac_word" >&5
+echo "configure:3716: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3755: checking for $ac_word" >&5
+echo "configure:3749: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3794: checking for $ac_word" >&5
+echo "configure:3788: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3827: checking for $ac_word" >&5
+echo "configure:3821: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3866: checking for $ac_word" >&5
+echo "configure:3860: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3899: checking for $ac_word" >&5
+echo "configure:3893: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3938: checking for $ac_word" >&5
+echo "configure:3932: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3971: checking for $ac_word" >&5
+echo "configure:3965: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4010: checking for $ac_word" >&5
+echo "configure:4004: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4043: checking for $ac_word" >&5
+echo "configure:4037: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4082: checking for $ac_word" >&5
+echo "configure:4076: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4115: checking for $ac_word" >&5
+echo "configure:4109: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4154: checking for $ac_word" >&5
+echo "configure:4148: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4187: checking for $ac_word" >&5
+echo "configure:4181: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4233: checking for $ac_word" >&5
+echo "configure:4227: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4266: checking for $ac_word" >&5
+echo "configure:4260: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4305: checking for $ac_word" >&5
+echo "configure:4299: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4338: checking for $ac_word" >&5
+echo "configure:4332: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4377: checking for $ac_word" >&5
+echo "configure:4371: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4410: checking for $ac_word" >&5
+echo "configure:4404: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4449: checking for $ac_word" >&5
+echo "configure:4443: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4482: checking for $ac_word" >&5
+echo "configure:4476: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4521: checking for $ac_word" >&5
+echo "configure:4515: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4554: checking for $ac_word" >&5
+echo "configure:4548: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4593: checking for $ac_word" >&5
+echo "configure:4587: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4626: checking for $ac_word" >&5
+echo "configure:4620: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4665: checking for $ac_word" >&5
+echo "configure:4659: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4698: checking for $ac_word" >&5
+echo "configure:4692: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4783: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4777: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not
# possible, however, we can resort to mv.
echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
-echo "configure:4830: checking if symbolic links between directories work" >&5
+echo "configure:4824: checking if symbolic links between directories work" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
build_libs="build-libiberty"
# these tools are built for the build environment
-build_tools="build-texinfo build-byacc build-flex build-bison build-m4"
+build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
# these libraries are used by various programs built for the host environment
#
## ${target_configdirs} is directories we build using the target tools.
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
-
-# Only make build libraries if build != host.
-if test ${host_alias} != ${build_alias} ; then
- build_configdirs=`echo ${build_libs} ${build_tools}`
-else
- build_configdirs=`echo ${build_tools}`
-fi
+build_configdirs=`echo ${build_libs} ${build_tools}`
################################################################################
+2004-08-04 Paolo Bonzini <bonzini@gnu.org>
+
+ * gcc_update: Add fixincludes.
+
2004-08-26 Matthias Klose <doko@debian.org>
* texi2pod.pl: keep references of the form @ref{...}, print them bold.
* gcc_update (self): libjava/configure.in -> configure.ac. Automake
update done.
-2004-08-04 Paolo Bonzini <gcc@gcc.gnu.org>
+2004-08-04 Paolo Bonzini <bonzini@gnu.org>
* gcc_update: libjava/configure.ac -> configure.in. Automake
1.4 does not handle configure.ac properly.
# colon is stripped from the output.
files_and_dependencies () {
sed -e 's/ *#.*//' -e '/^$/d' -e 's/://' <<\EOF
+# fixincludes
+fixincludes/configure: fixincludes/configure.ac fixincludes/aclocal.m4
+fixincludes/config.h.in: fixincludes/configure.ac fixincludes/aclocal.m4
# intl library
intl/plural.c: intl/plural.y
intl/configure: intl/configure.ac intl/aclocal.m4
--- /dev/null
+autom4te.cache
--- /dev/null
+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.
--- /dev/null
+# Makefile for fixincludes.
+#
+# Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+#This file is part of fixincludes.
+
+#fixincludes 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.
+
+#fixincludes 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 fixincludes; see the file COPYING. If not, write to
+#the Free Software Foundation, 59 Temple Place - Suite 330,
+#Boston, MA 02111-1307, USA.
+
+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 >
+
+CC = @CC@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
+FIXINC_CFLAGS = -DHAVE_CONFIG_H $(INCLUDES)
+
+# Directory where sources are, from where we are.
+srcdir = @srcdir@
+VPATH = $(srcdir)
+
+# End of variables for you to override.
+
+default : all
+
+# Now figure out from those variables how to compile and link.
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(FIXINC_CFLAGS) $<
+
+# The only suffixes we want for implicit rules are .c and .o.
+.SUFFIXES:
+.SUFFIXES: .c .o
+
+#\f
+
+## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+##
+## Makefile for constructing the "best" include fixer we can
+##
+## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+LIBIBERTY=../libiberty/libiberty.a
+
+ALLOBJ = fixincl.o fixtests.o fixfixes.o server.o procopen.o \
+ fixlib.o
+
+TESTOBJ = fixincl.o fixlib.o fixtests.o
+FIXOBJ = fixfixes.o fixlib.o
+
+HDR = server.h fixlib.h
+FI = fixincl@EXEEXT@
+AF = applyfix@EXEEXT@
+
+all : @TARGET@
+gen : $(srcdir)/fixincl.x
+
+
+oneprocess : full-stamp
+twoprocess : test-stamp $(AF)
+
+full-stamp : $(ALLOBJ) $(LIBIBERTY)
+ $(CC) $(LDFLAGS) -o $(FI) $(ALLOBJ) $(LIBIBERTY)
+ $(STAMP) $@
+
+test-stamp : $(TESTOBJ) $(LIBIBERTY)
+ $(CC) $(LDFLAGS) -o $(FI) $(TESTOBJ) $(LIBIBERTY)
+ $(STAMP) $@
+
+$(AF): $(FIXOBJ) $(LIBIBERTY)
+ $(CC) $(LDFLAGS) -o $@ $(FIXOBJ) $(LIBIBERTY)
+
+$(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
+
+Makefile: $(srcdir)/Makefile.in config.status
+ $(SHELL) ./config.status Makefile
+
+config.h: stamp-h
+stamp-h: $(srcdir)/config.h.in config.status
+ $(SHELL) ./config.status config.h
+
+config.status: $(srcdir)/configure
+ $(SHELL) ./config.status --recheck
+
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
+ autoconf
+
+$(srcdir)/config.h.in: @MAINT@ $(srcdir)/configure.ac
+ autoheader
+
+$(srcdir)/aclocal.m4: @MAINT@ $(srcdir)/../gcc/aclocal.m4
+ cp $(srcdir)/../gcc/aclocal.m4 .
+
+check : all
+ autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
+ $(SHELL) ./check.sh $(srcdir)/tests/base
+ @rm -f ./check.sh
--- /dev/null
+
+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.
--- /dev/null
+sinclude(../config/acx.m4)
+sinclude(../config/accross.m4)
+sinclude(../config/gettext.m4)
+sinclude(../config/progtest.m4)
+
+dnl See whether we need a declaration for a function.
+dnl The result is highly dependent on the INCLUDES passed in, so make sure
+dnl to use a different cache variable name in this macro if it is invoked
+dnl in a different context somewhere else.
+dnl gcc_AC_CHECK_DECL(SYMBOL,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
+AC_DEFUN([gcc_AC_CHECK_DECL],
+[AC_MSG_CHECKING([whether $1 is declared])
+AC_CACHE_VAL(gcc_cv_have_decl_$1,
+[AC_TRY_COMPILE([$4],
+[#ifndef $1
+char *(*pfn) = (char *(*)) $1 ;
+#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
+ AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no) ; ifelse([$3], , :, [$3])
+fi
+])dnl
+
+dnl Check multiple functions to see whether each needs a declaration.
+dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
+dnl gcc_AC_CHECK_DECLS(SYMBOLS,
+dnl [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
+AC_DEFUN([gcc_AC_CHECK_DECLS],
+[AC_FOREACH([gcc_AC_Func], [$1],
+ [AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_[]gcc_AC_Func),
+ [Define to 1 if we found a declaration for ']gcc_AC_Func[', otherwise
+ define to 0.])])dnl
+for ac_func in $1
+do
+ ac_tr_decl=AS_TR_CPP([HAVE_DECL_$ac_func])
+gcc_AC_CHECK_DECL($ac_func,
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
+ [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
+dnl It is possible that the include files passed in here are local headers
+dnl which supply a backup declaration for the relevant prototype based on
+dnl the definition of (or lack of) the HAVE_DECL_ macro. If so, this test
+dnl will always return success. E.g. see libiberty.h's handling of
+dnl `basename'. To avoid this, we define the relevant HAVE_DECL_ macro to
+dnl 1 so that any local headers used do not provide their own prototype
+dnl during this test.
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+ $4
+)
+done
+])
+
+dnl 'make compare' can be significantly faster, if cmp itself can
+dnl skip bytes instead of using tail. The test being performed is
+dnl "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
+dnl but we need to sink errors and handle broken shells. We also test
+dnl for the parameter format "cmp file1 file2 skip1 skip2" which is
+dnl accepted by cmp on some systems.
+AC_DEFUN([gcc_AC_PROG_CMP_IGNORE_INITIAL],
+[AC_CACHE_CHECK([for cmp's capabilities], gcc_cv_prog_cmp_skip,
+[ echo abfoo >t1
+ echo cdfoo >t2
+ gcc_cv_prog_cmp_skip=slowcompare
+ if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
+ if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip=gnucompare
+ fi
+ fi
+ if test $gcc_cv_prog_cmp_skip = slowcompare ; then
+ if cmp t1 t2 2 2 > /dev/null 2>&1; then
+ if cmp t1 t2 1 1 > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_prog_cmp_skip=fastcompare
+ fi
+ fi
+ fi
+ rm t1 t2
+])
+make_compare_target=$gcc_cv_prog_cmp_skip
+AC_SUBST(make_compare_target)
+])
+
+dnl See if the printf functions in libc support %p in format strings.
+AC_DEFUN([gcc_AC_FUNC_PRINTF_PTR],
+[AC_CACHE_CHECK(whether the printf functions support %p,
+ gcc_cv_func_printf_ptr,
+[AC_TRY_RUN([#include <stdio.h>
+
+int main()
+{
+ char buf[64];
+ char *p = buf, *q = NULL;
+ sprintf(buf, "%p", p);
+ sscanf(buf, "%p", &q);
+ return (p != q);
+}], gcc_cv_func_printf_ptr=yes, gcc_cv_func_printf_ptr=no,
+ gcc_cv_func_printf_ptr=no)
+rm -f core core.* *.core])
+if test $gcc_cv_func_printf_ptr = yes ; then
+ AC_DEFINE(HAVE_PRINTF_PTR, 1, [Define if printf supports "%p".])
+fi
+])
+
+dnl See if symbolic links work and if not, try to substitute either hard links or simple copy.
+AC_DEFUN([gcc_AC_PROG_LN_S],
+[AC_MSG_CHECKING(whether ln -s works)
+AC_CACHE_VAL(gcc_cv_prog_LN_S,
+[rm -f conftestdata_t
+echo >conftestdata_f
+if ln -s conftestdata_f conftestdata_t 2>/dev/null
+then
+ gcc_cv_prog_LN_S="ln -s"
+else
+ if ln conftestdata_f conftestdata_t 2>/dev/null
+ then
+ gcc_cv_prog_LN_S=ln
+ else
+ gcc_cv_prog_LN_S=cp
+ fi
+fi
+rm -f conftestdata_f conftestdata_t
+])dnl
+LN_S="$gcc_cv_prog_LN_S"
+if test "$gcc_cv_prog_LN_S" = "ln -s"; then
+ AC_MSG_RESULT(yes)
+else
+ if test "$gcc_cv_prog_LN_S" = "ln"; then
+ AC_MSG_RESULT([no, using ln])
+ else
+ AC_MSG_RESULT([no, and neither does ln, so using cp])
+ fi
+fi
+AC_SUBST(LN_S)dnl
+])
+
+dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
+dnl of the usual 2.
+AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG],
+[AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_DIRECT_H
+# include <direct.h>
+#endif], [mkdir ("foo", 0);],
+ gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)])
+if test $gcc_cv_mkdir_takes_one_arg = yes ; then
+ AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.])
+fi
+])
+
+AC_DEFUN([gcc_AC_PROG_INSTALL],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+AC_MSG_CHECKING(for a BSD compatible install)
+if test -z "$INSTALL"; then
+AC_CACHE_VAL(ac_cv_path_install,
+[ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+])dnl
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+dnl We do special magic for INSTALL instead of AC_SUBST, to get
+dnl relative paths right.
+AC_MSG_RESULT($INSTALL)
+AC_SUBST(INSTALL)dnl
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+AC_SUBST(INSTALL_PROGRAM)dnl
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+AC_SUBST(INSTALL_DATA)dnl
+])
+
+dnl GCC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
+dnl like AC_PATH_PROG but use other cache variables
+AC_DEFUN([GCC_PATH_PROG],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(gcc_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ gcc_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ gcc_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="ifelse([$4], , $PATH, [$4])"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ gcc_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 3rd arg is given, leave the cache variable unset,
+dnl so GCC_PATH_PROGS will keep looking.
+ifelse([$3], , , [ test -z "[$]gcc_cv_path_$1" && gcc_cv_path_$1="$3"
+])dnl
+ ;;
+esac])dnl
+$1="$gcc_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# mmap(2) blacklisting. Some platforms provide the mmap library routine
+# but don't support all of the features we need from it.
+AC_DEFUN([gcc_AC_FUNC_MMAP_BLACKLIST],
+[
+AC_CHECK_HEADER([sys/mman.h],
+ [gcc_header_sys_mman_h=yes], [gcc_header_sys_mman_h=no])
+AC_CHECK_FUNC([mmap], [gcc_func_mmap=yes], [gcc_func_mmap=no])
+if test "$gcc_header_sys_mman_h" != yes \
+ || test "$gcc_func_mmap" != yes; then
+ gcc_cv_func_mmap_file=no
+ gcc_cv_func_mmap_dev_zero=no
+ gcc_cv_func_mmap_anon=no
+else
+ AC_CACHE_CHECK([whether read-only mmap of a plain file works],
+ gcc_cv_func_mmap_file,
+ [# Add a system to this blacklist if
+ # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
+ # memory area containing the same data that you'd get if you applied
+ # read() to the same fd. The only system known to have a problem here
+ # is VMS, where text files have record structure.
+ case "$host_os" in
+ vms* | ultrix*)
+ gcc_cv_func_mmap_file=no ;;
+ *)
+ gcc_cv_func_mmap_file=yes;;
+ esac])
+ AC_CACHE_CHECK([whether mmap from /dev/zero works],
+ gcc_cv_func_mmap_dev_zero,
+ [# Add a system to this blacklist if it has mmap() but /dev/zero
+ # does not exist, or if mmapping /dev/zero does not give anonymous
+ # zeroed pages with both the following properties:
+ # 1. If you map N consecutive pages in with one call, and then
+ # unmap any subset of those pages, the pages that were not
+ # explicitly unmapped remain accessible.
+ # 2. If you map two adjacent blocks of memory and then unmap them
+ # both at once, they must both go away.
+ # Systems known to be in this category are Windows (all variants),
+ # VMS, and Darwin.
+ case "$host_os" in
+ vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
+ gcc_cv_func_mmap_dev_zero=no ;;
+ *)
+ gcc_cv_func_mmap_dev_zero=yes;;
+ esac])
+
+ # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
+ AC_CACHE_CHECK([for MAP_ANON(YMOUS)], gcc_cv_decl_map_anon,
+ [AC_TRY_COMPILE(
+[#include <sys/types.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+],
+[int n = MAP_ANONYMOUS;],
+ gcc_cv_decl_map_anon=yes,
+ gcc_cv_decl_map_anon=no)])
+
+ if test $gcc_cv_decl_map_anon = no; then
+ gcc_cv_func_mmap_anon=no
+ else
+ AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works],
+ gcc_cv_func_mmap_anon,
+ [# Add a system to this blacklist if it has mmap() and MAP_ANON or
+ # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
+ # doesn't give anonymous zeroed pages with the same properties listed
+ # above for use of /dev/zero.
+ # Systems known to be in this category are Windows, VMS, and SCO Unix.
+ case "$host_os" in
+ vms* | cygwin* | pe | mingw* | sco* | udk* )
+ gcc_cv_func_mmap_anon=no ;;
+ *)
+ gcc_cv_func_mmap_anon=yes;;
+ esac])
+ fi
+fi
+
+if test $gcc_cv_func_mmap_file = yes; then
+ AC_DEFINE(HAVE_MMAP_FILE, 1,
+ [Define if read-only mmap of a plain file works.])
+fi
+if test $gcc_cv_func_mmap_dev_zero = yes; then
+ AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1,
+ [Define if mmap of /dev/zero works.])
+fi
+if test $gcc_cv_func_mmap_anon = yes; then
+ AC_DEFINE(HAVE_MMAP_ANON, 1,
+ [Define if mmap with MAP_ANON(YMOUS) works.])
+fi
+])
+
+dnl Locate a program and check that its version is acceptable.
+dnl AC_PROG_CHECK_VER(var, name, version-switch,
+dnl version-extract-regexp, version-glob)
+AC_DEFUN([gcc_AC_CHECK_PROG_VER],
+[AC_CHECK_PROG([$1], [$2], [$2])
+if test -n "[$]$1"; then
+ # Found it, now check the version.
+ AC_CACHE_CHECK(for modern $2, gcc_cv_prog_$2_modern,
+[changequote(<<,>>)dnl
+ ac_prog_version=`<<$>>$1 $3 2>&1 |
+ sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'`
+changequote([,])dnl
+ echo "configure:__oline__: version of $2 is $ac_prog_version" >&AC_FD_CC
+changequote(<<,>>)dnl
+ case $ac_prog_version in
+ '') gcc_cv_prog_$2_modern=no;;
+ <<$5>>)
+ gcc_cv_prog_$2_modern=yes;;
+ *) gcc_cv_prog_$2_modern=no;;
+ esac
+changequote([,])dnl
+])
+else
+ gcc_cv_prog_$2_modern=no
+fi
+])
+
+dnl Determine if enumerated bitfields are unsigned. ISO C says they can
+dnl be either signed or unsigned.
+dnl
+AC_DEFUN([gcc_AC_C_ENUM_BF_UNSIGNED],
+[AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
+[AC_TRY_RUN(#include <stdlib.h>
+enum t { BLAH = 128 } ;
+struct s_t { enum t member : 8; } s ;
+int main(void)
+{
+ s.member = BLAH;
+ if (s.member < 0) exit(1);
+ exit(0);
+
+}, gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
+if test $gcc_cv_enum_bf_unsigned = yes; then
+ AC_DEFINE(ENUM_BITFIELDS_ARE_UNSIGNED, 1,
+ [Define if enumerated bitfields are treated as unsigned values.])
+fi])
+
+dnl Probe number of bits in a byte.
+dnl Note C89 requires CHAR_BIT >= 8.
+dnl
+AC_DEFUN([gcc_AC_C_CHAR_BIT],
+[AC_CACHE_CHECK(for CHAR_BIT, gcc_cv_decl_char_bit,
+[AC_EGREP_CPP(found,
+[#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef CHAR_BIT
+found
+#endif], gcc_cv_decl_char_bit=yes, gcc_cv_decl_char_bit=no)
+])
+if test $gcc_cv_decl_char_bit = no; then
+ AC_CACHE_CHECK(number of bits in a byte, gcc_cv_c_nbby,
+[i=8
+ gcc_cv_c_nbby=
+ while test $i -lt 65; do
+ AC_TRY_COMPILE(,
+ [switch(0) {
+ case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
+ case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
+ ; }],
+ [gcc_cv_c_nbby=$i; break])
+ i=`expr $i + 1`
+ done
+ test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed
+])
+if test $gcc_cv_c_nbby = failed; then
+ AC_MSG_ERROR(cannot determine number of bits in a byte)
+else
+ AC_DEFINE_UNQUOTED(CHAR_BIT, $gcc_cv_c_nbby,
+ [Define as the number of bits in a byte, if \`limits.h' doesn't.])
+fi
+fi])
+
+dnl Checking for long long.
+dnl By Caolan McNamara <caolan@skynet.ie>
+dnl Added check for __int64, Zack Weinberg <zackw@stanford.edu>
+dnl
+AC_DEFUN([gcc_AC_C_LONG_LONG],
+[AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
+ [AC_TRY_COMPILE(,[long long int i;],
+ ac_cv_c_long_long=yes,
+ ac_cv_c_long_long=no)])
+ if test $ac_cv_c_long_long = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1,
+ [Define if your compiler supports the \`long long' type.])
+ fi
+AC_CACHE_CHECK(for __int64, ac_cv_c___int64,
+ [AC_TRY_COMPILE(,[__int64 i;],
+ ac_cv_c___int64=yes,
+ ac_cv_c___int64=no)])
+ if test $ac_cv_c___int64 = yes; then
+ AC_DEFINE(HAVE___INT64, 1,
+ [Define if your compiler supports the \`__int64' type.])
+ fi
+])
+
+#serial AM2
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ am_cv_lib_iconv_ldpath=
+ AC_ARG_WITH([libiconv-prefix],
+[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
+ for dir in `echo "$withval" | tr : ' '`; do
+ if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+ if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
+ done
+ ])
+
+ AC_CHECK_HEADERS([iconv.h])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+ LIBICONV=
+ if test "$am_cv_lib_iconv" = yes; then
+ LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
+ fi
+ AC_SUBST(LIBICONV)
+])
+
+AC_DEFUN([gcc_AC_INITFINI_ARRAY],
+[AC_ARG_ENABLE(initfini-array,
+ [ --enable-initfini-array use .init_array/.fini_array sections],
+ [], [
+AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
+ gcc_cv_initfini_array, [dnl
+ AC_TRY_RUN([
+static int x = -1;
+int main (void) { return x; }
+int foo (void) { x = 0; }
+int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;],
+ [gcc_cv_initfini_array=yes], [gcc_cv_initfini_array=no],
+ [gcc_cv_initfini_array=no])])
+ enable_initfini_array=$gcc_cv_initfini_array
+])
+if test $enable_initfini_array = yes; then
+ AC_DEFINE(HAVE_INITFINI_ARRAY, 1,
+ [Define .init_array/.fini_array sections are available and working.])
+fi])
+
+dnl # _gcc_COMPUTE_GAS_VERSION
+dnl # Used by gcc_GAS_VERSION_GTE_IFELSE
+dnl #
+dnl # WARNING:
+dnl # gcc_cv_as_gas_srcdir must be defined before this.
+dnl # This gross requirement will go away eventually.
+AC_DEFUN([_gcc_COMPUTE_GAS_VERSION],
+[gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
+for f in $gcc_cv_as_bfd_srcdir/configure \
+ $gcc_cv_as_gas_srcdir/configure \
+ $gcc_cv_as_gas_srcdir/configure.in \
+ $gcc_cv_as_gas_srcdir/Makefile.in ; do
+ gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
+ if test x$gcc_cv_gas_version != x; then
+ break
+ fi
+done
+gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
+gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
+gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)"`
+case $gcc_cv_gas_patch_version in
+ "") gcc_cv_gas_patch_version="0" ;;
+esac
+gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
+ + $gcc_cv_gas_minor_version \) \* 1000 \
+ + $gcc_cv_gas_patch_version`
+]) []dnl # _gcc_COMPUTE_GAS_VERSION
+
+dnl # gcc_GAS_VERSION_GTE_IFELSE([elf,] major, minor, patchlevel,
+dnl # [command_if_true = :], [command_if_false = :])
+dnl # Check to see if the version of GAS is greater than or
+dnl # equal to the specified version.
+dnl #
+dnl # The first ifelse() shortens the shell code if the patchlevel
+dnl # is unimportant (the usual case). The others handle missing
+dnl # commands. Note that the tests are structured so that the most
+dnl # common version number cases are tested first.
+AC_DEFUN([_gcc_GAS_VERSION_GTE_IFELSE],
+[ifelse([$1], elf,
+ [if test $in_tree_gas_is_elf = yes \
+ &&],
+ [if]) test $gcc_cv_gas_vers -ge `expr \( \( $2 \* 1000 \) + $3 \) \* 1000 + $4`
+ then dnl
+ifelse([$5],,:,[$5])[]dnl
+ifelse([$6],,,[
+ else $6])
+fi])
+
+AC_DEFUN([gcc_GAS_VERSION_GTE_IFELSE],
+[AC_REQUIRE([_gcc_COMPUTE_GAS_VERSION])dnl
+ifelse([$1], elf, [_gcc_GAS_VERSION_GTE_IFELSE($@)],
+ [_gcc_GAS_VERSION_GTE_IFELSE(,$@)])])
+
+dnl gcc_GAS_CHECK_FEATURE(description, cv, [[elf,]major,minor,patchlevel],
+dnl [extra switches to as], [assembler input],
+dnl [extra testing logic], [command if feature available])
+dnl
+dnl Checks for an assembler feature. If we are building an in-tree
+dnl gas, the feature is available if the associated assembler version
+dnl is greater than or equal to major.minor.patchlevel. If not, then
+dnl ASSEMBLER INPUT is fed to the assembler and the feature is available
+dnl if assembly succeeds. If EXTRA TESTING LOGIC is not the empty string,
+dnl then it is run instead of simply setting CV to "yes" - it is responsible
+dnl for doing so, if appropriate.
+AC_DEFUN([gcc_GAS_CHECK_FEATURE],
+[AC_CACHE_CHECK([assembler for $1], [$2],
+ [[$2]=no
+ ifelse([$3],,,[dnl
+ if test $in_tree_gas = yes; then
+ gcc_GAS_VERSION_GTE_IFELSE($3, [[$2]=yes])
+ el])if test x$gcc_cv_as != x; then
+ echo ifelse(m4_substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
+ if AC_TRY_COMMAND([$gcc_cv_as $4 -o conftest.o conftest.s >&AC_FD_CC])
+ then
+ ifelse([$6],, [$2]=yes, [$6])
+ else
+ echo "configure: failed program was" >&AC_FD_CC
+ cat conftest.s >&AC_FD_CC
+ fi
+ rm -f conftest.o conftest.s
+ fi])
+ifelse([$7],,,[dnl
+if test $[$2] = yes; then
+ $7
+fi])])
+
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
--- /dev/null
+[= 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))
+
+=]
--- /dev/null
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the declaration of `abort', and to 0 if you don't.
+ */
+#undef HAVE_DECL_ABORT
+
+/* Define to 1 if you have the declaration of `errno', and to 0 if you don't.
+ */
+#undef HAVE_DECL_ERRNO
+
+/* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FPRINTF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_PUTC_UNLOCKED
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fprintf_unlocked' function. */
+#undef HAVE_FPRINTF_UNLOCKED
+
+/* Define to 1 if you have the `fputc_unlocked' function. */
+#undef HAVE_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the `fputs_unlocked' function. */
+#undef HAVE_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the `fwrite_unlocked' function. */
+#undef HAVE_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if mmap with MAP_ANON(YMOUS) works. */
+#undef HAVE_MMAP_ANON
+
+/* Define if mmap of /dev/zero works. */
+#undef HAVE_MMAP_DEV_ZERO
+
+/* Define if read-only mmap of a plain file works. */
+#undef HAVE_MMAP_FILE
+
+/* Define to 1 if you have the `putc_unlocked' function. */
+#undef HAVE_PUTC_UNLOCKED
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define if testing and fixing are done by separate process */
+#undef SEPARATE_FIX_PROC
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to xatexit if the host system does not support atexit */
+#undef atexit
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to xexit if the host system does not support atexit */
+#undef exit
--- /dev/null
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for fixincludes .
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='fixincludes'
+PACKAGE_TARNAME='fixincludes'
+PACKAGE_VERSION=' '
+PACKAGE_STRING='fixincludes '
+PACKAGE_BUGREPORT=''
+
+ac_unique_file="inclhack.def"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# 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 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT TARGET CPP EGREP MAINT LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures fixincludes to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of fixincludes :";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd "$ac_popdir"
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+fixincludes configure
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by fixincludes $as_me , which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in .. $srcdir/..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Choose one or two-process fix methodology. Systems that cannot handle
+# bi-directional pipes must use the two process method.
+#
+case $host in
+ i?86-*-msdosdjgpp* | \
+ *-*-beos* )
+ TARGET=twoprocess
+
+cat >>confdefs.h <<\_ACEOF
+#define SEPARATE_FIX_PROC 1
+_ACEOF
+
+ ;;
+
+ vax-dec-bsd* )
+ TARGET=oneprocess
+
+cat >>confdefs.h <<\_ACEOF
+#define exit xexit
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define atexit xatexit
+_ACEOF
+
+ ;;
+
+ * )
+ TARGET=oneprocess
+ ;;
+esac
+
+
+# Checks for header files.
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+for ac_header in stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
+ sys/stat.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## -------------------------------------- ##
+## Report this to the fixincludes lists. ##
+## -------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+for ac_func in putc_unlocked fputc_unlocked fputs_unlocked \
+ fwrite_unlocked fprintf_unlocked
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+echo "$as_me:$LINENO: checking whether abort is declared" >&5
+echo $ECHO_N "checking whether abort is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_abort+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef abort
+ char *p = (char *) abort;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_abort=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_abort=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_abort" >&5
+echo "${ECHO_T}$ac_cv_have_decl_abort" >&6
+if test $ac_cv_have_decl_abort = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ABORT 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ABORT 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether errno is declared" >&5
+echo $ECHO_N "checking whether errno is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_errno+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef errno
+ char *p = (char *) errno;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_errno=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_errno=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_errno" >&5
+echo "${ECHO_T}$ac_cv_have_decl_errno" >&6
+if test $ac_cv_have_decl_errno = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ERRNO 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ERRNO 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
+echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef putc_unlocked
+ char *p = (char *) putc_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_putc_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_putc_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
+if test $ac_cv_have_decl_putc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTC_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTC_UNLOCKED 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
+echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fputc_unlocked
+ char *p = (char *) fputc_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_fputc_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fputc_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
+if test $ac_cv_have_decl_fputc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTC_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTC_UNLOCKED 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
+echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fputs_unlocked
+ char *p = (char *) fputs_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_fputs_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fputs_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
+if test $ac_cv_have_decl_fputs_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTS_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTS_UNLOCKED 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
+echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fwrite_unlocked
+ char *p = (char *) fwrite_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_fwrite_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fwrite_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
+if test $ac_cv_have_decl_fwrite_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FWRITE_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FWRITE_UNLOCKED 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether fprintf_unlocked is declared" >&5
+echo $ECHO_N "checking whether fprintf_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fprintf_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fprintf_unlocked
+ char *p = (char *) fprintf_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_decl_fprintf_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fprintf_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fprintf_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fprintf_unlocked" >&6
+if test $ac_cv_have_decl_fprintf_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPRINTF_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPRINTF_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+
+if test "${ac_cv_header_sys_mman_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/mman.h" >&5
+echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_mman_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/mman.h usability" >&5
+echo $ECHO_N "checking sys/mman.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/mman.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/mman.h presence" >&5
+echo $ECHO_N "checking sys/mman.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/mman.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/mman.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/mman.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/mman.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/mman.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/mman.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/mman.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/mman.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/mman.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/mman.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## -------------------------------------- ##
+## Report this to the fixincludes lists. ##
+## -------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/mman.h" >&5
+echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_mman_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_mman_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6
+
+fi
+if test $ac_cv_header_sys_mman_h = yes; then
+ gcc_header_sys_mman_h=yes
+else
+ gcc_header_sys_mman_h=no
+fi
+
+
+echo "$as_me:$LINENO: checking for mmap" >&5
+echo $ECHO_N "checking for mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mmap to an innocuous variant, in case <limits.h> declares mmap.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mmap innocuous_mmap
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mmap (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mmap
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char mmap ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_mmap) || defined (__stub___mmap)
+choke me
+#else
+char (*f) () = mmap;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != mmap;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mmap=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_mmap=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5
+echo "${ECHO_T}$ac_cv_func_mmap" >&6
+if test $ac_cv_func_mmap = yes; then
+ gcc_func_mmap=yes
+else
+ gcc_func_mmap=no
+fi
+
+if test "$gcc_header_sys_mman_h" != yes \
+ || test "$gcc_func_mmap" != yes; then
+ gcc_cv_func_mmap_file=no
+ gcc_cv_func_mmap_dev_zero=no
+ gcc_cv_func_mmap_anon=no
+else
+ echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5
+echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6
+if test "${gcc_cv_func_mmap_file+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Add a system to this blacklist if
+ # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
+ # memory area containing the same data that you'd get if you applied
+ # read() to the same fd. The only system known to have a problem here
+ # is VMS, where text files have record structure.
+ case "$host_os" in
+ vms* | ultrix*)
+ gcc_cv_func_mmap_file=no ;;
+ *)
+ gcc_cv_func_mmap_file=yes;;
+ esac
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5
+echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6
+ echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5
+echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6
+if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Add a system to this blacklist if it has mmap() but /dev/zero
+ # does not exist, or if mmapping /dev/zero does not give anonymous
+ # zeroed pages with both the following properties:
+ # 1. If you map N consecutive pages in with one call, and then
+ # unmap any subset of those pages, the pages that were not
+ # explicitly unmapped remain accessible.
+ # 2. If you map two adjacent blocks of memory and then unmap them
+ # both at once, they must both go away.
+ # Systems known to be in this category are Windows (all variants),
+ # VMS, and Darwin.
+ case "$host_os" in
+ vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
+ gcc_cv_func_mmap_dev_zero=no ;;
+ *)
+ gcc_cv_func_mmap_dev_zero=yes;;
+ esac
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5
+echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6
+
+ # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
+ echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5
+echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6
+if test "${gcc_cv_decl_map_anon+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
+int
+main ()
+{
+int n = MAP_ANONYMOUS;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gcc_cv_decl_map_anon=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gcc_cv_decl_map_anon=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5
+echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6
+
+ if test $gcc_cv_decl_map_anon = no; then
+ gcc_cv_func_mmap_anon=no
+ else
+ echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5
+echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6
+if test "${gcc_cv_func_mmap_anon+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Add a system to this blacklist if it has mmap() and MAP_ANON or
+ # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
+ # doesn't give anonymous zeroed pages with the same properties listed
+ # above for use of /dev/zero.
+ # Systems known to be in this category are Windows, VMS, and SCO Unix.
+ case "$host_os" in
+ vms* | cygwin* | pe | mingw* | sco* | udk* )
+ gcc_cv_func_mmap_anon=no ;;
+ *)
+ gcc_cv_func_mmap_anon=yes;;
+ esac
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5
+echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6
+ fi
+fi
+
+if test $gcc_cv_func_mmap_file = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP_FILE 1
+_ACEOF
+
+fi
+if test $gcc_cv_func_mmap_dev_zero = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP_DEV_ZERO 1
+_ACEOF
+
+fi
+if test $gcc_cv_func_mmap_anon = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP_ANON 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi;
+echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+if test "$USE_MAINTAINER_MODE" = yes; then
+ MAINT=
+else
+ MAINT='#'
+fi
+
+
+ ac_config_headers="$ac_config_headers config.h"
+
+ ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by fixincludes $as_me , which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+fixincludes config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@TARGET@,$TARGET,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@MAINT@,$MAINT,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+ # Run the commands associated with the file.
+ case $ac_file in
+ config.h ) echo timestamp > stamp-h ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
--- /dev/null
+AC_PREREQ(2.59)
+
+AC_INIT(fixincludes, [ ])
+AC_CONFIG_SRCDIR(inclhack.def)
+AC_CONFIG_AUX_DIR(..)
+AC_CANONICAL_SYSTEM
+AC_PROG_CC
+
+# Choose one or two-process fix methodology. Systems that cannot handle
+# bi-directional pipes must use the two process method.
+#
+case $host in
+ i?86-*-msdosdjgpp* | \
+ *-*-beos* )
+ TARGET=twoprocess
+ AC_DEFINE(SEPARATE_FIX_PROC, 1, [Define if testing and fixing are done by separate process])
+ ;;
+
+ vax-dec-bsd* )
+ TARGET=oneprocess
+ AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit])
+ AC_DEFINE(atexit, xatexit, [Define to xatexit if the host system does not support atexit])
+ ;;
+
+ * )
+ TARGET=oneprocess
+ ;;
+esac
+AC_SUBST(TARGET)
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
+ sys/stat.h])
+AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \
+ fwrite_unlocked fprintf_unlocked)
+AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked,
+ fputs_unlocked, fwrite_unlocked, fprintf_unlocked])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Checks for library functions.
+gcc_AC_FUNC_MMAP_BLACKLIST
+
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+AC_MSG_RESULT($USE_MAINTAINER_MODE)
+if test "$USE_MAINTAINER_MODE" = yes; then
+ MAINT=
+else
+ MAINT='#'
+fi
+AC_SUBST(MAINT)
+
+AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
--- /dev/null
+
+/*
+
+ 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
--- /dev/null
+/* 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();
+}
--- /dev/null
+[= 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 =]
+};
--- /dev/null
+/* -*- 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 }
+};
--- /dev/null
+
+/* 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
--- /dev/null
+
+/* 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 <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 */
--- /dev/null
+
+/*
+
+ 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 );
+}
--- /dev/null
+#! /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
--- /dev/null
+/* -*- 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*/
--- /dev/null
+
+/*
+ * 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;
+}
--- /dev/null
+
+/*
+ * 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;
+ }
+}
--- /dev/null
+
+/*
+ * 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 */
--- /dev/null
+/* Get common system includes and various definitions and declarations based
+ on autoconf macros.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
+
+This file is part of libcpp (aka cpplib).
+
+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 FIXINC_SYSTEM_H
+#define FIXINC_SYSTEM_H
+
+/* We must include stdarg.h before stdio.h. */
+#include <stdarg.h>
+
+#ifdef HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#include <stdio.h>
+
+/* Define a generic NULL if one hasn't already been defined. */
+#ifndef NULL
+#define NULL 0
+#endif
+
+/* fixincludes is not a multi-threaded application and therefore we
+ do not have to use the locking functions. In fact, using the locking
+ functions can cause the compiler to be significantly slower under
+ I/O bound conditions (such as -g -O0 on very large source files).
+
+ HAVE_DECL_PUTC_UNLOCKED actually indicates whether or not the stdio
+ code is multi-thread safe by default. If it is set to 0, then do
+ not worry about using the _unlocked functions.
+
+ fputs_unlocked, fwrite_unlocked, and fprintf_unlocked are
+ extensions and need to be prototyped by hand (since we do not
+ define _GNU_SOURCE). */
+
+#if defined HAVE_DECL_PUTC_UNLOCKED && HAVE_DECL_PUTC_UNLOCKED
+
+# ifdef HAVE_PUTC_UNLOCKED
+# undef putc
+# define putc(C, Stream) putc_unlocked (C, Stream)
+# endif
+# ifdef HAVE_FPUTC_UNLOCKED
+# undef fputc
+# define fputc(C, Stream) fputc_unlocked (C, Stream)
+# endif
+
+# ifdef HAVE_FPUTS_UNLOCKED
+# undef fputs
+# define fputs(String, Stream) fputs_unlocked (String, Stream)
+# if defined (HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
+extern int fputs_unlocked (const char *, FILE *);
+# endif
+# endif
+# ifdef HAVE_FWRITE_UNLOCKED
+# undef fwrite
+# define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream)
+# if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
+extern int fwrite_unlocked (const void *, size_t, size_t, FILE *);
+# endif
+# endif
+# ifdef HAVE_FPRINTF_UNLOCKED
+# undef fprintf
+/* We can't use a function-like macro here because we don't know if
+ we have varargs macros. */
+# define fprintf fprintf_unlocked
+# if defined (HAVE_DECL_FPRINTF_UNLOCKED) && !HAVE_DECL_FPRINTF_UNLOCKED
+extern int fprintf_unlocked (FILE *, const char *, ...);
+# endif
+# endif
+
+#endif
+
+/* ??? Glibc's fwrite/fread_unlocked macros cause
+ "warning: signed and unsigned type in conditional expression". */
+#undef fread_unlocked
+#undef fwrite_unlocked
+
+#include <sys/types.h>
+#include <errno.h>
+
+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
+extern int errno;
+#endif
+
+/* Some of glibc's string inlines cause warnings. Plus we'd rather
+ rely on (and therefore test) GCC's string builtins. */
+#define __NO_STRING_INLINES
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#else
+# ifdef HAVE_SYS_FILE_H
+# include <sys/file.h>
+# endif
+#endif
+
+/* The HAVE_DECL_* macros are three-state, undefined, 0 or 1. If they
+ are defined to 0 then we must provide the relevant declaration
+ here. These checks will be in the undefined state while configure
+ is running so be careful to test "defined (HAVE_DECL_*)". */
+
+#if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT
+extern void abort (void);
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+/* Test if something is a normal file. */
+#ifndef S_ISREG
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
+/* Filename handling macros. */
+#include "filenames.h"
+
+/* Get libiberty declarations. */
+#include "libiberty.h"
+#include "safe-ctype.h"
+
+#endif /* ! FIXINC_SYSTEM_H */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
--- /dev/null
+/* 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 */
+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.
* 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.
# It's normally the absolute path to the current directory.
objdir = @objdir@
+build_subdir=@build_subdir@
+
# --------
# Defined vpaths
# --------
# 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)
$(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 ; \
-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
$(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
# 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.
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
cd ..
rm -rf $tempdir
build_auto=auto-build.h
- FORBUILD=../${build_subdir}
fi
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.
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
# 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
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
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"
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.
# 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
--- /dev/null
+#!/bin/sh
+#
+# 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.
+#
+# See README-fixinc for more information.
+#
+# fixincludes copyright (c) 1998, 1999, 2000, 2002
+# The Free Software Foundation, Inc.
+#
+# fixincludes 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.
+#
+# fixincludes 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 fixincludes. See the file "COPYING". If not,
+# write to: The Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+# # # # # # # # # # # # # # # # # # # # #
+
+# 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.
+if [ "x$1" = "x" ]
+then
+ echo fixincludes: no output directory specified
+ exit 1
+fi
+
+LIB=${1}
+shift
+
+# Make sure it exists.
+if [ ! -d $LIB ]; then
+ mkdir $LIB || {
+ echo fixincludes: output dir '`'$LIB"' cannot be created"
+ exit 1
+ }
+else
+ ( cd $LIB && touch DONE && rm DONE ) || {
+ echo fixincludes: output dir '`'$LIB"' is an invalid directory"
+ exit 1
+ }
+fi
+
+if test -z "$VERBOSE"
+then
+ VERBOSE=2
+ export VERBOSE
+else
+ case "$VERBOSE" in
+ [0-9] ) : ;;
+ * ) VERBOSE=3 ;;
+ esac
+fi
+
+# Define what target system we're fixing.
+#
+if test -r ./Makefile; then
+ target_canonical="`sed -n -e 's,^target[ ]*=[ ]*\(.*\)$,\1,p' < Makefile`"
+fi
+
+# If not from the Makefile, then try config.guess
+#
+if test -z "${target_canonical}" ; then
+ if test -x ./config.guess ; then
+ target_canonical="`config.guess`" ; fi
+ test -z "${target_canonical}" && target_canonical=unknown
+fi
+export target_canonical
+
+# # # # # # # # # # # # # # # # # # # # #
+#
+# Define PWDCMD as a command to use to get the working dir
+# in the form that we want.
+PWDCMD=${PWDCMD-pwd}
+
+case "`$PWDCMD`" in
+//*)
+ # On an Apollo, discard everything before `/usr'.
+ PWDCMD="eval pwd | sed -e 's,.*/usr/,/usr/,'"
+ ;;
+esac
+
+# Original directory.
+ORIGDIR=`${PWDCMD}`
+export ORIGDIR
+FIXINCL="@FIXINCL@"
+if [ ! -x $FIXINCL ] ; then
+ echo "Cannot find working fixincl" >&2
+ exit 1
+fi
+export FIXINCL
+
+# Make LIB absolute only if needed to avoid problems with the amd.
+case $LIB in
+/*)
+ ;;
+*)
+ cd $LIB; LIB=`${PWDCMD}`
+ ;;
+esac
+
+if test $VERBOSE -gt 0
+then echo Fixing headers into ${LIB} for ${target_canonical} target ; fi
+
+# Determine whether this system has symbolic links.
+if test -n "$DJDIR"; then
+ LINKS=false
+elif ln -s X $LIB/ShouldNotExist 2>/dev/null; then
+ rm -f $LIB/ShouldNotExist
+ LINKS=true
+elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then
+ rm -f /tmp/ShouldNotExist
+ LINKS=true
+else
+ LINKS=false
+fi
+
+# # # # # # # # # # # # # # # # # # # # #
+#
+# Extract from the gcc -dM and from the specs file all the predefined
+# macros that are not in the C89 reserved namespace (the reserved
+# namespace is all identifiers beginnning with two underscores or one
+# underscore followed by a capital letter). The specs file is in
+# ${ORIGDIR}, as is cc1. A regular expression to find any of those
+# macros in a header file is written to MN_NAME_PAT.
+#
+# Note dependency on ASCII. \012 = newline.
+# tr ' ' '\n' is, alas, not portable.
+
+echo | ${ORIGDIR}/cc1 -quiet -dM -E - |
+ sed -n 's/^#define \([a-zA-Z][a-zA-Z0-9_]*\).*/\1/p' > mn.T
+tr -s '\040\011' '\012\012' < ${ORIGDIR}/specs |
+ sed -n 's/^.*-D\([a-zA-Z_][a-zA-Z0-9_]*\).*/\1/p' >> mn.T
+
+if sort -u mn.T | grep -v '^_[_A-Z]' > mn.U
+then
+ if test $VERBOSE -gt 0
+ then echo "Forbidden identifiers: `tr '\012' ' ' <mn.U`" ; fi
+ sed 's/^/\\\\</; s/$/\\\\>/; $!s/$/|/' < mn.U | tr -d '\012' > mn.V
+ MN_NAME_PAT="`cat mn.V`"
+ export MN_NAME_PAT
+else
+ if test $VERBOSE -gt 0
+ then echo "No forbidden identifiers defined by this target" ; fi
+fi
+rm -f mn.[TUV]
+
+# # # # # # # # # # # # # # # # # # # # #
+#
+# Search each input directory for broken header files.
+# This loop ends near the end of the file.
+#
+if test $# -eq 0
+then
+ INPUTLIST="/usr/include"
+else
+ INPUTLIST="$@"
+fi
+
+for INPUT in ${INPUTLIST} ; do
+
+cd ${ORIGDIR}
+
+# Make sure a directory exists before changing into it,
+# otherwise Solaris2 will fail-exit the script.
+#
+if [ ! -d ${INPUT} ]; then
+ continue
+fi
+cd ${INPUT}
+
+INPUT=`${PWDCMD}`
+export INPUT
+
+#
+# # # # # # # # # # # # # # # # # # # # #
+#
+if test $VERBOSE -gt 1
+then echo Finding directories and links to directories ; fi
+
+# Find all directories and all symlinks that point to directories.
+# Put the list in $all_dirs.
+# Each time we find a symlink, add it to newdirs
+# so that we do another find within the dir the link points to.
+# Note that $all_dirs may have duplicates in it;
+# later parts of this file are supposed to ignore them.
+dirs="."
+levels=2
+all_dirs=""
+search_dirs=""
+
+while [ -n "$dirs" ] && [ $levels -gt 0 ]
+do
+ levels=`expr $levels - 1`
+ newdirs=
+ for d in $dirs
+ do
+ if test $VERBOSE -gt 1
+ then echo " Searching $INPUT/$d" ; fi
+
+ # Find all directories under $d, relative to $d, excluding $d itself.
+ # (The /. is needed after $d in case $d is a symlink.)
+ all_dirs="$all_dirs `find $d/. -type d -print | \
+ sed -e '/\/\.$/d' -e 's@/./@/@g'`"
+ # Find all links to directories.
+ # Using `-exec test -d' in find fails on some systems,
+ # and trying to run test via sh fails on others,
+ # so this is the simplest alternative left.
+ # First find all the links, then test each one.
+ theselinks=
+ $LINKS && \
+ theselinks=`find $d/. -type l -print | sed -e 's@/./@/@g'`
+ for d1 in $theselinks --dummy--
+ do
+ # If the link points to a directory,
+ # add that dir to $newdirs
+ if [ -d $d1 ]
+ then
+ all_dirs="$all_dirs $d1"
+ if [ "`ls -ld $d1 | sed -n 's/.*-> //p'`" != "." ]
+ then
+ newdirs="$newdirs $d1"
+ search_dirs="$search_dirs $d1"
+ fi
+ fi
+ done
+ done
+
+ dirs="$newdirs"
+done
+
+# # # # # # # # # # # # # # # # # # # # #
+#
+dirs=
+if test $VERBOSE -gt 2
+then echo "All directories (including links to directories):"
+ echo $all_dirs
+fi
+
+for file in $all_dirs; do
+ rm -rf $LIB/$file
+ if [ ! -d $LIB/$file ]
+ then mkdir $LIB/$file
+ fi
+done
+mkdir $LIB/root
+
+# # # # # # # # # # # # # # # # # # # # #
+#
+# treetops gets an alternating list
+# of old directories to copy
+# and the new directories to copy to.
+treetops=". ${LIB}"
+
+if $LINKS; then
+ if test $VERBOSE -gt 1
+ then echo 'Making symbolic directory links' ; fi
+ cwd=`${PWDCMD}`
+
+ for sym_link in $search_dirs; do
+ cd ${INPUT}
+ dest=`ls -ld ${sym_link} | sed -n 's/.*-> //p'`
+
+ # In case $dest is relative, get to ${sym_link}'s dir first.
+ #
+ cd ./`echo ${sym_link} | sed 's;/[^/]*$;;'`
+
+ # Check that the target directory exists.
+ # Redirections changed to avoid bug in sh on Ultrix.
+ #
+ (cd $dest) > /dev/null 2>&1
+ if [ $? = 0 ]; then
+ cd $dest
+
+ # full_dest_dir gets the dir that the link actually leads to.
+ #
+ full_dest_dir=`${PWDCMD}`
+
+ # Canonicalize ${INPUT} now to minimize the time an
+ # automounter has to change the result of ${PWDCMD}.
+ #
+ cinput=`cd ${INPUT}; ${PWDCMD}`
+
+ # If a link points to ., make a similar link to .
+ #
+ if [ ${full_dest_dir} = ${cinput} ]; then
+ if test $VERBOSE -gt 2
+ then echo ${sym_link} '->' . ': Making self link' ; fi
+ rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
+ ln -s . ${LIB}/${sym_link} > /dev/null 2>&1
+
+ # If link leads back into ${INPUT},
+ # make a similar link here.
+ #
+ elif expr ${full_dest_dir} : "${cinput}/.*" > /dev/null; then
+ # Y gets the actual target dir name, relative to ${INPUT}.
+ y=`echo ${full_dest_dir} | sed -n "s&${cinput}/&&p"`
+ # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}.
+ dots=`echo "${sym_link}" |
+ sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
+ if test $VERBOSE -gt 2
+ then echo ${sym_link} '->' $dots$y ': Making local link' ; fi
+ rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
+ ln -s $dots$y ${LIB}/${sym_link} > /dev/null 2>&1
+
+ else
+ # If the link is to a dir $target outside ${INPUT},
+ # repoint the link at ${INPUT}/root$target
+ # and process $target into ${INPUT}/root$target
+ # treat this directory as if it actually contained the files.
+ #
+ if test $VERBOSE -gt 2
+ then echo ${sym_link} '->' root${full_dest_dir} ': Making rooted link'
+ fi
+ if [ -d $LIB/root${full_dest_dir} ]
+ then true
+ else
+ dirname=root${full_dest_dir}/
+ dirmade=.
+ cd $LIB
+ while [ x$dirname != x ]; do
+ component=`echo $dirname | sed -e 's|/.*$||'`
+ mkdir $component >/dev/null 2>&1
+ cd $component
+ dirmade=$dirmade/$component
+ dirname=`echo $dirname | sed -e 's|[^/]*/||'`
+ done
+ fi
+
+ # Duplicate directory structure created in ${LIB}/${sym_link} in new
+ # root area.
+ #
+ for file2 in $all_dirs; do
+ case $file2 in
+ ${sym_link}/*)
+ dupdir=${LIB}/root${full_dest_dir}/`echo $file2 |
+ sed -n "s|^${sym_link}/||p"`
+ if test $VERBOSE -gt 2
+ then echo "Duplicating ${sym_link}'s ${dupdir}" ; fi
+ if [ -d ${dupdir} ]
+ then true
+ else
+ mkdir ${dupdir}
+ fi
+ ;;
+ *)
+ ;;
+ esac
+ done
+
+ # Get the path from ${LIB} to ${sym_link}, accounting for symlinks.
+ #
+ parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'`
+ libabs=`cd ${LIB}; ${PWDCMD}`
+ file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"`
+
+ # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}.
+ #
+ dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'`
+ rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
+ ln -s ${dots}root${full_dest_dir} ${LIB}/${sym_link} > /dev/null 2>&1
+ treetops="$treetops ${sym_link} ${LIB}/root${full_dest_dir}"
+ fi
+ fi
+ done
+fi
+
+# # # # # # # # # # # # # # # # # # # # #
+#
+required=
+set x $treetops
+shift
+while [ $# != 0 ]; do
+ # $1 is an old directory to copy, and $2 is the new directory to copy to.
+ #
+ SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}`
+ export SRCDIR
+
+ FIND_BASE=$1
+ export FIND_BASE
+ shift
+
+ DESTDIR=`cd $1;${PWDCMD}`
+ export DESTDIR
+ shift
+
+ # The same dir can appear more than once in treetops.
+ # There's no need to scan it more than once.
+ #
+ if [ -f ${DESTDIR}/DONE ]
+ then continue ; fi
+
+ touch ${DESTDIR}/DONE
+ if test $VERBOSE -gt 1
+ then echo Fixing directory ${SRCDIR} into ${DESTDIR} ; fi
+
+ # Check files which are symlinks as well as those which are files.
+ #
+ cd ${INPUT}
+ required="$required `if $LINKS; then
+ find ${FIND_BASE}/. -name '*.h' \( -type f -o -type l \) -print
+ else
+ find ${FIND_BASE}/. -name '*.h' -type f -print
+ fi | \
+ sed -e 's;/\./;/;g' -e 's;//*;/;g' | \
+ ${FIXINCL}`"
+done
+
+## Make sure that any include files referenced using double quotes
+## exist in the fixed directory. This comes last since otherwise
+## we might end up deleting some of these files "because they don't
+## need any change."
+set x `echo $required`
+shift
+while [ $# != 0 ]; do
+ newreq=
+ while [ $# != 0 ]; do
+ # $1 is the directory to copy from,
+ # $2 is the unfixed file,
+ # $3 is the fixed file name.
+ #
+ cd ${INPUT}
+ cd $1
+ if [ -f $2 ] ; then
+ if [ -r $2 ] && [ ! -r $3 ]; then
+ cp $2 $3 >/dev/null 2>&1 || echo "Can't copy $2" >&2
+ chmod +w $3 2>/dev/null
+ chmod a+r $3 2>/dev/null
+ if test $VERBOSE -gt 2
+ then echo Copied $2 ; fi
+ for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' $3 |
+ sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`
+ do
+ dir=`echo $2 | sed -e s'|/[^/]*$||'`
+ dir2=`echo $3 | sed -e s'|/[^/]*$||'`
+ newreq="$newreq $1 $dir/$include $dir2/$include"
+ done
+ fi
+ fi
+ shift; shift; shift
+ done
+ set x $newreq
+ shift
+done
+
+if test $VERBOSE -gt 2
+then echo 'Cleaning up DONE files.' ; fi
+cd $LIB
+# Look for files case-insensitively, for the benefit of
+# DOS/Windows filesystems.
+find . -name '[Dd][Oo][Nn][Ee]' -exec rm -f '{}' ';'
+
+if test $VERBOSE -gt 1
+then echo 'Cleaning up unneeded directories:' ; fi
+cd $LIB
+all_dirs=`find . -type d \! -name '.' -print | sort -r`
+for file in $all_dirs; do
+ if rmdir $LIB/$file > /dev/null
+ then
+ test $VERBOSE -gt 3 && echo " removed $file"
+ fi
+done 2> /dev/null
+
+# On systems which don't support symlinks, `find' may barf
+# if called with "-type l" predicate. So only use that if
+# we know we should look for symlinks.
+if $LINKS; then
+ test $VERBOSE -gt 2 && echo "Removing unused symlinks"
+
+ all_dirs=`find . -type l -print`
+ for file in $all_dirs
+ do
+ if test ! -d $file
+ then
+ rm -f $file
+ test $VERBOSE -gt 3 && echo " removed $file"
+ rmdir `dirname $file` > /dev/null && \
+ test $VERBOSE -gt 3 && \
+ echo " removed `dirname $file`"
+ fi
+ done 2> /dev/null
+fi
+
+if test $VERBOSE -gt 0
+then echo fixincludes is done ; fi
+
+# # # # # # # # # # # # # # # # # # # # #
+#
+# End of for INPUT directories
+#
+done
+#
+# # # # # # # # # # # # # # # # # # # # #
+++ /dev/null
-# 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
-
-#\f
-
-## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-##
-## 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
+++ /dev/null
-
-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.
+++ /dev/null
-[= 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))
-
-=]
+++ /dev/null
-
-/*
-
- 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
+++ /dev/null
-/* 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();
-}
+++ /dev/null
-#!/bin/sh
-#
-# 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.
-#
-# See README-fixinc for more information.
-#
-# fixincludes copyright (c) 1998, 1999, 2000, 2002
-# The Free Software Foundation, Inc.
-#
-# fixincludes 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.
-#
-# fixincludes 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 fixincludes. See the file "COPYING". If not,
-# write to: The Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-#
-# # # # # # # # # # # # # # # # # # # # #
-
-# Usage: fixincl.sh output-dir input-dir
-#
-# Directory in which to store the results.
-# Fail if no arg to specify a directory for the output.
-if [ "x$1" = "x" ]
-then
- echo fixincludes: no output directory specified
- exit 1
-fi
-
-LIB=${1}
-shift
-
-# Make sure it exists.
-if [ ! -d $LIB ]; then
- mkdir $LIB || {
- echo fixincludes: output dir '`'$LIB"' cannot be created"
- exit 1
- }
-else
- ( cd $LIB && touch DONE && rm DONE ) || {
- echo fixincludes: output dir '`'$LIB"' is an invalid directory"
- exit 1
- }
-fi
-
-if test -z "$VERBOSE"
-then
- VERBOSE=2
- export VERBOSE
-else
- case "$VERBOSE" in
- [0-9] ) : ;;
- * ) VERBOSE=3 ;;
- esac
-fi
-
-# Define what target system we're fixing.
-#
-if test -r ./Makefile; then
- target_canonical="`sed -n -e 's,^target[ ]*=[ ]*\(.*\)$,\1,p' < Makefile`"
-fi
-
-# If not from the Makefile, then try config.guess
-#
-if test -z "${target_canonical}" ; then
- if test -x ./config.guess ; then
- target_canonical="`config.guess`" ; fi
- test -z "${target_canonical}" && target_canonical=unknown
-fi
-export target_canonical
-
-# # # # # # # # # # # # # # # # # # # # #
-#
-# Define PWDCMD as a command to use to get the working dir
-# in the form that we want.
-PWDCMD=${PWDCMD-pwd}
-
-case "`$PWDCMD`" in
-//*)
- # On an Apollo, discard everything before `/usr'.
- PWDCMD="eval pwd | sed -e 's,.*/usr/,/usr/,'"
- ;;
-esac
-
-# Original directory.
-ORIGDIR=`${PWDCMD}`
-export ORIGDIR
-FIXINCL=${ORIGDIR}/fixinc/fixincl
-if [ ! -x $FIXINCL ] ; then
- FIXINCL=${ORIGDIR}/fixincl
- if [ ! -x $FIXINCL ] ; then
- echo "Cannot find working fixincl" >&2
- exit 1
- fi
-fi
-export FIXINCL
-
-# Make LIB absolute only if needed to avoid problems with the amd.
-case $LIB in
-/*)
- ;;
-*)
- cd $LIB; LIB=`${PWDCMD}`
- ;;
-esac
-
-if test $VERBOSE -gt 0
-then echo Fixing headers into ${LIB} for ${target_canonical} target ; fi
-
-# Determine whether this system has symbolic links.
-if test -n "$DJDIR"; then
- LINKS=false
-elif ln -s X $LIB/ShouldNotExist 2>/dev/null; then
- rm -f $LIB/ShouldNotExist
- LINKS=true
-elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then
- rm -f /tmp/ShouldNotExist
- LINKS=true
-else
- LINKS=false
-fi
-
-# # # # # # # # # # # # # # # # # # # # #
-#
-# Extract from the gcc -dM and from the specs file all the predefined
-# macros that are not in the C89 reserved namespace (the reserved
-# namespace is all identifiers beginnning with two underscores or one
-# underscore followed by a capital letter). The specs file is in
-# ${ORIGDIR}, as is cc1. A regular expression to find any of those
-# macros in a header file is written to MN_NAME_PAT.
-#
-# Note dependency on ASCII. \012 = newline.
-# tr ' ' '\n' is, alas, not portable.
-
-echo | ${ORIGDIR}/cc1 -quiet -dM -E - |
- sed -n 's/^#define \([a-zA-Z][a-zA-Z0-9_]*\).*/\1/p' > mn.T
-tr -s '\040\011' '\012\012' < ${ORIGDIR}/specs |
- sed -n 's/^.*-D\([a-zA-Z_][a-zA-Z0-9_]*\).*/\1/p' >> mn.T
-
-if sort -u mn.T | grep -v '^_[_A-Z]' > mn.U
-then
- if test $VERBOSE -gt 0
- then echo "Forbidden identifiers: `tr '\012' ' ' <mn.U`" ; fi
- sed 's/^/\\\\</; s/$/\\\\>/; $!s/$/|/' < mn.U | tr -d '\012' > mn.V
- MN_NAME_PAT="`cat mn.V`"
- export MN_NAME_PAT
-else
- if test $VERBOSE -gt 0
- then echo "No forbidden identifiers defined by this target" ; fi
-fi
-rm -f mn.[TUV]
-
-# # # # # # # # # # # # # # # # # # # # #
-#
-# Search each input directory for broken header files.
-# This loop ends near the end of the file.
-#
-if test $# -eq 0
-then
- INPUTLIST="/usr/include"
-else
- INPUTLIST="$@"
-fi
-
-for INPUT in ${INPUTLIST} ; do
-
-cd ${ORIGDIR}
-
-# Make sure a directory exists before changing into it,
-# otherwise Solaris2 will fail-exit the script.
-#
-if [ ! -d ${INPUT} ]; then
- continue
-fi
-cd ${INPUT}
-
-INPUT=`${PWDCMD}`
-export INPUT
-
-#
-# # # # # # # # # # # # # # # # # # # # #
-#
-if test $VERBOSE -gt 1
-then echo Finding directories and links to directories ; fi
-
-# Find all directories and all symlinks that point to directories.
-# Put the list in $all_dirs.
-# Each time we find a symlink, add it to newdirs
-# so that we do another find within the dir the link points to.
-# Note that $all_dirs may have duplicates in it;
-# later parts of this file are supposed to ignore them.
-dirs="."
-levels=2
-all_dirs=""
-search_dirs=""
-
-while [ -n "$dirs" ] && [ $levels -gt 0 ]
-do
- levels=`expr $levels - 1`
- newdirs=
- for d in $dirs
- do
- if test $VERBOSE -gt 1
- then echo " Searching $INPUT/$d" ; fi
-
- # Find all directories under $d, relative to $d, excluding $d itself.
- # (The /. is needed after $d in case $d is a symlink.)
- all_dirs="$all_dirs `find $d/. -type d -print | \
- sed -e '/\/\.$/d' -e 's@/./@/@g'`"
- # Find all links to directories.
- # Using `-exec test -d' in find fails on some systems,
- # and trying to run test via sh fails on others,
- # so this is the simplest alternative left.
- # First find all the links, then test each one.
- theselinks=
- $LINKS && \
- theselinks=`find $d/. -type l -print | sed -e 's@/./@/@g'`
- for d1 in $theselinks --dummy--
- do
- # If the link points to a directory,
- # add that dir to $newdirs
- if [ -d $d1 ]
- then
- all_dirs="$all_dirs $d1"
- if [ "`ls -ld $d1 | sed -n 's/.*-> //p'`" != "." ]
- then
- newdirs="$newdirs $d1"
- search_dirs="$search_dirs $d1"
- fi
- fi
- done
- done
-
- dirs="$newdirs"
-done
-
-# # # # # # # # # # # # # # # # # # # # #
-#
-dirs=
-if test $VERBOSE -gt 2
-then echo "All directories (including links to directories):"
- echo $all_dirs
-fi
-
-for file in $all_dirs; do
- rm -rf $LIB/$file
- if [ ! -d $LIB/$file ]
- then mkdir $LIB/$file
- fi
-done
-mkdir $LIB/root
-
-# # # # # # # # # # # # # # # # # # # # #
-#
-# treetops gets an alternating list
-# of old directories to copy
-# and the new directories to copy to.
-treetops=". ${LIB}"
-
-if $LINKS; then
- if test $VERBOSE -gt 1
- then echo 'Making symbolic directory links' ; fi
- cwd=`${PWDCMD}`
-
- for sym_link in $search_dirs; do
- cd ${INPUT}
- dest=`ls -ld ${sym_link} | sed -n 's/.*-> //p'`
-
- # In case $dest is relative, get to ${sym_link}'s dir first.
- #
- cd ./`echo ${sym_link} | sed 's;/[^/]*$;;'`
-
- # Check that the target directory exists.
- # Redirections changed to avoid bug in sh on Ultrix.
- #
- (cd $dest) > /dev/null 2>&1
- if [ $? = 0 ]; then
- cd $dest
-
- # full_dest_dir gets the dir that the link actually leads to.
- #
- full_dest_dir=`${PWDCMD}`
-
- # Canonicalize ${INPUT} now to minimize the time an
- # automounter has to change the result of ${PWDCMD}.
- #
- cinput=`cd ${INPUT}; ${PWDCMD}`
-
- # If a link points to ., make a similar link to .
- #
- if [ ${full_dest_dir} = ${cinput} ]; then
- if test $VERBOSE -gt 2
- then echo ${sym_link} '->' . ': Making self link' ; fi
- rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
- ln -s . ${LIB}/${sym_link} > /dev/null 2>&1
-
- # If link leads back into ${INPUT},
- # make a similar link here.
- #
- elif expr ${full_dest_dir} : "${cinput}/.*" > /dev/null; then
- # Y gets the actual target dir name, relative to ${INPUT}.
- y=`echo ${full_dest_dir} | sed -n "s&${cinput}/&&p"`
- # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}.
- dots=`echo "${sym_link}" |
- sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'`
- if test $VERBOSE -gt 2
- then echo ${sym_link} '->' $dots$y ': Making local link' ; fi
- rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
- ln -s $dots$y ${LIB}/${sym_link} > /dev/null 2>&1
-
- else
- # If the link is to a dir $target outside ${INPUT},
- # repoint the link at ${INPUT}/root$target
- # and process $target into ${INPUT}/root$target
- # treat this directory as if it actually contained the files.
- #
- if test $VERBOSE -gt 2
- then echo ${sym_link} '->' root${full_dest_dir} ': Making rooted link'
- fi
- if [ -d $LIB/root${full_dest_dir} ]
- then true
- else
- dirname=root${full_dest_dir}/
- dirmade=.
- cd $LIB
- while [ x$dirname != x ]; do
- component=`echo $dirname | sed -e 's|/.*$||'`
- mkdir $component >/dev/null 2>&1
- cd $component
- dirmade=$dirmade/$component
- dirname=`echo $dirname | sed -e 's|[^/]*/||'`
- done
- fi
-
- # Duplicate directory structure created in ${LIB}/${sym_link} in new
- # root area.
- #
- for file2 in $all_dirs; do
- case $file2 in
- ${sym_link}/*)
- dupdir=${LIB}/root${full_dest_dir}/`echo $file2 |
- sed -n "s|^${sym_link}/||p"`
- if test $VERBOSE -gt 2
- then echo "Duplicating ${sym_link}'s ${dupdir}" ; fi
- if [ -d ${dupdir} ]
- then true
- else
- mkdir ${dupdir}
- fi
- ;;
- *)
- ;;
- esac
- done
-
- # Get the path from ${LIB} to ${sym_link}, accounting for symlinks.
- #
- parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'`
- libabs=`cd ${LIB}; ${PWDCMD}`
- file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"`
-
- # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}.
- #
- dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'`
- rm -fr ${LIB}/${sym_link} > /dev/null 2>&1
- ln -s ${dots}root${full_dest_dir} ${LIB}/${sym_link} > /dev/null 2>&1
- treetops="$treetops ${sym_link} ${LIB}/root${full_dest_dir}"
- fi
- fi
- done
-fi
-
-# # # # # # # # # # # # # # # # # # # # #
-#
-required=
-set x $treetops
-shift
-while [ $# != 0 ]; do
- # $1 is an old directory to copy, and $2 is the new directory to copy to.
- #
- SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}`
- export SRCDIR
-
- FIND_BASE=$1
- export FIND_BASE
- shift
-
- DESTDIR=`cd $1;${PWDCMD}`
- export DESTDIR
- shift
-
- # The same dir can appear more than once in treetops.
- # There's no need to scan it more than once.
- #
- if [ -f ${DESTDIR}/DONE ]
- then continue ; fi
-
- touch ${DESTDIR}/DONE
- if test $VERBOSE -gt 1
- then echo Fixing directory ${SRCDIR} into ${DESTDIR} ; fi
-
- # Check files which are symlinks as well as those which are files.
- #
- cd ${INPUT}
- required="$required `if $LINKS; then
- find ${FIND_BASE}/. -name '*.h' \( -type f -o -type l \) -print
- else
- find ${FIND_BASE}/. -name '*.h' -type f -print
- fi | \
- sed -e 's;/\./;/;g' -e 's;//*;/;g' | \
- ${FIXINCL}`"
-done
-
-## Make sure that any include files referenced using double quotes
-## exist in the fixed directory. This comes last since otherwise
-## we might end up deleting some of these files "because they don't
-## need any change."
-set x `echo $required`
-shift
-while [ $# != 0 ]; do
- newreq=
- while [ $# != 0 ]; do
- # $1 is the directory to copy from,
- # $2 is the unfixed file,
- # $3 is the fixed file name.
- #
- cd ${INPUT}
- cd $1
- if [ -f $2 ] ; then
- if [ -r $2 ] && [ ! -r $3 ]; then
- cp $2 $3 >/dev/null 2>&1 || echo "Can't copy $2" >&2
- chmod +w $3 2>/dev/null
- chmod a+r $3 2>/dev/null
- if test $VERBOSE -gt 2
- then echo Copied $2 ; fi
- for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' $3 |
- sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`
- do
- dir=`echo $2 | sed -e s'|/[^/]*$||'`
- dir2=`echo $3 | sed -e s'|/[^/]*$||'`
- newreq="$newreq $1 $dir/$include $dir2/$include"
- done
- fi
- fi
- shift; shift; shift
- done
- set x $newreq
- shift
-done
-
-if test $VERBOSE -gt 2
-then echo 'Cleaning up DONE files.' ; fi
-cd $LIB
-# Look for files case-insensitively, for the benefit of
-# DOS/Windows filesystems.
-find . -name '[Dd][Oo][Nn][Ee]' -exec rm -f '{}' ';'
-
-if test $VERBOSE -gt 1
-then echo 'Cleaning up unneeded directories:' ; fi
-cd $LIB
-all_dirs=`find . -type d \! -name '.' -print | sort -r`
-for file in $all_dirs; do
- if rmdir $LIB/$file > /dev/null
- then
- test $VERBOSE -gt 3 && echo " removed $file"
- fi
-done 2> /dev/null
-
-# On systems which don't support symlinks, `find' may barf
-# if called with "-type l" predicate. So only use that if
-# we know we should look for symlinks.
-if $LINKS; then
- test $VERBOSE -gt 2 && echo "Removing unused symlinks"
-
- all_dirs=`find . -type l -print`
- for file in $all_dirs
- do
- if test ! -d $file
- then
- rm -f $file
- test $VERBOSE -gt 3 && echo " removed $file"
- rmdir `dirname $file` > /dev/null && \
- test $VERBOSE -gt 3 && \
- echo " removed `dirname $file`"
- fi
- done 2> /dev/null
-fi
-
-if test $VERBOSE -gt 0
-then echo fixincludes is done ; fi
-
-# # # # # # # # # # # # # # # # # # # # #
-#
-# End of for INPUT directories
-#
-done
-#
-# # # # # # # # # # # # # # # # # # # # #
+++ /dev/null
-[= 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 =]
-};
+++ /dev/null
-/* -*- 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 }
-};
+++ /dev/null
-
-/* 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
+++ /dev/null
-
-/* 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 */
+++ /dev/null
-
-/*
-
- 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 );
-}
+++ /dev/null
-#! /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
+++ /dev/null
-/* -*- 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*/
+++ /dev/null
-#! /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
+++ /dev/null
-
-/*
- * 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;
-}
+++ /dev/null
-
-/*
- * 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;
- }
-}
+++ /dev/null
-
-/*
- * 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
+++ /dev/null
-/* 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 */
--- /dev/null
+#! /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}