[SCM] Samba Shared Repository - branch master updated
Gary Lockyer
gary at samba.org
Thu Nov 29 01:21:02 UTC 2018
The branch, master has been updated
via dbbf978ae06 s4:torture: Use #ifdef instead of #if for config.h definitions
via 342c3b7dae2 s4:smbd: Use #ifdef instead of #if for config.h definitions
via 4c4d588f477 s4:ntvfs: Use #ifdef instead of #if for config.h definitions
via 788d9f31d5c s4:lib: Use #ifdef instead of #if for config.h definitions
via 3872d4ab495 s3:winbindd: Use #ifdef instead of #if for config.h definitions
via fce92606b35 s3:utils: Use #ifdef instead of #if for config.h definitions
via 95432e30e9b s3:smbd: Use #ifdef instead of #if for config.h definitions
via a7e10f7853a s3:rpc_server: Use #ifdef instead of #if for config.h definitions
via 0c69078f3cc s3:nmbd: Use #ifdef instead of #if for config.h definitions
via 32fda4fc64c s3:modules: Use #ifdef instead of #if for config.h definitions
via 77b88fd0593 s3:libsmb: Use #ifdef instead of #if for config.h definitions
via 3f3cc42b517 s3:libads: Use #ifdef instead of #if for config.h definitions
via 72c6cd2d39a s3:lib: Use #ifdef instead of #if for config.h definitions
via f4694b61f2c s3:include: Use #ifdef instead of #if for config.h definitions
via 99a9b092ca2 s3:ldap: Use #ifdef instead of #if for config.h definitions
via be04480e087 s3:auth: Use #ifdef instead of #if for config.h definitions
via 0433576dfd3 nss_winbind: Use #ifdef instead of #if for config.h definitions
via 4dd2349c117 wins: Use #ifdef instead of #if for config.h definitions
via c56b16906ce wbclient: Use #ifdef instead of #if for config.h definitions
via d035f2492e3 krb5_plugin: Use #ifdef instead of #if for config.h definitions
via b51e8b98080 libcli:smbreadline: Use #ifdef instead of #if for config.h definitions
via aee760cdc93 libcli:smb: Use #ifdef instead of #if for config.h definitions
via e7f0b6e41fa lib:util: Avoid name confusion with config.h
via 80750253032 lib:util: Use #ifdef instead of #if for config.h definitions
via 4e8e1720905 tdb: Use #ifdef instead of #if for config.h definitions
via 9f2cd92c8e9 replace: Use #ifdef instead of #if for config.h definitions
via ded788bccbb krb5_wrap: Use #ifdef instead of #if for config.h definitions
via ab5f26f3f3b ctdb: Use #ifdef instead of #if for config.h definitions
via a9477eb3bd1 autobuild: Add _FORTIFY_SOURCE=2 to the -O3 build
via bebab076090 wafsamba: Do not always set _FORTIFY_SOURCE=2
via 9f28d8e8963 s3: Remove unsused MMAP_BLACKLIST ifdef checks
via 63a48e64871 lib:replace: Check if HAVE_DECL_ENVIRON is defined first
from 3be9ffe4456 krb5_wrap: Fix a typo
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit dbbf978ae062b49504d257a5e8c247c7f135d4db
Author: Andreas Schneider <asn at samba.org>
Date: Wed Nov 21 11:38:24 2018 +0100
s4:torture: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary at samba.org>
Autobuild-Date(master): Thu Nov 29 02:20:48 CET 2018 on sn-devel-144
commit 342c3b7dae269645a7629719ad6c1948f2e0e09e
Author: Andreas Schneider <asn at samba.org>
Date: Wed Nov 21 11:37:26 2018 +0100
s4:smbd: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 4c4d588f4777548f81881024e4ed0c08e3ac20b6
Author: Andreas Schneider <asn at samba.org>
Date: Wed Nov 21 11:36:23 2018 +0100
s4:ntvfs: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 788d9f31d5c5def8a042a937b730b5be31543809
Author: Andreas Schneider <asn at samba.org>
Date: Wed Nov 21 11:33:51 2018 +0100
s4:lib: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 3872d4ab495027fe42790c76cf749f1809323bcc
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 15:58:28 2018 +0100
s3:winbindd: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit fce92606b356883ed9fbea6948d426345ede79cf
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 15:57:51 2018 +0100
s3:utils: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 95432e30e9b2f1aa4832b045ff70bac3853f4d17
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 15:57:09 2018 +0100
s3:smbd: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit a7e10f7853a4afe628a31a8a440572fc059ef37d
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 15:56:14 2018 +0100
s3:rpc_server: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 0c69078f3ccf46ffe897d753332e6e46a2dc37e2
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 15:55:43 2018 +0100
s3:nmbd: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 32fda4fc64cceb8b0c268322edc9ce86cc9dfed0
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 15:54:28 2018 +0100
s3:modules: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 77b88fd05939871c3e72bf52f3bbc96d38cd42c1
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 15:53:23 2018 +0100
s3:libsmb: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 3f3cc42b517a2ed42e37f140a8f4186936ba44a5
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:14:07 2018 +0100
s3:libads: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 72c6cd2d39a09966e2e3d728120283e785002c61
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:12:49 2018 +0100
s3:lib: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit f4694b61f2c93ec655da0a4422f133b3d7e60a51
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:12:23 2018 +0100
s3:include: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 99a9b092ca2da884cfeae92162f2aa5f72ec3fb8
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:11:39 2018 +0100
s3:ldap: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit be04480e0872a70c7ddca0eb14ba28b9bee98990
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:10:36 2018 +0100
s3:auth: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 0433576dfd3ce955834332c61822a4d85e61b5c9
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:08:31 2018 +0100
nss_winbind: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 4dd2349c1171a2c09d6b4cdebe5c3242d4fd67b8
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:08:05 2018 +0100
wins: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit c56b16906ce56bebeac8a4f90c7671dee02b144a
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:07:39 2018 +0100
wbclient: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit d035f2492e306ddc74b1b9fe533608e0f37a1cd0
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:06:48 2018 +0100
krb5_plugin: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit b51e8b980801f635bffe57a648606ad388f22923
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:06:21 2018 +0100
libcli:smbreadline: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit aee760cdc93934225acd0cd8eb5cb0fafaae7717
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:05:39 2018 +0100
libcli:smb: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit e7f0b6e41fa3db68f588b91a6a7c25cf58aa815a
Author: Andreas Schneider <asn at samba.org>
Date: Wed Nov 21 18:24:59 2018 +0100
lib:util: Avoid name confusion with config.h
The HAVE_* is normally used for config.h definitions, so rename it to
USE_ASM_BYTEORDER.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 80750253032843f919ea8ab48698f54c98968e4d
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:01:20 2018 +0100
lib:util: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 4e8e17209051b6a1c8c95cb21b31f85afb61a17e
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 14:00:39 2018 +0100
tdb: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 9f2cd92c8e9527b0e45e6017345c0551776133a4
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 13:57:48 2018 +0100
replace: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit ded788bccbb1bfc749f7edcdad6ec2113b992356
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 13:57:13 2018 +0100
krb5_wrap: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit ab5f26f3f3bf14462dd8fbe645397e236640c615
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 13:55:49 2018 +0100
ctdb: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit a9477eb3bd1faabe182710859201cbacb9f76763
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 12:11:43 2018 +0100
autobuild: Add _FORTIFY_SOURCE=2 to the -O3 build
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit bebab0760905f7251a1bf22ad88741043d642901
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 12:09:31 2018 +0100
wafsamba: Do not always set _FORTIFY_SOURCE=2
This requires to be compiled with optimization (-O).
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 9f28d8e89637b870d788e5259539d8e8bec74bd5
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 12:06:13 2018 +0100
s3: Remove unsused MMAP_BLACKLIST ifdef checks
This doesn't get defined by anything.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 63a48e64871cbfa36c4f9686a36a951711135114
Author: Andreas Schneider <asn at samba.org>
Date: Tue Nov 20 12:01:32 2018 +0100
lib:replace: Check if HAVE_DECL_ENVIRON is defined first
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_autoconf.py | 2 +-
ctdb/common/system.c | 12 +++----
lib/krb5_wrap/gss_samba.c | 2 +-
lib/replace/getifaddrs.c | 2 +-
lib/replace/replace.h | 6 ++--
lib/replace/system/dir.h | 4 +--
lib/replace/system/filesys.h | 8 ++---
lib/replace/system/gssapi.h | 4 +--
lib/replace/system/kerberos.h | 4 +--
lib/tdb/common/io.c | 4 +--
lib/util/byteorder.h | 10 +++---
lib/util/charset/charset_macosxfs.c | 4 +--
lib/util/charset/tests/iconv.c | 2 +-
libcli/smb/smb_seal.c | 2 +-
libcli/smbreadline/smbreadline.c | 8 ++---
nsswitch/krb5_plugin/winbind_krb5_localauth.c | 2 +-
nsswitch/krb5_plugin/winbind_krb5_locator.c | 2 +-
nsswitch/wb_common.c | 10 +++---
nsswitch/winbind_nss_linux.c | 52 +++++++++++++--------------
nsswitch/wins.c | 8 ++---
script/autobuild.py | 2 +-
source3/auth/pampass.c | 6 ++--
source3/include/includes.h | 15 +++-----
source3/include/smb_ldap.h | 4 +--
source3/lib/addrchange.c | 2 +-
source3/lib/system.c | 4 +--
source3/libads/ads_struct.c | 2 +-
source3/libads/kerberos.c | 2 +-
source3/libsmb/libsmb_stat.c | 8 ++---
source3/libsmb/pylibsmb.c | 2 +-
source3/modules/getdate.c | 6 ++--
source3/modules/getdate.y | 6 ++--
source3/modules/vfs_commit.c | 4 +--
source3/modules/vfs_zfsacl.c | 2 +-
source3/nmbd/nmbd.c | 2 +-
source3/param/loadparm.c | 4 ---
source3/rpc_server/rpc_sock_helper.c | 4 +--
source3/smbd/oplock.c | 2 +-
source3/smbd/oplock_linux.c | 2 +-
source3/smbd/server.c | 6 ++--
source3/utils/ntlm_auth.c | 2 +-
source3/utils/smbcontrol.c | 6 ++--
source3/winbindd/winbindd.c | 2 +-
source4/lib/socket/socket.c | 2 +-
source4/lib/socket/socket_ip.c | 2 +-
source4/lib/tls/tlscert.c | 4 +--
source4/ntvfs/posix/pvfs_read.c | 2 +-
source4/ntvfs/posix/pvfs_write.c | 2 +-
source4/ntvfs/posix/vfs_posix.c | 2 +-
source4/smbd/process_prefork.c | 2 +-
source4/smbd/process_standard.c | 2 +-
source4/smbd/server.c | 6 ++--
source4/torture/shell.c | 2 +-
source4/torture/smb2/oplock.c | 2 +-
source4/torture/smbtorture.c | 2 +-
55 files changed, 130 insertions(+), 143 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 5f203fc7d36..58800d24351 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -703,7 +703,7 @@ def SAMBA_CONFIG_H(conf, path=None):
mandatory=False,
msg='Checking if compiler accepts %s' % (stack_protect_flag))
if flag_supported:
- conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag))
+ conf.ADD_CFLAGS('%s' % (stack_protect_flag))
break
flag_supported = conf.check(fragment='''
diff --git a/ctdb/common/system.c b/ctdb/common/system.c
index 51149edbaf5..ab1941124d7 100644
--- a/ctdb/common/system.c
+++ b/ctdb/common/system.c
@@ -33,11 +33,11 @@
#include "common/logging.h"
#include "common/system.h"
-#if HAVE_SCHED_H
+#ifdef HAVE_SCHED_H
#include <sched.h>
#endif
-#if HAVE_PROCINFO_H
+#ifdef HAVE_PROCINFO_H
#include <procinfo.h>
#endif
@@ -49,7 +49,7 @@
bool set_scheduler(void)
{
#ifdef _AIX_
-#if HAVE_THREAD_SETSCHED
+#ifdef HAVE_THREAD_SETSCHED
struct thrdentry64 te;
tid64_t ti;
@@ -68,7 +68,7 @@ bool set_scheduler(void)
}
#endif
#else /* no AIX */
-#if HAVE_SCHED_SETSCHEDULER
+#ifdef HAVE_SCHED_SETSCHEDULER
struct sched_param p;
p.sched_priority = 1;
@@ -92,7 +92,7 @@ bool set_scheduler(void)
void reset_scheduler(void)
{
#ifdef _AIX_
-#if HAVE_THREAD_SETSCHED
+#ifdef HAVE_THREAD_SETSCHED
struct thrdentry64 te;
tid64_t ti;
@@ -105,7 +105,7 @@ void reset_scheduler(void)
}
#endif
#else /* no AIX */
-#if HAVE_SCHED_SETSCHEDULER
+#ifdef HAVE_SCHED_SETSCHEDULER
struct sched_param p;
p.sched_priority = 0;
diff --git a/lib/krb5_wrap/gss_samba.c b/lib/krb5_wrap/gss_samba.c
index 860f44482a6..2a99661ddee 100644
--- a/lib/krb5_wrap/gss_samba.c
+++ b/lib/krb5_wrap/gss_samba.c
@@ -61,7 +61,7 @@ uint32_t smb_gss_krb5_import_cred(uint32_t *minor_status, krb5_context ctx,
{
uint32_t major_status = 0;
-#if HAVE_GSS_ACQUIRE_CRED_FROM
+#ifdef HAVE_GSS_ACQUIRE_CRED_FROM
uint32_t minor = 0;
gss_key_value_element_desc ccache_element = {
.key = "ccache",
diff --git a/lib/replace/getifaddrs.c b/lib/replace/getifaddrs.c
index 9e377e5edc0..a55ef7e30fe 100644
--- a/lib/replace/getifaddrs.c
+++ b/lib/replace/getifaddrs.c
@@ -73,7 +73,7 @@ static struct sockaddr *sockaddr_dup(struct sockaddr *sa)
}
#endif
-#if HAVE_IFACE_IFCONF
+#ifdef HAVE_IFACE_IFCONF
/* this works for Linux 2.2, Solaris 2.5, SunOS4, HPUX 10.20, OSF1
V4.0, Ultrix 4.4, SCO Unix 3.2, IRIX 6.4 and FreeBSD 3.2.
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 732a8226858..ece71b74107 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -272,6 +272,7 @@ char *rep_strndup(const char *s, size_t n);
size_t rep_strnlen(const char *s, size_t n);
#endif
+#if defined(HAVE_DECL_ENVIRON)
#if !HAVE_DECL_ENVIRON
#ifdef __APPLE__
#include <crt_externs.h>
@@ -280,6 +281,7 @@ size_t rep_strnlen(const char *s, size_t n);
extern char **environ;
#endif
#endif
+#endif /* defined(HAVE_DECL_ENVIRON) */
#ifndef HAVE_SETENV
#define setenv rep_setenv
@@ -830,10 +832,6 @@ typedef unsigned long long ptrdiff_t ;
*/
#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2)))
-#if MMAP_BLACKLIST
-#undef HAVE_MMAP
-#endif
-
#ifdef __COMPAR_FN_T
#define QSORT_CAST (__compar_fn_t)
#endif
diff --git a/lib/replace/system/dir.h b/lib/replace/system/dir.h
index 0955b193958..497b5a7c0fa 100644
--- a/lib/replace/system/dir.h
+++ b/lib/replace/system/dir.h
@@ -25,7 +25,7 @@
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#if HAVE_DIRENT_H
+#ifdef HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
@@ -46,7 +46,7 @@
#define mkdir(dir, mode) mkdir(dir)
#endif
-#if HAVE_LIBGEN_H
+#ifdef HAVE_LIBGEN_H
# include <libgen.h>
#endif
diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
index faa94c73f26..b9ce41a4b38 100644
--- a/lib/replace/system/filesys.h
+++ b/lib/replace/system/filesys.h
@@ -115,16 +115,16 @@
#define VXFS_QUOTA
#endif
-#if HAVE_SYS_ATTRIBUTES_H
+#if defined(HAVE_SYS_ATTRIBUTES_H)
#include <sys/attributes.h>
-#elif HAVE_ATTR_ATTRIBUTES_H
+#elif defined(HAVE_ATTR_ATTRIBUTES_H)
#include <attr/attributes.h>
#endif
/* mutually exclusive (SuSE 8.2) */
-#if HAVE_ATTR_XATTR_H
+#if defined(HAVE_ATTR_XATTR_H)
#include <attr/xattr.h>
-#elif HAVE_SYS_XATTR_H
+#elif defined(HAVE_SYS_XATTR_H)
#include <sys/xattr.h>
#endif
diff --git a/lib/replace/system/gssapi.h b/lib/replace/system/gssapi.h
index 6386c7b21a3..9e68dcc1c88 100644
--- a/lib/replace/system/gssapi.h
+++ b/lib/replace/system/gssapi.h
@@ -39,11 +39,11 @@
#include <gssapi.h>
#endif
-#if HAVE_GSSAPI_GSSAPI_KRB5_H
+#ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
#include <gssapi/gssapi_krb5.h>
#endif
-#if HAVE_GSSAPI_GSSAPI_SPNEGO_H
+#ifdef HAVE_GSSAPI_GSSAPI_SPNEGO_H
#include <gssapi/gssapi_spnego.h>
#elif HAVE_GSSAPI_SPNEGO_H
#include <gssapi_spnego.h>
diff --git a/lib/replace/system/kerberos.h b/lib/replace/system/kerberos.h
index 636ce0f2e0b..ebd8657e612 100644
--- a/lib/replace/system/kerberos.h
+++ b/lib/replace/system/kerberos.h
@@ -29,11 +29,11 @@
#ifdef HAVE_KRB5
-#if HAVE_KRB5_H
+#ifdef HAVE_KRB5_H
#include <krb5.h>
#endif
-#if HAVE_COM_ERR_H
+#ifdef HAVE_COM_ERR_H
#include <com_err.h>
#endif
diff --git a/lib/tdb/common/io.c b/lib/tdb/common/io.c
index 94b316331c1..df460176159 100644
--- a/lib/tdb/common/io.c
+++ b/lib/tdb/common/io.c
@@ -96,7 +96,7 @@ static int tdb_ftruncate(struct tdb_context *tdb, off_t length)
return ret;
}
-#if HAVE_POSIX_FALLOCATE
+#ifdef HAVE_POSIX_FALLOCATE
static int tdb_posix_fallocate(struct tdb_context *tdb, off_t offset,
off_t len)
{
@@ -413,7 +413,7 @@ static int tdb_expand_file(struct tdb_context *tdb, tdb_off_t size, tdb_off_t ad
return -1;
}
-#if HAVE_POSIX_FALLOCATE
+#ifdef HAVE_POSIX_FALLOCATE
ret = tdb_posix_fallocate(tdb, size, addition);
if (ret == 0) {
return 0;
diff --git a/lib/util/byteorder.h b/lib/util/byteorder.h
index 77afba58cbd..8656035693d 100644
--- a/lib/util/byteorder.h
+++ b/lib/util/byteorder.h
@@ -118,9 +118,9 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
{
__asm__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
}
-#define HAVE_ASM_BYTEORDER 1
+#define USE_ASM_BYTEORDER 1
#else
-#define HAVE_ASM_BYTEORDER 0
+#define USE_ASM_BYTEORDER 0
#endif
#define CVAL(buf,pos) ((unsigned int)(((const uint8_t *)(buf))[pos]))
@@ -128,7 +128,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
#define PVAL(buf,pos) (CVAL(buf,pos))
#define SCVAL(buf,pos,val) (CVAL_NC(buf,pos) = (val))
-#if HAVE_ASM_BYTEORDER
+#if USE_ASM_BYTEORDER
#define _PTRPOS(buf,pos) (((const uint8_t *)(buf))+(pos))
#define SVAL(buf,pos) ld_le16((const uint16_t *)_PTRPOS(buf,pos))
@@ -140,7 +140,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
#define SSVALS(buf,pos,val) SSVAL((buf),(pos),((int16_t)(val)))
#define SIVALS(buf,pos,val) SIVAL((buf),(pos),((int32_t)(val)))
-#else /* not HAVE_ASM_BYTEORDER */
+#else /* not USE_ASM_BYTEORDER */
#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
@@ -153,7 +153,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16_t)(val)))
#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))
-#endif /* not HAVE_ASM_BYTEORDER */
+#endif /* not USE_ASM_BYTEORDER */
/* 64 bit macros */
#define BVAL(p, ofs) (IVAL(p,ofs) | (((uint64_t)IVAL(p,(ofs)+4)) << 32))
diff --git a/lib/util/charset/charset_macosxfs.c b/lib/util/charset/charset_macosxfs.c
index 24e21fd6d2c..97a366a1532 100644
--- a/lib/util/charset/charset_macosxfs.c
+++ b/lib/util/charset/charset_macosxfs.c
@@ -43,11 +43,11 @@
/*
* See if autoconf has found us the internal headers in some form.
*/
-#if HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H
+#if defined(HAVE_COREFOUNDATION_CFSTRINGENCODINGCONVERTER_H)
# include <CoreFoundation/CFStringEncodingConverter.h>
# include <CoreFoundation/CFUnicodePrecomposition.h>
# define USE_INTERNAL_API 1
-#elif HAVE_CFSTRINGENCODINGCONVERTER_H
+#elif defined(HAVE_CFSTRINGENCODINGCONVERTER_H)
# include <CFStringEncodingConverter.h>
# include <CFUnicodePrecomposition.h>
# define USE_INTERNAL_API 1
diff --git a/lib/util/charset/tests/iconv.c b/lib/util/charset/tests/iconv.c
index 30161d3d8ed..3733c3c6b66 100644
--- a/lib/util/charset/tests/iconv.c
+++ b/lib/util/charset/tests/iconv.c
@@ -30,7 +30,7 @@
#include "torture/local/proto.h"
#include "talloc.h"
-#if HAVE_NATIVE_ICONV
+#ifdef HAVE_NATIVE_ICONV
static bool iconv_untestable(struct torture_context *tctx)
{
diff --git a/libcli/smb/smb_seal.c b/libcli/smb/smb_seal.c
index f4f804c9473..079744cd68e 100644
--- a/libcli/smb/smb_seal.c
+++ b/libcli/smb/smb_seal.c
@@ -19,7 +19,7 @@
#include "includes.h"
#include "smb_common.h"
-#if HAVE_KRB5
+#ifdef HAVE_KRB5
#include "lib/krb5_wrap/krb5_samba.h"
#endif
#include "auth/gensec/gensec.h"
diff --git a/libcli/smbreadline/smbreadline.c b/libcli/smbreadline/smbreadline.c
index 1a0f61c2cfe..6929209be20 100644
--- a/libcli/smbreadline/smbreadline.c
+++ b/libcli/smbreadline/smbreadline.c
@@ -47,7 +47,7 @@
static bool smb_rl_done;
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
/*
* MacOS/X does not have rl_done in readline.h, but
* readline.so has it
@@ -58,7 +58,7 @@ extern int rl_done;
void smb_readline_done(void)
{
smb_rl_done = true;
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
rl_done = 1;
#endif
}
@@ -122,7 +122,7 @@ char *smb_readline(const char *prompt, void (*callback)(void),
return smb_readline_replacement(NULL, callback, completion_fn);
}
-#if HAVE_LIBREADLINE
+#ifdef HAVE_LIBREADLINE
/* Aargh! Readline does bizzare things with the terminal width
that mucks up expect(1). Set CLI_NO_READLINE in the environment
@@ -145,7 +145,7 @@ char *smb_readline(const char *prompt, void (*callback)(void),
rl_basic_word_break_characters = " \t\n";
}
-#if HAVE_DECL_RL_EVENT_HOOK
+#ifdef HAVE_DECL_RL_EVENT_HOOK
if (callback)
rl_event_hook = (rl_hook_func_t *)callback;
#endif
diff --git a/nsswitch/krb5_plugin/winbind_krb5_localauth.c b/nsswitch/krb5_plugin/winbind_krb5_localauth.c
index e27bd6c6c54..f87b19abed6 100644
--- a/nsswitch/krb5_plugin/winbind_krb5_localauth.c
+++ b/nsswitch/krb5_plugin/winbind_krb5_localauth.c
@@ -22,7 +22,7 @@
#include "replace.h"
#include <krb5/localauth_plugin.h>
#include <wbclient.h>
-#if HAVE_COM_ERR_H
+#ifdef HAVE_COM_ERR_H
#include <com_err.h>
#endif
diff --git a/nsswitch/krb5_plugin/winbind_krb5_locator.c b/nsswitch/krb5_plugin/winbind_krb5_locator.c
index 91a2d64d84c..518c871b248 100644
--- a/nsswitch/krb5_plugin/winbind_krb5_locator.c
+++ b/nsswitch/krb5_plugin/winbind_krb5_locator.c
@@ -26,7 +26,7 @@
#if defined(HAVE_KRB5) && defined(HAVE_KRB5_LOCATE_PLUGIN_H)
-#if HAVE_COM_ERR_H
+#ifdef HAVE_COM_ERR_H
#include <com_err.h>
#endif
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index f2672fb1298..ba1138c4549 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -27,7 +27,7 @@
#include "system/select.h"
#include "winbind_client.h"
-#if HAVE_PTHREAD_H
+#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
@@ -41,7 +41,7 @@ struct winbindd_context {
pid_t our_pid; /* calling process pid */
};
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
static pthread_mutex_t wb_global_ctx_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
@@ -53,7 +53,7 @@ static struct winbindd_context *get_wb_global_ctx(void)
.our_pid = 0
};
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&wb_global_ctx_mutex);
#endif
return &wb_global_ctx;
@@ -61,7 +61,7 @@ static struct winbindd_context *get_wb_global_ctx(void)
static void put_wb_global_ctx(void)
{
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&wb_global_ctx_mutex);
#endif
return;
@@ -149,7 +149,7 @@ static void winbind_close_sock(struct winbindd_context *ctx)
/* Destructor for global context to ensure fd is closed */
-#if HAVE_DESTRUCTOR_ATTRIBUTE
+#ifdef HAVE_DESTRUCTOR_ATTRIBUTE
__attribute__((destructor))
#endif
static void winbind_destructor(void)
diff --git a/nsswitch/winbind_nss_linux.c b/nsswitch/winbind_nss_linux.c
index c7443e505bf..4ab10b90f4f 100644
--- a/nsswitch/winbind_nss_linux.c
+++ b/nsswitch/winbind_nss_linux.c
@@ -21,11 +21,11 @@
#include "winbind_client.h"
-#if HAVE_PTHREAD_H
+#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
static pthread_mutex_t winbind_nss_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
@@ -243,11 +243,11 @@ static NSS_STATUS fill_pwent(struct passwd *result,
/* The struct passwd for Solaris has some extra fields which must
be initialised or nscd crashes. */
-#if HAVE_PASSWD_PW_COMMENT
+#ifdef HAVE_PASSWD_PW_COMMENT
result->pw_comment = "";
#endif
-#if HAVE_PASSWD_PW_AGE
+#ifdef HAVE_PASSWD_PW_AGE
result->pw_age = "";
#endif
@@ -369,7 +369,7 @@ _nss_winbind_setpwent(void)
fprintf(stderr, "[%5d]: setpwent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
@@ -385,7 +385,7 @@ _nss_winbind_setpwent(void)
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
return ret;
@@ -401,7 +401,7 @@ _nss_winbind_endpwent(void)
fprintf(stderr, "[%5d]: endpwent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
@@ -417,7 +417,7 @@ _nss_winbind_endpwent(void)
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
@@ -438,7 +438,7 @@ _nss_winbind_getpwent_r(struct passwd *result, char *buffer,
--
Samba Shared Repository
More information about the samba-cvs
mailing list