From: Anders Kaseorg Date: Tue, 23 Jul 2013 18:30:20 +0000 (-0400) Subject: Do not expose afs_assert.h from other public headers X-Git-Tag: upstream/1.6.6_pre2^2~97 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e7c6ff13868cfbf0c3374b52877a2d9d932dfa3e;p=packages%2Fo%2Fopenafs.git Do not expose afs_assert.h from other public headers afs_assert.h redefines the standard assert macro, which is evil and breaks some applications that might want to include our public headers (e.g. some versions of Cython). This was fixed on master by commit cac74242728ad97e3ce9cef0a949d58c237250f6, which removes afs_assert.h entirely and adds opr_Assert. Since that patch may be too invasive for 1.6.x, here’s a minimal patch that just stops exposing afs_assert.h from our other public headers. Change-Id: I39a7b9ae8d43cfe0059e10e47ce4b1c22e01c544 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10096 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand --- diff --git a/src/kauth/admin_tools.c b/src/kauth/admin_tools.c index 9f676fa81..6e1199588 100644 --- a/src/kauth/admin_tools.c +++ b/src/kauth/admin_tools.c @@ -30,6 +30,7 @@ #include #define UBIK_LEGACY_CALLITER 1 #include +#include #ifndef AFS_NT40_ENV #include #endif diff --git a/src/lwp/lock.h b/src/lwp/lock.h index 7bda37588..aa104488f 100644 --- a/src/lwp/lock.h +++ b/src/lwp/lock.h @@ -44,7 +44,6 @@ #ifdef AFS_PTHREAD_ENV #include -#include /* can't include in non-lwp case; rx builds later */ #include #define LOCK_LOCK(A) MUTEX_ENTER(&(A)->mutex); diff --git a/src/ubik/remote.c b/src/ubik/remote.c index 83ede63ee..6dabe61c0 100644 --- a/src/ubik/remote.c +++ b/src/ubik/remote.c @@ -28,6 +28,7 @@ #include #include #include +#include #define UBIK_INTERNALS #include "ubik.h" diff --git a/src/ubik/ubik.p.h b/src/ubik/ubik.p.h index ff7196804..3581fb23b 100644 --- a/src/ubik/ubik.p.h +++ b/src/ubik/ubik.p.h @@ -75,7 +75,6 @@ #define CFLastFailed 1 /*!< last call failed to this guy (to detect down hosts) */ /*\}*/ -#include #ifdef AFS_PTHREAD_ENV #include #else diff --git a/src/util/pthread_glock.h b/src/util/pthread_glock.h index c6414c96c..dad68fa5a 100644 --- a/src/util/pthread_glock.h +++ b/src/util/pthread_glock.h @@ -12,7 +12,6 @@ #ifdef AFS_PTHREAD_ENV #include -#include typedef struct { pthread_mutex_t mut; diff --git a/src/volser/volser.p.h b/src/volser/volser.p.h index 5907fcb00..7a225b543 100644 --- a/src/volser/volser.p.h +++ b/src/volser/volser.p.h @@ -10,7 +10,6 @@ #ifndef _VOLSER_ #define _VOLSER_ 1 -#include #ifdef AFS_PTHREAD_ENV #include #endif