diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-05-18 12:43:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-05-18 12:43:09 -0700 |
commit | 1ef801e92a5b074a55232c18329986bdb0c4c11b (patch) | |
tree | 39c3fb3a79351ab0831ea977b817d33a6dbf88ef /configure | |
parent | af6b68669c26b5ca5ce8544f00b7f3a50adf9304 (diff) | |
download | txr-1ef801e92a5b074a55232c18329986bdb0c4c11b.tar.gz txr-1ef801e92a5b074a55232c18329986bdb0c4c11b.tar.bz2 txr-1ef801e92a5b074a55232c18329986bdb0c4c11b.zip |
* configure: New test added for fork, pipe, exec and waitpid.
Produces HAVE_FORK_STUFF in config.h.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -1189,6 +1189,37 @@ else fi # +# fork, pipe, exec, waitpid. +# + +printf "Checking for POSIX fork/pipe/exec/waitpid ... " + +cat > conftest.c <<! +#include "config.h" +#ifdef HAVE_SYS_WAIT +#include <sys/wait.h> +#endif +#include <unistd.h> + +int main(int argc, char **argv) +{ + int status, fd[2]; + pid_t p = fork(); + (void) execvp(argv[0], argv); + (void) waitpid(p, &status, 0); + (void) pipe(fd); + 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_FORK_STUFF 1\n" >> config.h +fi + +# # Check for fields inside struct tm # |