From 0be7721c52cf2978114de43e391c04437d8d875e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 28 Nov 2013 20:15:08 -0800 Subject: * configure: Detect the daemon function. * eval.c: Include conditionally. (errno_wrap, daemon_wrap): New functions. (eval_init): Registered errno_wrap and daemon_wrap as intrinsics under the names daemon and errno. * txr.1: Documented errno and daemon in new UNIX PROGRAMMING section. --- configure | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'configure') diff --git a/configure b/configure index fe27ace2..e318ef17 100755 --- a/configure +++ b/configure @@ -1281,6 +1281,8 @@ int x = sizeof ((struct tm *) 0)->$try_field; fi done +printf "done\n" + printf "Checking for POSIX sleep function ... " cat > conftest.c < conftest.c < + +int main(int argc, char **argv) +{ + daemon(0, 0); + return 0; +} +! +rm -f conftest +if ! $make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then + printf "no\n" +else + printf "yes\n" + printf "#define HAVE_DAEMON 1\n" >> config.h + have_unistd=y +fi + # # Dependent variables # -- cgit v1.2.3