Commit f50f17e6 by Yunlian Jiang Committed by Ian Lance Taylor

libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is not defined.

include/:
	* libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is
	not defined.
libiberty/:
	* configure.ac: Add AC_GNU_SOURCE.
	* Makefile.in (COMPILE.c): Add -D_GNU_SOURCE.
	* configure, config.in: Rebuild.
	* floatformat.c (_GNU_SOURCE): Don't define if already defined.

From-SVN: r223589
parent af563d4b
2015-05-22 Yunlian Jiang <yunlian@google.com>
* libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is
not defined.
2015-03-19 Richard Biener <rguenther@suse.de> 2015-03-19 Richard Biener <rguenther@suse.de>
* partition.h (struct partition_elem): Re-order elements to * partition.h (struct partition_elem): Re-order elements to
......
...@@ -621,7 +621,7 @@ extern int pexecute (const char *, char * const *, const char *, ...@@ -621,7 +621,7 @@ extern int pexecute (const char *, char * const *, const char *,
extern int pwait (int, int *, int); extern int pwait (int, int *, int);
#if !HAVE_DECL_ASPRINTF #if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF
/* Like sprintf but provides a pointer to malloc'd storage, which must /* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */ be freed by the caller. */
......
2015-05-22 Yunlian Jiang <yunlian@google.com>
* configure.ac: Add AC_GNU_SOURCE.
* Makefile.in (COMPILE.c): Add -D_GNU_SOURCE.
* configure, config.in: Rebuild.
* floatformat.c (_GNU_SOURCE): Don't define if already defined.
2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org> 2015-05-16 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_symbol_kinds): New enum. * d-demangle.c (dlang_symbol_kinds): New enum.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, # 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
# 2012, 2014 Free Software Foundation # 2012, 2014, 2015 Free Software Foundation
# #
# This file is part of the libiberty library. # This file is part of the libiberty library.
# Libiberty is free software; you can redistribute it and/or # Libiberty is free software; you can redistribute it and/or
...@@ -113,7 +113,8 @@ installcheck: installcheck-subdir ...@@ -113,7 +113,8 @@ installcheck: installcheck-subdir
INCDIR=$(srcdir)/$(MULTISRCTOP)../include INCDIR=$(srcdir)/$(MULTISRCTOP)../include
COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@ COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) \
$(HDEFINES) @ac_libiberty_warn_cflags@ -D_GNU_SOURCE
# Just to make sure we don't use a built-in rule with VPATH # Just to make sure we don't use a built-in rule with VPATH
.c.$(objext): .c.$(objext):
......
...@@ -485,6 +485,28 @@ ...@@ -485,6 +485,28 @@
/* Define to an unsigned 64-bit type available in the compiler. */ /* Define to an unsigned 64-bit type available in the compiler. */
#undef UNSIGNED_64BIT_TYPE #undef UNSIGNED_64BIT_TYPE
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */ significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD #if defined AC_APPLE_UNIVERSAL_BUILD
...@@ -503,6 +525,16 @@ ...@@ -503,6 +525,16 @@
/* Define for large files, on AIX-style hosts. */ /* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES #undef _LARGE_FILES
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
#undef const #undef const
......
...@@ -599,11 +599,11 @@ PICFLAG ...@@ -599,11 +599,11 @@ PICFLAG
INSTALL_DATA INSTALL_DATA
INSTALL_SCRIPT INSTALL_SCRIPT
INSTALL_PROGRAM INSTALL_PROGRAM
EGREP
GREP
OUTPUT_OPTION OUTPUT_OPTION
NO_MINUS_C_MINUS_O NO_MINUS_C_MINUS_O
ac_libiberty_warn_cflags ac_libiberty_warn_cflags
EGREP
GREP
CPP CPP
OBJEXT OBJEXT
EXEEXT EXEEXT
...@@ -1480,6 +1480,93 @@ fi ...@@ -1480,6 +1480,93 @@ fi
} # ac_fn_c_try_cpp } # ac_fn_c_try_cpp
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
# the include files in INCLUDES and setting the cache variable VAR
# accordingly.
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 :
{ $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 :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
$as_echo_n "checking $2 usability... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_header_compiler=yes
else
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
$as_echo_n "checking $2 presence... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <$2>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
ac_header_preproc=yes
else
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
yes:no: )
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
;;
no:yes:* )
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$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 :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
fi
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;}
} # ac_fn_c_check_header_mongrel
# ac_fn_c_try_run LINENO # ac_fn_c_try_run LINENO
# ---------------------- # ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
...@@ -1522,6 +1609,37 @@ fi ...@@ -1522,6 +1609,37 @@ fi
} # ac_fn_c_try_run } # ac_fn_c_try_run
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
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 :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$3=yes"
else
eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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;}
} # ac_fn_c_check_header_compile
# ac_fn_c_check_header_preproc LINENO HEADER VAR # ac_fn_c_check_header_preproc LINENO HEADER VAR
# ---------------------------------------------- # ----------------------------------------------
# Tests whether HEADER is present, setting the cache variable VAR accordingly. # Tests whether HEADER is present, setting the cache variable VAR accordingly.
...@@ -3610,312 +3728,114 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ...@@ -3610,312 +3728,114 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Check whether --enable-largefile was given. ac_ext=c
if test "${enable_largefile+set}" = set; then : ac_cpp='$CPP $CPPFLAGS'
enableval=$enable_largefile; ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi fi
if test -z "$CPP"; then
if test "$enable_largefile" != no; then if test "${ac_cv_prog_CPP+set}" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if test "${ac_cv_sys_largefile_CC+set}" = set; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_cv_sys_largefile_CC=no # Double quotes because CPP needs to be expanded
if test "$GCC" != yes; then for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
ac_save_CC=$CC do
while :; do ac_preproc_ok=false
# IRIX 6.2 and later do not support large files by default, for ac_c_preproc_warn_flag in '' yes
# so use the C compiler's -n32 option if that helps. do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext # Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h> #ifdef __STDC__
/* Check that off_t can represent 2**63 - 1 correctly. # include <limits.h>
We can't simply define LARGE_OFF_T to be 9223372036854775807, #else
since some C++ compilers masquerading as C compilers # include <assert.h>
incorrectly reject 9223372036854775807. */ #endif
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) Syntax error
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_cpp "$LINENO"; then :
break
else
# Broken: fails on valid input.
continue
fi fi
rm -f core conftest.err conftest.$ac_objext rm -f conftest.err conftest.$ac_ext
CC="$CC -n32"
if ac_fn_c_try_compile "$LINENO"; then : # OK, works on sane cases. Now check whether nonexistent headers
ac_cv_sys_largefile_CC=' -n32'; break # can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi fi
rm -f core conftest.err conftest.$ac_objext rm -f conftest.err conftest.$ac_ext
break
done done
CC=$ac_save_CC # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.$ac_ext rm -f conftest.err conftest.$ac_ext
fi if $ac_preproc_ok; then :
break
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 done
$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } ac_cv_prog_CPP=$CPP
if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
$as_echo_n "(cached) " >&6 fi
CPP=$ac_cv_prog_CPP
else else
while :; do ac_cv_prog_CPP=$CPP
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h> #ifdef __STDC__
/* Check that off_t can represent 2**63 - 1 correctly. # include <limits.h>
We can't simply define LARGE_OFF_T to be 9223372036854775807, #else
since some C++ compilers masquerading as C compilers # include <assert.h>
incorrectly reject 9223372036854775807. */ #endif
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) Syntax error
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_cpp "$LINENO"; then :
ac_cv_sys_file_offset_bits=no; break
else
# Broken: fails on valid input.
continue
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#define _FILE_OFFSET_BITS 64 #include <ac_nonexistent.h>
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_file_offset_bits=64; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_file_offset_bits=unknown
break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
;;
esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if test "${ac_cv_sys_large_files+set}" = set; then :
$as_echo_n "(cached) " >&6
else
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_large_files=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGE_FILES 1
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_large_files=1; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_large_files=unknown
break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
$as_echo_n "checking how to run the C preprocessor... " >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input.
continue
else
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
done
ac_cv_prog_CPP=$CPP
fi
CPP=$ac_cv_prog_CPP
else
ac_cv_prog_CPP=$CPP
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
$as_echo "$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
else
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF _ACEOF
if ac_fn_c_try_cpp "$LINENO"; then : if ac_fn_c_try_cpp "$LINENO"; then :
# Broken: success on invalid input. # Broken: success on invalid input.
...@@ -3946,66 +3866,147 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ...@@ -3946,66 +3866,147 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_c_preproc_warn_flag=yes { $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; }
ac_libiberty_warn_cflags= if test "${ac_cv_path_GREP+set}" = set; then :
save_CFLAGS="$CFLAGS"
for real_option in -W -Wall -Wwrite-strings -Wc++-compat \
-Wstrict-prototypes; do
# Do the check with the no- prefix removed since gcc silently
# accepts any -Wno-* option on purpose
case $real_option in
-Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
*) option=$real_option ;;
esac
as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
{ $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 :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
CFLAGS="$option" if test -z "$GREP"; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext ac_path_GREP_found=false
/* end confdefs.h. */ # Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
int for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
main () do
{ IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
; for ac_prog in grep ggrep; do
return 0; for ac_exec_ext in '' $ac_executable_extensions; do
} ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
_ACEOF { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
if ac_fn_c_try_compile "$LINENO"; then : # Check for GNU ac_path_GREP and select it if it is found.
eval "$as_acx_Woption=yes" # Check for GNU $ac_path_GREP
else case `"$ac_path_GREP" --version 2>&1` in
eval "$as_acx_Woption=no" *GNU*)
fi ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext *)
ac_count=0
fi $as_echo_n 0123456789 >"conftest.in"
eval ac_res=\$$as_acx_Woption while :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 do
$as_echo "$ac_res" >&6; } cat "conftest.in" "conftest.in" >"conftest.tmp"
if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : mv "conftest.tmp" "conftest.in"
ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$real_option" cp "conftest.in" "conftest.nl"
fi $as_echo 'GREP' >> "conftest.nl"
done "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
CFLAGS="$save_CFLAGS" diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
# Do the check with the no- prefix removed from the warning options if test $ac_count -gt ${ac_path_GREP_max-0}; then
# since gcc silently accepts any -Wno-* option on purpose # Best one so far, save it but keep looking for a better one
if test "$GCC" = yes; then : ac_cv_path_GREP="$ac_path_GREP"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic " >&5 ac_path_GREP_max=$ac_count
$as_echo_n "checking whether $CC supports -pedantic ... " >&6; } fi
if test "${acx_cv_prog_cc_pedantic_+set}" = set; then : # 10*(2^10) chars as input seems more than enough
$as_echo_n "(cached) " >&6 test $ac_count -gt 10 && break
done
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
$ac_path_GREP_found && break 3
done
done
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
fi
else else
save_CFLAGS="$CFLAGS" ac_cv_path_GREP=$GREP
CFLAGS="-pedantic " fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
{ $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 :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
if test -z "$EGREP"; then
ac_path_EGREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
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
# 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
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
$as_echo 'EGREP' >> "conftest.nl"
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_EGREP="$ac_path_EGREP"
ac_path_EGREP_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
$ac_path_EGREP_found && break 3
done
done
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
fi
else
ac_cv_path_EGREP=$EGREP
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
$as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
{ $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 :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
int int
main () main ()
...@@ -4016,522 +4017,703 @@ main () ...@@ -4016,522 +4017,703 @@ main ()
} }
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
acx_cv_prog_cc_pedantic_=yes ac_cv_header_stdc=yes
else else
acx_cv_prog_cc_pedantic_=no ac_cv_header_stdc=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi if test $ac_cv_header_stdc = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic_" >&5 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
$as_echo "$acx_cv_prog_cc_pedantic_" >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext
if test $acx_cv_prog_cc_pedantic_ = yes; then : /* end confdefs.h. */
ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic " #include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi fi
rm -f conftest*
fi fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then :
if test "x$CC" != xcc; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 ac_cv_header_stdc=no
$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi fi
set dummy $CC; ac_cc=`$as_echo "$2" | rm -f conftest*
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : fi
$as_echo_n "(cached) " >&6
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then :
:
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <ctype.h>
#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int int
main () main ()
{ {
int i;
; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
return 2;
return 0; return 0;
} }
_ACEOF _ACEOF
# Make sure it works both with $CC and with simple cc. if ac_fn_c_try_run "$LINENO"; then :
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
if { { 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; } &&
test -f conftest2.$ac_objext && { { 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
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
if { ac_try='cc -c conftest.$ac_ext >&5'
{ { 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
ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
rm -f conftest2.*
if { { 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; } &&
test -f conftest2.$ac_objext && { { 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
# cc works too.
:
else
# cc exists but doesn't like -o.
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
fi
fi
else else
eval ac_cv_prog_cc_${ac_cc}_c_o=no ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi fi
rm -f core conftest*
fi fi
if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
$as_echo "yes" >&6; } $as_echo "$ac_cv_header_stdc" >&6; }
else if test $ac_cv_header_stdc = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h $as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi fi
# autoconf is lame and doesn't give us any substitution variable for this. # On IRIX 5.3, sys/types and inttypes.h are conflicting.
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
NO_MINUS_C_MINUS_O=yes inttypes.h stdint.h unistd.h
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 :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
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 :
MINIX=yes
else else
OUTPUT_OPTION='-o $@' MINIX=
fi fi
if test "$MINIX" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if test "${ac_cv_c_const+set}" = set; then :
$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
$as_echo "#define _MINIX 1" >>confdefs.h
fi
{ $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 :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
# define __EXTENSIONS__ 1
$ac_includes_default
int int
main () main ()
{ {
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
const charset cs;
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
pcpcc = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
if (s) return 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
if (!foo) return 0;
}
return !cs[0] && !zero.x;
#endif
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_const=yes ac_cv_safe_to_define___extensions__=yes
else else
ac_cv_c_const=no ac_cv_safe_to_define___extensions__=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
$as_echo "$ac_cv_c_const" >&6; } $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
if test $ac_cv_c_const = no; then test $ac_cv_safe_to_define___extensions__ = yes &&
$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
$as_echo "#define _ALL_SOURCE 1" >>confdefs.h
$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
$as_echo "#define const /**/" >>confdefs.h
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
enableval=$enable_largefile;
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 if test "$enable_largefile" != no; then
$as_echo_n "checking for inline... " >&6; }
if test "${ac_cv_c_inline+set}" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if test "${ac_cv_sys_largefile_CC+set}" = set; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_cv_c_inline=no ac_cv_sys_largefile_CC=no
for ac_kw in inline __inline__ __inline; do if test "$GCC" != yes; then
ac_save_CC=$CC
while :; do
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
break
fi
rm -f core conftest.err conftest.$ac_objext
CC="$CC -n32"
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_largefile_CC=' -n32'; break
fi
rm -f core conftest.err conftest.$ac_objext
break
done
CC=$ac_save_CC
rm -f conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
$as_echo_n "(cached) " >&6
else
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#ifndef __cplusplus #include <sys/types.h>
typedef int foo_t; /* Check that off_t can represent 2**63 - 1 correctly.
static $ac_kw foo_t static_foo () {return 0; } We can't simply define LARGE_OFF_T to be 9223372036854775807,
$ac_kw foo_t foo () {return 0; } since some C++ compilers masquerading as C compilers
#endif incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_inline=$ac_kw ac_cv_sys_file_offset_bits=no; break
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
test "$ac_cv_c_inline" != no && break cat confdefs.h - <<_ACEOF >conftest.$ac_ext
done /* end confdefs.h. */
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_file_offset_bits=64; break
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo "$ac_cv_c_inline" >&6; } ac_cv_sys_file_offset_bits=unknown
break
case $ac_cv_c_inline in done
inline | yes) ;; fi
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
case $ac_cv_c_inline in $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
no) ac_val=;; case $ac_cv_sys_file_offset_bits in #(
*) ac_val=$ac_cv_c_inline;; no | unknown) ;;
esac *)
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#ifndef __cplusplus #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
#define inline $ac_val
#endif
_ACEOF _ACEOF
;; ;;
esac esac
rm -rf conftest*
if test $ac_cv_sys_file_offset_bits = unknown; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if test "${ac_cv_sys_large_files+set}" = set; then :
$as_echo_n "(cached) " >&6
else
while :; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_large_files=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _LARGE_FILES 1
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
main ()
{
{ $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; } return 0;
if test "${ac_cv_path_GREP+set}" = set; then : }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_sys_large_files=1; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_sys_large_files=unknown
break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
no | unknown) ;;
*)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
fi
fi
ac_c_preproc_warn_flag=yes
ac_libiberty_warn_cflags=
save_CFLAGS="$CFLAGS"
for real_option in -W -Wall -Wwrite-strings -Wc++-compat \
-Wstrict-prototypes; do
# Do the check with the no- prefix removed since gcc silently
# accepts any -Wno-* option on purpose
case $real_option in
-Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
*) option=$real_option ;;
esac
as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
{ $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 :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
if test -z "$GREP"; then CFLAGS="$option"
ac_path_GREP_found=false cat confdefs.h - <<_ACEOF >conftest.$ac_ext
# Loop through the user's path and test for each of PROGNAME-LIST /* end confdefs.h. */
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
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
# 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
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
ac_count=0
$as_echo_n 0123456789 >"conftest.in"
while :
do
cat "conftest.in" "conftest.in" >"conftest.tmp"
mv "conftest.tmp" "conftest.in"
cp "conftest.in" "conftest.nl"
$as_echo 'GREP' >> "conftest.nl"
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
as_fn_arith $ac_count + 1 && ac_count=$as_val
if test $ac_count -gt ${ac_path_GREP_max-0}; then
# Best one so far, save it but keep looking for a better one
ac_cv_path_GREP="$ac_path_GREP"
ac_path_GREP_max=$ac_count
fi
# 10*(2^10) chars as input seems more than enough
test $ac_count -gt 10 && break
done
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
$ac_path_GREP_found && break 3 int
done main ()
done {
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
eval "$as_acx_Woption=yes"
else
eval "$as_acx_Woption=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$as_acx_Woption
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$real_option"
fi
done done
IFS=$as_save_IFS CFLAGS="$save_CFLAGS"
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 # Do the check with the no- prefix removed from the warning options
fi # since gcc silently accepts any -Wno-* option on purpose
if test "$GCC" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic " >&5
$as_echo_n "checking whether $CC supports -pedantic ... " >&6; }
if test "${acx_cv_prog_cc_pedantic_+set}" = set; then :
$as_echo_n "(cached) " >&6
else else
ac_cv_path_GREP=$GREP save_CFLAGS="$CFLAGS"
CFLAGS="-pedantic "
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
acx_cv_prog_cc_pedantic_=yes
else
acx_cv_prog_cc_pedantic_=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic_" >&5
$as_echo "$acx_cv_prog_cc_pedantic_" >&6; }
if test $acx_cv_prog_cc_pedantic_ = yes; then :
ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic "
fi fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
$as_echo "$ac_cv_path_GREP" >&6; }
GREP="$ac_cv_path_GREP"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 if test "x$CC" != xcc; then
$as_echo_n "checking for egrep... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
fi
set dummy $CC; ac_cc=`$as_echo "$2" |
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
then ac_cv_path_EGREP="$GREP -E" /* end confdefs.h. */
else
if test -z "$EGREP"; then int
ac_path_EGREP_found=false main ()
# Loop through the user's path and test for each of PROGNAME-LIST {
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ;
do return 0;
IFS=$as_save_IFS }
test -z "$as_dir" && as_dir=. _ACEOF
for ac_prog in egrep; do # Make sure it works both with $CC and with simple cc.
for ac_exec_ext in '' $ac_executable_extensions; do # We do the test twice because some compilers refuse to overwrite an
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" # existing .o file with -o, though they will create one.
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
# Check for GNU ac_path_EGREP and select it if it is found. rm -f conftest2.*
# Check for GNU $ac_path_EGREP if { { case "(($ac_try" in
case `"$ac_path_EGREP" --version 2>&1` in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*GNU*) *) ac_try_echo=$ac_try;;
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; esac
*) eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
ac_count=0 $as_echo "$ac_try_echo"; } >&5
$as_echo_n 0123456789 >"conftest.in" (eval "$ac_try") 2>&5
while : ac_status=$?
do $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
cat "conftest.in" "conftest.in" >"conftest.tmp" test $ac_status = 0; } &&
mv "conftest.tmp" "conftest.in" test -f conftest2.$ac_objext && { { case "(($ac_try" in
cp "conftest.in" "conftest.nl" *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
$as_echo 'EGREP' >> "conftest.nl" *) ac_try_echo=$ac_try;;
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break esac
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
as_fn_arith $ac_count + 1 && ac_count=$as_val $as_echo "$ac_try_echo"; } >&5
if test $ac_count -gt ${ac_path_EGREP_max-0}; then (eval "$ac_try") 2>&5
# Best one so far, save it but keep looking for a better one ac_status=$?
ac_cv_path_EGREP="$ac_path_EGREP" $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
ac_path_EGREP_max=$ac_count test $ac_status = 0; };
fi then
# 10*(2^10) chars as input seems more than enough eval ac_cv_prog_cc_${ac_cc}_c_o=yes
test $ac_count -gt 10 && break if test "x$CC" != xcc; then
done # Test first that cc exists at all.
rm -f conftest.in conftest.tmp conftest.nl conftest.out;; if { ac_try='cc -c conftest.$ac_ext >&5'
{ { case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$ac_path_EGREP_found && break 3 $as_echo "$ac_try_echo"; } >&5
done (eval "$ac_try") 2>&5
done ac_status=$?
done $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
IFS=$as_save_IFS test $ac_status = 0; }; }; then
if test -z "$ac_cv_path_EGREP"; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 rm -f conftest2.*
if { { 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; } &&
test -f conftest2.$ac_objext && { { 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
# cc works too.
:
else
# cc exists but doesn't like -o.
eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi
fi
fi fi
else else
ac_cv_path_EGREP=$EGREP eval ac_cv_prog_cc_${ac_cc}_c_o=no
fi fi
rm -f core conftest*
fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
$as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
EGREP="$ac_cv_path_EGREP" $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 fi
$as_echo_n "checking for ANSI C header files... " >&6; }
if test "${ac_cv_header_stdc+set}" = set; then : # autoconf is lame and doesn't give us any substitution variable for this.
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
NO_MINUS_C_MINUS_O=yes
else
OUTPUT_OPTION='-o $@'
fi
{ $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 :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
int int
main () main ()
{ {
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
const charset cs;
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
pcpcc = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
if (s) return 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
if (!foo) return 0;
}
return !cs[0] && !zero.x;
#endif
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
if ac_fn_c_try_compile "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stdc=yes ac_cv_c_const=yes
else else
ac_cv_header_stdc=no ac_cv_c_const=no
fi fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
$as_echo "$ac_cv_c_const" >&6; }
if test $ac_cv_c_const = no; then
if test $ac_cv_header_stdc = yes; then $as_echo "#define const /**/" >>confdefs.h
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then :
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi fi
if test $ac_cv_header_stdc = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. $as_echo_n "checking for inline... " >&6; }
if test "$cross_compiling" = yes; then : if test "${ac_cv_c_inline+set}" = set; then :
: $as_echo_n "(cached) " >&6
else else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <ctype.h> #ifndef __cplusplus
#include <stdlib.h> typedef int foo_t;
#if ((' ' & 0x0FF) == 0x020) static $ac_kw foo_t static_foo () {return 0; }
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') $ac_kw foo_t foo () {return 0; }
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif #endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
return 2;
return 0;
}
_ACEOF _ACEOF
if ac_fn_c_try_run "$LINENO"; then : if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_inline=$ac_kw
else
ac_cv_header_stdc=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo "$ac_cv_header_stdc" >&6; } test "$ac_cv_c_inline" != no && break
if test $ac_cv_header_stdc = yes; then done
$as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
$as_echo "$ac_cv_c_inline" >&6; }
# On IRIX 5.3, sys/types and inttypes.h are conflicting. case $ac_cv_c_inline in
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inline | yes) ;;
inttypes.h stdint.h unistd.h *)
do : case $ac_cv_c_inline in
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` no) ac_val=;;
ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" *) ac_val=$ac_cv_c_inline;;
eval as_val=\$$as_ac_Header esac
if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF
cat >>confdefs.h <<_ACEOF #ifndef __cplusplus
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 #define inline $ac_val
#endif
_ACEOF _ACEOF
;;
fi esac
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; } $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
......
...@@ -155,6 +155,7 @@ AC_MSG_NOTICE([target_header_dir = $target_header_dir]) ...@@ -155,6 +155,7 @@ AC_MSG_NOTICE([target_header_dir = $target_header_dir])
GCC_NO_EXECUTABLES GCC_NO_EXECUTABLES
AC_PROG_CC AC_PROG_CC
AC_GNU_SOURCE
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_PROG_CPP_WERROR AC_PROG_CPP_WERROR
......
/* IEEE floating point support routines, for GDB, the GNU Debugger. /* IEEE floating point support routines, for GDB, the GNU Debugger.
Copyright 1991, 1994, 1999, 2000, 2003, 2005, 2006, 2010, 2012 Copyright 1991, 1994, 1999, 2000, 2003, 2005, 2006, 2010, 2012, 2015
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
...@@ -19,7 +19,9 @@ along with this program; if not, write to the Free Software ...@@ -19,7 +19,9 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This is needed to pick up the NAN macro on some systems. */ /* This is needed to pick up the NAN macro on some systems. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
......
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