From: Andrew Deason Date: Wed, 18 Nov 2009 21:43:17 +0000 (-0600) Subject: Define WCOREDUMP in salvsync-server.c X-Git-Tag: openafs-devel-1_5_67~31 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b9f6a8ce1898cd90c713dc4b54a27bd1644fe47a;p=packages%2Fo%2Fopenafs.git Define WCOREDUMP in salvsync-server.c 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 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/bozo/bnode.c b/src/bozo/bnode.c index 5e020f3c4..b0ba84a47 100644 --- a/src/bozo/bnode.c +++ b/src/bozo/bnode.c @@ -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) diff --git a/src/vol/salvaged.c b/src/vol/salvaged.c index 6094f1e27..8ce40f12e 100644 --- a/src/vol/salvaged.c +++ b/src/vol/salvaged.c @@ -36,8 +36,8 @@ #include #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 #include diff --git a/src/vol/salvager.c b/src/vol/salvager.c index 5a93a5f89..68c214673 100644 --- a/src/vol/salvager.c +++ b/src/vol/salvager.c @@ -38,8 +38,8 @@ #include #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 #include diff --git a/src/vol/salvsync-server.c b/src/vol/salvsync-server.c index e9e66a7e1..f3cdc23f2 100644 --- a/src/vol/salvsync-server.c +++ b/src/vol/salvsync-server.c @@ -69,6 +69,9 @@ #include #endif +#ifndef WCOREDUMP +#define WCOREDUMP(x) ((x) & 0200) +#endif /*@printflike@*/ extern void Log(const char *format, ...); diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index e5daf80fb..03f6daeb6 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -105,8 +105,8 @@ Vnodes with 0 inode pointers in RW volumes are now deleted. #include #include #endif -#if defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV) -#define WCOREDUMP(x) (x & 0200) +#ifndef WCOREDUMP +#define WCOREDUMP(x) ((x) & 0200) #endif #include #include