summaryrefslogtreecommitdiff
path: root/lib/common/BoxPlatform.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2016-09-03 00:07:23 +0100
committerChris Wilson <chris+github@qwirx.com>2016-09-03 00:07:23 +0100
commitc0125ee22e09a31ae291e42faa817835bd903dbc (patch)
treeaca37c831ef9897f1b4898cbf8d2bef36112c5af /lib/common/BoxPlatform.h
parent0560d351665313fcdd503af213118eec46930cbe (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.h23
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