]> arthur.barton.de Git - netatalk.git/blobdiff - etc/psf/psf.c
autoconf POSIX.1 sys/wait.h check
[netatalk.git] / etc / psf / psf.c
index 53d3a543124beec8b82ed60700def2faeafa3904..c29467b9e027bf7dc8985408a1df9165acaaba2c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: psf.c,v 1.4 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: psf.c,v 1.5 2001-09-06 19:04:40 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
 #include <sys/time.h>
+
+/* POSIX.1 sys/wait.h check */
 #include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
+#endif /* HAVE_SYS_WAIT_H */
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif /* ! WEXITSTATUS */
+#ifndef WIFEXITED
+#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif /* ! WIFEXITED */
+
 #include <sys/file.h>
 #include <sys/syslog.h>
 #include <atalk/paths.h>