If assert() will be used within pthreads_nosig.h, include assert.h.
Also, permit assert() to be a macro that is a no-op by always evaluating
the expression.
Change-Id: I8c790dcb8cb98f75028343e5de94b91ab891daad
Reviewed-on: http://gerrit.openafs.org/2988
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
#endif
#define AFS_SIGSET_CLEAR() \
do { \
+ int b; \
sigfillset(&i_tset); \
_SETSEGV \
_SETBUS \
_SETTRAP \
_SETABRT \
_SETFPE \
- assert(AFS_SET_SIGMASK(SIG_BLOCK, &i_tset, &i_oset) == 0); \
+ b = (AFS_SET_SIGMASK(SIG_BLOCK, &i_tset, &i_oset) == 0); \
+ assert(b); \
} while (0)
#define AFS_SIGSET_RESTORE() \
do { \
- assert(AFS_SET_SIGMASK(SIG_SETMASK, &i_oset, NULL) == 0); \
+ int b = (AFS_SET_SIGMASK(SIG_SETMASK, &i_oset, NULL) == 0); \
+ assert(b); \
} while (0)
#endif /* AFS_NT40_ENV */