diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-23 16:05:03 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-23 16:05:03 +0000 |
commit | fb758229aba9757ceb06b3de8a72f3a761d1a651 (patch) | |
tree | 36f10416500fbf8a5ffa0c7fe7957e1d761edf22 /libiberty/aclocal.m4 | |
parent | 68e6b6e1c0f5ae5cf5a338a063be8bd52742487e (diff) | |
download | gcc-fb758229aba9757ceb06b3de8a72f3a761d1a651.tar.gz |
* aclocal.m4 (libiberty_AC_DECLARE_ERRNO): New macro.
* configure.in (libiberty_AC_DECLARE_ERRNO): Add check.
* configure, config.in: Regenerate.
* pexecute.c, strtol.c, strtoul.c: Declare errno if necessary.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35199 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/aclocal.m4')
-rw-r--r-- | libiberty/aclocal.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index b6a38d60522..b6c611e132d 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -69,3 +69,17 @@ if test $ac_cv_func_strncmp_works = no ; then LIBOBJS="$LIBOBJS strncmp.o" fi ]) + +dnl See if errno must be declared even when <errno.h> is included. +AC_DEFUN(libiberty_AC_DECLARE_ERRNO, +[AC_CACHE_CHECK(whether errno must be declared, libiberty_cv_declare_errno, +[AC_TRY_COMPILE( +[#include <errno.h>], +[int x = errno;], +libiberty_cv_declare_errno=no, +libiberty_cv_declare_errno=yes)]) +if test $libiberty_cv_declare_errno = yes +then AC_DEFINE(NEED_DECLARATION_ERRNO, 1, + [Define if errno must be declared even when <errno.h> is included.]) +fi +]) |