Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Azkali:Tegra
gcc7
gcc7-fixincludes-gcc-12-has_include.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gcc7-fixincludes-gcc-12-has_include.patch of Package gcc7
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 96107ab5015..e210fb49bed 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,22 +1,281 @@ -2018-06-22 Jakub Jelinek <jakub@redhat.com> +2023-03-28 Xi Ruoyao <xry111@xry111.site> - Backported from mainline - 2018-04-18 David Malcolm <dmalcolm@redhat.com> + Backported from master: + 2023-03-28 Xi Ruoyao <xry111@xry111.site> + + PR other/109293 + * configure.ac (AC_CHECK_DECLS): Add memmem. + * configure: Regenerate. + * config.h.in: Regenerate. + * system.h (memmem): Declare if HAVE_DECL_MEMMEM is zero. + +2022-08-19 Release Manager + + * GCC 12.2.0 released. + +2022-05-06 Release Manager + + * GCC 12.1.0 released. + +2022-02-27 John David Anglin <danglin@gcc.gnu.org> + + * inclhack.def (hpux_math_constexpr): New hack. + * fixincl.x: Regenerate. + * tests/base/math.h: Update. + +2022-02-04 Martin Liska <mliska@suse.cz> + + * fixinc.in: Use cd OLDDIR instead of cd .. . + +2022-02-03 Martin Liska <mliska@suse.cz> + + * fixinc.in: Use mkdir -p rather that a loop. + +2022-01-16 Olivier Hainque <hainque@adacore.com> + + * inclhack.def (vxworks_posix_open): New hack. + * tests/base/fcntl.h: Update. + * fixincl.x: Regenerate. + +2022-01-16 Olivier Hainque <hainque@adacore.com> + + * inclhack.def (vxworks_time_h_syslib): New hack. + * tests/base/time.h: Update. + * fixincl.x: Regenerate. + +2022-01-16 Olivier Hainque <hainque@adacore.com> + + * inclhack.def (vxworks_math_h_fp_c99): New hack. + * tests/base/math.h: Update. + * fixincl.x: Regenerate. + +2022-01-06 Olivier Hainque <hainque@adacore.com> + + * inclhack.def (vxworks_next_yvals): New hack. + * tests/base/yvals.h: New expected test result. + * fixincl.x: Regenerate. + +2022-01-04 Olivier Hainque <hainque@adacore.com> + + * inclhack.def (vxworks_posix_mkdir): Refine to expose a + varargs interface. + * tests/base/sys/stat.h: Update expected results. + * fixincl.x: Regenerate. + +2022-01-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + * inclhack.def: Add new fix on darwin. + * fixincl.x: Regenerate. + * tests/base/math.h: Regenerate. + +2021-11-23 Xi Ruoyao <xry111@mengyan1223.wang> + + PR bootstrap/103306 + * fixincl.c (process): Don't call abort(). + +2021-11-13 Xi Ruoyao <xry111@mengyan1223.wang> + + PR other/21823 + PR bootstrap/80047 + * fixincl.c (process): Simplify the handling for highly + unlikely access() failure, to avoid using non-standard + extensions. + +2021-08-30 John David Anglin <danglin@gcc.gnu.org> + + * inclhack.def (hpux_c99_inttypes5): New hack to define PRIdPTR, etc. + * fixincl.x: Regenerate. + * tests/base/inttypes.h: Update. + +2021-07-06 Clément Chigot <clement.chigot@atos.net> + + * inclhack.def (aix_externcpp1): Improve select regexp. + * fixincl.x: Regenerate. + * tests/base/sys/socket.h: Update. + +2021-06-30 Xi Ruoyao <xry111@mengyan1223.wang> + + PR other/91085 + * fixfixes.c (check_has_inc): New static function. + (machine_name_fix): Don't replace header names in + __has_include(...). + * inclhack.def (machine_name): Adjust test. + * tests/base/testing.h: Update. + +2020-12-14 Ilya Leoshkevich <iii@linux.ibm.com> + + * fixincl.x: Rerun genfixes. + * inclhack.def(aix_physadr_t): Change test_text to something + that needs to be replaced. + * tests/base/sys/types.h(aix_physadr_t): Add expectation. + +2020-11-18 Nathan Sidwell <nathan@acm.org> + + * inclhack.def (aix_physaddr_t): New. + * fixincl.x: Regenerated. + +2020-10-03 Clément Chigot <clement.chigot@atos.net> + + * inclhack.def (aix_malloc): Add more context to select. + * fixincl.x: Regenerate. + * tests/base/malloc.h: Update expected results. + +2020-09-26 David Edelsohn <dje.gcc@gmail.com> + + PR target/97044 + * inclhack.def (aix_inttypes): New fix. + * fixincl.x: Regenerate. + * tests/base/sys/inttypes.h: New file. + +2020-09-17 David Edelsohn <dje.gcc@gmail.com> + + * inclhack.def (aix_externcpp1): Add more context to select. + (aix_externcpp2): Same. + * fixincl.x: Regenerate. + * tests/base/sys/socket.h: Update expected results. + +2020-09-17 Torbjörn SVENSSON <torbjorn.svensson@st.com> + Christophe Lyon <christophe.lyon@linaro.org> + + * fixfixes.c (pz_tmp_base, pz_tmp_dot): Define only with + _PC_NAME_MAX. + +2020-02-20 Alexandre Oliva <oliva@adacore.com> + + * mkheaders.in: Don't require build-time shell on host. + +2020-02-13 Matheus Castanho <msc@linux.ibm.com> + + * fixinc.in: Skip machine_name fix on powerpc*-*-linux*. + +2020-02-13 Alexandre Oliva <oliva@adacore.com> + + * mkheaders.in: Re-create subdirs, copy limits.h into subdir. + * mkfixinc.sh: Create dummy fixinc for *-*-vxworks7*. + +2020-01-25 John David Anglin <danglin@gcc.gnu.org> + + * inclhack.def (hpux_c99_inttypes4): New, add missing SCNuMAX defines. + * fixincl.x: Regenerate. + * tests/base/inttypes.h: Update for above fix. + +2019-12-30 John David Anglin <danglin@gcc.gnu.org> + + PR libgomp/93066 + * inclhack.def (hpux_c99_inttypes3): Fix defines for INTPTR_MAX + and UINTPTR_MAX, and missing define for SIZE_MAX. + * fixincl.x: Regenerate. + * tests/base/inttypes.h: Update for above fix. + +2019-08-18 C.G. Dogan <gcc+cgdogan.00@gmail.com> + Iain Sandoe <iain@sandoe.co.uk> + + PR target/83531 + * inclhack.def (darwin_api_availability): New, strip leading + underscores from API_XXXX defines. + * fixincl.x: Regenerate. + * tests/base/os/availability.h: New file. + +2019-06-21 Iain Sandoe <iain@sandoe.co.uk> + + * inclhack.def: Replace the complex test using __STRICT_ANSI__ and + __STDC_VERSION__ with a test using __DARWIN_NO_LONG_LONG. + Ensure that the top level math.h uses <> to wrap included headers + rather than "". + * fixincl.x: Regenerated. + * tests/base/architecture/ppc/math.h: Update test to include the + __DARWIN_NO_LONG_LONG case. + +2019-06-21 Iain Sandoe <iain@sandoe.co.uk> + + * inclhack.def: Guard __has_attribute and __has_extension in + os/base.h. + Guard Apple blocks syntax in dispatch/object.h. + * fixincl.x: Regenerate. + * tests/base/dispatch/object.h: New file. + * tests/base/os/base.h: New file. + +2019-05-11 Iain Sandoe <iain@sandoe.co.uk> + PR target/90379 + PR bootstrap/89864 + * inclhack.def (darwin_ucred__Atomic): Do not supply test_text + for wrap fixes. + * fixincl.x: Regenerated. + +2019-04-18 Erik Schnetter <schnetter@gmail.com> + Jakub Jelinek <jakub@redhat.com> + Iain Sandoe <iain@sandoe.co.uk> + + PR bootstrap/89864 + * inclhack.def (darwin_ucred__Atomic): New, work around _Atomic keyword + use in headers included by C++. + * fixincl.x: Regenerated. + +2018-10-31 Joseph Myers <joseph@codesourcery.com> + + PR bootstrap/82856 + * configure.ac: Remove AC_PREREQ. + * aclocal.m4, configure: Regenerate. + +2018-10-16 Rasmus Villemoes <rv@rasmusvillemoes.dk> + + * inclhack.def (AAB_vxworks_regs_vxtypes): Add unconditional + include of vxCpu.h, guard include of vxTypesOld.h by + !_ASMLANGUAGE. + * fixincl.x: Regenerate. + +2018-09-03 Rasmus Villemoes <rv@rasmusvillemoes.dk> + + * inclhack.def (vxworks_ioctl_macro): Remove parentheses from + expansion of ioctl macro. + * fixincl.x: Regenerate. + +2018-07-23 David Edelsohn <dje.gcc@gmail.com> + + * inclhack.def (aix_unistd): New. + * fixincl.x: Regenerate. + * tests/base/unistd.h [AIX_UNISTD_CHECK]: New test. + +2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk> + + * tests/base/ioLib.h [VXWORKS_IOLIB_INCLUDE_UNISTD_CHECK]: Add + missing hunk. + +2018-06-12 Rasmus Villemoes <rasmus.villemoes@prevas.dk> + + * genfixes: exit 1 when autogen not found. + * genfixes: Remove some redundant code. + * genfixes: Update URL to autogen source code. + + * inclhack.def: Fix fixup for assert.h on vxworks. + * fixincl.x: Regenerate. + +2018-05-25 Rasmus Villemoes <rasmus.villemoes@prevas.dk> + + * inclhack.def (vxworks_iolib_include_unistd): New fix. + +2018-04-18 David Malcolm <dmalcolm@redhat.com> PR jit/85384 * configure: Regenerate. -2018-01-25 Release Manager +2018-02-22 David Edelsohn <dje.gcc@gmail.com> - * GCC 7.3.0 released. + * inclhack.def (aix_stdlib_vec_malloc): New. + (aix_stdlib_vec_calloc): New. + * fixincl.x: Regenerate. + * tests/base/stdlib.h [AIX_STDLIB_VEC_MALLOC]: New test. + [AIX_STDLIB_VEC_CALLOC]: New test. -2017-08-14 Release Manager +2017-10-13 Mike Frysinger <vapier@chromium.org> - * GCC 7.2.0 released. + * fixinc.in (dirname): Change sed from 's|[^/]*/||' to + 's|[^/]*//*||'. -2017-05-02 Release Manager +2017-06-12 Doug Rupp <rupp@adacore.com> - * GCC 7.1.0 released. + * inclhack.def (AAB_vxworks_stdint): Remove hack. + * fixincl.x: Regenerate. 2017-02-25 John David Anglin <danglin@gcc.gnu.org> @@ -1229,7 +1488,7 @@ * tests/base/math.h: Update. 2007-01-05 Bruce Korb <bkorb@gnu.org>, - Daniel Franke <franke.daniel@gmail.com> + Daniel Franke <franke.daniel@gmail.com> PR target/30008 * fixincl.tpl (List): separate file name patterns with a NUL byte instead @@ -1445,7 +1704,7 @@ * fixincl.c: Don't include <sys/wait.h> if SEPARATE_FIX_PROC. 2005-05-19 Eric Botcazou <ebotcazou@libertysurf.fr> - Joseph S. Myers <joseph@codesourcery.com> + Joseph S. Myers <joseph@codesourcery.com> PR target/19933 PR target/21315 diff --git a/fixincludes/aclocal.m4 b/fixincludes/aclocal.m4 index 7092c900215..20b7f4d9a8d 100644 --- a/fixincludes/aclocal.m4 +++ b/fixincludes/aclocal.m4 @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -12,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_include([../config/acx.m4]) m4_include([../config/mmap.m4]) m4_include([../config/override.m4]) diff --git a/fixincludes/config.h.in b/fixincludes/config.h.in index 3f6cf1e574e..9792fdb2419 100644 --- a/fixincludes/config.h.in +++ b/fixincludes/config.h.in @@ -138,6 +138,10 @@ #endif +/* Define to 1 if you have the declaration of `memmem', and to 0 if you don't. + */ +#undef HAVE_DECL_MEMMEM + /* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if you don't. */ #ifndef USED_FOR_TARGET diff --git a/fixincludes/configure b/fixincludes/configure index e4b03fd588c..0d5cd6967ca 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -1,10 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for fixincludes . +# Generated by GNU Autoconf 2.69 for fixincludes . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -87,6 +87,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -131,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -164,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -209,14 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -314,10 +352,18 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -354,19 +400,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -439,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # 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 sensitive to this). @@ -473,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -494,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -524,10 +554,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -exec 7<&0 </dev/null 6>&1 +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -738,8 +769,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -784,7 +816,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -810,7 +842,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1014,7 +1046,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1030,7 +1062,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1060,8 +1092,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1069,7 +1101,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1079,7 +1111,7 @@ Try \`$0 --help' for more information." $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1087,13 +1119,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1116,7 +1148,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1130,8 +1162,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_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 @@ -1146,9 +1176,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1187,11 +1217,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1231,7 +1261,7 @@ Configuration: --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 + -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 @@ -1309,7 +1339,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor @@ -1380,9 +1410,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF fixincludes configure -generated by GNU Autoconf 2.64 +generated by GNU Autoconf 2.69 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1426,8 +1456,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1452,7 +1482,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1463,8 +1493,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1476,10 +1506,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1515,7 +1545,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1542,7 +1572,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1551,7 +1581,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1592,8 +1622,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1606,7 +1636,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1624,7 +1654,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1655,7 +1685,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1669,8 +1699,8 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1682,7 +1712,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1737,13 +1767,14 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -1751,7 +1782,7 @@ ac_fn_c_check_decl () as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1782,7 +1813,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF @@ -1790,7 +1821,7 @@ 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.64. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1900,11 +1931,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1938,11 +1967,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1955,11 +1982,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1973,11 +1998,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2032,7 +2055,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2043,18 +2071,22 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } 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 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -2123,7 +2155,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2142,16 +2174,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in .. "$srcdir"/..; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + 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 - as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3158,27 +3196,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3196,14 +3234,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3211,7 +3249,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3229,14 +3267,14 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : +if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi @@ -3244,7 +3282,7 @@ fi $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -3277,7 +3315,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3289,7 +3327,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3317,7 +3355,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3329,7 +3367,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3370,7 +3408,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3382,7 +3420,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3410,7 +3448,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3423,7 +3461,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_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 @@ -3469,7 +3507,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3481,7 +3519,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3513,7 +3551,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3525,7 +3563,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3567,8 +3605,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3589,8 +3627,8 @@ $as_echo "$ac_try_echo"; } >&5 ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3607,12 +3645,12 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM 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. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3674,62 +3712,28 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -3759,19 +3763,78 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3811,8 +3874,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3822,7 +3885,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3859,7 +3922,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3937,7 +4000,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3946,8 +4009,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* 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); @@ -4045,7 +4107,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4075,7 +4137,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4091,11 +4153,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4134,7 +4196,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4150,18 +4212,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4173,7 +4235,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -4187,7 +4249,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4222,7 +4284,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4236,7 +4298,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4253,7 +4315,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4288,7 +4350,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4303,7 +4365,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4420,8 +4482,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4433,7 +4494,7 @@ done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -4455,14 +4516,14 @@ $as_echo "#define _MINIX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -4494,7 +4555,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -4514,7 +4575,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4549,7 +4610,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4586,7 +4647,7 @@ for real_option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 $as_echo_n "checking whether $CC supports $option... " >&6; } -if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$as_acx_Woption+:} false; then : $as_echo_n "(cached) " >&6 else CFLAGS="$option" @@ -4636,7 +4697,7 @@ WARN_PEDANTIC= if test "$GCC" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wlong-long" >&5 $as_echo_n "checking whether $CC supports -pedantic -Wlong-long... " >&6; } -if test "${acx_cv_prog_cc_pedantic__Wlong_long+set}" = set; then : +if ${acx_cv_prog_cc_pedantic__Wlong_long+:} false; then : $as_echo_n "(cached) " >&6 else save_CFLAGS="$CFLAGS" @@ -4728,7 +4789,7 @@ local_prefix= # Check whether --with-local-prefix was given. if test "${with_local_prefix+set}" = set; then : withval=$with_local_prefix; case "${withval}" in -yes) as_fn_error "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;; +yes) as_fn_error $? "bad value ${withval} given for local include directory prefix" "$LINENO" 5 ;; no) ;; *) local_prefix=$with_local_prefix ;; esac @@ -4794,7 +4855,7 @@ _ACEOF # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4909,8 +4970,7 @@ for ac_header in stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -4924,8 +4984,7 @@ for ac_func in clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -4934,7 +4993,7 @@ fi done ac_fn_c_check_decl "$LINENO" "abort" "ac_cv_have_decl_abort" "$ac_includes_default" -if test "x$ac_cv_have_decl_abort" = x""yes; then : +if test "x$ac_cv_have_decl_abort" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -4944,7 +5003,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ABORT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_asprintf" = x""yes; then : +if test "x$ac_cv_have_decl_asprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -4953,8 +5012,9 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ASPRINTF $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "basename(char *)" "ac_cv_have_decl_basename_char_p_" "$ac_includes_default" -if test "x$ac_cv_have_decl_basename_char_p_" = x""yes; then : +as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` +ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" +if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : ac_have_decl=1 else ac_have_decl=0 @@ -4964,7 +5024,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_BASENAME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "errno" "ac_cv_have_decl_errno" "$ac_includes_default" -if test "x$ac_cv_have_decl_errno" = x""yes; then : +if test "x$ac_cv_have_decl_errno" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -4974,7 +5034,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ERRNO $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : +if test "x$ac_cv_have_decl_vasprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -4983,9 +5043,19 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_VASPRINTF $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" +if test "x$ac_cv_have_decl_memmem" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MEMMEM $ac_have_decl +_ACEOF ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -4995,7 +5065,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5005,7 +5075,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5015,7 +5085,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5025,7 +5095,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fgetc_unlocked" "ac_cv_have_decl_fgetc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fgetc_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fgetc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5035,7 +5105,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FGETC_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5045,7 +5115,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fileno_unlocked" "ac_cv_have_decl_fileno_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fileno_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fileno_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5055,7 +5125,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FILENO_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fprintf_unlocked" "ac_cv_have_decl_fprintf_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fprintf_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fprintf_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5065,7 +5135,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPRINTF_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5075,7 +5145,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5085,7 +5155,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5095,7 +5165,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5105,7 +5175,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5115,7 +5185,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5125,7 +5195,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5135,7 +5205,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then : +if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -5149,7 +5219,7 @@ _ACEOF # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5158,11 +5228,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -5179,8 +5249,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -5196,10 +5267,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, 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; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -5231,7 +5302,7 @@ fi # Checks for library functions. ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mman_h" = x""yes; then : +if test "x$ac_cv_header_sys_mman_h" = xyes; then : gcc_header_sys_mman_h=yes else gcc_header_sys_mman_h=no @@ -5239,7 +5310,7 @@ fi ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : +if test "x$ac_cv_func_mmap" = xyes; then : gcc_func_mmap=yes else gcc_func_mmap=no @@ -5253,7 +5324,7 @@ if test "$gcc_header_sys_mman_h" != yes \ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether read-only mmap of a plain file works" >&5 $as_echo_n "checking whether read-only mmap of a plain file works... " >&6; } -if test "${gcc_cv_func_mmap_file+set}" = set; then : +if ${gcc_cv_func_mmap_file+:} false; then : $as_echo_n "(cached) " >&6 else # Add a system to this blacklist if @@ -5272,7 +5343,7 @@ fi $as_echo "$gcc_cv_func_mmap_file" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap from /dev/zero works" >&5 $as_echo_n "checking whether mmap from /dev/zero works... " >&6; } -if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then : +if ${gcc_cv_func_mmap_dev_zero+:} false; then : $as_echo_n "(cached) " >&6 else # Add a system to this blacklist if it has mmap() but /dev/zero @@ -5298,7 +5369,7 @@ $as_echo "$gcc_cv_func_mmap_dev_zero" >&6; } # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5 $as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; } -if test "${gcc_cv_decl_map_anon+set}" = set; then : +if ${gcc_cv_decl_map_anon+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5334,7 +5405,7 @@ $as_echo "$gcc_cv_decl_map_anon" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mmap with MAP_ANON(YMOUS) works" >&5 $as_echo_n "checking whether mmap with MAP_ANON(YMOUS) works... " >&6; } -if test "${gcc_cv_func_mmap_anon+set}" = set; then : +if ${gcc_cv_func_mmap_anon+:} false; then : $as_echo_n "(cached) " >&6 else # Add a system to this blacklist if it has mmap() and MAP_ANON or @@ -5477,10 +5548,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&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" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -5496,6 +5578,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -5511,7 +5594,7 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -5612,6 +5695,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5657,19 +5741,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -5807,16 +5891,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -5865,7 +5949,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -5876,28 +5960,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -5919,7 +5991,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by fixincludes $as_me , which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5958,6 +6030,7 @@ Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -5977,12 +6050,13 @@ Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ fixincludes config.status -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -5997,11 +6071,16 @@ 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=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -6015,12 +6094,15 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -6033,7 +6115,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -6042,7 +6124,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -6062,7 +6144,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -6095,7 +6177,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "mkheaders.almost") CONFIG_FILES="$CONFIG_FILES mkheaders.almost:mkheaders.in" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -6117,9 +6199,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -6127,12 +6210,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -6149,12 +6233,12 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -6163,18 +6247,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -6182,7 +6266,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -6196,7 +6280,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -6210,7 +6294,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -6230,7 +6314,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -6262,21 +6346,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -6288,7 +6380,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -6300,11 +6392,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -6389,7 +6481,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -6402,7 +6494,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -6421,7 +6513,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -6430,7 +6522,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -6456,8 +6548,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -6582,23 +6674,24 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -6607,21 +6700,21 @@ which seems to be undefined. Please make sure it is defined." >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -6641,7 +6734,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -6662,7 +6755,7 @@ if test "$no_create" != yes; then 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 || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index 190f5382874..ef2227e3c93 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -1,4 +1,3 @@ -AC_PREREQ(2.64) AC_INIT(fixincludes, [ ]) AC_CONFIG_SRCDIR(inclhack.def) @@ -89,7 +88,7 @@ define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl putchar_unlocked putc_unlocked) AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS) -AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, vasprintf]) +AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, vasprintf, memmem]) AC_CHECK_DECLS(m4_split(m4_normalize(fixincludes_UNLOCKED_FUNCS))) # Checks for typedefs, structures, and compiler characteristics. diff --git a/fixincludes/fixfixes.c b/fixincludes/fixfixes.c index 034e15d9985..404b420f302 100644 --- a/fixincludes/fixfixes.c +++ b/fixincludes/fixfixes.c @@ -477,6 +477,39 @@ FIX_PROC_HEAD( char_macro_def_fix ) fputs (text, stdout); } +/* Check if the pattern at pos is actually in a "__has_include(...)" + directive. Return the pointer to the ')' of this + "__has_include(...)" if it is, NULL otherwise. */ +static const char * +check_has_inc (const char *begin, const char *pos, const char *end) +{ + static const char has_inc[] = "__has_include"; + const size_t has_inc_len = sizeof (has_inc) - 1; + const char *p; + + for (p = memmem (begin, pos - begin, has_inc, has_inc_len); + p != NULL; + p = memmem (p, pos - p, has_inc, has_inc_len)) + { + p += has_inc_len; + while (p < end && ISSPACE (*p)) + p++; + + /* "__has_include" may appear as "defined(__has_include)", + search for the next appearance then. */ + if (*p != '(') + continue; + + /* To avoid too much complexity, just hope there is never a + ')' in a header name. */ + p = memchr (p, ')', end - p); + if (p == NULL || p > pos) + return p; + } + + return NULL; +} + /* 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 @@ -524,7 +557,7 @@ FIX_PROC_HEAD( machine_name_fix ) /* 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. + such lines are only legal in a "__has_include" directive. 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 @@ -544,8 +577,16 @@ FIX_PROC_HEAD( machine_name_fix ) break; p = base + match[0].rm_so; - base += match[0].rm_eo; + /* Check if the match is in __has_include(...) (PR 91085). */ + q = check_has_inc (base, p, limit); + if (q) + { + base = q + 1; + goto again; + } + + 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. */ @@ -738,8 +779,10 @@ main( int argc, char** argv ) { tFixDesc* pFix; char* pz_tmptmp; +#ifdef _PC_NAME_MAX char* pz_tmp_base; char* pz_tmp_dot; +#endif if (argc != 5) { @@ -772,12 +815,12 @@ main( int argc, char** argv ) pz_tmptmp = XNEWVEC (char, strlen (argv[4]) + 5); strcpy( pz_tmptmp, argv[4] ); +#ifdef _PC_NAME_MAX /* 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, '.' ); -#ifdef _PC_NAME_MAX 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 */ diff --git a/fixincludes/fixinc.in b/fixincludes/fixinc.in index 15cbaa23544..0bd8027a554 100755 --- a/fixincludes/fixinc.in +++ b/fixincludes/fixinc.in @@ -136,7 +136,7 @@ fi # disable the fix. case "${target_canonical}" in - *-*-vxworks*) + *-*-vxworks* | powerpc*-*-linux*) test -f ${MACRO_LIST} && echo > ${MACRO_LIST} ;; esac @@ -258,12 +258,11 @@ 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 +OLDDIR=`${PWDCMD}` +cd $LIB +echo "$all_dirs" | xargs mkdir -p +cd ${OLDDIR} + mkdir $LIB/root # # # # # # # # # # # # # # # # # # # # # @@ -344,7 +343,7 @@ if $LINKS; then mkdir $component >/dev/null 2>&1 cd $component dirmade=$dirmade/$component - dirname=`echo $dirname | sed -e 's|[^/]*/||'` + dirname=`echo $dirname | sed -e 's|[^/]*//*||'` done fi diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c index 6dba2f6e830..92909baf85f 100644 --- a/fixincludes/fixincl.c +++ b/fixincludes/fixincl.c @@ -1352,10 +1352,18 @@ process (void) 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)); + /* It may happens if for e. g. the distro ships some broken symlinks + in /usr/include. */ + + /* "INPUT" is exported in fixinc.sh, which is the pwd where fixincl + runs. It's used instead of getcwd to avoid allocating a buffer + with unknown length. */ + const char *cwd = getenv ("INPUT"); + if (!cwd) + cwd = "the working directory"; + + fprintf (stderr, "Cannot access %s from %s: %s\n", pz_curr_file, cwd, + xstrerror (errno)); return; } diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index c5be74f2832..bad490453b7 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -1,12 +1,12 @@ /* -*- buffer-read-only: t -*- vi: set ro: - * + * * DO NOT EDIT THIS FILE (fixincl.x) - * - * It has been AutoGen-ed Saturday February 25, 2017 at 03:25:44 PM EST + * + * It has been AutoGen-ed February 27, 2022 at 07:47:03 PM by AutoGen 5.18.16 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Sat 25 Feb 2017 15:25:44 EST +/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Feb 27 19:47:03 UTC 2022 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 248 fixup descriptions. + * This file contains 267 fixup descriptions. * * See README for more information. * @@ -267,6 +267,56 @@ static const char* apzAab_Darwin7_9_Long_Double_FuncsPatch[] = { #endif /* __MATH__ */", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_Api_Availability fix + */ +tSCC zDarwin_Api_AvailabilityName[] = + "darwin_api_availability"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Api_AvailabilityList[] = + "os/availability.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Api_AvailabilityMachs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Api_AvailabilitySelect0[] = + " *#define __API_AVAILABLE.*\n\ + *#define __API_DEPRECATED.*\n\ + *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n\ + *#define __API_UNAVAILABLE.*\n"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zDarwin_Api_AvailabilityBypass0[] = + "__IPHONE_OS_VERSION_MIN_REQUIRED"; + +#define DARWIN_API_AVAILABILITY_TEST_CT 2 +static tTestDesc aDarwin_Api_AvailabilityTests[] = { + { TT_NEGREP, zDarwin_Api_AvailabilityBypass0, (regex_t*)NULL }, + { TT_EGREP, zDarwin_Api_AvailabilitySelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Api_Availability + */ +static const char* apzDarwin_Api_AvailabilityPatch[] = { + "format", + " #define API_AVAILABLE(...)\n\ + #define API_DEPRECATED(...)\n\ + #define API_DEPRECATED_WITH_REPLACEMENT(...)\n\ + #define API_UNAVAILABLE(...)\n", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Aab_Fd_Zero_Asm_Posix_Types_H fix @@ -524,11 +574,14 @@ tSCC* apzAab_Vxworks_AssertMachs[] = { * Fix Command Arguments for Aab_Vxworks_Assert */ static const char* apzAab_Vxworks_AssertPatch[] = { -"#ifndef _ASSERT_H\n\ -#define _ASSERT_H\n\n\ -#ifdef assert\n\ +"#ifdef _ASSERT_H\n\ +#undef _ASSERT_H\n\ #undef assert\n\ #endif\n\n\ +#define _ASSERT_H\n\n\ +#ifdef __cplusplus\n\ +extern \"C\" {\n\ +#endif\n\n\ #if defined(__STDC__) || defined(__cplusplus)\n\ extern void __assert (const char*);\n\ #else\n\ @@ -541,9 +594,11 @@ extern void __assert ();\n\ #define ASSERT_STRINGIFY_HELPER(str) #str\n\n\ #define assert(test) ((void) \\\n\ ((test) ? ((void)0) : \\\n\ - __assert(\"Assertion failed: \" ASSERT_STRINGIFY(test) \", file \" \\\n\ + __assert(\"Assertion failed: \" #test \", file \" \\\n\ __FILE__ \", line \" ASSERT_STRINGIFY(__LINE__) \"\\n\")))\n\n\ #endif\n\n\ +#ifdef __cplusplus\n\ +}\n\ #endif", (char*)NULL }; @@ -574,125 +629,21 @@ tSCC* apzAab_Vxworks_Regs_VxtypesMachs[] = { static const char* apzAab_Vxworks_Regs_VxtypesPatch[] = { "#ifndef _REGS_H\n\ #define _REGS_H\n\ +/* regs.h depends on CPU_FAMILY being properly defined, which\n\ + is done by vxCpu.h. */\n\ +#include <types/vxCpu.h>\n\ +/* regs.h includes a CPU_FAMILY-specific header that requires\n\ + vxTypesOld.h to already have been included. Those headers\n\ + contain proper _ASMLANGUAGE guards around their typedefs,\n\ + but vxTypesOld.h itself does not. So we avoid including\n\ + vxTypesOld.h from assembly. */\n\ +#ifndef _ASMLANGUAGE\n\ #include <types/vxTypesOld.h>\n\ +#endif\n\ #include_next <arch/../regs.h>\n\ #endif", (char*)NULL }; -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Aab_Vxworks_Stdint fix - */ -tSCC zAab_Vxworks_StdintName[] = - "AAB_vxworks_stdint"; - -/* - * File name selection pattern - */ -tSCC zAab_Vxworks_StdintList[] = - "stdint.h\0"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzAab_Vxworks_StdintMachs[] = { - "*-*-vxworks*", - (const char*)NULL }; -#define AAB_VXWORKS_STDINT_TEST_CT 0 -#define aAab_Vxworks_StdintTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Aab_Vxworks_Stdint - */ -static const char* apzAab_Vxworks_StdintPatch[] = { -"#ifndef _STDINT_H\n\ -#define _STDINT_H\n\ -/* get int*_t, uint*_t */\n\ -#include <types/vxTypes.h>\n\n\ -/* get legacy vxworks types for compatibility */\n\ -#include <types/vxTypesOld.h>\n\n\ -typedef long intptr_t;\n\ -typedef unsigned long uintptr_t;\n\n\ -typedef int64_t intmax_t;\n\ -typedef uint64_t uintmax_t;\n\n\ -typedef int8_t int_least8_t;\n\ -typedef int16_t int_least16_t;\n\ -typedef int32_t int_least32_t;\n\ -typedef int64_t int_least64_t;\n\n\ -typedef uint8_t uint_least8_t;\n\ -typedef uint16_t uint_least16_t;\n\ -typedef uint32_t uint_least32_t;\n\ -typedef uint64_t uint_least64_t;\n\n\ -typedef int8_t int_fast8_t;\n\ -typedef int int_fast16_t;\n\ -typedef int32_t int_fast32_t;\n\ -typedef int64_t int_fast64_t;\n\n\ -typedef uint8_t uint_fast8_t;\n\ -typedef unsigned int uint_fast16_t;\n\ -typedef uint32_t uint_fast32_t;\n\ -typedef uint64_t uint_fast64_t;\n\n\ -/* Ranges */\n\ -#define UINT8_MAX (~(uint8_t)0)\n\ -#define UINT8_MIN 0\n\ -#define UINT16_MAX (~(uint16_t)0)\n\ -#define UINT16_MIN 0\n\ -#define UINT32_MAX (~(uint32_t)0)\n\ -#define UINT32_MIN 0\n\ -#define UINT64_MAX (~(uint64_t)0)\n\ -#define UINT64_MIN 0\n\n\ -#define UINTPTR_MAX (~(uintptr_t)0)\n\ -#define UINTPTR_MIN 0\n\n\ -/* Need to do int_fast16_t as well, as type\n\ - size may be architecture dependent */\n\ -#define UINT_FAST16_MAX (~(uint_fast16_t)0)\n\ -#define UINT_FAST16_MAX 0\n\n\ -#define INT8_MAX (UINT8_MAX>>1)\n\ -#define INT8_MIN (INT8_MAX+1)\n\ -#define INT16_MAX (UINT16_MAX>>1)\n\ -#define INT16_MIN (INT16_MAX+1)\n\ -#define INT32_MAX (UINT32_MAX>>1)\n\ -#define INT32_MIN (INT32_MAX+1)\n\ -#define INT64_MAX (UINT64_MAX>>1)\n\ -#define INT64_MIN (INT64_MAX+1)\n\n\ -#define INTPTR_MAX (UINTPTR_MAX>>1)\n\ -#define INTPTR_MIN (INTPTR_MAX+1)\t\n\n\ -#define INT_FAST16_MAX (UINT_FAST16_MAX>>1)\n\ -#define INT_FAST16_MIN (INT_FAST16_MAX+1)\n\n\ -/* now define equiv. constants */\n\ -#define UINT_FAST8_MAX UINT8_MAX\n\ -#define UINT_FAST8_MIN UINT_FAST8_MIN\n\ -#define INT_FAST8_MAX INT8_MAX\n\ -#define INT_FAST8_MIN INT8_MIN\n\ -#define UINT_FAST32_MAX UINT32_MAX\n\ -#define UINT_FAST32_MIN UINT32_MIN\n\ -#define INT_FAST32_MAX INT32_MAX\n\ -#define INT_FAST32_MIN INT32_MIN\n\ -#define UINT_FAST64_MAX UINT64_MAX\n\ -#define UINT_FAST64_MIN UINT64_MIN\n\ -#define INT_FAST64_MAX INT64_MAX\n\ -#define INT_FAST64_MIN INT64_MIN\n\n\ -#define UINT_LEAST8_MAX UINT8_MAX\n\ -#define UINT_LEAST8_MIN UINT8_MIN\n\ -#define INT_LEAST8_MAX INT8_MAX\n\ -#define INT_LEAST8_MIN INT8_MIN\n\ -#define UINT_LEAST16_MAX UINT16_MAX\n\ -#define UINT_LEAST16_MIN UINT16_MIN\n\ -#define INT_LEAST16_MAX INT16_MAX\n\ -#define INT_LEAST16_MIN INT16_MIN\n\ -#define UINT_LEAST32_MAX UINT32_MAX\n\ -#define UINT_LEAST32_MIN UINT32_MIN\n\ -#define INT_LEAST32_MAX INT32_MAX\n\ -#define INT_LEAST32_MIN INT32_MIN\n\ -#define UINT_LEAST64_MAX UINT64_MAX\n\ -#define UINT_LEAST64_MIN UINT64_MIN\n\ -#define INT_LEAST64_MAX INT64_MAX\n\ -#define INT_LEAST64_MIN INT64_MIN\n\n\ -#define UINTMAX_MAX UINT64_MAX\n\ -#define UINTMAX_MIN UINT64_MIN\n\ -#define INTMAX_MAX INT64_MAX\n\ -#define INTMAX_MIN INT64_MIN\n\n\ -#endif", - (char*)NULL }; - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Aab_Vxworks_Unistd fix @@ -875,7 +826,9 @@ tSCC* apzAix_Externcpp1Machs[] = { * content selection pattern - do fix if pattern found */ tSCC zAix_Externcpp1Select0[] = - "#ifdef __cplusplus"; + "#ifndef _KERNEL\n\ +#ifdef __cplusplus\n\ +extern \"C\" int naccept\\(int, struct sockaddr \\*, socklen_t \\*\\);"; #define AIX_EXTERNCPP1_TEST_CT 1 static tTestDesc aAix_Externcpp1Tests[] = { @@ -886,8 +839,10 @@ static tTestDesc aAix_Externcpp1Tests[] = { */ static const char* apzAix_Externcpp1Patch[] = { "format", - "#ifdef __cplusplus\n\ -extern \"C++\" {", + "#ifndef _KERNEL\n\ +#ifdef __cplusplus\n\ +extern \"C++\" {\n\ +extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -913,7 +868,8 @@ tSCC* apzAix_Externcpp2Machs[] = { * content selection pattern - do fix if pattern found */ tSCC zAix_Externcpp2Select0[] = - "#else /\\* __cplusplus \\*/"; + "#endif /\\* COMPAT_43 \\*/\n\ +#else /\\* __cplusplus \\*/"; #define AIX_EXTERNCPP2_TEST_CT 1 static tTestDesc aAix_Externcpp2Tests[] = { @@ -924,10 +880,48 @@ static tTestDesc aAix_Externcpp2Tests[] = { */ static const char* apzAix_Externcpp2Patch[] = { "format", - "} /* extern \"C++\" */\n\ + "#endif /* COMPAT_43 */\n\ +} /* extern \"C++\" */\n\ #else /* __cplusplus */", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Inttypes fix + */ +tSCC zAix_InttypesName[] = + "aix_inttypes"; + +/* + * File name selection pattern + */ +tSCC zAix_InttypesList[] = + "sys/inttypes.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_InttypesMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_InttypesSelect0[] = + "#if !defined\\(__cplusplus\\) \\|\\| defined\\(__STDC_FORMAT_MACROS\\)"; + +#define AIX_INTTYPES_TEST_CT 1 +static tTestDesc aAix_InttypesTests[] = { + { TT_EGREP, zAix_InttypesSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Inttypes + */ +static const char* apzAix_InttypesPatch[] = { + "format", + "#if 1", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Aix_Malloc fix @@ -951,7 +945,9 @@ tSCC* apzAix_MallocMachs[] = { * content selection pattern - do fix if pattern found */ tSCC zAix_MallocSelect0[] = - "#ifdef __cplusplus"; + "#ifdef __cplusplus\n\ +extern \"C\" \\{\n\ +[ \t]extern \"builtin\" char \\*__alloca \\(size_t\\);"; #define AIX_MALLOC_TEST_CT 1 static tTestDesc aAix_MallocTests[] = { @@ -962,7 +958,9 @@ static tTestDesc aAix_MallocTests[] = { */ static const char* apzAix_MallocPatch[] = { "format", - "#if (defined(__cplusplus) && defined(__IBMCPP__))", + "#if (defined(__cplusplus) && defined(__IBMCPP__))\n\ +extern \"C\" {\n\ +\textern \"builtin\" char *__alloca (size_t);", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1251,6 +1249,43 @@ static const char* apzAix_Rwlock_Initializer_1Patch[] = { {{ \\\n", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Physadr_T fix + */ +tSCC zAix_Physadr_TName[] = + "aix_physadr_t"; + +/* + * File name selection pattern + */ +tSCC zAix_Physadr_TList[] = + "sys/types.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Physadr_TMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Physadr_TSelect0[] = + "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)"; + +#define AIX_PHYSADR_T_TEST_CT 1 +static tTestDesc aAix_Physadr_TTests[] = { + { TT_EGREP, zAix_Physadr_TSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Physadr_T + */ +static const char* apzAix_Physadr_TPatch[] = { + "format", + "typedef struct __physadr_s %1", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Aix_Pthread fix @@ -1693,6 +1728,80 @@ static const char* apzAix_Stdlib_VallocPatch[] = { "extern void *valloc(size_t) __asm__(\"__linux_valloc\");", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Stdlib_Vec_Malloc fix + */ +tSCC zAix_Stdlib_Vec_MallocName[] = + "aix_stdlib_vec_malloc"; + +/* + * File name selection pattern + */ +tSCC zAix_Stdlib_Vec_MallocList[] = + "stdlib.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Stdlib_Vec_MallocMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Stdlib_Vec_MallocSelect0[] = + "#define[ \t]+malloc[ \t]+vec_malloc"; + +#define AIX_STDLIB_VEC_MALLOC_TEST_CT 1 +static tTestDesc aAix_Stdlib_Vec_MallocTests[] = { + { TT_EGREP, zAix_Stdlib_Vec_MallocSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Stdlib_Vec_Malloc + */ +static const char* apzAix_Stdlib_Vec_MallocPatch[] = { + "format", + "extern void *malloc(size_t) __asm__(\"vec_malloc\");", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Stdlib_Vec_Calloc fix + */ +tSCC zAix_Stdlib_Vec_CallocName[] = + "aix_stdlib_vec_calloc"; + +/* + * File name selection pattern + */ +tSCC zAix_Stdlib_Vec_CallocList[] = + "stdlib.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_Stdlib_Vec_CallocMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_Stdlib_Vec_CallocSelect0[] = + "#define[ \t]+calloc[ \t]+vec_calloc"; + +#define AIX_STDLIB_VEC_CALLOC_TEST_CT 1 +static tTestDesc aAix_Stdlib_Vec_CallocTests[] = { + { TT_EGREP, zAix_Stdlib_Vec_CallocSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Stdlib_Vec_Calloc + */ +static const char* apzAix_Stdlib_Vec_CallocPatch[] = { + "format", + "extern void *calloc(size_t, size_t) __asm__(\"vec_calloc\");", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Aix_Strtof_Const fix @@ -1841,6 +1950,43 @@ static const char* apzAix_VolatilePatch[] = { "typedef int sig_atomic_t", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Aix_Unistd fix + */ +tSCC zAix_UnistdName[] = + "aix_unistd"; + +/* + * File name selection pattern + */ +tSCC zAix_UnistdList[] = + "unistd.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAix_UnistdMachs[] = { + "*-*-aix*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAix_UnistdSelect0[] = + "[ \t]+static[ \t]+int[ \t]+getdtablesize\\(\\)"; + +#define AIX_UNISTD_TEST_CT 1 +static tTestDesc aAix_UnistdTests[] = { + { TT_EGREP, zAix_UnistdSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Aix_Unistd + */ +static const char* apzAix_UnistdPatch[] = { + "format", + "\tstatic int\t\tgetdtablesize(void)", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Alpha___Assert fix @@ -2638,7 +2784,7 @@ tSCC zDarwin_9_Long_Double_Funcs_2List[] = * Machine/OS name selection pattern */ tSCC* apzDarwin_9_Long_Double_Funcs_2Machs[] = { - "*-*-darwin7.9*", + "*-*-darwin*", (const char*)NULL }; /* @@ -2742,6 +2888,42 @@ static const char* apzDarwin_Gcc4_BreakagePatch[] = { "((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_Ll_Funcs_Avail fix + */ +tSCC zDarwin_Ll_Funcs_AvailName[] = + "darwin_ll_funcs_avail"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Ll_Funcs_AvailList[] = + "architecture/ppc/math.h\0architecture/i386/math.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Ll_Funcs_AvailMachs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Ll_Funcs_AvailSelect0[] = + "#if[^_]*__STDC_VERSION__[^_]*__STDC_VERSION__[^1]*199901L[^_]*__STRICT_ANSI__[^_]*__GNUC__[^)]*"; + +#define DARWIN_LL_FUNCS_AVAIL_TEST_CT 1 +static tTestDesc aDarwin_Ll_Funcs_AvailTests[] = { + { TT_EGREP, zDarwin_Ll_Funcs_AvailSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Ll_Funcs_Avail + */ +static const char* apzDarwin_Ll_Funcs_AvailPatch[] = { sed_cmd_z, + "-e", "s/#if[^_]*__STDC_VERSION__[^_]*__STDC_VERSION__[^_]*199901L[^_]*__STRICT_ANSI__[^_]*__GNUC__[^\\)]*)/#if !(__DARWIN_NO_LONG_LONG)/", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Darwin_Longjmp_Noreturn fix @@ -2904,6 +3086,86 @@ static const char* apzDarwin_Os_Trace_3Patch[] = { #endif", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_Os_Base_1 fix + */ +tSCC zDarwin_Os_Base_1Name[] = + "darwin_os_base_1"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Os_Base_1List[] = + "os/base.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Os_Base_1Machs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Os_Base_1Select0[] = + "#define __has_attribute.*\n\ +#endif"; + +#define DARWIN_OS_BASE_1_TEST_CT 1 +static tTestDesc aDarwin_Os_Base_1Tests[] = { + { TT_EGREP, zDarwin_Os_Base_1Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Os_Base_1 + */ +static const char* apzDarwin_Os_Base_1Patch[] = { + "format", + "%0\n\ +#ifndef __has_extension\n\ +#define __has_extension(x) 0\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_Dispatch_Object_1 fix + */ +tSCC zDarwin_Dispatch_Object_1Name[] = + "darwin_dispatch_object_1"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Dispatch_Object_1List[] = + "dispatch/object.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Dispatch_Object_1Machs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Dispatch_Object_1Select0[] = + "typedef void.*\\^dispatch_block_t.*"; + +#define DARWIN_DISPATCH_OBJECT_1_TEST_CT 1 +static tTestDesc aDarwin_Dispatch_Object_1Tests[] = { + { TT_EGREP, zDarwin_Dispatch_Object_1Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Dispatch_Object_1 + */ +static const char* apzDarwin_Dispatch_Object_1Patch[] = { + "format", + "#if __BLOCKS__\n\ +%0\n\ +#endif", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Darwin_Private_Extern fix @@ -3218,46 +3480,125 @@ static const char* apzDarwin_Stdint_6Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Darwin_Stdint_7 fix + * Description of Darwin_Stdint_7 fix + */ +tSCC zDarwin_Stdint_7Name[] = + "darwin_stdint_7"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Stdint_7List[] = + "stdint-darwin.h\0stdint.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Stdint_7Machs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Stdint_7Select0[] = + "#define INTMAX_C\\(v\\)[ \t]+\\(v ## LL\\)\n\ +#define UINTMAX_C\\(v\\)[ \t]+\\(v ## ULL\\)"; + +#define DARWIN_STDINT_7_TEST_CT 1 +static tTestDesc aDarwin_Stdint_7Tests[] = { + { TT_EGREP, zDarwin_Stdint_7Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Stdint_7 + */ +static const char* apzDarwin_Stdint_7Patch[] = { + "format", + "#if __WORDSIZE == 64\n\ +#define INTMAX_C(v) (v ## L)\n\ +#define UINTMAX_C(v) (v ## UL)\n\ +#else\n\ +#define INTMAX_C(v) (v ## LL)\n\ +#define UINTMAX_C(v) (v ## ULL)\n\ +#endif", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_Ucred__Atomic fix + */ +tSCC zDarwin_Ucred__AtomicName[] = + "darwin_ucred__Atomic"; + +/* + * File name selection pattern + */ +tSCC zDarwin_Ucred__AtomicList[] = + "sys/ucred.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzDarwin_Ucred__AtomicMachs[] = { + "*-*-darwin*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zDarwin_Ucred__AtomicSelect0[] = + "_Atomic"; + +#define DARWIN_UCRED__ATOMIC_TEST_CT 1 +static tTestDesc aDarwin_Ucred__AtomicTests[] = { + { TT_EGREP, zDarwin_Ucred__AtomicSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Darwin_Ucred__Atomic + */ +static const char* apzDarwin_Ucred__AtomicPatch[] = { + "wrap", + "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n\ +# define _Atomic volatile\n\ +#endif\n", + "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n\ +# undef _Atomic\n\ +#endif\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Darwin_Flt_Eval_Method fix */ -tSCC zDarwin_Stdint_7Name[] = - "darwin_stdint_7"; +tSCC zDarwin_Flt_Eval_MethodName[] = + "darwin_flt_eval_method"; /* * File name selection pattern */ -tSCC zDarwin_Stdint_7List[] = - "stdint-darwin.h\0stdint.h\0"; +tSCC zDarwin_Flt_Eval_MethodList[] = + "math.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzDarwin_Stdint_7Machs[] = { +tSCC* apzDarwin_Flt_Eval_MethodMachs[] = { "*-*-darwin*", (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zDarwin_Stdint_7Select0[] = - "#define INTMAX_C\\(v\\)[ \t]+\\(v ## LL\\)\n\ -#define UINTMAX_C\\(v\\)[ \t]+\\(v ## ULL\\)"; +tSCC zDarwin_Flt_Eval_MethodSelect0[] = + "^#if __FLT_EVAL_METHOD__ == 0$"; -#define DARWIN_STDINT_7_TEST_CT 1 -static tTestDesc aDarwin_Stdint_7Tests[] = { - { TT_EGREP, zDarwin_Stdint_7Select0, (regex_t*)NULL }, }; +#define DARWIN_FLT_EVAL_METHOD_TEST_CT 1 +static tTestDesc aDarwin_Flt_Eval_MethodTests[] = { + { TT_EGREP, zDarwin_Flt_Eval_MethodSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Darwin_Stdint_7 + * Fix Command Arguments for Darwin_Flt_Eval_Method */ -static const char* apzDarwin_Stdint_7Patch[] = { +static const char* apzDarwin_Flt_Eval_MethodPatch[] = { "format", - "#if __WORDSIZE == 64\n\ -#define INTMAX_C(v) (v ## L)\n\ -#define UINTMAX_C(v) (v ## UL)\n\ -#else\n\ -#define INTMAX_C(v) (v ## LL)\n\ -#define UINTMAX_C(v) (v ## ULL)\n\ -#endif", + "#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -4175,6 +4516,36 @@ static const char* apzHpux11_Cpp_Pow_InlinePatch[] = { "", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux_Math_Constexpr fix + */ +tSCC zHpux_Math_ConstexprName[] = + "hpux_math_constexpr"; + +/* + * File name selection pattern + */ +tSCC zHpux_Math_ConstexprList[] = + "math.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux_Math_ConstexprMachs[] = { + "*-hp-hpux11*", + (const char*)NULL }; +#define HPUX_MATH_CONSTEXPR_TEST_CT 0 +#define aHpux_Math_ConstexprTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Hpux_Math_Constexpr + */ +static const char* apzHpux_Math_ConstexprPatch[] = { sed_cmd_z, + "-e", "s@^[ \t]*extern[ \t]*const[ \t]*double[ \t]*_DINFINITY;[ \t]*$@# define _DINFINITY (__builtin_inf ())@", + "-e", "s@^[ \t]*extern[ \t]*const[ \t]*float[ \t]*_SINFINITY;[ \t]*$@# define _SINFINITY (__builtin_inff ())@", + "-e", "s@^[ \t]*extern[ \t]*const[ \t]*float[ \t]*_SQNAN;[ \t]*$@# define _SQNAN (__builtin_nanf (\\\"\\\"))@", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Hpux10_Ctype_Declarations1 fix @@ -4927,6 +5298,138 @@ static const char* apzHpux_C99_Inttypes2Patch[] = { sed_cmd_z, "-e", "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux_C99_Inttypes3 fix + */ +tSCC zHpux_C99_Inttypes3Name[] = + "hpux_c99_inttypes3"; + +/* + * File name selection pattern + */ +tSCC zHpux_C99_Inttypes3List[] = + "inttypes.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux_C99_Inttypes3Machs[] = { + "hppa*-hp-hpux11*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux_C99_Inttypes3Select0[] = + "#define[ \t]INTPTR_MAX[ \t]*\n\ +#define[ \t]UINTPTR_MAX[ \t]*\n"; + +#define HPUX_C99_INTTYPES3_TEST_CT 1 +static tTestDesc aHpux_C99_Inttypes3Tests[] = { + { TT_EGREP, zHpux_C99_Inttypes3Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux_C99_Inttypes3 + */ +static const char* apzHpux_C99_Inttypes3Patch[] = { + "format", + "#undef SIZE_MAX\n\ +#define SIZE_MAX __SIZE_MAX__\n\ +#ifdef __INTPTR_MAX__\n\ +# undef INTPTR_MAX\n\ +# define INTPTR_MAX __INTPTR_MAX__\n\ +# undef INTPTR_MIN\n\ +# define INTPTR_MIN (-INTPTR_MAX - 1)\n\ +#endif\n\ +#ifdef __UINTPTR_MAX__\n\ +# undef UINTPTR_MAX\n\ +# define UINTPTR_MAX __UINTPTR_MAX__\n\ +#endif\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux_C99_Inttypes4 fix + */ +tSCC zHpux_C99_Inttypes4Name[] = + "hpux_c99_inttypes4"; + +/* + * File name selection pattern + */ +tSCC zHpux_C99_Inttypes4List[] = + "inttypes.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux_C99_Inttypes4Machs[] = { + "hppa*-hp-hpux11.[01]*", + (const char*)NULL }; +#define HPUX_C99_INTTYPES4_TEST_CT 0 +#define aHpux_C99_Inttypes4Tests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Hpux_C99_Inttypes4 + */ +static const char* apzHpux_C99_Inttypes4Patch[] = { sed_cmd_z, + "-e", "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx64/a\\\n\ +#define SCNuMAX \t SCNu64\n", + "-e", "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx32/a\\\n\ +#define SCNuMAX \t SCNu32\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Hpux_C99_Inttypes5 fix + */ +tSCC zHpux_C99_Inttypes5Name[] = + "hpux_c99_inttypes5"; + +/* + * File name selection pattern + */ +tSCC zHpux_C99_Inttypes5List[] = + "inttypes.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzHpux_C99_Inttypes5Machs[] = { + "hppa*-hp-hpux11.[01]*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux_C99_Inttypes5Select0[] = + "#ifndef[ \t]_KERNEL[ \t]*\n"; + +#define HPUX_C99_INTTYPES5_TEST_CT 1 +static tTestDesc aHpux_C99_Inttypes5Tests[] = { + { TT_EGREP, zHpux_C99_Inttypes5Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux_C99_Inttypes5 + */ +static const char* apzHpux_C99_Inttypes5Patch[] = { + "format", + "#ifndef __LP64__\n\ +#define PRIdPTR\t\tPRId32\n\ +#define PRIiPTR\t\tPRIi32\n\ +#define PRIoPTR\t\tPRIo32\n\ +#define PRIuPTR\t\tPRIu32\n\ +#define PRIxPTR\t\tPRIx32\n\ +#define PRIXPTR\t\tPRIX32\n\ +#else\n\ +#define PRIdPTR\t\tPRId64\n\ +#define PRIiPTR\t\tPRIi64\n\ +#define PRIoPTR\t\tPRIo64\n\ +#define PRIuPTR\t\tPRIu64\n\ +#define PRIxPTR\t\tPRIx64\n\ +#define PRIXPTR\t\tPRIX64\n\ +#endif\n\n\ +#ifndef _KERNEL\n", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Hpux_Ctype_Macros fix @@ -9735,38 +10238,103 @@ tSCC* apzVxworks_Ioctl_MacroMachs[] = { static const char* apzVxworks_Ioctl_MacroPatch[] = { "format", "%0\n\ -#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n", +#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n", "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Vxworks_Mkdir_Macro fix + * Description of Vxworks_Math_H_Fp_C99 fix + */ +tSCC zVxworks_Math_H_Fp_C99Name[] = + "vxworks_math_h_fp_c99"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Math_H_Fp_C99List[] = + "math.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Math_H_Fp_C99Machs[] = { + "*-*-vxworks*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVxworks_Math_H_Fp_C99Select0[] = + "#define HUGE_VAL[ \t]*_ARCH.*"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zVxworks_Math_H_Fp_C99Bypass0[] = + "#define[ \t]+FP_INFINITE"; + +#define VXWORKS_MATH_H_FP_C99_TEST_CT 2 +static tTestDesc aVxworks_Math_H_Fp_C99Tests[] = { + { TT_NEGREP, zVxworks_Math_H_Fp_C99Bypass0, (regex_t*)NULL }, + { TT_EGREP, zVxworks_Math_H_Fp_C99Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vxworks_Math_H_Fp_C99 + */ +static const char* apzVxworks_Math_H_Fp_C99Patch[] = { + "format", + "\n\ +%0\n\n\ +#if _C99\n\n\ +#define FP_INFINITE 1\n\ +#define FP_NAN 2\n\ +#define FP_NORMAL (-1)\n\ +#define FP_SUBNORMAL (-2)\n\ +#define FP_ZERO 0\n\n\ +#define fpclassify(x) \\\n\ + __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, \\\n\ +\t\t FP_SUBNORMAL, FP_ZERO, (x))\n\n\ +#define signbit(x) __builtin_signbit(x)\n\ +#define isfinite(x) __builtin_isfinite(x)\n\ +#define isnormal(x) __builtin_isnormal(x)\n\ +#define isnan(x) __builtin_isnan(x)\n\ +#define isinf(x) __builtin_isinf(x)\n\n\ +#define isgreater(x, y) __builtin_isgreater((x),(y))\n\ +#define isgreaterequal(x, y) __builtin_isgreaterequal((x),(y))\n\ +#define isless(x, y) __builtin_isless((x),(y))\n\ +#define islessequal(x, y) __builtin_islessequal((x),(y))\n\ +#define islessgreater(x, y) __builtin_islessgreater((x),(y))\n\ +#define isunordered(x, y) __builtin_isunordered((x),(y))\n\n\ +#endif /* _C99 */\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vxworks_Posix_Mkdir fix */ -tSCC zVxworks_Mkdir_MacroName[] = - "vxworks_mkdir_macro"; +tSCC zVxworks_Posix_MkdirName[] = + "vxworks_posix_mkdir"; /* * File name selection pattern */ -tSCC zVxworks_Mkdir_MacroList[] = +tSCC zVxworks_Posix_MkdirList[] = "sys/stat.h\0"; /* * Machine/OS name selection pattern */ -tSCC* apzVxworks_Mkdir_MacroMachs[] = { +tSCC* apzVxworks_Posix_MkdirMachs[] = { "*-*-vxworks*", (const char*)NULL }; -#define VXWORKS_MKDIR_MACRO_TEST_CT 0 -#define aVxworks_Mkdir_MacroTests (tTestDesc*)NULL +#define VXWORKS_POSIX_MKDIR_TEST_CT 0 +#define aVxworks_Posix_MkdirTests (tTestDesc*)NULL /* - * Fix Command Arguments for Vxworks_Mkdir_Macro + * Fix Command Arguments for Vxworks_Posix_Mkdir */ -static const char* apzVxworks_Mkdir_MacroPatch[] = { +static const char* apzVxworks_Posix_MkdirPatch[] = { "format", - "%0\n\ -#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n", + "extern STATUS mkdir(const char *dir, ...);", "extern[\t ]+STATUS[\t ]+mkdir[\t ]*\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*(|[_[:alpha:]][_[:alnum:]]*)\\)[\t ]*;", (char*)NULL }; @@ -9853,6 +10421,48 @@ static const char* apzVxworks_Needs_VxworksPatch[] = { sed_cmd_z, #include <types/vxTypesOld.h>\n", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vxworks_Next_Yvals fix + */ +tSCC zVxworks_Next_YvalsName[] = + "vxworks_next_yvals"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Next_YvalsList[] = + "yvals.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Next_YvalsMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVxworks_Next_YvalsSelect0[] = + "#include_next <yvals.h>"; + +#define VXWORKS_NEXT_YVALS_TEST_CT 1 +static tTestDesc aVxworks_Next_YvalsTests[] = { + { TT_EGREP, zVxworks_Next_YvalsSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vxworks_Next_Yvals + */ +static const char* apzVxworks_Next_YvalsPatch[] = { + "format", + "#if 0 /* GCC does not provide yvals.h. */\n\ +%1", + "#if .*\n\ +/\\* .*\n\ +(#include_next <yvals.h>\n\ +)", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Vxworks_Regs fix @@ -9889,6 +10499,53 @@ static const char* apzVxworks_RegsPatch[] = { "#include <arch/../regs.h>", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vxworks_Posix_Open fix + */ +tSCC zVxworks_Posix_OpenName[] = + "vxworks_posix_open"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Posix_OpenList[] = + "fcntl.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Posix_OpenMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVxworks_Posix_OpenSelect0[] = + "extern int.*open \\(const char \\*[ a-z]*, int[ a-z]*, int[ a-z]*\\);"; + +#define VXWORKS_POSIX_OPEN_TEST_CT 1 +static tTestDesc aVxworks_Posix_OpenTests[] = { + { TT_EGREP, zVxworks_Posix_OpenSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vxworks_Posix_Open + */ +static const char* apzVxworks_Posix_OpenPatch[] = { + "format", + "%0\n\n\ +#if defined(__cplusplus)\n\ +extern \"C++\" {\n\ + inline int open (const char *, int) __attribute__((__always_inline__));\n\n\ + inline int\n\ + open (const char *name, int flags)\n\ + {\n\ + return open (name, flags, 0);\n\ + }\n\ +}\n\ +#endif\n", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of Vxworks_Time fix @@ -9969,6 +10626,82 @@ static const char* apzVxworks_Write_ConstPatch[] = { "extern[\t ]+int[\t ]+write[\t ]*\\([\t ]*int[\t ]*,[\t ]*char[\t ]*\\*[\t ]*,[\t ]*size_t[\t ]*\\)[\t ]*;", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vxworks_Iolib_Include_Unistd fix + */ +tSCC zVxworks_Iolib_Include_UnistdName[] = + "vxworks_iolib_include_unistd"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Iolib_Include_UnistdList[] = + "ioLib.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Iolib_Include_UnistdMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVxworks_Iolib_Include_UnistdSelect0[] = + "#include \"unistd.h\""; + +#define VXWORKS_IOLIB_INCLUDE_UNISTD_TEST_CT 1 +static tTestDesc aVxworks_Iolib_Include_UnistdTests[] = { + { TT_EGREP, zVxworks_Iolib_Include_UnistdSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vxworks_Iolib_Include_Unistd + */ +static const char* apzVxworks_Iolib_Include_UnistdPatch[] = { + "format", + "#include <unistd.h>", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Vxworks_Time_H_Syslib fix + */ +tSCC zVxworks_Time_H_SyslibName[] = + "vxworks_time_h_syslib"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Time_H_SyslibList[] = + "time.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Time_H_SyslibMachs[] = { + "*-*-vxworks*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVxworks_Time_H_SyslibSelect0[] = + "[ \t]*#define[ \t]+CLOCKS_PER_SEC[ \t]+sysClkRateGet.*"; + +#define VXWORKS_TIME_H_SYSLIB_TEST_CT 1 +static tTestDesc aVxworks_Time_H_SyslibTests[] = { + { TT_EGREP, zVxworks_Time_H_SyslibSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vxworks_Time_H_Syslib + */ +static const char* apzVxworks_Time_H_SyslibPatch[] = { + "format", + "%0\n\ +#include <sysLib.h>", + "#include <vxWorks.h>|#endif.* _YVALS.*", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description of X11_Class fix @@ -10139,9 +10872,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 285 +#define REGEX_COUNT 305 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 248 +#define FIX_COUNT 267 /* * Enumerate the fixes @@ -10150,6 +10883,7 @@ typedef enum { AAB_AIX_STDIO_FIXIDX, AAB_AIX_FCNTL_FIXIDX, AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_FIXIDX, + DARWIN_API_AVAILABILITY_FIXIDX, AAB_FD_ZERO_ASM_POSIX_TYPES_H_FIXIDX, AAB_FD_ZERO_GNU_TYPES_H_FIXIDX, AAB_FD_ZERO_SELECTBITS_H_FIXIDX, @@ -10157,13 +10891,13 @@ typedef enum { AAB_SUN_MEMCPY_FIXIDX, AAB_VXWORKS_ASSERT_FIXIDX, AAB_VXWORKS_REGS_VXTYPES_FIXIDX, - AAB_VXWORKS_STDINT_FIXIDX, AAB_VXWORKS_UNISTD_FIXIDX, AIX_ASSERT_FIXIDX, AIX_COMPLEX_FIXIDX, AIX_EXTERNC_FIXIDX, AIX_EXTERNCPP1_FIXIDX, AIX_EXTERNCPP2_FIXIDX, + AIX_INTTYPES_FIXIDX, AIX_MALLOC_FIXIDX, AIX_NET_IF_ARP_FIXIDX, AIX_NULL_FIXIDX, @@ -10172,6 +10906,7 @@ typedef enum { AIX_MUTEX_INITIALIZER_1_FIXIDX, AIX_COND_INITIALIZER_1_FIXIDX, AIX_RWLOCK_INITIALIZER_1_FIXIDX, + AIX_PHYSADR_T_FIXIDX, AIX_PTHREAD_FIXIDX, AIX_STDINT_1_FIXIDX, AIX_STDINT_2_FIXIDX, @@ -10183,10 +10918,13 @@ typedef enum { AIX_STDLIB_REALLOC_FIXIDX, AIX_STDLIB_CALLOC_FIXIDX, AIX_STDLIB_VALLOC_FIXIDX, + AIX_STDLIB_VEC_MALLOC_FIXIDX, + AIX_STDLIB_VEC_CALLOC_FIXIDX, AIX_STRTOF_CONST_FIXIDX, AIX_SYSMACHINE_FIXIDX, AIX_SYSWAIT_2_FIXIDX, AIX_VOLATILE_FIXIDX, + AIX_UNISTD_FIXIDX, ALPHA___ASSERT_FIXIDX, ALPHA_ASSERT_FIXIDX, ALPHA_GETOPT_FIXIDX, @@ -10210,10 +10948,13 @@ typedef enum { DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX, DARWIN_EXTERNC_FIXIDX, DARWIN_GCC4_BREAKAGE_FIXIDX, + DARWIN_LL_FUNCS_AVAIL_FIXIDX, DARWIN_LONGJMP_NORETURN_FIXIDX, DARWIN_OS_TRACE_1_FIXIDX, DARWIN_OS_TRACE_2_FIXIDX, DARWIN_OS_TRACE_3_FIXIDX, + DARWIN_OS_BASE_1_FIXIDX, + DARWIN_DISPATCH_OBJECT_1_FIXIDX, DARWIN_PRIVATE_EXTERN_FIXIDX, DARWIN_STDINT_1_FIXIDX, DARWIN_STDINT_2_FIXIDX, @@ -10222,6 +10963,8 @@ typedef enum { DARWIN_STDINT_5_FIXIDX, DARWIN_STDINT_6_FIXIDX, DARWIN_STDINT_7_FIXIDX, + DARWIN_UCRED__ATOMIC_FIXIDX, + DARWIN_FLT_EVAL_METHOD_FIXIDX, DEC_INTERN_ASM_FIXIDX, DJGPP_WCHAR_H_FIXIDX, ECD_CURSOR_FIXIDX, @@ -10244,6 +10987,7 @@ typedef enum { HPPA_HPUX_FP_MACROS_FIXIDX, HPUX10_CPP_POW_INLINE_FIXIDX, HPUX11_CPP_POW_INLINE_FIXIDX, + HPUX_MATH_CONSTEXPR_FIXIDX, HPUX10_CTYPE_DECLARATIONS1_FIXIDX, HPUX10_CTYPE_DECLARATIONS2_FIXIDX, HPUX10_STDIO_DECLARATIONS_FIXIDX, @@ -10263,6 +11007,9 @@ typedef enum { HPUX_C99_INTPTR_FIXIDX, HPUX_C99_INTTYPES_FIXIDX, HPUX_C99_INTTYPES2_FIXIDX, + HPUX_C99_INTTYPES3_FIXIDX, + HPUX_C99_INTTYPES4_FIXIDX, + HPUX_C99_INTTYPES5_FIXIDX, HPUX_CTYPE_MACROS_FIXIDX, HPUX_EXTERN_ERRNO_FIXIDX, HPUX_HTONL_FIXIDX, @@ -10385,12 +11132,17 @@ typedef enum { VOID_NULL_FIXIDX, VXWORKS_GCC_PROBLEM_FIXIDX, VXWORKS_IOCTL_MACRO_FIXIDX, - VXWORKS_MKDIR_MACRO_FIXIDX, + VXWORKS_MATH_H_FP_C99_FIXIDX, + VXWORKS_POSIX_MKDIR_FIXIDX, VXWORKS_NEEDS_VXTYPES_FIXIDX, VXWORKS_NEEDS_VXWORKS_FIXIDX, + VXWORKS_NEXT_YVALS_FIXIDX, VXWORKS_REGS_FIXIDX, + VXWORKS_POSIX_OPEN_FIXIDX, VXWORKS_TIME_FIXIDX, VXWORKS_WRITE_CONST_FIXIDX, + VXWORKS_IOLIB_INCLUDE_UNISTD_FIXIDX, + VXWORKS_TIME_H_SYSLIB_FIXIDX, X11_CLASS_FIXIDX, X11_CLASS_USAGE_FIXIDX, X11_NEW_FIXIDX, @@ -10413,6 +11165,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AAB_DARWIN7_9_LONG_DOUBLE_FUNCS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, aAab_Darwin7_9_Long_Double_FuncsTests, apzAab_Darwin7_9_Long_Double_FuncsPatch, 0 }, + { zDarwin_Api_AvailabilityName, zDarwin_Api_AvailabilityList, + apzDarwin_Api_AvailabilityMachs, + DARWIN_API_AVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_Api_AvailabilityTests, apzDarwin_Api_AvailabilityPatch, 0 }, + { zAab_Fd_Zero_Asm_Posix_Types_HName, zAab_Fd_Zero_Asm_Posix_Types_HList, apzAab_Fd_Zero_Asm_Posix_Types_HMachs, AAB_FD_ZERO_ASM_POSIX_TYPES_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, @@ -10448,11 +11205,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AAB_VXWORKS_REGS_VXTYPES_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, aAab_Vxworks_Regs_VxtypesTests, apzAab_Vxworks_Regs_VxtypesPatch, 0 }, - { zAab_Vxworks_StdintName, zAab_Vxworks_StdintList, - apzAab_Vxworks_StdintMachs, - AAB_VXWORKS_STDINT_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, - aAab_Vxworks_StdintTests, apzAab_Vxworks_StdintPatch, 0 }, - { zAab_Vxworks_UnistdName, zAab_Vxworks_UnistdList, apzAab_Vxworks_UnistdMachs, AAB_VXWORKS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT, @@ -10483,6 +11235,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_EXTERNCPP2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_Externcpp2Tests, apzAix_Externcpp2Patch, 0 }, + { zAix_InttypesName, zAix_InttypesList, + apzAix_InttypesMachs, + AIX_INTTYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_InttypesTests, apzAix_InttypesPatch, 0 }, + { zAix_MallocName, zAix_MallocList, apzAix_MallocMachs, AIX_MALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10523,6 +11280,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_RWLOCK_INITIALIZER_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_Rwlock_Initializer_1Tests, apzAix_Rwlock_Initializer_1Patch, 0 }, + { zAix_Physadr_TName, zAix_Physadr_TList, + apzAix_Physadr_TMachs, + AIX_PHYSADR_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Physadr_TTests, apzAix_Physadr_TPatch, 0 }, + { zAix_PthreadName, zAix_PthreadList, apzAix_PthreadMachs, AIX_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10578,6 +11340,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_STDLIB_VALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_Stdlib_VallocTests, apzAix_Stdlib_VallocPatch, 0 }, + { zAix_Stdlib_Vec_MallocName, zAix_Stdlib_Vec_MallocList, + apzAix_Stdlib_Vec_MallocMachs, + AIX_STDLIB_VEC_MALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Stdlib_Vec_MallocTests, apzAix_Stdlib_Vec_MallocPatch, 0 }, + + { zAix_Stdlib_Vec_CallocName, zAix_Stdlib_Vec_CallocList, + apzAix_Stdlib_Vec_CallocMachs, + AIX_STDLIB_VEC_CALLOC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_Stdlib_Vec_CallocTests, apzAix_Stdlib_Vec_CallocPatch, 0 }, + { zAix_Strtof_ConstName, zAix_Strtof_ConstList, apzAix_Strtof_ConstMachs, AIX_STRTOF_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10598,6 +11370,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { AIX_VOLATILE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAix_VolatileTests, apzAix_VolatilePatch, 0 }, + { zAix_UnistdName, zAix_UnistdList, + apzAix_UnistdMachs, + AIX_UNISTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aAix_UnistdTests, apzAix_UnistdPatch, 0 }, + { zAlpha___AssertName, zAlpha___AssertList, apzAlpha___AssertMachs, ALPHA___ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10713,6 +11490,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { DARWIN_GCC4_BREAKAGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aDarwin_Gcc4_BreakageTests, apzDarwin_Gcc4_BreakagePatch, 0 }, + { zDarwin_Ll_Funcs_AvailName, zDarwin_Ll_Funcs_AvailList, + apzDarwin_Ll_Funcs_AvailMachs, + DARWIN_LL_FUNCS_AVAIL_TEST_CT, FD_MACH_ONLY, + aDarwin_Ll_Funcs_AvailTests, apzDarwin_Ll_Funcs_AvailPatch, 0 }, + { zDarwin_Longjmp_NoreturnName, zDarwin_Longjmp_NoreturnList, apzDarwin_Longjmp_NoreturnMachs, DARWIN_LONGJMP_NORETURN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10733,6 +11515,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { DARWIN_OS_TRACE_3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aDarwin_Os_Trace_3Tests, apzDarwin_Os_Trace_3Patch, 0 }, + { zDarwin_Os_Base_1Name, zDarwin_Os_Base_1List, + apzDarwin_Os_Base_1Machs, + DARWIN_OS_BASE_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_Os_Base_1Tests, apzDarwin_Os_Base_1Patch, 0 }, + + { zDarwin_Dispatch_Object_1Name, zDarwin_Dispatch_Object_1List, + apzDarwin_Dispatch_Object_1Machs, + DARWIN_DISPATCH_OBJECT_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_Dispatch_Object_1Tests, apzDarwin_Dispatch_Object_1Patch, 0 }, + { zDarwin_Private_ExternName, zDarwin_Private_ExternList, apzDarwin_Private_ExternMachs, DARWIN_PRIVATE_EXTERN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10773,6 +11565,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { DARWIN_STDINT_7_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aDarwin_Stdint_7Tests, apzDarwin_Stdint_7Patch, 0 }, + { zDarwin_Ucred__AtomicName, zDarwin_Ucred__AtomicList, + apzDarwin_Ucred__AtomicMachs, + DARWIN_UCRED__ATOMIC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_Ucred__AtomicTests, apzDarwin_Ucred__AtomicPatch, 0 }, + + { zDarwin_Flt_Eval_MethodName, zDarwin_Flt_Eval_MethodList, + apzDarwin_Flt_Eval_MethodMachs, + DARWIN_FLT_EVAL_METHOD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aDarwin_Flt_Eval_MethodTests, apzDarwin_Flt_Eval_MethodPatch, 0 }, + { zDec_Intern_AsmName, zDec_Intern_AsmList, apzDec_Intern_AsmMachs, DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY, @@ -10883,6 +11685,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX11_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux11_Cpp_Pow_InlineTests, apzHpux11_Cpp_Pow_InlinePatch, 0 }, + { zHpux_Math_ConstexprName, zHpux_Math_ConstexprList, + apzHpux_Math_ConstexprMachs, + HPUX_MATH_CONSTEXPR_TEST_CT, FD_MACH_ONLY, + aHpux_Math_ConstexprTests, apzHpux_Math_ConstexprPatch, 0 }, + { zHpux10_Ctype_Declarations1Name, zHpux10_Ctype_Declarations1List, apzHpux10_Ctype_Declarations1Machs, HPUX10_CTYPE_DECLARATIONS1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -10978,6 +11785,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX_C99_INTTYPES2_TEST_CT, FD_MACH_ONLY, aHpux_C99_Inttypes2Tests, apzHpux_C99_Inttypes2Patch, 0 }, + { zHpux_C99_Inttypes3Name, zHpux_C99_Inttypes3List, + apzHpux_C99_Inttypes3Machs, + HPUX_C99_INTTYPES3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_C99_Inttypes3Tests, apzHpux_C99_Inttypes3Patch, 0 }, + + { zHpux_C99_Inttypes4Name, zHpux_C99_Inttypes4List, + apzHpux_C99_Inttypes4Machs, + HPUX_C99_INTTYPES4_TEST_CT, FD_MACH_ONLY, + aHpux_C99_Inttypes4Tests, apzHpux_C99_Inttypes4Patch, 0 }, + + { zHpux_C99_Inttypes5Name, zHpux_C99_Inttypes5List, + apzHpux_C99_Inttypes5Machs, + HPUX_C99_INTTYPES5_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux_C99_Inttypes5Tests, apzHpux_C99_Inttypes5Patch, 0 }, + { zHpux_Ctype_MacrosName, zHpux_Ctype_MacrosList, apzHpux_Ctype_MacrosMachs, HPUX_CTYPE_MACROS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -11588,10 +12410,15 @@ tFixDesc fixDescList[ FIX_COUNT ] = { VXWORKS_IOCTL_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVxworks_Ioctl_MacroTests, apzVxworks_Ioctl_MacroPatch, 0 }, - { zVxworks_Mkdir_MacroName, zVxworks_Mkdir_MacroList, - apzVxworks_Mkdir_MacroMachs, - VXWORKS_MKDIR_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aVxworks_Mkdir_MacroTests, apzVxworks_Mkdir_MacroPatch, 0 }, + { zVxworks_Math_H_Fp_C99Name, zVxworks_Math_H_Fp_C99List, + apzVxworks_Math_H_Fp_C99Machs, + VXWORKS_MATH_H_FP_C99_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Math_H_Fp_C99Tests, apzVxworks_Math_H_Fp_C99Patch, 0 }, + + { zVxworks_Posix_MkdirName, zVxworks_Posix_MkdirList, + apzVxworks_Posix_MkdirMachs, + VXWORKS_POSIX_MKDIR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Posix_MkdirTests, apzVxworks_Posix_MkdirPatch, 0 }, { zVxworks_Needs_VxtypesName, zVxworks_Needs_VxtypesList, apzVxworks_Needs_VxtypesMachs, @@ -11603,11 +12430,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = { VXWORKS_NEEDS_VXWORKS_TEST_CT, FD_MACH_ONLY, aVxworks_Needs_VxworksTests, apzVxworks_Needs_VxworksPatch, 0 }, + { zVxworks_Next_YvalsName, zVxworks_Next_YvalsList, + apzVxworks_Next_YvalsMachs, + VXWORKS_NEXT_YVALS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Next_YvalsTests, apzVxworks_Next_YvalsPatch, 0 }, + { zVxworks_RegsName, zVxworks_RegsList, apzVxworks_RegsMachs, VXWORKS_REGS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVxworks_RegsTests, apzVxworks_RegsPatch, 0 }, + { zVxworks_Posix_OpenName, zVxworks_Posix_OpenList, + apzVxworks_Posix_OpenMachs, + VXWORKS_POSIX_OPEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Posix_OpenTests, apzVxworks_Posix_OpenPatch, 0 }, + { zVxworks_TimeName, zVxworks_TimeList, apzVxworks_TimeMachs, VXWORKS_TIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -11618,6 +12455,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = { VXWORKS_WRITE_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVxworks_Write_ConstTests, apzVxworks_Write_ConstPatch, 0 }, + { zVxworks_Iolib_Include_UnistdName, zVxworks_Iolib_Include_UnistdList, + apzVxworks_Iolib_Include_UnistdMachs, + VXWORKS_IOLIB_INCLUDE_UNISTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Iolib_Include_UnistdTests, apzVxworks_Iolib_Include_UnistdPatch, 0 }, + + { zVxworks_Time_H_SyslibName, zVxworks_Time_H_SyslibList, + apzVxworks_Time_H_SyslibMachs, + VXWORKS_TIME_H_SYSLIB_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Time_H_SyslibTests, apzVxworks_Time_H_SyslibPatch, 0 }, + { zX11_ClassName, zX11_ClassList, apzX11_ClassMachs, X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/genfixes b/fixincludes/genfixes index f0fc5e64f8b..47aad01289d 100755 --- a/fixincludes/genfixes +++ b/fixincludes/genfixes @@ -55,19 +55,16 @@ do esac done -if [ $# -eq 0 ] ; then - set -- fixincl.x -fi - AG="autogen $AG" set -e if [ -z "`${AG} -v | fgrep ' 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" + echo "Please download and install from:" + echo " https://ftp.gnu.org/gnu/autogen/" touch fixincl.x + exit 1 else echo AutoGen-ing fixincl.x $AG inclhack.def diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 8a5514ffcab..7605ac89aa2 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -194,6 +194,33 @@ fix = { _EndOfHeader_; }; +/* + * SDKs for 10.13 and 10.14 omit the definitions for API_AVAILABLE where + * __attribute__((availability)) is not supported. + */ +fix = { + hackname = darwin_api_availability; + mach = "*-*-darwin*"; + files = os/availability.h; + bypass = "__IPHONE_OS_VERSION_MIN_REQUIRED"; + select = + " *#define __API_AVAILABLE.*\n" + " *#define __API_DEPRECATED.*\n" + " *#define __API_DEPRECATED_WITH_REPLACEMENT.*\n" + " *#define __API_UNAVAILABLE.*\n"; + c_fix = format; + c_fix_arg = + " #define API_AVAILABLE(...)\n" + " #define API_DEPRECATED(...)\n" + " #define API_DEPRECATED_WITH_REPLACEMENT(...)\n" + " #define API_UNAVAILABLE(...)\n"; + test_text = + "#define __API_AVAILABLE(...)\n" + "#define __API_DEPRECATED(...)\n" + "#define __API_DEPRECATED_WITH_REPLACEMENT(...)\n" + "#define __API_UNAVAILABLE(...)\n"; +}; + /* * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n) */ @@ -377,11 +404,15 @@ fix = { mach = "*-*-vxworks*"; replace = <<- _EndOfHeader_ - #ifndef _ASSERT_H + #ifdef _ASSERT_H + #undef _ASSERT_H + #undef assert + #endif + #define _ASSERT_H - #ifdef assert - #undef assert + #ifdef __cplusplus + extern "C" { #endif #if defined(__STDC__) || defined(__cplusplus) @@ -399,11 +430,13 @@ fix = { #define assert(test) ((void) \ ((test) ? ((void)0) : \ - __assert("Assertion failed: " ASSERT_STRINGIFY(test) ", file " \ + __assert("Assertion failed: " #test ", file " \ __FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n"))) #endif + #ifdef __cplusplus + } #endif _EndOfHeader_; }; @@ -420,124 +453,18 @@ fix = { replace = <<- _EndOfHeader_ #ifndef _REGS_H #define _REGS_H + /* regs.h depends on CPU_FAMILY being properly defined, which + is done by vxCpu.h. */ + #include <types/vxCpu.h> + /* regs.h includes a CPU_FAMILY-specific header that requires + vxTypesOld.h to already have been included. Those headers + contain proper _ASMLANGUAGE guards around their typedefs, + but vxTypesOld.h itself does not. So we avoid including + vxTypesOld.h from assembly. */ + #ifndef _ASMLANGUAGE #include <types/vxTypesOld.h> - #include_next <arch/../regs.h> #endif - _EndOfHeader_; -}; - -/* - * Make VxWorks stdint.h a bit more compliant - add typedefs - */ -fix = { - hackname = AAB_vxworks_stdint; - files = stdint.h; - mach = "*-*-vxworks*"; - - replace = <<- _EndOfHeader_ - #ifndef _STDINT_H - #define _STDINT_H - /* get int*_t, uint*_t */ - #include <types/vxTypes.h> - - /* get legacy vxworks types for compatibility */ - #include <types/vxTypesOld.h> - - typedef long intptr_t; - typedef unsigned long uintptr_t; - - typedef int64_t intmax_t; - typedef uint64_t uintmax_t; - - typedef int8_t int_least8_t; - typedef int16_t int_least16_t; - typedef int32_t int_least32_t; - typedef int64_t int_least64_t; - - typedef uint8_t uint_least8_t; - typedef uint16_t uint_least16_t; - typedef uint32_t uint_least32_t; - typedef uint64_t uint_least64_t; - - typedef int8_t int_fast8_t; - typedef int int_fast16_t; - typedef int32_t int_fast32_t; - typedef int64_t int_fast64_t; - - typedef uint8_t uint_fast8_t; - typedef unsigned int uint_fast16_t; - typedef uint32_t uint_fast32_t; - typedef uint64_t uint_fast64_t; - - /* Ranges */ - #define UINT8_MAX (~(uint8_t)0) - #define UINT8_MIN 0 - #define UINT16_MAX (~(uint16_t)0) - #define UINT16_MIN 0 - #define UINT32_MAX (~(uint32_t)0) - #define UINT32_MIN 0 - #define UINT64_MAX (~(uint64_t)0) - #define UINT64_MIN 0 - - #define UINTPTR_MAX (~(uintptr_t)0) - #define UINTPTR_MIN 0 - - /* Need to do int_fast16_t as well, as type - size may be architecture dependent */ - #define UINT_FAST16_MAX (~(uint_fast16_t)0) - #define UINT_FAST16_MAX 0 - - #define INT8_MAX (UINT8_MAX>>1) - #define INT8_MIN (INT8_MAX+1) - #define INT16_MAX (UINT16_MAX>>1) - #define INT16_MIN (INT16_MAX+1) - #define INT32_MAX (UINT32_MAX>>1) - #define INT32_MIN (INT32_MAX+1) - #define INT64_MAX (UINT64_MAX>>1) - #define INT64_MIN (INT64_MAX+1) - - #define INTPTR_MAX (UINTPTR_MAX>>1) - #define INTPTR_MIN (INTPTR_MAX+1) - - #define INT_FAST16_MAX (UINT_FAST16_MAX>>1) - #define INT_FAST16_MIN (INT_FAST16_MAX+1) - - /* now define equiv. constants */ - #define UINT_FAST8_MAX UINT8_MAX - #define UINT_FAST8_MIN UINT_FAST8_MIN - #define INT_FAST8_MAX INT8_MAX - #define INT_FAST8_MIN INT8_MIN - #define UINT_FAST32_MAX UINT32_MAX - #define UINT_FAST32_MIN UINT32_MIN - #define INT_FAST32_MAX INT32_MAX - #define INT_FAST32_MIN INT32_MIN - #define UINT_FAST64_MAX UINT64_MAX - #define UINT_FAST64_MIN UINT64_MIN - #define INT_FAST64_MAX INT64_MAX - #define INT_FAST64_MIN INT64_MIN - - #define UINT_LEAST8_MAX UINT8_MAX - #define UINT_LEAST8_MIN UINT8_MIN - #define INT_LEAST8_MAX INT8_MAX - #define INT_LEAST8_MIN INT8_MIN - #define UINT_LEAST16_MAX UINT16_MAX - #define UINT_LEAST16_MIN UINT16_MIN - #define INT_LEAST16_MAX INT16_MAX - #define INT_LEAST16_MIN INT16_MIN - #define UINT_LEAST32_MAX UINT32_MAX - #define UINT_LEAST32_MIN UINT32_MIN - #define INT_LEAST32_MAX INT32_MAX - #define INT_LEAST32_MIN INT32_MIN - #define UINT_LEAST64_MAX UINT64_MAX - #define UINT_LEAST64_MIN UINT64_MIN - #define INT_LEAST64_MAX INT64_MAX - #define INT_LEAST64_MIN INT64_MIN - - #define UINTMAX_MAX UINT64_MAX - #define UINTMAX_MIN UINT64_MIN - #define INTMAX_MAX INT64_MAX - #define INTMAX_MIN INT64_MIN - + #include_next <arch/../regs.h> #endif _EndOfHeader_; }; @@ -626,24 +553,44 @@ fix = { hackname = aix_externcpp1; mach = "*-*-aix*"; files = "sys/socket.h"; - select = "#ifdef __cplusplus"; + select = "#ifndef _KERNEL\n" + "#ifdef __cplusplus\n" + "extern \"C\" int naccept\\(int, struct sockaddr \\*, socklen_t \\*\\);"; c_fix = format; - c_fix_arg = "#ifdef __cplusplus\n" - "extern \"C++\" {"; - test_text = "#ifdef __cplusplus"; - + c_fix_arg = "#ifndef _KERNEL\n" + "#ifdef __cplusplus\n" + "extern \"C++\" {\n" + "extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);"; + test_text = "#ifndef _KERNEL\n" + "#ifdef __cplusplus\n" + "extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);"; }; fix = { hackname = aix_externcpp2; mach = "*-*-aix*"; files = "sys/socket.h"; - select = "#else /\\* __cplusplus \\*/"; + select = "#endif /\\* COMPAT_43 \\*/\n" + "#else /\\* __cplusplus \\*/"; c_fix = format; - c_fix_arg = "} /* extern \"C++\" */\n" + c_fix_arg = "#endif /* COMPAT_43 */\n" + "} /* extern \"C++\" */\n" "#else /* __cplusplus */"; - test_text = "#else /* __cplusplus */"; + test_text = "#endif /* COMPAT_43 */\n" + "#else /* __cplusplus */"; +}; +/* + * inttypes.h STDC_FORMAT_MACROS + */ +fix = { + hackname = aix_inttypes; + mach = "*-*-aix*"; + files = "sys/inttypes.h"; + select = "#if !defined\\(__cplusplus\\) \\|\\| defined\\(__STDC_FORMAT_MACROS\\)"; + c_fix = format; + c_fix_arg = "#if 1"; + test_text = "#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)"; }; /* @@ -653,10 +600,16 @@ fix = { hackname = aix_malloc; mach = "*-*-aix*"; files = "malloc.h"; - select = "#ifdef __cplusplus"; + select = "#ifdef __cplusplus\n" + "extern \"C\" \\{\n" + "[ \t]extern \"builtin\" char \\*__alloca \\(size_t\\);"; c_fix = format; - c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))"; - test_text = "#ifdef __cplusplus"; + c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))\n" + "extern \"C\" {\n" + "\textern \"builtin\" char *__alloca (size_t);"; + test_text = "#ifdef __cplusplus\n" + "extern \"C\" {\n" + "\textern \"builtin\" char *__alloca (size_t);"; }; /* @@ -770,6 +723,20 @@ fix = { "{ \\\\\n"; }; + +/* On AIX 'typedef struct {<stuff>} * physadr_t;' needs to give the struct a + name for linkage purposes. Fortunately it is on exactly one + line. */ +fix = { + hackname = aix_physadr_t; + mach = "*-*-aix*"; + files = sys/types.h; + select = "typedef[ \t]*struct[ \t]*([{][^}]*[}][ \t]*\\*[ \t]*physadr_t;)"; + c_fix = format; + c_fix_arg = "typedef struct __physadr_s %1"; + test_text = "typedef struct { random stuff } * physadr_t;"; +}; + /* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace * which violates a requirement of ISO C. @@ -954,6 +921,26 @@ fix = { test_text = "#define valloc __linux_valloc"; }; +fix = { + hackname = aix_stdlib_vec_malloc; + mach = "*-*-aix*"; + files = stdlib.h; + select = "#define[ \t]+malloc[ \t]+vec_malloc"; + c_fix = format; + c_fix_arg = "extern void *malloc(size_t) __asm__(\"vec_malloc\");"; + test_text = "#define malloc vec_malloc"; +}; + +fix = { + hackname = aix_stdlib_vec_calloc; + mach = "*-*-aix*"; + files = stdlib.h; + select = "#define[ \t]+calloc[ \t]+vec_calloc"; + c_fix = format; + c_fix_arg = "extern void *calloc(size_t, size_t) __asm__(\"vec_calloc\");"; + test_text = "#define calloc vec_calloc"; +}; + /* * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument. */ @@ -1013,6 +1000,20 @@ fix = { test_text = "typedef volatile int sig_atomic_t;"; }; +/* + * AIX unistd.h defines a static function with an empty parameter list. + */ +fix = { + hackname = aix_unistd; + mach = "*-*-aix*"; + files = unistd.h; + + select = "[ \t]+static[ \t]+int[ \t]+getdtablesize\\(\\)"; + c_fix = format; + c_fix_arg = "\tstatic int\t\tgetdtablesize(void)"; + test_text = " static int getdtablesize()"; +}; + /* * Fix __assert declaration in assert.h on Alpha OSF/1. */ @@ -1364,12 +1365,12 @@ fix = { }; /* - * For the AAB_darwin7_9_long_double_funcs fix to be useful, - * you have to not use "" includes. + * For the AAB_darwin7_9_long_double_funcs fix (and later fixes for long long) + * to be useful, the main math.h must use <> and not "" includes. */ fix = { hackname = darwin_9_long_double_funcs_2; - mach = "*-*-darwin7.9*"; + mach = "*-*-darwin*"; files = math.h; select = '#include[ \t]+\"'; c_fix = format; @@ -1377,7 +1378,7 @@ fix = { c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"'; - test_text = '#include "architecture/ppc/math.h"'; + test_text = '#include <architecture/ppc/math.h>'; }; /* @@ -1420,6 +1421,22 @@ fix = { "(__GNUC_MINOR__ >= 1)\n"; }; +/* + * math.h hides the long long functions that are available on the system for + * 10.5 and 10.6 SDKs, we expect to use them in G++ without specifying a value + * for __STDC_VERSION__, or switching __STRICT_ANSI__ off. + */ +fix = { + hackname = darwin_ll_funcs_avail; + mach = "*-*-darwin*"; + files = architecture/ppc/math.h, architecture/i386/math.h; + select = "#if[^_]*__STDC_VERSION__[^_]*__STDC_VERSION__[^1]*199901L[^_]*" + "__STRICT_ANSI__[^_]*__GNUC__[^\)]*"; + sed = "s/#if[^_]*__STDC_VERSION__[^_]*__STDC_VERSION__[^_]*199901L[^_]*" + "__STRICT_ANSI__[^_]*__GNUC__[^\\)]*\)/#if\ !\(__DARWIN_NO_LONG_LONG\)/"; + test_text = "#if\ !(__DARWIN_NO_LONG_LONG)"; +}; + /* * Before Mac OS X 10.8 <i386/setjmp.h> doesn't mark longjump noreturn. */ @@ -1491,6 +1508,49 @@ fix = { _EOText_; }; +/* + * In macOS 10.10 <os/base.h>, doesn't have __has_extension guarded. + */ +fix = { + hackname = darwin_os_base_1; + mach = "*-*-darwin*"; + files = os/base.h; + select = <<- OS_BASE_1_SEL +#define __has_attribute.* +#endif +OS_BASE_1_SEL; + c_fix = format; + c_fix_arg = <<- OS_BASE_1_FIX +%0 +#ifndef __has_extension +#define __has_extension(x) 0 +#endif +OS_BASE_1_FIX; + test_text = <<- OS_BASE_1_TEST +#define __has_attribute(x) 0 +#endif + +#if __GNUC__ +OS_BASE_1_TEST; +}; + +/* + * In macOS 10.10 <dispatch/object.h>, has unguarded block syntax. + */ +fix = { + hackname = darwin_dispatch_object_1; + mach = "*-*-darwin*"; + files = dispatch/object.h; + select = "typedef void.*\\^dispatch_block_t.*"; + c_fix = format; + c_fix_arg = "#if __BLOCKS__\n%0\n#endif"; + test_text = <<- DISPATCH_OBJECT_1_TEST +typedef void (^dispatch_block_t)(void); + +__BEGIN_DECLS +DISPATCH_OBJECT_1_TEST; +}; + /* * __private_extern__ doesn't exist in FSF GCC. Even if it did, * why would you ever put it in a system header file? @@ -1688,6 +1748,36 @@ fix = { "#define UINTMAX_C(v) (v ## ULL)"; }; +/* The SDK included with XCode 10.2 has the file <sys/ucred.h> that uses the + C11 _Atomic keyword (exposing it to C++ code). The work-around here follows + the header in declaring the entity volatile when _Atomic is not available. +*/ +fix = { + hackname = darwin_ucred__Atomic; + mach = "*-*-darwin*"; + files = sys/ucred.h; + select = "_Atomic"; + c_fix = wrap; + c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n" + "# define _Atomic volatile\n" + "#endif\n"; + c_fix_arg = "#if (__STDC_VERSION__ < 201112L) || defined(__cplusplus)\n" + "# undef _Atomic\n" + "#endif\n"; + test_text = ""; /* Don't provide this for wrap fixes. */ +}; + +/* The darwin headers don't accept __FLT_EVAL_METHOD__ == 16. */ +fix = { + hackname = darwin_flt_eval_method; + mach = "*-*-darwin*"; + files = math.h; + select = "^#if __FLT_EVAL_METHOD__ == 0$"; + c_fix = format; + c_fix_arg = "#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16"; + test_text = "#if __FLT_EVAL_METHOD__ == 0"; +}; + /* * Fix <c_asm.h> on Digital UNIX V4.0: * It contains a prototype for a DEC C internal asm() function, @@ -2192,6 +2282,24 @@ fix = { " }\n"; }; +/* + * This hack fixes the declarations of _DINFINITY, _SINFINITY and _SQNAN. + */ +fix = { + hackname = hpux_math_constexpr; + mach = "*-hp-hpux11*"; + files = math.h; + sed = "s@^[ \t]*extern[ \t]*const[ \t]*double[ \t]*_DINFINITY;" + "[ \t]*$@# define _DINFINITY (__builtin_inf ())@"; + sed = "s@^[ \t]*extern[ \t]*const[ \t]*float[ \t]*_SINFINITY;" + "[ \t]*$@# define _SINFINITY (__builtin_inff ())@"; + sed = "s@^[ \t]*extern[ \t]*const[ \t]*float[ \t]*_SQNAN;" + "[ \t]*$@# define _SQNAN (__builtin_nanf (\\\"\\\"))@"; + test_text = " extern const double _DINFINITY;\n" + " extern const float _SINFINITY;\n" + " extern const float _SQNAN;"; +}; + /* * Fix hpux 10.X missing ctype declarations 1 */ @@ -2548,6 +2656,75 @@ fix = { "# define UINT16_C(__c) ((unsigned short)(__c))\n"; }; +/* + * Fix broken and missing defines in inttypes.h + */ +fix = { + hackname = hpux_c99_inttypes3; + mach = "hppa*-hp-hpux11*"; + files = inttypes.h; + select = "#define[ \t]INTPTR_MAX[ \t]*\n" + "#define[ \t]UINTPTR_MAX[ \t]*\n"; + c_fix = format; + c_fix_arg = "#undef SIZE_MAX\n" + "#define SIZE_MAX __SIZE_MAX__\n" + "#ifdef __INTPTR_MAX__\n" + "# undef INTPTR_MAX\n" + "# define INTPTR_MAX __INTPTR_MAX__\n" + "# undef INTPTR_MIN\n" + "# define INTPTR_MIN (-INTPTR_MAX - 1)\n" + "#endif\n" + "#ifdef __UINTPTR_MAX__\n" + "# undef UINTPTR_MAX\n" + "# define UINTPTR_MAX __UINTPTR_MAX__\n" + "#endif\n"; + test_text = "#define INTPTR_MAX\n" + "#define UINTPTR_MAX\n"; +}; + +/* + * Fix missing SCNuMAX defines in inttypes.h + */ +fix = { + hackname = hpux_c99_inttypes4; + mach = "hppa*-hp-hpux11.[01]*"; + files = inttypes.h; + sed = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx64/a\\\n" + "#define SCNuMAX \t SCNu64\n"; + sed = "/^[ \t]*#[ \t]*define[ \t]*SCNxMAX[ \t]*SCNx32/a\\\n" + "#define SCNuMAX \t SCNu32\n"; + test_text = "#define SCNxMAX SCNx64\n" + "#define SCNxMAX SCNx32\n"; +}; + +/* + * Fix missing PRIdPTR defines in inttypes.h + */ +fix = { + hackname = hpux_c99_inttypes5; + mach = "hppa*-hp-hpux11.[01]*"; + files = inttypes.h; + select = "#ifndef[ \t]_KERNEL[ \t]*\n"; + c_fix = format; + c_fix_arg = "#ifndef __LP64__\n" + "#define PRIdPTR\t\tPRId32\n" + "#define PRIiPTR\t\tPRIi32\n" + "#define PRIoPTR\t\tPRIo32\n" + "#define PRIuPTR\t\tPRIu32\n" + "#define PRIxPTR\t\tPRIx32\n" + "#define PRIXPTR\t\tPRIX32\n" + "#else\n" + "#define PRIdPTR\t\tPRId64\n" + "#define PRIiPTR\t\tPRIi64\n" + "#define PRIoPTR\t\tPRIo64\n" + "#define PRIuPTR\t\tPRIu64\n" + "#define PRIxPTR\t\tPRIx64\n" + "#define PRIXPTR\t\tPRIX64\n" + "#endif\n\n" + "#ifndef _KERNEL\n"; + test_text = "#ifndef _KERNEL\n"; +}; + /* * Fix hpux broken ctype macros */ @@ -3034,7 +3211,8 @@ fix = { c_fix = machine_name; test_text = "/* MACH_DIFF: */\n" - "#if defined( i386 ) || defined( sparc ) || defined( vax )" + "#if defined( i386 ) || defined( sparc ) || defined( vax ) || " + "defined( linux ) || __has_include ( <linux.h> )" "\n/* no uniform test, so be careful :-) */"; }; @@ -4992,28 +5170,80 @@ fix = { c_fix = format; c_fix_arg = "%0\n" - "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n"; + "#define ioctl(fd, func, arg) ioctl(fd, func, (int)(arg))\n"; c_fix_arg = "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);"; test_text = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;"; }; + +/* + * Provide C99 FP classification support in VxWorks math.h if + * not already there. Note the strict expectation on #define without + * whitespaces in the bypass expression, which "works" for + * the system headers we have met and doesn't match test texts for + * other hacks, found in the test baseline. + */ +fix = { + hackname = vxworks_math_h_fp_c99; + mach = "*-*-vxworks*"; + files = math.h; + bypass = "#define[ \t]+FP_INFINITE"; + select = "#define HUGE_VAL[ \t]*_ARCH.*"; + c_fix = format; + c_fix_arg = << _EOArg_ + +%0 + +#if _C99 + +#define FP_INFINITE 1 +#define FP_NAN 2 +#define FP_NORMAL (-1) +#define FP_SUBNORMAL (-2) +#define FP_ZERO 0 + +#define fpclassify(x) \ + __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, \ + FP_SUBNORMAL, FP_ZERO, (x)) + +#define signbit(x) __builtin_signbit(x) +#define isfinite(x) __builtin_isfinite(x) +#define isnormal(x) __builtin_isnormal(x) +#define isnan(x) __builtin_isnan(x) +#define isinf(x) __builtin_isinf(x) + +#define isgreater(x, y) __builtin_isgreater((x),(y)) +#define isgreaterequal(x, y) __builtin_isgreaterequal((x),(y)) +#define isless(x, y) __builtin_isless((x),(y)) +#define islessequal(x, y) __builtin_islessequal((x),(y)) +#define islessgreater(x, y) __builtin_islessgreater((x),(y)) +#define isunordered(x, y) __builtin_isunordered((x),(y)) + +#endif /* _C99 */ + +_EOArg_; + + test_text = "#define HUGE_VAL _ARCH_HUGH_VAL"; +}; /* - * Wrap VxWorks mkdir to be posix compliant + * mkdir's posix interface expects two arguments. While the RTP VxWorks + * API is fine, the kernel version handles only one. We used to expose + * a macro and this didn't play nice with uses such as posix:mkdir(x, y) + * in libstdc++, so we expose a vararg prototype instead. */ fix = { - hackname = vxworks_mkdir_macro; + hackname = vxworks_posix_mkdir; files = sys/stat.h; mach = "*-*-vxworks*"; c_fix = format; - c_fix_arg = "%0\n" - "#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n"; + c_fix_arg = "extern STATUS mkdir(const char *dir, ...);"; c_fix_arg = "extern[\t ]+STATUS[\t ]+mkdir[\t ]*" "\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*" /* arg type */ "(|[_[:alpha:]][_[:alnum:]]*)" /* arg name (optional) */ "\\)[\t ]*;"; - + test_text = "extern STATUS mkdir (const char * _qwerty) ;"; }; @@ -5048,6 +5278,28 @@ fix = { "# define\t__INCstath <sys/stat.h>"; }; +/* + * yvals.h on VxWorks-6 expects the toolchain to provide its own + * version of the header, which we don't do. Arrange to fallback + * on the system definition. + */ +fix = { + hackname = vxworks_next_yvals; + mach = "*-*-vxworks*"; + files = yvals.h; + select = "#include_next <yvals.h>"; + c_fix = format; + c_fix_arg = "#if 0 /* GCC does not provide yvals.h. */\n%1"; + c_fix_arg = "#if .*\n" + "/\\* .*\n" + "(#include_next <yvals.h>\n)"; + + test_text = "#if (defined(__cplusplus) && defined(__GNUC__))\n" + "/* GCC C++ has it's own yvals.h */\n" + "#include_next <yvals.h>\n" + "#else\n"; +}; + /* * Make it so VxWorks does not include gcc/regs.h accidentally */ @@ -5062,6 +5314,47 @@ fix = { test_text = "#include <regs.h>\n"; }; +/* + * Likewise, open's posix interface allows two or three arguments and + * some VxWorks headers expose only a strict 3 arguments version. Merely + * changing the prototype into a varargs one is risky as the implementation + * would receive garbage in the third arg for calls providing only two, + * which libstdc++ does. We simply provide an always inline overload for C++ + * instead. + * + * Both fcntl.h and ioLib.h might "feature" such a prototype for _WRS_KERNEL. + * The latter #includes the former though (since 1992 according to the embedded + * log), so just leave ioLib.h alone. + */ +fix = { + hackname = vxworks_posix_open; + mach = "*-*-vxworks*"; + files = fcntl.h; + + select = "extern int.*open \\(const char \\*[ a-z]*, int[ a-z]*, int[ a-z]*\\);"; + c_fix = format; + c_fix_arg = << _EOArg_ +%0 + +#if defined(__cplusplus) +extern "C++" { + inline int open (const char *, int) __attribute__((__always_inline__)); + + inline int + open (const char *name, int flags) + { + return open (name, flags, 0); + } +} +#endif + +_EOArg_; + + test_text = + "extern int open (const char *, int, int);\n" + "extern int open (const char *name, int flags, int mode );\n"; +}; + /* * Another bad dependency in VxWorks 5.2 <time.h>. */ @@ -5106,6 +5399,54 @@ fix = { test_text = "extern int write ( int , char * , size_t ) ;"; }; +/* + * This hack ensures the include_next in the fixed unistd.h actually + * finds the system's unistd.h and not the fixed unistd.h again. + */ +fix = { + hackname = vxworks_iolib_include_unistd; + files = ioLib.h; + mach = "*-*-vxworks*"; + select = "#include \"unistd.h\""; + + c_fix = format; + c_fix_arg = "#include <unistd.h>"; + + test_text = "#include \"unistd.h\""; +}; + +/* + * Make sure there is a visible prototype of sysClkRateGet() when + * CLOCKS_PER_SEC is #defined to that in time.h for VxWorks. This would + * typically be provided by sysLib.h. + * + * The new #include has to come after the one for vxWorks.h in kernel headers + * and vxWorks.h is typically not #included in RTP headers. yvals.h is + * conditionally included in the latter, instead, and new #include are better + * inserted after that. + */ +fix = { + hackname = vxworks_time_h_syslib; + files = time.h; + mach = "*-*-vxworks*"; + select = "[ \t]*#define[ \t]+CLOCKS_PER_SEC[ \t]+sysClkRateGet.*"; + + c_fix = format; + c_fix_arg = "%0\n#include <sysLib.h>"; + c_fix_arg = "#include <vxWorks.h>|#endif.* _YVALS.*"; + + test_text = + "/* kernel header pattern: */\n" + "#include <vxWorks.h>\n" + "\n" + "/* rtp header pattern: */\n" + "#ifndef _YVALS\n" + "#include <yvals.h>\n" + "#endif /* _YVALS */\n" + "\n" + "#define CLOCKS_PER_SEC sysClkRateGet()"; +}; + /* * 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 diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh index 0f9648608e9..df90720b716 100755 --- a/fixincludes/mkfixinc.sh +++ b/fixincludes/mkfixinc.sh @@ -19,6 +19,7 @@ case $machine in powerpc-*-rtems* | \ powerpcle-*-eabisim* | \ powerpcle-*-eabi* | \ + *-*-vxworks7* | \ *-musl* ) # IF there is no include fixing, # THEN create a no-op fixer and exit diff --git a/fixincludes/mkheaders.in b/fixincludes/mkheaders.in index 9109b057c53..4109dc633dd 100644 --- a/fixincludes/mkheaders.in +++ b/fixincludes/mkheaders.in @@ -77,20 +77,39 @@ libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version} itoolsdir=${libexecsubdir}/install-tools itoolsdatadir=${libsubdir}/install-tools incdir=${libsubdir}/include-fixed -mkinstalldirs="@SHELL@ ${itoolsdir}/mkinstalldirs" +mkinstalldirs="${itoolsdir}/mkinstalldirs" cd ${itoolsdir} rm -rf ${incdir}/* +for shell in $CONFIG_SHELL $SHELL @SHELL@ /bin/sh ""; do + if { test -x $shell || test -x $shell.exe; } \ + && $shell $mkinstalldirs > /dev/null 2>&1; then + mkinstalldirs="$shell $mkinstalldirs" + break + elif test x$shell = x; then + if $mkinstalldirs > /dev/null 2>&1; then + break + elif test ! -f $mkinstalldirs; then + echo mkheaders: could not find $mkinstalldirs >&2 + exit 1 + else + echo mkheaders: please rerun with CONFIG_SHELL set to a working Bourne shell >&2 + exit 1 + fi + fi +done + for ml in `cat ${itoolsdatadir}/fixinc_list`; do sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'` multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'` subincdir=${incdir}${multi_dir} + ${mkinstalldirs} ${subincdir} . ${itoolsdatadir}/mkheaders.conf if [ x${STMP_FIXINC} != x ] ; then TARGET_MACHINE="${target}" target_canonical="${target}" \ MACRO_LIST="${itoolsdatadir}/macro_list" \ - @SHELL@ ./fixinc.sh ${subincdir} \ + $shell ./fixinc.sh ${subincdir} \ ${isysroot}${SYSTEM_HEADER_DIR} ${OTHER_FIXINCLUDES_DIRS} rm -f ${subincdir}/syslimits.h if [ -f ${subincdir}/limits.h ]; then @@ -100,5 +119,5 @@ for ml in `cat ${itoolsdatadir}/fixinc_list`; do fi fi - cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir} + cp ${itoolsdatadir}/include${multi_dir}/limits.h ${subincdir}/limits.h done diff --git a/fixincludes/system.h b/fixincludes/system.h index dca5d57b2e3..687fb2e2025 100644 --- a/fixincludes/system.h +++ b/fixincludes/system.h @@ -209,6 +209,10 @@ extern int errno; extern void abort (void); #endif +#if defined (HAVE_DECL_MEMMEM) && !HAVE_DECL_MEMMEM +extern void *memmem (const void *, size_t, const void *, size_t); +#endif + #if HAVE_SYS_STAT_H # include <sys/stat.h> #endif diff --git a/fixincludes/tests/base/architecture/ppc/math.h b/fixincludes/tests/base/architecture/ppc/math.h index 4af7808fcc2..e7db705f5f9 100644 --- a/fixincludes/tests/base/architecture/ppc/math.h +++ b/fixincludes/tests/base/architecture/ppc/math.h @@ -12,3 +12,8 @@ #if defined( BROKEN_NAN_CHECK ) #if 1 #endif /* BROKEN_NAN_CHECK */ + + +#if defined( DARWIN_LL_FUNCS_AVAIL_CHECK ) +#if !(__DARWIN_NO_LONG_LONG) +#endif /* DARWIN_LL_FUNCS_AVAIL_CHECK */ diff --git a/fixincludes/tests/base/dispatch/object.h b/fixincludes/tests/base/dispatch/object.h new file mode 100644 index 00000000000..36722f4b9dc --- /dev/null +++ b/fixincludes/tests/base/dispatch/object.h @@ -0,0 +1,18 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/dispatch/object.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( DARWIN_DISPATCH_OBJECT_1_CHECK ) +#if __BLOCKS__ +typedef void (^dispatch_block_t)(void); +#endif + +__BEGIN_DECLS +#endif /* DARWIN_DISPATCH_OBJECT_1_CHECK */ diff --git a/fixincludes/tests/base/fcntl.h b/fixincludes/tests/base/fcntl.h index 3a40c01cabe..fe0e56a99f8 100644 --- a/fixincludes/tests/base/fcntl.h +++ b/fixincludes/tests/base/fcntl.h @@ -18,6 +18,39 @@ extern "C" { #if defined( AAB_AIX_FCNTL_CHECK ) #endif /* AAB_AIX_FCNTL_CHECK */ + + +#if defined( VXWORKS_POSIX_OPEN_CHECK ) +extern int open (const char *, int, int); + +#if defined(__cplusplus) +extern "C++" { + inline int open (const char *, int) __attribute__((__always_inline__)); + + inline int + open (const char *name, int flags) + { + return open (name, flags, 0); + } +} +#endif + +extern int open (const char *name, int flags, int mode ); + +#if defined(__cplusplus) +extern "C++" { + inline int open (const char *, int) __attribute__((__always_inline__)); + + inline int + open (const char *name, int flags) + { + return open (name, flags, 0); + } +} +#endif + + +#endif /* VXWORKS_POSIX_OPEN_CHECK */ #ifdef __cplusplus } #endif diff --git a/fixincludes/tests/base/inttypes.h b/fixincludes/tests/base/inttypes.h index 3f556856a41..9c1f93eb736 100644 --- a/fixincludes/tests/base/inttypes.h +++ b/fixincludes/tests/base/inttypes.h @@ -16,3 +16,51 @@ #define UINT32_C(__c) __CONCAT__(__c,u) #endif /* HPUX_C99_INTTYPES_CHECK */ + + +#if defined( HPUX_C99_INTTYPES3_CHECK ) +#undef SIZE_MAX +#define SIZE_MAX __SIZE_MAX__ +#ifdef __INTPTR_MAX__ +# undef INTPTR_MAX +# define INTPTR_MAX __INTPTR_MAX__ +# undef INTPTR_MIN +# define INTPTR_MIN (-INTPTR_MAX - 1) +#endif +#ifdef __UINTPTR_MAX__ +# undef UINTPTR_MAX +# define UINTPTR_MAX __UINTPTR_MAX__ +#endif + +#endif /* HPUX_C99_INTTYPES3_CHECK */ + + +#if defined( HPUX_C99_INTTYPES4_CHECK ) +#define SCNxMAX SCNx64 +#define SCNuMAX SCNu64 +#define SCNxMAX SCNx32 +#define SCNuMAX SCNu32 + +#endif /* HPUX_C99_INTTYPES4_CHECK */ + + +#if defined( HPUX_C99_INTTYPES5_CHECK ) +#ifndef __LP64__ +#define PRIdPTR PRId32 +#define PRIiPTR PRIi32 +#define PRIoPTR PRIo32 +#define PRIuPTR PRIu32 +#define PRIxPTR PRIx32 +#define PRIXPTR PRIX32 +#else +#define PRIdPTR PRId64 +#define PRIiPTR PRIi64 +#define PRIoPTR PRIo64 +#define PRIuPTR PRIu64 +#define PRIxPTR PRIx64 +#define PRIXPTR PRIX64 +#endif + +#ifndef _KERNEL + +#endif /* HPUX_C99_INTTYPES5_CHECK */ diff --git a/fixincludes/tests/base/ioLib.h b/fixincludes/tests/base/ioLib.h index d570c895d57..a3ff6c1eb86 100644 --- a/fixincludes/tests/base/ioLib.h +++ b/fixincludes/tests/base/ioLib.h @@ -17,3 +17,8 @@ extern int ioctl ( int asdf1234, int jkl , int qwerty ) ; #if defined( VXWORKS_WRITE_CONST_CHECK ) extern int write (int, const char*, size_t); #endif /* VXWORKS_WRITE_CONST_CHECK */ + + +#if defined( VXWORKS_IOLIB_INCLUDE_UNISTD_CHECK ) +#include <unistd.h> +#endif /* VXWORKS_IOLIB_INCLUDE_UNISTD_CHECK */ diff --git a/fixincludes/tests/base/malloc.h b/fixincludes/tests/base/malloc.h index 15be8b02b88..b5d0e6e31c9 100644 --- a/fixincludes/tests/base/malloc.h +++ b/fixincludes/tests/base/malloc.h @@ -11,6 +11,8 @@ #if defined( AIX_MALLOC_CHECK ) #if (defined(__cplusplus) && defined(__IBMCPP__)) +extern "C" { + extern "builtin" char *__alloca (size_t); #endif /* AIX_MALLOC_CHECK */ diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h index c7da15ad2c7..29b67579748 100644 --- a/fixincludes/tests/base/math.h +++ b/fixincludes/tests/base/math.h @@ -30,6 +30,11 @@ #endif /* DARWIN_9_LONG_DOUBLE_FUNCS_2_CHECK */ +#if defined( DARWIN_FLT_EVAL_METHOD_CHECK ) +#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16 +#endif /* DARWIN_FLT_EVAL_METHOD_CHECK */ + + #if defined( HPPA_HPUX_FP_MACROS_CHECK ) #endif /* _INCLUDE_HPUX_SOURCE */ @@ -52,6 +57,13 @@ #endif /* HPUX11_CPP_POW_INLINE_CHECK */ +#if defined( HPUX_MATH_CONSTEXPR_CHECK ) +# define _DINFINITY (__builtin_inf ()) +# define _SINFINITY (__builtin_inff ()) +# define _SQNAN (__builtin_nanf ("")) +#endif /* HPUX_MATH_CONSTEXPR_CHECK */ + + #if defined( HPUX11_FABSF_CHECK ) #ifdef _PA_RISC #ifndef __cplusplus @@ -99,6 +111,40 @@ extern int class(); int foo; #endif #endif /* STRICT_ANSI_NOT_CTD_CHECK */ + + +#if defined( VXWORKS_MATH_H_FP_C99_CHECK ) + +#define HUGE_VAL _ARCH_HUGH_VAL + +#if _C99 + +#define FP_INFINITE 1 +#define FP_NAN 2 +#define FP_NORMAL (-1) +#define FP_SUBNORMAL (-2) +#define FP_ZERO 0 + +#define fpclassify(x) \ + __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, \ + FP_SUBNORMAL, FP_ZERO, (x)) + +#define signbit(x) __builtin_signbit(x) +#define isfinite(x) __builtin_isfinite(x) +#define isnormal(x) __builtin_isnormal(x) +#define isnan(x) __builtin_isnan(x) +#define isinf(x) __builtin_isinf(x) + +#define isgreater(x, y) __builtin_isgreater((x),(y)) +#define isgreaterequal(x, y) __builtin_isgreaterequal((x),(y)) +#define isless(x, y) __builtin_isless((x),(y)) +#define islessequal(x, y) __builtin_islessequal((x),(y)) +#define islessgreater(x, y) __builtin_islessgreater((x),(y)) +#define isunordered(x, y) __builtin_isunordered((x),(y)) + +#endif /* _C99 */ + +#endif /* VXWORKS_MATH_H_FP_C99_CHECK */ #ifdef __cplusplus #undef exception #endif diff --git a/fixincludes/tests/base/os/availability.h b/fixincludes/tests/base/os/availability.h new file mode 100644 index 00000000000..e8696b14acd --- /dev/null +++ b/fixincludes/tests/base/os/availability.h @@ -0,0 +1,18 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/os/availability.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( DARWIN_API_AVAILABILITY_CHECK ) + #define API_AVAILABLE(...) + #define API_DEPRECATED(...) + #define API_DEPRECATED_WITH_REPLACEMENT(...) + #define API_UNAVAILABLE(...) + +#endif /* DARWIN_API_AVAILABILITY_CHECK */ diff --git a/fixincludes/tests/base/os/base.h b/fixincludes/tests/base/os/base.h new file mode 100644 index 00000000000..44aa3932cfa --- /dev/null +++ b/fixincludes/tests/base/os/base.h @@ -0,0 +1,20 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/os/base.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( DARWIN_OS_BASE_1_CHECK ) +#define __has_attribute(x) 0 +#endif +#ifndef __has_extension +#define __has_extension(x) 0 +#endif + +#if __GNUC__ +#endif /* DARWIN_OS_BASE_1_CHECK */ diff --git a/fixincludes/tests/base/stdlib.h b/fixincludes/tests/base/stdlib.h index cee7e5db413..99092dedd24 100644 --- a/fixincludes/tests/base/stdlib.h +++ b/fixincludes/tests/base/stdlib.h @@ -29,6 +29,16 @@ extern void *valloc(size_t) __asm__("__linux_valloc"); #endif /* AIX_STDLIB_VALLOC_CHECK */ +#if defined( AIX_STDLIB_VEC_MALLOC_CHECK ) +extern void *malloc(size_t) __asm__("vec_malloc"); +#endif /* AIX_STDLIB_VEC_MALLOC_CHECK */ + + +#if defined( AIX_STDLIB_VEC_CALLOC_CHECK ) +extern void *calloc(size_t, size_t) __asm__("vec_calloc"); +#endif /* AIX_STDLIB_VEC_CALLOC_CHECK */ + + #if defined( AIX_STRTOF_CONST_CHECK ) extern float strtof(const char *, char **); #endif /* AIX_STRTOF_CONST_CHECK */ diff --git a/fixincludes/tests/base/sys/inttypes.h b/fixincludes/tests/base/sys/inttypes.h new file mode 100644 index 00000000000..f349bdacdbf --- /dev/null +++ b/fixincludes/tests/base/sys/inttypes.h @@ -0,0 +1,14 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/sys/inttypes.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( AIX_INTTYPES_CHECK ) +#if 1 +#endif /* AIX_INTTYPES_CHECK */ diff --git a/fixincludes/tests/base/sys/socket.h b/fixincludes/tests/base/sys/socket.h index 5d66f8be291..588a378fe0a 100644 --- a/fixincludes/tests/base/sys/socket.h +++ b/fixincludes/tests/base/sys/socket.h @@ -10,12 +10,15 @@ #if defined( AIX_EXTERNCPP1_CHECK ) +#ifndef _KERNEL #ifdef __cplusplus extern "C++" { +extern "C" int naccept(int, struct sockaddr *, socklen_t *); #endif /* AIX_EXTERNCPP1_CHECK */ #if defined( AIX_EXTERNCPP2_CHECK ) +#endif /* COMPAT_43 */ } /* extern "C++" */ #else /* __cplusplus */ #endif /* AIX_EXTERNCPP2_CHECK */ diff --git a/fixincludes/tests/base/sys/stat.h b/fixincludes/tests/base/sys/stat.h index 9c81cff94bd..cf86e5d169e 100644 --- a/fixincludes/tests/base/sys/stat.h +++ b/fixincludes/tests/base/sys/stat.h @@ -28,11 +28,9 @@ extern int fchmod(int, mode_t); #endif /* RS6000_FCHMOD_CHECK */ -#if defined( VXWORKS_MKDIR_MACRO_CHECK ) -extern STATUS mkdir (const char * _qwerty) ; -#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir)) - -#endif /* VXWORKS_MKDIR_MACRO_CHECK */ +#if defined( VXWORKS_POSIX_MKDIR_CHECK ) +extern STATUS mkdir(const char *dir, ...); +#endif /* VXWORKS_POSIX_MKDIR_CHECK */ #if defined( VXWORKS_NEEDS_VXWORKS_CHECK ) diff --git a/fixincludes/tests/base/sys/types.h b/fixincludes/tests/base/sys/types.h index 683b5e93ecd..7340e76b175 100644 --- a/fixincludes/tests/base/sys/types.h +++ b/fixincludes/tests/base/sys/types.h @@ -9,6 +9,11 @@ +#if defined( AIX_PHYSADR_T_CHECK ) +typedef struct __physadr_s { random stuff } * physadr_t; +#endif /* AIX_PHYSADR_T_CHECK */ + + #if defined( GNU_TYPES_CHECK ) #if !defined(_GCC_PTRDIFF_T) #define _GCC_PTRDIFF_T diff --git a/fixincludes/tests/base/testing.h b/fixincludes/tests/base/testing.h index cf95321fb86..8b3accaf04e 100644 --- a/fixincludes/tests/base/testing.h +++ b/fixincludes/tests/base/testing.h @@ -64,7 +64,7 @@ BSD43__IOWR('T', 1) /* Some are multi-line */ #if defined( MACHINE_NAME_CHECK ) /* MACH_DIFF: */ -#if defined( i386 ) || defined( sparc ) || defined( vax ) +#if defined( i386 ) || defined( sparc ) || defined( vax ) || defined( linux ) || __has_include ( <linux.h> ) /* no uniform test, so be careful :-) */ #endif /* MACHINE_NAME_CHECK */ diff --git a/fixincludes/tests/base/time.h b/fixincludes/tests/base/time.h index cf22e2014d6..e0252bd85d1 100644 --- a/fixincludes/tests/base/time.h +++ b/fixincludes/tests/base/time.h @@ -25,3 +25,18 @@ typedef void (*__gcc_VOIDFUNCPTR) (); #endif #define VOIDFUNCPTR __gcc_VOIDFUNCPTR #endif /* VXWORKS_TIME_CHECK */ + + +#if defined( VXWORKS_TIME_H_SYSLIB_CHECK ) +/* kernel header pattern: */ +#include <vxWorks.h> +#include <sysLib.h> + +/* rtp header pattern: */ +#ifndef _YVALS +#include <yvals.h> +#endif /* _YVALS */ +#include <sysLib.h> + +#define CLOCKS_PER_SEC sysClkRateGet() +#endif /* VXWORKS_TIME_H_SYSLIB_CHECK */ diff --git a/fixincludes/tests/base/unistd.h b/fixincludes/tests/base/unistd.h index 756451d837b..263df8f336b 100644 --- a/fixincludes/tests/base/unistd.h +++ b/fixincludes/tests/base/unistd.h @@ -9,6 +9,11 @@ +#if defined( AIX_UNISTD_CHECK ) + static int getdtablesize(void) +#endif /* AIX_UNISTD_CHECK */ + + #if defined( ALPHA_SBRK_CHECK ) extern void *sbrk(ptrdiff_t increment); #endif /* ALPHA_SBRK_CHECK */ diff --git a/fixincludes/tests/base/yvals.h b/fixincludes/tests/base/yvals.h new file mode 100644 index 00000000000..ea384d9cf9e --- /dev/null +++ b/fixincludes/tests/base/yvals.h @@ -0,0 +1,17 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/yvals.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( VXWORKS_NEXT_YVALS_CHECK ) +#if 0 /* GCC does not provide yvals.h. */ +#include_next <yvals.h> +#else + +#endif /* VXWORKS_NEXT_YVALS_CHECK */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor