summaryrefslogtreecommitdiff
path: root/lib/replace/system
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-01 13:29:38 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-02 02:13:49 +0200
commitc290cdb9349220ba70b54143e1432da0230e2cee (patch)
tree4ebf0aa557376557eaec362eaa14f587c53ea1ec /lib/replace/system
parent664af060ac9ea83b565fbb817bb63d67d83843ef (diff)
downloadsamba-c290cdb9349220ba70b54143e1432da0230e2cee.tar.gz
samba-c290cdb9349220ba70b54143e1432da0230e2cee.tar.bz2
samba-c290cdb9349220ba70b54143e1432da0230e2cee.zip
lib/replace: xattr wrappers in lib/replace rather than source3/lib/system.c
This also moves all the still-used configure tests etc. The unused OSF API is also removed at this time. Andrew Bartlett
Diffstat (limited to 'lib/replace/system')
-rw-r--r--lib/replace/system/filesys.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
index 2393068b4f..cf8b36b53f 100644
--- a/lib/replace/system/filesys.h
+++ b/lib/replace/system/filesys.h
@@ -123,11 +123,26 @@
#include <sys/xattr.h>
#endif
+#ifdef HAVE_SYS_EA_H
+#include <sys/ea.h>
+#endif
+
+#ifdef HAVE_SYS_EXTATTR_H
+#include <sys/extattr.h>
+#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
+#ifndef XATTR_CREATE
+#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
+#endif
+
+#ifndef XATTR_REPLACE
+#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
+#endif
+
/* Some POSIX definitions for those without */
#ifndef S_IFDIR
@@ -208,4 +223,45 @@
#define ENOATTR ENODATA
#endif
+
+#if !defined(HAVE_GETXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FGETXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_LISTXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_listxattr (const char *path, char *list, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FLISTXATTR) || defined(XATTR_ADD_OPT)
+ssize_t rep_flistxattr (int filedes, char *list, size_t size);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_REMOVEXATTR) || defined(XATTR_ADD_OPT)
+int rep_removexattr (const char *path, const char *name);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADD_OPT)
+int rep_fremovexattr (int filedes, const char *name);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_SETXATTR) || defined(XATTR_ADD_OPT)
+int rep_setxattr (const char *path, const char *name, const void *value, size_t size, int flags);
+/* define is in "replace.h" */
+#endif
+
+#if !defined(HAVE_FSETXATTR) || defined(XATTR_ADD_OPT)
+int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
+/* define is in "replace.h" */
+#endif
+
#endif