OSDN Git Service

Fix AIX build problem when IBM cc is used.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 1997 21:39:10 +0000 (21:39 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 1997 21:39:10 +0000 (21:39 +0000)
* acconfig.h (NEED_DECLARATION_CALLOC): Add.
* configure.in: Add GCC_NEED_DECLARATION call for calloc.
* rs6000/xm-rs6000.h (malloc, realloc, calloc, free): Delete
declarations.
* config.in, configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14896 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/acconfig.h
gcc/config.in
gcc/config/rs6000/xm-rs6000.h
gcc/configure
gcc/configure.in

index 1b1ea09..28d7add 100644 (file)
@@ -1,3 +1,11 @@
+Fri Aug 22 14:05:55 1997  Jim Wilson  <wilson@cygnus.com>
+
+       * acconfig.h (NEED_DECLARATION_CALLOC): Add.
+       * configure.in: Add GCC_NEED_DECLARATION call for calloc.
+       * rs6000/xm-rs6000.h (malloc, realloc, calloc, free): Delete
+       declarations.
+       * config.in, configure: Regenerate.
+
 Thu Aug 21 23:52:16 1997  John F. Carr  <jfc@mit.edu>
 
        * alias.c (find_base_value): Improve handling of PLUS, MINUS, and
index 690a213..fcc7162 100644 (file)
@@ -9,6 +9,9 @@
 /* Whether realloc must be declared even if <stdlib.h> is included.  */
 #undef NEED_DECLARATION_REALLOC
 
+/* Whether calloc must be declared even if <stdlib.h> is included.  */
+#undef NEED_DECLARATION_CALLOC
+
 /* Whether free must be declared even if <stdlib.h> is included.  */
 #undef NEED_DECLARATION_FREE
 @TOP@
index 8a04e60..504e1bb 100644 (file)
@@ -10,6 +10,9 @@
 /* Whether realloc must be declared even if <stdlib.h> is included.  */
 #undef NEED_DECLARATION_REALLOC
 
+/* Whether calloc must be declared even if <stdlib.h> is included.  */
+#undef NEED_DECLARATION_CALLOC
+
 /* Whether free must be declared even if <stdlib.h> is included.  */
 #undef NEED_DECLARATION_FREE
 
index df6e4e7..9dbd41e 100644 (file)
@@ -59,10 +59,3 @@ extern char *alloca ();
    collect has a chance to see them, so scan the object files directly.  */
 #define COLLECT_EXPORT_LIST
 #endif
-
-#ifndef __STDC__
-extern char *malloc (), *realloc (), *calloc ();
-#else
-extern void *malloc (), *realloc (), *calloc ();
-#endif
-extern void free ();
index 95ec01e..5df865e 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
+# Generated automatically using autoconf version 2.12.1 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
 # This configure script is free software; the Free Software Foundation
@@ -350,7 +350,7 @@ EOF
     verbose=yes ;;
 
   -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
+    echo "configure generated by autoconf version 2.12.1"
     exit 0 ;;
 
   -with-* | --with-*)
@@ -704,7 +704,7 @@ esac
 
 
 # Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
@@ -716,14 +716,14 @@ case "$host_alias" in
 NONE)
   case $nonopt in
   NONE)
-    if host_alias=`$ac_config_guess`; then :
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
     fi ;;
   *) host_alias=$nonopt ;;
   esac ;;
 esac
 
-host=`$ac_config_sub $host_alias`
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
@@ -741,7 +741,7 @@ NONE)
   esac ;;
 esac
 
-target=`$ac_config_sub $target_alias`
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
@@ -759,7 +759,7 @@ NONE)
   esac ;;
 esac
 
-build=`$ac_config_sub $build_alias`
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
@@ -1424,13 +1424,61 @@ EOF
 
 fi
 
+echo $ac_n "checking whether calloc must be declared""... $ac_c" 1>&6
+echo "configure:1429: checking whether calloc must be declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_decl_needed_calloc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1434 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() {
+char *(*pfn) = (char *(*)) calloc
+; return 0; }
+EOF
+if { (eval echo configure:1455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gcc_cv_decl_needed_calloc=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gcc_cv_decl_needed_calloc=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gcc_cv_decl_needed_calloc" 1>&6
+if test $gcc_cv_decl_needed_calloc = yes; then
+  gcc_tr_decl=NEED_DECLARATION_`echo calloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $gcc_tr_decl 1
+EOF
+
+fi
+
 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:1429: checking whether free must be declared" >&5
+echo "configure:1477: checking whether free must be declared" >&5
 if eval "test \"`echo '$''{'gcc_cv_decl_needed_free'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1434 "configure"
+#line 1482 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -1451,7 +1499,7 @@ int main() {
 char *(*pfn) = (char *(*)) free
 ; return 0; }
 EOF
-if { (eval echo configure:1455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gcc_cv_decl_needed_free=no
 else
@@ -4420,6 +4468,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
 
 
 
+
 # Echo that links are built
 if [ x$host = x$target ]
 then
@@ -4541,7 +4590,7 @@ do
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
+    echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
index e906ae9..510018b 100644 (file)
@@ -137,6 +137,7 @@ AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
 
 GCC_NEED_DECLARATION(malloc)
 GCC_NEED_DECLARATION(realloc)
+GCC_NEED_DECLARATION(calloc)
 GCC_NEED_DECLARATION(free)
 
 # File extensions