Commit ccc7d11a by Kaveh R. Ghazi Committed by Kaveh Ghazi

aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is safe to include…

aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is safe to include both string.h and strings.h together.

        * aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is
        safe to include both string.h and strings.h together.
        (GCC_NEED_DECLARATION): Test STRING_WITH_STRINGS when deciding
        which headers to search for function declarations.  Continue to
        prefer string.h over strings.h when both are not acceptable.
        * acconfig.h (STRING_WITH_STRINGS): Add stub.
        * configure.in: Call GCC_HEADER_STRING.
        * system.h: Test STRING_WITH_STRINGS when deciding which headers
        to include.  Continue to prefer string.h over strings.h when both
        are not acceptable.

From-SVN: r22204
parent 127b53d5
Thu Sep 3 09:47:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is
safe to include both string.h and strings.h together.
(GCC_NEED_DECLARATION): Test STRING_WITH_STRINGS when deciding
which headers to search for function declarations. Continue to
prefer string.h over strings.h when both are not acceptable.
* acconfig.h (STRING_WITH_STRINGS): Add stub.
* configure.in: Call GCC_HEADER_STRING.
* system.h: Test STRING_WITH_STRINGS when deciding which headers
to include. Continue to prefer string.h over strings.h when both
are not acceptable.
Wed Sep 2 23:56:29 1998 David S. Miller <davem@pierdol.cobaltmicro.com> Wed Sep 2 23:56:29 1998 David S. Miller <davem@pierdol.cobaltmicro.com>
* config/sparc/sparc.c (output_double_int): If V9 and MEDLOW, do * config/sparc/sparc.c (output_double_int): If V9 and MEDLOW, do
......
/* Define if you can safely include both <string.h> and <strings.h>. */
#undef STRING_WITH_STRINGS
/* Define if printf supports "%p". */ /* Define if printf supports "%p". */
#undef HAVE_PRINTF_PTR #undef HAVE_PRINTF_PTR
......
dnl See whether we can include both string.h and strings.h.
AC_DEFUN(GCC_HEADER_STRING,
[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
gcc_cv_header_string,
[AC_TRY_COMPILE([#include <string.h>
#include <strings.h>], , gcc_cv_header_string=yes, gcc_cv_header_string=no)])
if test $gcc_cv_header_string = yes; then
AC_DEFINE(STRING_WITH_STRINGS)
fi
])
dnl See whether we need a declaration for a function. dnl See whether we need a declaration for a function.
dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES]) dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
AC_DEFUN(GCC_NEED_DECLARATION, AC_DEFUN(GCC_NEED_DECLARATION,
...@@ -5,12 +16,17 @@ AC_DEFUN(GCC_NEED_DECLARATION, ...@@ -5,12 +16,17 @@ AC_DEFUN(GCC_NEED_DECLARATION,
AC_CACHE_VAL(gcc_cv_decl_needed_$1, AC_CACHE_VAL(gcc_cv_decl_needed_$1,
[AC_TRY_COMPILE([ [AC_TRY_COMPILE([
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STRING_H #ifdef STRING_WITH_STRINGS
#include <string.h> # include <string.h>
# include <strings.h>
#else #else
#ifdef HAVE_STRINGS_H # ifdef HAVE_STRING_H
#include <strings.h> # include <string.h>
#endif # else
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
# endif
#endif #endif
#ifdef HAVE_STDLIB_H #ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
......
/* config.in. Generated automatically from configure.in by autoheader. */ /* config.in. Generated automatically from configure.in by autoheader. */
/* Define if you can safely include both <string.h> and <strings.h>. */
#undef STRING_WITH_STRINGS
/* Define if printf supports "%p". */ /* Define if printf supports "%p". */
#undef HAVE_PRINTF_PTR #undef HAVE_PRINTF_PTR
......
...@@ -1613,21 +1613,55 @@ EOF ...@@ -1613,21 +1613,55 @@ EOF
fi fi
echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
echo "configure:1618: checking whether string.h and strings.h may both be included" >&5
if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1623 "configure"
#include "confdefs.h"
#include <string.h>
#include <strings.h>
int main() {
; return 0; }
EOF
if { (eval echo configure:1631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_header_string=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gcc_cv_header_string=no
fi
rm -f conftest*
fi
echo "$ac_t""$gcc_cv_header_string" 1>&6
if test $gcc_cv_header_string = yes; then
cat >> confdefs.h <<\EOF
#define STRING_WITH_STRINGS 1
EOF
fi
for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1621: checking for $ac_hdr" >&5 echo "configure:1655: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1626 "configure" #line 1660 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1657,17 +1691,17 @@ done ...@@ -1657,17 +1691,17 @@ done
# Check for thread headers. # Check for thread headers.
ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for thread.h""... $ac_c" 1>&6 echo $ac_n "checking for thread.h""... $ac_c" 1>&6
echo "configure:1661: checking for thread.h" >&5 echo "configure:1695: checking for thread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1666 "configure" #line 1700 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <thread.h> #include <thread.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1691,17 +1725,17 @@ fi ...@@ -1691,17 +1725,17 @@ fi
ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
echo "configure:1695: checking for pthread.h" >&5 echo "configure:1729: checking for pthread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1700 "configure" #line 1734 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <pthread.h> #include <pthread.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1727,12 +1761,12 @@ fi ...@@ -1727,12 +1761,12 @@ fi
# See if the system preprocessor understands the ANSI C preprocessor # See if the system preprocessor understands the ANSI C preprocessor
# stringification operator. # stringification operator.
echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6 echo $ac_n "checking whether cpp understands the stringify operator""... $ac_c" 1>&6
echo "configure:1731: checking whether cpp understands the stringify operator" >&5 echo "configure:1765: checking whether cpp understands the stringify operator" >&5
if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_c_have_stringify'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1736 "configure" #line 1770 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
...@@ -1740,7 +1774,7 @@ int main() { ...@@ -1740,7 +1774,7 @@ int main() {
char *test = S(foo); char *test = S(foo);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
gcc_cv_c_have_stringify=yes gcc_cv_c_have_stringify=yes
else else
...@@ -1763,12 +1797,12 @@ fi ...@@ -1763,12 +1797,12 @@ fi
# Use <inttypes.h> only if it exists, # Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t. # doesn't clash with <sys/types.h>, and declares intmax_t.
echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
echo "configure:1767: checking for inttypes.h" >&5 echo "configure:1801: checking for inttypes.h" >&5
if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1772 "configure" #line 1806 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <inttypes.h> #include <inttypes.h>
...@@ -1776,7 +1810,7 @@ int main() { ...@@ -1776,7 +1810,7 @@ int main() {
intmax_t i = -1; intmax_t i = -1;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
cat >> confdefs.h <<EOF cat >> confdefs.h <<EOF
#define HAVE_INTTYPES_H 1 #define HAVE_INTTYPES_H 1
...@@ -1799,12 +1833,12 @@ for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \ ...@@ -1799,12 +1833,12 @@ for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
sysconf isascii gettimeofday sysconf isascii gettimeofday
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1803: checking for $ac_func" >&5 echo "configure:1837: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1808 "configure" #line 1842 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -1827,7 +1861,7 @@ $ac_func(); ...@@ -1827,7 +1861,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -1856,12 +1890,12 @@ done ...@@ -1856,12 +1890,12 @@ done
#AC_CHECK_TYPE(wchar_t, unsigned int) #AC_CHECK_TYPE(wchar_t, unsigned int)
echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:1860: checking for vprintf" >&5 echo "configure:1894: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1865 "configure" #line 1899 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */ which can conflict with char vprintf(); below. */
...@@ -1884,7 +1918,7 @@ vprintf(); ...@@ -1884,7 +1918,7 @@ vprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vprintf=yes" eval "ac_cv_func_vprintf=yes"
else else
...@@ -1908,12 +1942,12 @@ fi ...@@ -1908,12 +1942,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:1912: checking for _doprnt" >&5 echo "configure:1946: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1917 "configure" #line 1951 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */ which can conflict with char _doprnt(); below. */
...@@ -1936,7 +1970,7 @@ _doprnt(); ...@@ -1936,7 +1970,7 @@ _doprnt();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func__doprnt=yes" eval "ac_cv_func__doprnt=yes"
else else
...@@ -1972,7 +2006,7 @@ fi ...@@ -1972,7 +2006,7 @@ fi
echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
echo "configure:1976: checking whether the printf functions support %p" >&5 echo "configure:2010: checking whether the printf functions support %p" >&5
if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1980,7 +2014,7 @@ else ...@@ -1980,7 +2014,7 @@ else
gcc_cv_func_printf_ptr=no gcc_cv_func_printf_ptr=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1984 "configure" #line 2018 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
...@@ -1993,7 +2027,7 @@ main() ...@@ -1993,7 +2027,7 @@ main()
exit (p != q); exit (p != q);
} }
EOF EOF
if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then then
gcc_cv_func_printf_ptr=yes gcc_cv_func_printf_ptr=yes
else else
...@@ -2021,21 +2055,26 @@ for ac_func in malloc realloc calloc free bcopy bzero bcmp \ ...@@ -2021,21 +2055,26 @@ for ac_func in malloc realloc calloc free bcopy bzero bcmp \
index rindex getenv atol sbrk abort atof strerror getcwd getwd index rindex getenv atol sbrk abort atof strerror getcwd getwd
do do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:2025: checking whether $ac_func must be declared" >&5 echo "configure:2059: checking whether $ac_func must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2030 "configure" #line 2064 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STRING_H #ifdef STRING_WITH_STRINGS
#include <string.h> # include <string.h>
# include <strings.h>
#else #else
#ifdef HAVE_STRINGS_H # ifdef HAVE_STRING_H
#include <strings.h> # include <string.h>
#endif # else
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
# endif
#endif #endif
#ifdef HAVE_STDLIB_H #ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
...@@ -2054,7 +2093,7 @@ int main() { ...@@ -2054,7 +2093,7 @@ int main() {
char *(*pfn) = (char *(*)) $ac_func char *(*pfn) = (char *(*)) $ac_func
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "gcc_cv_decl_needed_$ac_func=no" eval "gcc_cv_decl_needed_$ac_func=no"
else else
...@@ -2083,21 +2122,26 @@ done ...@@ -2083,21 +2122,26 @@ done
for ac_func in getrlimit setrlimit for ac_func in getrlimit setrlimit
do do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6 echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
echo "configure:2087: checking whether $ac_func must be declared" >&5 echo "configure:2126: checking whether $ac_func must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_decl_needed_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2092 "configure" #line 2131 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STRING_H #ifdef STRING_WITH_STRINGS
#include <string.h> # include <string.h>
# include <strings.h>
#else #else
#ifdef HAVE_STRINGS_H # ifdef HAVE_STRING_H
#include <strings.h> # include <string.h>
#endif # else
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
# endif
#endif #endif
#ifdef HAVE_STDLIB_H #ifdef HAVE_STDLIB_H
#include <stdlib.h> #include <stdlib.h>
...@@ -2120,7 +2164,7 @@ int main() { ...@@ -2120,7 +2164,7 @@ int main() {
char *(*pfn) = (char *(*)) $ac_func char *(*pfn) = (char *(*)) $ac_func
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval "gcc_cv_decl_needed_$ac_func=no" eval "gcc_cv_decl_needed_$ac_func=no"
else else
...@@ -2147,12 +2191,12 @@ done ...@@ -2147,12 +2191,12 @@ done
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
echo "configure:2151: checking for sys_siglist declaration in signal.h or unistd.h" >&5 echo "configure:2195: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2156 "configure" #line 2200 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
...@@ -2164,7 +2208,7 @@ int main() { ...@@ -2164,7 +2208,7 @@ int main() {
char *msg = *(sys_siglist + 1); char *msg = *(sys_siglist + 1);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_decl_sys_siglist=yes ac_cv_decl_sys_siglist=yes
else else
...@@ -5322,7 +5366,7 @@ fi ...@@ -5322,7 +5366,7 @@ fi
# Figure out what assembler alignment features are present. # Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:5326: checking assembler alignment features" >&5 echo "configure:5370: checking assembler alignment features" >&5
gcc_cv_as= gcc_cv_as=
gcc_cv_as_alignment_features= gcc_cv_as_alignment_features=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,gcc$,gas,'` gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,gcc$,gas,'`
...@@ -5582,7 +5626,7 @@ fi ...@@ -5582,7 +5626,7 @@ fi
# Warn if using init_priority. # Warn if using init_priority.
echo $ac_n "checking whether to enable init_priority by default""... $ac_c" 1>&6 echo $ac_n "checking whether to enable init_priority by default""... $ac_c" 1>&6
echo "configure:5586: checking whether to enable init_priority by default" >&5 echo "configure:5630: checking whether to enable init_priority by default" >&5
if test x$enable_init_priority != xyes; then if test x$enable_init_priority != xyes; then
enable_init_priority=no enable_init_priority=no
fi fi
......
...@@ -213,6 +213,7 @@ EGCS_PROG_INSTALL ...@@ -213,6 +213,7 @@ EGCS_PROG_INSTALL
AC_HEADER_STDC AC_HEADER_STDC
AC_HEADER_TIME AC_HEADER_TIME
GCC_HEADER_STRING
AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h) AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h)
# Check for thread headers. # Check for thread headers.
......
...@@ -88,11 +88,16 @@ ...@@ -88,11 +88,16 @@
extern int errno; extern int errno;
#endif #endif
#ifdef HAVE_STRING_H #ifdef STRING_WITH_STRINGS
# include <string.h> # include <string.h>
# include <strings.h>
#else #else
# ifdef HAVE_STRINGS_H # ifdef HAVE_STRING_H
# include <strings.h> # include <string.h>
# else
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
# endif # endif
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment