* collect2.c (sys_errlist): Likewise.
* cpplib.c (sys_errlist): Likewise.
* gcc.c (sys_errlist): Likewise.
* protoize (sys_errlist): Likewise.
* configure.in: Check for strerror.
* xm-freebsd.h (HAVE_STRERROR): Remove definition.
* xm-gnu.h (HAVE_STRERROR): Likewise.
* xm-linux.h (HAVE_STRERROR): Likewise.
* xm-netbsd.h (HAVE_STRERROR): Likewise.
* xm-bsd386.h (HAVE_STRERROR): Likewise.
* xm-cygwin32.h (HAVE_STRERROR): Likewise.
* xm-dos.h (HAVE_STRERROR): Likewise.
* xm-mingw32.h (HAVE_STRERROR): Likewise.
* xm-pa.h (HAVE_STRERROR): Likewise.
* xm-papro.h (HAVE_STRERROR): Likewise.
* xm-sysv4.h (HAVE_STRERROR): Likewise.
* configure, config.in: Rebuilt.
Remove the need to define HAVE_STRERROR for each host port.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15011
138bc75d-0d04-0410-961f-
82ee72b054a4
Mon Sep 1 08:29:46 1997 Jeffrey A Law (law@cygnus.com)
+ * cccp.c (sys_errlist): Remove special 4.4bsd declaration.
+ * collect2.c (sys_errlist): Likewise.
+ * cpplib.c (sys_errlist): Likewise.
+ * gcc.c (sys_errlist): Likewise.
+ * protoize (sys_errlist): Likewise.
+ * configure.in: Check for strerror.
+ * xm-freebsd.h (HAVE_STRERROR): Remove definition.
+ * xm-gnu.h (HAVE_STRERROR): Likewise.
+ * xm-linux.h (HAVE_STRERROR): Likewise.
+ * xm-netbsd.h (HAVE_STRERROR): Likewise.
+ * xm-bsd386.h (HAVE_STRERROR): Likewise.
+ * xm-cygwin32.h (HAVE_STRERROR): Likewise.
+ * xm-dos.h (HAVE_STRERROR): Likewise.
+ * xm-mingw32.h (HAVE_STRERROR): Likewise.
+ * xm-pa.h (HAVE_STRERROR): Likewise.
+ * xm-papro.h (HAVE_STRERROR): Likewise.
+ * xm-sysv4.h (HAVE_STRERROR): Likewise.
+ * configure, config.in: Rebuilt.
+
* Makefile.in: Add several missing "else true" clauses.
* collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.
#ifndef VMS
#ifndef HAVE_STRERROR
extern int sys_nerr;
-#if defined(bsd4_4)
-extern const char *const sys_errlist[];
-#else
extern char *sys_errlist[];
-#endif
#else /* HAVE_STRERROR */
char *strerror ();
#endif
#endif
#ifndef HAVE_STRERROR
-#if defined(bsd4_4)
-extern const char *const sys_errlist[];
-#else
extern char *sys_errlist[];
-#endif
extern int sys_nerr;
#else
char *strerror();
/* Define if `sys_siglist' is declared by <signal.h>. */
#undef SYS_SIGLIST_DECLARED
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
-#define HAVE_STRERROR
#define USE_BFD
/* Configuration for GCC for Intel i386 running BSDI's BSD/386 as host. */
#include "i386/xm-i386.h"
-
-#define HAVE_STRERROR
Boston, MA 02111-1307, USA. */
#define NO_STAB_H
-#define HAVE_STRERROR
#define HAVE_RUSAGE
#define HAVE_FILE_H
#define EXECUTABLE_SUFFIX ".exe"
#define MKTEMP_EACH_FILE 1
#define NO_PRECOMPILES 1
-
-/* sys_errlist proto in cccp.c doesn't match djgpp */
-#define HAVE_STRERROR
Boston, MA 02111-1307, USA. */
#define NO_STAB_H
-#define HAVE_STRERROR
#define HAVE_RUSAGE
#define HAVE_FILE_H
/* Don't try to use sys_siglist. */
#define NO_SYS_SIGLIST
-/* We have strerror, don't try to use sys_errlist. */
-#define HAVE_STRERROR
-
/* 4.3BSD, OSF1 and Lites on the PA are all derived from NET2 or
later code from Berkeley. */
#define __BSD_NET2__
/* Don't try to use sys_siglist. */
#define NO_SYS_SIGLIST
-/* We have strerror, don't try to use sys_errlist. */
-#define HAVE_STRERROR
-
/* HP's compiler has problems with enum bitfields. */
#define ONLY_INT_FIELDS
#include "rs6000/xm-rs6000.h"
-#define HAVE_STRERROR
#define HAVE_RUSAGE
#define HAVE_FILE_H
#define EXECUTABLE_SUFFIX ".exe"
#define ONLY_INT_FIELDS
#endif
-/* We have STRERROR */
-#define HAVE_STRERROR
-
#ifdef __PPC__
#ifndef __STDC__
extern char *malloc (), *realloc (), *calloc ();
running FreeBSD. This file should not be specified as $xm_file itself;
instead $xm_file should be CPU/xm-freebsd.h, which should include both
CPU/xm-CPU.h and this file xm-freebsd.h. */
-
-/* FreeBSD has strerror. */
-#define HAVE_STRERROR
instead $xm_file should be CPU/xm-gnu.h, which should include both
CPU/xm-CPU.h and this file xm-gnu.h. */
-#define HAVE_STRERROR /* GNU has strerror. */
#define POSIX /* GNU complies to POSIX.1. */
#ifndef inhibit_libc
#undef HAVE_VPRINTF
#define HAVE_VPRINTF
-#undef HAVE_STRERROR
-#define HAVE_STRERROR
-
#undef HAVE_POPEN
#define HAVE_POPEN
instead $xm_file should be CPU/xm-netbsd.h, which should include both
CPU/xm-CPU.h and this file xm-netbsd.h. */
-#define HAVE_STRERROR
#define HAVE_VPRINTF
fi
+for ac_func in strerror
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1567: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1572 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
# File extensions
manext='.1'
objext='.o'
AC_DECL_SYS_SIGLIST
+AC_CHECK_FUNCS(strerror)
+
# File extensions
manext='.1'
objext='.o'
#ifndef VMS
#ifndef HAVE_STRERROR
extern int sys_nerr;
-#if defined(bsd4_4)
-extern const char *const sys_errlist[];
-#else
extern char *sys_errlist[];
-#endif
#else /* HAVE_STRERROR */
char *strerror ();
#endif
#ifndef HAVE_STRERROR
extern int sys_nerr;
-#if defined(bsd4_4)
-extern const char *const sys_errlist[];
-#else
extern char *sys_errlist[];
-#endif
#else
extern char *strerror();
#endif
#ifndef HAVE_STRERROR
extern int sys_nerr;
-#if defined(bsd4_4)
-extern const char *const sys_errlist[];
-#else
extern char *sys_errlist[];
-#endif
#else
extern char *strerror();
#endif