[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Sun Jun 3 01:47:02 MDT 2012
The branch, master has been updated
via d42d452 librepace: put #defines after #include "sys/xattr.h"
via aa08fc0 lib/replace: Undo change of 0 -> NULL
via 6c4cdbe s3-libnetapi: Cope with popt versions without POPT_TABLEEND
from c0b9a12 libreplace: Fix up MacOS xattr functions
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d42d4523ed0bddd2a34ac429bc8750712973996f
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sun Jun 3 15:56:29 2012 +1000
librepace: put #defines after #include "sys/xattr.h"
This avoids redefining the system xattr functions, which should fix MacOS.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet at samba.org>
Autobuild-Date: Sun Jun 3 09:46:44 CEST 2012 on sn-devel-104
commit aa08fc066b93156f543b57681a8a34b54d0eff33
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sun Jun 3 15:45:16 2012 +1000
lib/replace: Undo change of 0 -> NULL
This reverts part of e9d797e153ae95561dbb10b56a41281b2472f137 as
in the autoconf tests, NULL isn't available!
(it is available in waf, which caused confusion)
Andrew Bartlett
commit 6c4cdbe8916ad4782058847358404bc005c5d908
Author: Andrew Bartlett <abartlet at samba.org>
Date: Sun Jun 3 15:30:15 2012 +1000
s3-libnetapi: Cope with popt versions without POPT_TABLEEND
-----------------------------------------------------------------------
Summary of changes:
lib/replace/libreplace.m4 | 2 +-
lib/replace/replace.h | 40 ----------------------------------
lib/replace/system/filesys.h | 8 ++++++
source3/lib/netapi/examples/common.h | 4 +++
source3/lib/netapi/tests/common.h | 4 +++
5 files changed, 17 insertions(+), 41 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4
index 7e978ff..ad0f904 100644
--- a/lib/replace/libreplace.m4
+++ b/lib/replace/libreplace.m4
@@ -188,7 +188,7 @@ if test x"$ac_cv_func_getxattr" = x"yes" ; then
#include <sys/xattr.h>
#endif
],[
- getxattr(NULL, NULL, NULL, 0, 0, 0);
+ getxattr(0, 0, 0, 0, 0, 0);
],
[smb_attr_cv_xattr_add_opt=yes],
[smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS])
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 1166813..776da8a 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -543,46 +543,6 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
/* prototype is in "system/network.h" */
#endif
-#if !defined(HAVE_GETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define getxattr(path, name, value, size) rep_getxattr(path, name, value, size)
-/* prototype is in "system/filesys.h" */
-#endif
-
-#if !defined(HAVE_FGETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define fgetxattr(filedes, name, value, size) rep_fgetxattr(filedes, name, value, size)
-/* prototype is in "system/filesys.h" */
-#endif
-
-#if !defined(HAVE_LISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define listxattr(path, list, size) rep_listxattr(path, list, size)
-/* prototype is in "system/filesys.h" */
-#endif
-
-#if !defined(HAVE_FLISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define flistxattr(filedes, value, size) rep_flistxattr(filedes, value, size)
-/* prototype is in "system/filesys.h" */
-#endif
-
-#if !defined(HAVE_REMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define removexattr(path, name) rep_removexattr(path, name)
-/* prototype is in "system/filesys.h" */
-#endif
-
-#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define fremovexattr(filedes, name) rep_fremovexattr(filedes, name)
-/* prototype is in "system/filesys.h" */
-#endif
-
-#if !defined(HAVE_SETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define setxattr(path, name, value, size, flags) rep_setxattr(path, name, value, size, flags)
-/* prototype is in "system/filesys.h" */
-#endif
-
-#if !defined(HAVE_FSETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
-#define fsetxattr(filedes, name, value, size, flags) rep_fsetxattr(filedes, name, value, size, flags)
-/* prototype is in "system/filesys.h" */
-#endif
-
#ifndef HAVE_GET_CURRENT_DIR_NAME
#define get_current_dir_name rep_get_current_dir_name
char *rep_get_current_dir_name(void);
diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
index a72a59a..493d87d 100644
--- a/lib/replace/system/filesys.h
+++ b/lib/replace/system/filesys.h
@@ -226,41 +226,49 @@
#if !defined(HAVE_GETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t size);
+#define getxattr(path, name, value, size) rep_getxattr(path, name, value, size)
/* define is in "replace.h" */
#endif
#if !defined(HAVE_FGETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size);
+#define fgetxattr(filedes, name, value, size) rep_fgetxattr(filedes, name, value, size)
/* define is in "replace.h" */
#endif
#if !defined(HAVE_LISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
ssize_t rep_listxattr (const char *path, char *list, size_t size);
+#define listxattr(path, list, size) rep_listxattr(path, list, size)
/* define is in "replace.h" */
#endif
#if !defined(HAVE_FLISTXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
ssize_t rep_flistxattr (int filedes, char *list, size_t size);
+#define flistxattr(filedes, value, size) rep_flistxattr(filedes, value, size)
/* define is in "replace.h" */
#endif
#if !defined(HAVE_REMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
int rep_removexattr (const char *path, const char *name);
+#define removexattr(path, name) rep_removexattr(path, name)
/* define is in "replace.h" */
#endif
#if !defined(HAVE_FREMOVEXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
int rep_fremovexattr (int filedes, const char *name);
+#define fremovexattr(filedes, name) rep_fremovexattr(filedes, name)
/* define is in "replace.h" */
#endif
#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 setxattr(path, name, value, size, flags) rep_setxattr(path, name, value, size, flags)
/* define is in "replace.h" */
#endif
#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 fsetxattr(filedes, name, value, size, flags) rep_fsetxattr(filedes, name, value, size, flags)
/* define is in "replace.h" */
#endif
diff --git a/source3/lib/netapi/examples/common.h b/source3/lib/netapi/examples/common.h
index 85df51d..917698c 100644
--- a/source3/lib/netapi/examples/common.h
+++ b/source3/lib/netapi/examples/common.h
@@ -7,5 +7,9 @@ void popt_common_callback(poptContext con,
extern struct poptOption popt_common_netapi_examples[];
+#ifndef POPT_TABLEEND
+#define POPT_TABLEEND { NULL, '\0', 0, 0, 0, NULL, NULL }
+#endif
+
#define POPT_COMMON_LIBNETAPI_EXAMPLES { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_netapi_examples, 0, "Common samba netapi example options:", NULL },
diff --git a/source3/lib/netapi/tests/common.h b/source3/lib/netapi/tests/common.h
index 7e05aaf..fcbdad1 100644
--- a/source3/lib/netapi/tests/common.h
+++ b/source3/lib/netapi/tests/common.h
@@ -28,6 +28,10 @@ extern struct poptOption popt_common_netapi_examples[];
#define POPT_COMMON_LIBNETAPI_EXAMPLES { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_netapi_examples, 0, "Common samba netapi example options:", NULL },
+#ifndef POPT_TABLEEND
+#define POPT_TABLEEND { NULL, '\0', 0, 0, 0, NULL, NULL }
+#endif
+
NET_API_STATUS test_netuseradd(const char *hostname,
const char *username);
--
Samba Shared Repository
More information about the samba-cvs
mailing list