From c290cdb9349220ba70b54143e1432da0230e2cee Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 1 Jun 2012 13:29:38 +1000 Subject: 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 --- lib/replace/system/filesys.h | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'lib/replace/system') 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 #endif +#ifdef HAVE_SYS_EA_H +#include +#endif + +#ifdef HAVE_SYS_EXTATTR_H +#include +#endif #ifdef HAVE_SYS_RESOURCE_H #include #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 -- cgit