Define WCOREDUMP in salvsync-server.c
authorAndrew Deason <adeason@sinenomine.net>
Wed, 18 Nov 2009 21:43:17 +0000 (15:43 -0600)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 19 Nov 2009 21:13:30 +0000 (13:13 -0800)
Some platforms do not define WCOREDUMP. Conditionally define WCOREDUMP
in salvsync-server.c, and make all of the similar WCOREDUMP defines in
the tree consistent.

Change-Id: I197979881ade20f6e790bf41523938089379dbe3
Reviewed-on: http://gerrit.openafs.org/846
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/bozo/bnode.c
src/vol/salvaged.c
src/vol/salvager.c
src/vol/salvsync-server.c
src/vol/vol-salvage.c

index 5e020f3..b0ba84a 100644 (file)
@@ -38,9 +38,8 @@
 #include "bnode.h"
 #include "bosprototypes.h"
 
-#if defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV)
-/* All known versions of AIX lack WCOREDUMP but this works */
-#define WCOREDUMP(x) ((x) & 0x80)
+#ifndef WCOREDUMP
+#define WCOREDUMP(x) ((x) & 0200)
 #endif
 
 #define BNODE_LWP_STACKSIZE    (16 * 1024)
index 6094f1e..8ce40f1 100644 (file)
@@ -36,8 +36,8 @@
 #include <sys/time.h>
 #endif /* ITIMER_REAL */
 #endif
-#if    defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV)
-#define WCOREDUMP(x)   (x & 0200)
+#ifndef WCOREDUMP
+#define WCOREDUMP(x)   ((x) & 0200)
 #endif
 #include <rx/xdr.h>
 #include <afs/afsint.h>
index 5a93a5f..68c2146 100644 (file)
@@ -38,8 +38,8 @@
 #include <sys/time.h>
 #endif /* ITIMER_REAL */
 #endif
-#if    defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV)
-#define WCOREDUMP(x)   (x & 0200)
+#ifndef WCOREDUMP
+#define WCOREDUMP(x)   ((x) & 0200)
 #endif
 #include <rx/xdr.h>
 #include <afs/afsint.h>
index e9e66a7..f3cdc23 100644 (file)
@@ -69,6 +69,9 @@
 #include <sys/un.h>
 #endif
 
+#ifndef WCOREDUMP
+#define WCOREDUMP(x)    ((x) & 0200)
+#endif
 
 /*@printflike@*/ extern void Log(const char *format, ...);
 
index e5daf80..03f6dae 100644 (file)
@@ -105,8 +105,8 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
 #include <io.h>
 #include <WINNT/afsevent.h>
 #endif
-#if    defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV)
-#define WCOREDUMP(x)   (x & 0200)
+#ifndef WCOREDUMP
+#define WCOREDUMP(x)   ((x) & 0200)
 #endif
 #include <rx/xdr.h>
 #include <afs/afsint.h>