]> arthur.barton.de Git - netatalk.git/commitdiff
atalkd/main.c server_child.c if not defined add few macros
authordidg <didg>
Sat, 5 Oct 2002 13:20:13 +0000 (13:20 +0000)
committerdidg <didg>
Sat, 5 Oct 2002 13:20:13 +0000 (13:20 +0000)
atalkd/main.c initialize before use
ad_mmap.c ifdef never used code

etc/atalkd/main.c
libatalk/adouble/ad_mmap.c
libatalk/util/server_child.c

index 34d6f9d1ef84a2632a4b101be661d13221c483e8..95b58925f62fc35a516315d7e070a8204f6d1c61 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.16 2002-09-29 23:24:47 sibaz Exp $
+ * $Id: main.c,v 1.17 2002-10-05 13:20:13 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -31,6 +31,9 @@
 #ifndef WIFEXITED
 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
 #endif /* ! WIFEXITED */
+#ifndef WIFSTOPPED
+#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+#endif
 
 #include <errno.h>
 #ifdef TRU64
@@ -1106,6 +1109,9 @@ int main( ac, av )
     }
 #endif /* BSD4_4 */
 
+    ciface = interfaces;
+    bootaddr( ciface );
+
     memset(&sv, 0, sizeof(sv));
     sv.sa_handler = as_down;
     sigemptyset( &sv.sa_mask );
@@ -1149,8 +1155,6 @@ int main( ac, av )
        atalkd_exit( 1 );
     }
 
-    ciface = interfaces;
-    bootaddr( ciface );
     for (;;) {
        readfds = fds;
        if ( select( nfds, &readfds, NULL, NULL, NULL) < 0 ) {
index 632151c01011ecc849549a40848cf39c108153fd..6a04944b9e3f782eef2b9ed6606fecab47ee79f8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_mmap.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: ad_mmap.c,v 1.4 2002-10-05 13:20:14 didg Exp $
  *
  * ad_mmap provides interfaces to memory mapped files. as this is the
  * case, we don't have to deal w/ temporary buffers such as
@@ -11,6 +11,7 @@
 #include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#ifdef USE_MMAPPED_HEADERS
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -113,3 +114,5 @@ void *ad_mmapwrite(struct adouble *ad, const u_int32_t eid,
     return ad_mmap(buflen, PROT_READ | PROT_WRITE, MAP_SHARED,
                   ad->ad_hf.adf_fd, off);
 }
+
+#endif
index f23e1185629203af7da28e9e4462d7ed27bd4aa2..afa9c6da8b5246c8df6a08f80d9ae184e2bcf288 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: server_child.c,v 1.5 2002-01-04 04:45:48 sibaz Exp $
+ * $Id: server_child.c,v 1.6 2002-10-05 13:20:13 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
 #ifndef WIFEXITED
 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
 #endif /* ! WIFEXITED */
+#ifndef WIFSTOPPED
+#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+#endif
+#ifndef WIFSIGNAL
+#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status)) 
+#endif
 
 #include <atalk/server_child.h>