Commit 6683ce30 authored by Mathieu Parent's avatar Mathieu Parent

New upstream version 2.1.14

parent d5e2640d
_pytalloc_check_type: int (PyObject *, const char *)
_pytalloc_get_mem_ctx: TALLOC_CTX *(PyObject *)
_pytalloc_get_ptr: void *(PyObject *)
_pytalloc_get_type: void *(PyObject *, const char *)
pytalloc_BaseObject_PyType_Ready: int (PyTypeObject *)
pytalloc_BaseObject_check: int (PyObject *)
pytalloc_BaseObject_size: size_t (void)
pytalloc_CObject_FromTallocPtr: PyObject *(void *)
pytalloc_Check: int (PyObject *)
pytalloc_GenericObject_reference_ex: PyObject *(TALLOC_CTX *, void *)
pytalloc_GenericObject_steal_ex: PyObject *(TALLOC_CTX *, void *)
pytalloc_GetBaseObjectType: PyTypeObject *(void)
pytalloc_GetObjectType: PyTypeObject *(void)
pytalloc_reference_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
pytalloc_steal: PyObject *(PyTypeObject *, void *)
pytalloc_steal_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
_pytalloc_check_type: int (PyObject *, const char *)
_pytalloc_get_mem_ctx: TALLOC_CTX *(PyObject *)
_pytalloc_get_ptr: void *(PyObject *)
_pytalloc_get_type: void *(PyObject *, const char *)
pytalloc_BaseObject_PyType_Ready: int (PyTypeObject *)
pytalloc_BaseObject_check: int (PyObject *)
pytalloc_BaseObject_size: size_t (void)
pytalloc_Check: int (PyObject *)
pytalloc_GenericObject_reference_ex: PyObject *(TALLOC_CTX *, void *)
pytalloc_GenericObject_steal_ex: PyObject *(TALLOC_CTX *, void *)
pytalloc_GetBaseObjectType: PyTypeObject *(void)
pytalloc_GetObjectType: PyTypeObject *(void)
pytalloc_reference_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
pytalloc_steal: PyObject *(PyTypeObject *, void *)
pytalloc_steal_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
_talloc: void *(const void *, size_t)
_talloc_array: void *(const void *, size_t, unsigned int, const char *)
_talloc_free: int (void *, const char *)
_talloc_get_type_abort: void *(const void *, const char *, const char *)
_talloc_memdup: void *(const void *, const void *, size_t, const char *)
_talloc_move: void *(const void *, const void *)
_talloc_pooled_object: void *(const void *, size_t, const char *, unsigned int, size_t)
_talloc_realloc: void *(const void *, void *, size_t, const char *)
_talloc_realloc_array: void *(const void *, void *, size_t, unsigned int, const char *)
_talloc_reference_loc: void *(const void *, const void *, const char *)
_talloc_set_destructor: void (const void *, int (*)(void *))
_talloc_steal_loc: void *(const void *, const void *, const char *)
_talloc_zero: void *(const void *, size_t, const char *)
_talloc_zero_array: void *(const void *, size_t, unsigned int, const char *)
talloc_asprintf: char *(const void *, const char *, ...)
talloc_asprintf_append: char *(char *, const char *, ...)
talloc_asprintf_append_buffer: char *(char *, const char *, ...)
talloc_autofree_context: void *(void)
talloc_check_name: void *(const void *, const char *)
talloc_disable_null_tracking: void (void)
talloc_enable_leak_report: void (void)
talloc_enable_leak_report_full: void (void)
talloc_enable_null_tracking: void (void)
talloc_enable_null_tracking_no_autofree: void (void)
talloc_find_parent_byname: void *(const void *, const char *)
talloc_free_children: void (void *)
talloc_get_name: const char *(const void *)
talloc_get_size: size_t (const void *)
talloc_increase_ref_count: int (const void *)
talloc_init: void *(const char *, ...)
talloc_is_parent: int (const void *, const void *)
talloc_named: void *(const void *, size_t, const char *, ...)
talloc_named_const: void *(const void *, size_t, const char *)
talloc_parent: void *(const void *)
talloc_parent_name: const char *(const void *)
talloc_pool: void *(const void *, size_t)
talloc_realloc_fn: void *(const void *, void *, size_t)
talloc_reference_count: size_t (const void *)
talloc_reparent: void *(const void *, const void *, const void *)
talloc_report: void (const void *, FILE *)
talloc_report_depth_cb: void (const void *, int, int, void (*)(const void *, int, int, int, void *), void *)
talloc_report_depth_file: void (const void *, int, int, FILE *)
talloc_report_full: void (const void *, FILE *)
talloc_set_abort_fn: void (void (*)(const char *))
talloc_set_log_fn: void (void (*)(const char *))
talloc_set_log_stderr: void (void)
talloc_set_memlimit: int (const void *, size_t)
talloc_set_name: const char *(const void *, const char *, ...)
talloc_set_name_const: void (const void *, const char *)
talloc_show_parents: void (const void *, FILE *)
talloc_strdup: char *(const void *, const char *)
talloc_strdup_append: char *(char *, const char *)
talloc_strdup_append_buffer: char *(char *, const char *)
talloc_strndup: char *(const void *, const char *, size_t)
talloc_strndup_append: char *(char *, const char *, size_t)
talloc_strndup_append_buffer: char *(char *, const char *, size_t)
talloc_test_get_magic: int (void)
talloc_total_blocks: size_t (const void *)
talloc_total_size: size_t (const void *)
talloc_unlink: int (const void *, void *)
talloc_vasprintf: char *(const void *, const char *, va_list)
talloc_vasprintf_append: char *(char *, const char *, va_list)
talloc_vasprintf_append_buffer: char *(char *, const char *, va_list)
talloc_version_major: int (void)
talloc_version_minor: int (void)
......@@ -365,7 +365,7 @@ def CHECK_CODE(conf, code, define,
headers=None, msg=None, cflags='', includes='# .',
local_include=True, lib=None, link=True,
define_ret=False, quote=False,
on_target=True):
on_target=True, strict=False):
'''check if some code compiles and/or runs'''
if CONFIG_SET(conf, define):
......@@ -395,6 +395,16 @@ def CHECK_CODE(conf, code, define,
cflags = TO_LIST(cflags)
# Be strict when relying on a compiler check
# Some compilers (e.g. xlc) ignore non-supported features as warnings
if strict:
extra_cflags = None
if conf.env["CC_NAME"] == "gcc":
extra_cflags = "-Werror"
elif conf.env["CC_NAME"] == "xlc":
extra_cflags = "-qhalt=w"
cflags.append(extra_cflags)
if local_include:
cflags.append('-I%s' % conf.curdir)
......@@ -713,6 +723,8 @@ def SAMBA_CONFIG_H(conf, path=None):
testflags=True)
conf.ADD_CFLAGS('-Wimplicit-fallthrough',
testflags=True)
conf.ADD_CFLAGS('-Werror=strict-overflow -Wstrict-overflow=2',
testflags=True)
conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True)
conf.ADD_CFLAGS('-Wno-format-zero-length', testflags=True)
......
......@@ -85,6 +85,8 @@ def minimum_library_version(conf, libname, default):
@conf
def LIB_MAY_BE_BUNDLED(conf, libname):
if libname in conf.env.SYSTEM_LIBS:
return False
if libname in conf.env.BUNDLED_LIBS:
return True
if '!%s' % libname in conf.env.BUNDLED_LIBS:
......
......@@ -95,7 +95,7 @@ also accepted as dictionary entries here
self.VENDOR_SUFFIX=None
self.VENDOR_PATCH=None
for a, b in version_dict.iteritems():
for a, b in version_dict.items():
if a.startswith("SAMBA_VERSION_"):
setattr(self, a[14:], b)
else:
......
......@@ -269,6 +269,7 @@ def configure(conf):
conf.env.MODULESDIR = Options.options.MODULESDIR
conf.env.PRIVATELIBDIR = Options.options.PRIVATELIBDIR
conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
conf.env.SYSTEM_LIBS = ()
conf.env.PRIVATE_LIBS = Options.options.PRIVATE_LIBS.split(',')
conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
conf.env.NONSHARED_BINARIES = Options.options.NONSHARED_BINARIES.split(',')
......@@ -374,6 +375,7 @@ def configure(conf):
conf.CHECK_CODE('''int main(void) { return 0; }
__attribute__((visibility("default"))) void vis_foo2(void) {}''',
cflags=conf.env.VISIBILITY_CFLAGS,
strict=True,
define='HAVE_VISIBILITY_ATTR', addmain=False)
# check HAVE_CONSTRUCTOR_ATTRIBUTE
......@@ -391,6 +393,7 @@ def configure(conf):
''',
'HAVE_CONSTRUCTOR_ATTRIBUTE',
addmain=False,
strict=True,
msg='Checking for library constructor support')
# check HAVE_DESTRUCTOR_ATTRIBUTE
......@@ -408,6 +411,7 @@ def configure(conf):
''',
'HAVE_DESTRUCTOR_ATTRIBUTE',
addmain=False,
strict=True,
msg='Checking for library destructor support')
conf.CHECK_CODE('''
......@@ -424,6 +428,7 @@ def configure(conf):
''',
'HAVE___ATTRIBUTE__',
addmain=False,
strict=True,
msg='Checking for __attribute__')
if sys.platform.startswith('aix'):
......
......@@ -218,52 +218,33 @@
#endif
#if !defined(HAVE_GETXATTR) || defined(XATTR_ADDITIONAL_OPTIONS)
#if !defined(HAVE_XATTR_XATTR) || 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
#endif /* !defined(HAVE_XATTR_XATTR) || defined(XATTR_ADDITIONAL_OPTIONS) */
#endif
......@@ -293,7 +293,7 @@ def configure(conf):
''',
'HAVE_FALLTHROUGH_ATTRIBUTE',
addmain=False,
cflags='-Werror',
strict=True,
msg='Checking for fallthrough attribute')
# these may be builtins, so we need the link=False strategy
......@@ -393,35 +393,24 @@ def configure(conf):
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, 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
if not conf.CONFIG_SET('HAVE_GETXATTR'):
conf.CHECK_FUNCS_IN('''
attr_get attr_getf attr_list attr_listf attropen attr_remove
attr_removef attr_set attr_setf extattr_delete_fd extattr_delete_file
extattr_get_fd extattr_get_file extattr_list_fd extattr_list_file
extattr_set_fd extattr_set_file fgetea
fremoveea fsetea getea listea
removeea setea
''', 'attr', checklibc=True, headers=xattr_headers)
if (conf.CONFIG_SET('HAVE_ATTR_LISTF') or
conf.CONFIG_SET('HAVE_EXTATTR_LIST_FD') or
conf.CONFIG_SET('HAVE_FLISTEA') or
conf.CONFIG_SET('HAVE_FLISTXATTR')):
conf.DEFINE('HAVE_XATTR_SUPPORT', 1)
# Darwin has extra options to xattr-family functions
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")
# default to 1, we set it to 0 if we don't find any EA implementation below:
conf.DEFINE('HAVE_XATTR_SUPPORT', 1)
if conf.CHECK_FUNCS_IN('getxattr', 'attr', checklibc=True, headers=xattr_headers):
conf.DEFINE('HAVE_XATTR_XATTR', 1)
# Darwin has extra options to xattr-family functions
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")
elif conf.CHECK_FUNCS_IN('attr_listf', 'attr', checklibc=True, headers=xattr_headers):
conf.DEFINE('HAVE_XATTR_ATTR', 1)
elif conf.CHECK_FUNCS('extattr_list_fd'):
conf.DEFINE('HAVE_XATTR_EXTATTR', 1)
elif conf.CHECK_FUNCS('flistea'):
conf.DEFINE('HAVE_XATTR_EA', 1)
elif not conf.CHECK_FUNCS('attropen'):
conf.DEFINE('HAVE_XATTR_SUPPORT', 0)
conf.CHECK_FUNCS_IN('dlopen dlsym dlerror dlclose', 'dl',
checklibc=True, headers='dlfcn.h dl.h')
......@@ -670,6 +659,10 @@ removeea setea
headers='sys/socket.h netinet/in.h',
define='HAVE_SOCK_SIN_LEN')
conf.CHECK_STRUCTURE_MEMBER('struct sockaddr_in6', 'sin6_len',
headers='sys/socket.h netinet/in.h',
define='HAVE_SOCK_SIN6_LEN')
conf.CHECK_CODE('struct sockaddr_un sunaddr; sunaddr.sun_family = AF_UNIX;',
define='HAVE_UNIXSOCKET', headers='sys/socket.h sys/un.h')
......
......@@ -48,7 +48,7 @@ static int solaris_openat(int fildes, const char *path, int oflag, mode_t mode);
ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t size)
{
#if defined(HAVE_GETXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return getxattr(path, name, value, size);
#else
......@@ -58,9 +58,9 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si
int options = 0;
return getxattr(path, name, value, size, 0, options);
#endif
#elif defined(HAVE_GETEA)
#elif defined(HAVE_XATTR_EA)
return getea(path, name, value, size);
#elif defined(HAVE_EXTATTR_GET_FILE)
#elif defined(HAVE_XATTR_EXTATTR)
ssize_t retval;
int attrnamespace;
const char *attrname;
......@@ -93,7 +93,7 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si
}
return -1;
#elif defined(HAVE_ATTR_GET)
#elif defined(HAVE_XATTR_ATTR)
int retval, flags = 0;
int valuelength = (int)size;
char *attrname = strchr(name,'.') + 1;
......@@ -122,7 +122,7 @@ ssize_t rep_getxattr (const char *path, const char *name, void *value, size_t si
ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size)
{
#if defined(HAVE_FGETXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return fgetxattr(filedes, name, value, size);
#else
......@@ -132,9 +132,9 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size)
int options = 0;
return fgetxattr(filedes, name, value, size, 0, options);
#endif
#elif defined(HAVE_FGETEA)
#elif defined(HAVE_XATTR_EA)
return fgetea(filedes, name, value, size);
#elif defined(HAVE_EXTATTR_GET_FD)
#elif defined(HAVE_XATTR_EXTATTR)
ssize_t retval;
int attrnamespace;
const char *attrname;
......@@ -162,7 +162,7 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size)
}
return -1;
#elif defined(HAVE_ATTR_GETF)
#elif defined(HAVE_XATTR_ATTR)
int retval, flags = 0;
int valuelength = (int)size;
char *attrname = strchr(name,'.') + 1;
......@@ -188,7 +188,7 @@ ssize_t rep_fgetxattr (int filedes, const char *name, void *value, size_t size)
#endif
}
#if defined(HAVE_EXTATTR_LIST_FILE)
#if defined(HAVE_XATTR_EXTATTR)
#define EXTATTR_PREFIX(s) (s), (sizeof((s))-1)
......@@ -219,21 +219,15 @@ static ssize_t bsd_attr_list (int type, extattr_arg arg, char *list, size_t size
continue;
}
switch(type) {
#if defined(HAVE_EXTATTR_LIST_FILE)
case 0:
list_size = extattr_list_file(arg.path, extattr[t].space, list, size);
break;
#endif
#if defined(HAVE_EXTATTR_LIST_LINK)
case 1:
list_size = extattr_list_link(arg.path, extattr[t].space, list, size);
break;
#endif
#if defined(HAVE_EXTATTR_LIST_FD)
case 2:
list_size = extattr_list_fd(arg.filedes, extattr[t].space, list, size);
break;
#endif
default:
errno = ENOSYS;
return -1;
......@@ -285,7 +279,7 @@ static ssize_t bsd_attr_list (int type, extattr_arg arg, char *list, size_t size
#endif
#if defined(HAVE_ATTR_LIST) && (defined(HAVE_SYS_ATTRIBUTES_H) || defined(HAVE_ATTR_ATTRIBUTES_H))
#if defined(HAVE_XATTR_ATTR) && (defined(HAVE_SYS_ATTRIBUTES_H) || defined(HAVE_ATTR_ATTRIBUTES_H))
static char attr_buffer[ATTR_MAX_VALUELEN];
static ssize_t irix_attr_list(const char *path, int filedes, char *list, size_t size, int flags)
......@@ -355,7 +349,7 @@ static ssize_t irix_attr_list(const char *path, int filedes, char *list, size_t
ssize_t rep_listxattr (const char *path, char *list, size_t size)
{
#if defined(HAVE_LISTXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return listxattr(path, list, size);
#else
......@@ -364,13 +358,13 @@ ssize_t rep_listxattr (const char *path, char *list, size_t size)
int options = 0;
return listxattr(path, list, size, options);
#endif
#elif defined(HAVE_LISTEA)
#elif defined(HAVE_XATTR_EA)
return listea(path, list, size);
#elif defined(HAVE_EXTATTR_LIST_FILE)
#elif defined(HAVE_XATTR_EXTATTR)
extattr_arg arg;
arg.path = path;
return bsd_attr_list(0, arg, list, size);
#elif defined(HAVE_ATTR_LIST) && defined(HAVE_SYS_ATTRIBUTES_H)
#elif defined(HAVE_XATTR_ATTR) && defined(HAVE_SYS_ATTRIBUTES_H)
return irix_attr_list(path, 0, list, size, 0);
#elif defined(HAVE_ATTROPEN)
ssize_t ret = -1;
......@@ -388,7 +382,7 @@ ssize_t rep_listxattr (const char *path, char *list, size_t size)
ssize_t rep_flistxattr (int filedes, char *list, size_t size)
{
#if defined(HAVE_FLISTXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return flistxattr(filedes, list, size);
#else
......@@ -397,13 +391,13 @@ ssize_t rep_flistxattr (int filedes, char *list, size_t size)
int options = 0;
return flistxattr(filedes, list, size, options);
#endif
#elif defined(HAVE_FLISTEA)
#elif defined(HAVE_XATTR_EA)
return flistea(filedes, list, size);
#elif defined(HAVE_EXTATTR_LIST_FD)
#elif defined(HAVE_XATTR_EXTATTR)
extattr_arg arg;
arg.filedes = filedes;
return bsd_attr_list(2, arg, list, size);
#elif defined(HAVE_ATTR_LISTF)
#elif defined(HAVE_XATTR_ATTR)
return irix_attr_list(NULL, filedes, list, size, 0);
#elif defined(HAVE_ATTROPEN)
ssize_t ret = -1;
......@@ -421,7 +415,7 @@ ssize_t rep_flistxattr (int filedes, char *list, size_t size)
int rep_removexattr (const char *path, const char *name)
{
#if defined(HAVE_REMOVEXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return removexattr(path, name);
#else
......@@ -430,9 +424,9 @@ int rep_removexattr (const char *path, const char *name)
int options = 0;
return removexattr(path, name, options);
#endif
#elif defined(HAVE_REMOVEEA)
#elif defined(HAVE_XATTR_EA)
return removeea(path, name);
#elif defined(HAVE_EXTATTR_DELETE_FILE)
#elif defined(HAVE_XATTR_EXTATTR)
int attrnamespace;
const char *attrname;
......@@ -448,7 +442,7 @@ int rep_removexattr (const char *path, const char *name)
}
return extattr_delete_file(path, attrnamespace, attrname);
#elif defined(HAVE_ATTR_REMOVE)
#elif defined(HAVE_XATTR_ATTR)
int flags = 0;
char *attrname = strchr(name,'.') + 1;
......@@ -471,7 +465,7 @@ int rep_removexattr (const char *path, const char *name)
int rep_fremovexattr (int filedes, const char *name)
{
#if defined(HAVE_FREMOVEXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return fremovexattr(filedes, name);
#else
......@@ -480,9 +474,9 @@ int rep_fremovexattr (int filedes, const char *name)
int options = 0;
return fremovexattr(filedes, name, options);
#endif
#elif defined(HAVE_FREMOVEEA)
#elif defined(HAVE_XATTR_EA)
return fremoveea(filedes, name);
#elif defined(HAVE_EXTATTR_DELETE_FD)
#elif defined(HAVE_XATTR_EXTATTR)
int attrnamespace;
const char *attrname;
......@@ -498,7 +492,7 @@ int rep_fremovexattr (int filedes, const char *name)
}
return extattr_delete_fd(filedes, attrnamespace, attrname);
#elif defined(HAVE_ATTR_REMOVEF)
#elif defined(HAVE_XATTR_ATTR)
int flags = 0;
char *attrname = strchr(name,'.') + 1;
......@@ -521,7 +515,7 @@ int rep_fremovexattr (int filedes, const char *name)
int rep_setxattr (const char *path, const char *name, const void *value, size_t size, int flags)
{
#if defined(HAVE_SETXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return setxattr(path, name, value, size, flags);
#else
......@@ -530,9 +524,9 @@ int rep_setxattr (const char *path, const char *name, const void *value, size_t
int options = 0;
return setxattr(path, name, value, size, 0, options);
#endif
#elif defined(HAVE_SETEA)
#elif defined(HAVE_XATTR_EA)
return setea(path, name, value, size, flags);
#elif defined(HAVE_EXTATTR_SET_FILE)
#elif defined(HAVE_XATTR_EXTATTR)
int retval = 0;
int attrnamespace;
const char *attrname;
......@@ -569,7 +563,7 @@ int rep_setxattr (const char *path, const char *name, const void *value, size_t
}
retval = extattr_set_file(path, attrnamespace, attrname, value, size);
return (retval < 0) ? -1 : 0;
#elif defined(HAVE_ATTR_SET)
#elif defined(HAVE_XATTR_ATTR)
int myflags = 0;
char *attrname = strchr(name,'.') + 1;
......@@ -598,7 +592,7 @@ int rep_setxattr (const char *path, const char *name, const void *value, size_t
int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags)
{
#if defined(HAVE_FSETXATTR)
#if defined(HAVE_XATTR_XATTR)
#ifndef XATTR_ADDITIONAL_OPTIONS
return fsetxattr(filedes, name, value, size, flags);
#else
......@@ -607,9 +601,9 @@ int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size
int options = 0;
return fsetxattr(filedes, name, value, size, 0, options);
#endif
#elif defined(HAVE_FSETEA)
#elif defined(HAVE_XATTR_EA)
return fsetea(filedes, name, value, size, flags);
#elif defined(HAVE_EXTATTR_SET_FD)
#elif defined(HAVE_XATTR_EXTATTR)
int retval = 0;
int attrnamespace;
const char *attrname;
......@@ -646,7 +640,7 @@ int rep_fsetxattr (int filedes, const char *name, const void *value, size_t size
}
retval = extattr_set_fd(filedes, attrnamespace, attrname, value, size);
return (retval < 0) ? -1 : 0;
#elif defined(HAVE_ATTR_SETF)
#elif defined(HAVE_XATTR_ATTR)
int myflags = 0;
char *attrname = strchr(name,'.') + 1;
......
......@@ -86,7 +86,7 @@ static PyObject *pytalloc_default_repr(PyObject *obj)
pytalloc_Object *talloc_obj = (pytalloc_Object *)obj;
PyTypeObject *type = (PyTypeObject*)PyObject_Type(obj);
return PyStr_FromFormat("<%s talloc object at 0x%p>",
return PyStr_FromFormat("<%s talloc object at %p>",
type->tp_name, talloc_obj->ptr);
}
......
......@@ -1898,8 +1898,8 @@ void talloc_set_log_stderr(void);
* This affects all children of this context and constrain any
* allocation in the hierarchy to never exceed the limit set.
* The limit can be removed by setting 0 (unlimited) as the
* max_size by calling the funciton again on the sam context.
* Memory limits can also be nested, meaning a hild can have
* max_size by calling the function again on the same context.
* Memory limits can also be nested, meaning a child can have
* a stricter memory limit than a parent.
* Memory limits are enforced only at memory allocation time.
* Stealing a context into a 'limited' hierarchy properly
......
#!/usr/bin/env python
APPNAME = 'talloc'
VERSION = '2.1.13'
VERSION = '2.1.14'
blddir = 'bin'
......@@ -165,7 +165,7 @@ def build(bld):
bld.SAMBA_PYTHON('test_pytalloc',
'test_pytalloc.c',
deps='pytalloc',
deps=name,
enabled=bld.PYTHON_BUILD_IS_ENABLED(),
realname='_test_pytalloc.so',
install=False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment