diff options
author | rwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-03 06:45:02 +0000 |
---|---|---|
committer | rwild <rwild@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-03 06:45:02 +0000 |
commit | 050318d9e2c2b0c94959a97a0be729e16ea1f780 (patch) | |
tree | fd6998d5391b4b63be7127939dbd06d7a8807741 /libcpp | |
parent | dd163332d665888fc4250331c37080fee2270538 (diff) | |
download | gcc-050318d9e2c2b0c94959a97a0be729e16ea1f780.tar.gz |
Fix PR bootstrap/42798.
libiberty/:
PR bootstrap/42798
* configure.ac: Check for declaration of 'basename(char *)'.
* configure: Regenerate.
libcpp/:
PR bootstrap/42798
* configure.ac: Check for declaration of 'basename(char *)'.
* configure: Regenerate.
* config.in: Regenerate.
libjava/:
* configure: Regenerate.
libjava/classpath/:
* configure: Regenerate.
fixincludes/:
PR bootstrap/42798
* configure.ac: Check for declaration of 'basename(char *)'.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160211 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 8 | ||||
-rw-r--r-- | libcpp/config.in | 4 | ||||
-rwxr-xr-x | libcpp/configure | 39 | ||||
-rw-r--r-- | libcpp/configure.ac | 4 |
4 files changed, 35 insertions, 20 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index cc77ca013bc..042d6fed4cf 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,11 @@ +2010-06-03 Joern Rennecke <joern.rennecke@embecosm.com> + Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR bootstrap/42798 + * configure.ac: Check for declaration of 'basename(char *)'. + * configure: Regenerate. + * config.in: Regenerate. + 2010-04-25 Joseph Myers <joseph@codesourcery.com> * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X. diff --git a/libcpp/config.in b/libcpp/config.in index 4c71ec3cea5..996993405db 100644 --- a/libcpp/config.in +++ b/libcpp/config.in @@ -33,8 +33,8 @@ don't. */ #undef HAVE_DECL_ASPRINTF -/* Define to 1 if you have the declaration of `basename', and to 0 if you - don't. */ +/* Define to 1 if you have the declaration of `basename(char *)', and to 0 if + you don't. */ #undef HAVE_DECL_BASENAME /* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if diff --git a/libcpp/configure b/libcpp/configure index 00cbd7a583d..cf17de447f2 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -2239,8 +2239,10 @@ $as_echo "$ac_res" >&6; } ac_fn_cxx_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } + as_decl_name=`echo $2|sed 's/ *(.*//'` + 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 : $as_echo_n "(cached) " >&6 else @@ -2250,8 +2252,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -5480,8 +5486,8 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ASPRINTF $ac_have_decl _ACEOF -ac_fn_cxx_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default" -if test "x$ac_cv_have_decl_basename" = x""yes; then : +ac_fn_cxx_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 : ac_have_decl=1 else ac_have_decl=0 @@ -5510,6 +5516,17 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETOPT $ac_have_decl _ACEOF +ac_fn_cxx_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VASPRINTF $ac_have_decl +_ACEOF + ac_fn_cxx_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 : ac_have_decl=1 @@ -5670,16 +5687,6 @@ fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl _ACEOF -ac_fn_cxx_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vasprintf" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_VASPRINTF $ac_have_decl -_ACEOF # Checks for library functions. diff --git a/libcpp/configure.ac b/libcpp/configure.ac index d520e933c90..9dcec239bc1 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -81,8 +81,8 @@ define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl putchar_unlocked putc_unlocked) AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS) -AC_CHECK_DECLS(m4_split(m4_normalize(abort asprintf basename errno getopt \ - libcpp_UNLOCKED_FUNCS vasprintf))) +AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, getopt, vasprintf]) +AC_CHECK_DECLS(m4_split(m4_normalize(libcpp_UNLOCKED_FUNCS))) # Checks for library functions. AC_FUNC_ALLOCA |