diff options
author | Chris Wilson <chris+github@qwirx.com> | 2016-09-03 00:07:23 +0100 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2016-09-03 00:07:23 +0100 |
commit | c0125ee22e09a31ae291e42faa817835bd903dbc (patch) | |
tree | aca37c831ef9897f1b4898cbf8d2bef36112c5af /lib/common/BoxPlatform.h | |
parent | 0560d351665313fcdd503af213118eec46930cbe (diff) |
Update platform feature detection to work with CMake.
Rewrite some macros in forms that can be parsed by our parser written in CMake
language (fake m4 with regexps).
Fix incorrect conditional includes and incorrect #if/#ifdef assumptions.
Diffstat (limited to 'lib/common/BoxPlatform.h')
-rw-r--r-- | lib/common/BoxPlatform.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index 35ad7a2c..f8720587 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -96,16 +96,19 @@ #endif // Handle differing xattr APIs -#ifdef HAVE_SYS_XATTR_H - #if !defined(HAVE_LLISTXATTR) && defined(HAVE_LISTXATTR) && HAVE_DECL_XATTR_NOFOLLOW - #define llistxattr(a,b,c) listxattr(a,b,c,XATTR_NOFOLLOW) - #endif - #if !defined(HAVE_LGETXATTR) && defined(HAVE_GETXATTR) && HAVE_DECL_XATTR_NOFOLLOW - #define lgetxattr(a,b,c,d) getxattr(a,b,c,d,0,XATTR_NOFOLLOW) - #endif - #if !defined(HAVE_LSETXATTR) && defined(HAVE_SETXATTR) && HAVE_DECL_XATTR_NOFOLLOW - #define lsetxattr(a,b,c,d,e) setxattr(a,b,c,d,0,(e)|XATTR_NOFOLLOW) - #endif +#if !defined(HAVE_LLISTXATTR) && defined(HAVE_LISTXATTR) && HAVE_DECL_XATTR_NOFOLLOW + #define llistxattr(a,b,c) listxattr(a,b,c,XATTR_NOFOLLOW) + #define HAVE_LLISTXATTR +#endif + +#if !defined(HAVE_LGETXATTR) && defined(HAVE_GETXATTR) && HAVE_DECL_XATTR_NOFOLLOW + #define lgetxattr(a,b,c,d) getxattr(a,b,c,d,0,XATTR_NOFOLLOW) + #define HAVE_LGETXATTR +#endif + +#if !defined(HAVE_LSETXATTR) && defined(HAVE_SETXATTR) && HAVE_DECL_XATTR_NOFOLLOW + #define lsetxattr(a,b,c,d,e) setxattr(a,b,c,d,0,(e)|XATTR_NOFOLLOW) + #define HAVE_LSETXATTR #endif #if !HAVE_DECL_INFTIM |