rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 21703f6be477bfd95a2fd63efe2af081044babd5
parent 033d8a6834bcc51ca99052497e16701c31664441
Author: tjg <tjg>
Date:   Mon, 27 Nov 2000 12:51:55 +0000

need to #include <string.h> before testing for strerror()

Diffstat:
Macconfig.h | 3+++
Macinclude.m4 | 13+++++++++++++
Mconfigure.ac | 4+++-
3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/acconfig.h b/acconfig.h @@ -34,6 +34,9 @@ /* Define if you have sigsetjmp(). */ #undef HAVE_SIGSETJMP +/* Define in you have strerror(). */ +#undef HAVE_STRERROR + /* Define if you want rc to encode strange characters in the environment. */ #undef PROTECT_ENV diff --git a/acinclude.m4 b/acinclude.m4 @@ -29,6 +29,19 @@ sigsetjmp(e, 1); esac ]) +dnl Similarly, AC_CHECK_FUNCS doesn't find strerror() on NetBSD. +AC_DEFUN(RC_FUNC_STRERROR, [ + AC_CACHE_CHECK(for strerror, rc_cv_strerror, + AC_TRY_LINK([ +#include <string.h> + ], [ +strerror(0); + ], rc_cv_strerror=yes, rc_cv_strerror=no)) + case "$rc_cv_strerror" in + yes) AC_DEFINE(HAVE_STRERROR) ;; + esac +]) + dnl HPUX needs _KERNEL defined to pick up RLIMIT_foo defines. (Why?) AC_DEFUN(RC_NEED_KERNEL, [ AC_CACHE_CHECK(if _KERNEL is required for RLIMIT defines, rc_cv_kernel_rlimit, diff --git a/configure.ac b/configure.ac @@ -38,13 +38,15 @@ AC_TYPE_SIZE_T AC_TYPE_UID_T AC_CHECK_TYPE(ssize_t, long) -AC_CHECK_FUNCS(getgroups setpgrp setrlimit strerror) +AC_CHECK_FUNCS(getgroups setpgrp setrlimit) RC_FUNC_GETGROUPS RC_FUNC_SIGSETJMP AC_FUNC_SETPGRP +RC_FUNC_STRERROR + RC_NEED_KERNEL RC_TYPE_RLIM_T