#include <sys/xattr.h>
#endif
],[
- getxattr(0, 0, 0, 0, 0, 0);
+ getxattr(NULL, NULL, NULL, 0, 0, 0);
],
[smb_attr_cv_xattr_add_opt=yes],
[smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS])
])
if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
- AC_DEFINE(XATTR_ADD_OPT, 1, [xattr functions have additional options])
+ AC_DEFINE(XATTR_ADDITIONAL_OPTIONS, 1, [xattr functions have additional options])
fi
fi
/* prototype is in "system/network.h" */
#endif
-#if !defined(HAVE_GETXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_GETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define getxattr rep_getxattr
/* prototype is in "system/filesys.h" */
#endif
-#if !defined(HAVE_FGETXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_FGETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define fgetxattr rep_fgetxattr
/* prototype is in "system/filesys.h" */
#endif
-#if !defined(HAVE_LISTXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_LISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define listxattr rep_listxattr
/* prototype is in "system/filesys.h" */
#endif
-#if !defined(HAVE_FLISTXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_FLISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define flistxattr rep_flistxattr
/* prototype is in "system/filesys.h" */
#endif
-#if !defined(HAVE_REMOVEXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_REMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define removexattr rep_removexattr
/* prototype is in "system/filesys.h" */
#endif
-#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define fremovexattr rep_fremovexattr
/* prototype is in "system/filesys.h" */
#endif
-#if !defined(HAVE_SETXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_SETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define setxattr rep_setxattr
/* prototype is in "system/filesys.h" */
#endif
-#if !defined(HAVE_FSETXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_FSETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#define fsetxattr rep_fsetxattr
/* prototype is in "system/filesys.h" */
#endif
#endif
-#if !defined(HAVE_GETXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_GETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
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)
+#if !defined(HAVE_FGETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
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)
+#if !defined(HAVE_LISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
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)
+#if !defined(HAVE_FLISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
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)
+#if !defined(HAVE_REMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
int rep_removexattr (const char *path, const char *name);
/* define is in "replace.h" */
#endif
-#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
int rep_fremovexattr (int filedes, const char *name);
/* define is in "replace.h" */
#endif
-#if !defined(HAVE_SETXATTR) || defined(XATTR_ADD_OPT)
+#if !defined(HAVE_SETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
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)
+#if !defined(HAVE_FSETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags);
/* define is in "replace.h" */
#endif
conf.SET_TARGET_TYPE('attr', 'EMPTY')
+ xattr_headers='sys/attributes.h attr/xattr.h sys/xattr.h'
+
conf.CHECK_FUNCS_IN('''
fgetxattr flistea flistxattr
fremovexattr fsetxattr getxattr
listxattr removexattr setxattr
-''', 'attr', checklibc=True)
+''', 'attr', checklibc=True, headers=xattr_headers)
# We need to check for linux xattrs first, as we do not wish to link to -lattr
# (the XFS compat API) on Linux systems with the native xattr API
extattr_set_fd extattr_set_file fgetea flistea
fremoveea fsetea getea listea
removeea setea
-''', 'attr', checklibc=True)
+''', 'attr', checklibc=True, headers=xattr_headers)
if (conf.CONFIG_SET('HAVE_ATTR_LISTF') or
conf.CONFIG_SET('HAVE_EXTATTR_LIST_FD') or
conf.DEFINE('HAVE_XATTR_SUPPORT', 1)
# Darwin has extra options to xattr-family functions
- conf.CHECK_CODE('getxattr(0, 0, 0, 0, 0, 0);',
- 'XATTR_ADD_OPT',
- msg="Checking whether xattr interface takes additional options",
- headers='sys/types.h attr/xattr.h sys/xattr.h')
+ conf.CHECK_CODE('getxattr(NULL, NULL, NULL, 0, 0, 0)',
+ headers=xattr_headers, local_include=False,
+ define='XATTR_ADDITIONAL_OPTIONS',
+ msg="Checking whether xattr interface takes additional options")
conf.CHECK_FUNCS_IN('dlopen dlsym dlerror dlclose', 'dl',
checklibc=True, headers='dlfcn.h dl.h')
ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t size)
{
#if defined(HAVE_GETXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return getxattr(path, name, value, size);
#else
int options = 0;
ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size)
{
#if defined(HAVE_FGETXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return fgetxattr(filedes, name, value, size);
#else
int options = 0;
ssize_t rep_listxattr (const char *path, char *list, size_t size)
{
#if defined(HAVE_LISTXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return listxattr(path, list, size);
#else
int options = 0;
ssize_t rep_flistxattr (int filedes, char *list, size_t size)
{
#if defined(HAVE_FLISTXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return flistxattr(filedes, list, size);
#else
int options = 0;
int rep_removexattr (const char *path, const char *name)
{
#if defined(HAVE_REMOVEXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return removexattr(path, name);
#else
int options = 0;
int rep_fremovexattr (int filedes, const char *name)
{
#if defined(HAVE_FREMOVEXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return fremovexattr(filedes, name);
#else
int options = 0;
int rep_setxattr (const char *path, const char *name, const void *value, size_t size, int flags)
{
#if defined(HAVE_SETXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return setxattr(path, name, value, size, flags);
#else
int options = 0;
int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags)
{
#if defined(HAVE_FSETXATTR)
-#ifndef XATTR_ADD_OPT
+#ifndef XATTR_ADDITIONAL_OPTIONS
return fsetxattr(filedes, name, value, size, flags);
#else
int options = 0;
conf.CHECK_FUNCS('sigprocmask sigblock sigaction')
-xattr_headers='sys/attributes.h attr/xattr.h sys/xattr.h'
-
-conf.CHECK_CODE('getxattr(NULL, NULL, NULL, 0, 0, 0)',
- headers=xattr_headers, local_include=False,
- define='XATTR_ADDITIONAL_OPTIONS',
- msg='Checking for darwin xattr api')
-
-
conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h')
# all the different ways of doing statfs