]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/pap/pap_slinit.c
autoconf POSIX.1 sys/wait.h check
[netatalk.git] / libatalk / pap / pap_slinit.c
index 7a8e490da0cdd70de638424abd8557f9536f6b24..df5733a5f3f01a1564a9df9b31a74f3aa4fe291f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pap_slinit.c,v 1.3 2001-06-29 14:14:47 rufustfirefly Exp $
+ * $Id: pap_slinit.c,v 1.4 2001-09-06 19:04:40 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1996 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 #include <errno.h>
 #include <sys/signal.h>
 #include <sys/time.h>
-#include <sys/types.h>
 #include <sys/uio.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/socket.h>
 #include <sys/param.h>
 #include <netatalk/at.h>