diff options
author | Andreas Schneider <asn@samba.org> | 2018-11-20 14:08:31 +0100 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2018-11-28 23:19:22 +0100 |
commit | 0433576dfd3ce955834332c61822a4d85e61b5c9 (patch) | |
tree | 2515a092e3316ff9edd1683ae1656f2adc082cba /nsswitch | |
parent | 4dd2349c1171a2c09d6b4cdebe5c3242d4fd67b8 (diff) | |
download | samba-0433576dfd3ce955834332c61822a4d85e61b5c9.tar.gz |
nss_winbind: Use #ifdef instead of #if for config.h definitions
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/winbind_nss_linux.c | 52 |
1 files changed, 26 insertions, 26 deletions
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, fprintf(stderr, "[%5d]: getpwent\n", getpid()); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -514,7 +514,7 @@ _nss_winbind_getpwent_r(struct passwd *result, char *buffer, nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif return ret; @@ -535,7 +535,7 @@ _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, fprintf(stderr, "[%5d]: getpwuid_r %d\n", getpid(), (unsigned int)uid); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -587,7 +587,7 @@ _nss_winbind_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, (unsigned int)uid, nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif @@ -608,7 +608,7 @@ _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer, fprintf(stderr, "[%5d]: getpwnam_r %s\n", getpid(), name); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -663,7 +663,7 @@ _nss_winbind_getpwnam_r(const char *name, struct passwd *result, char *buffer, name, nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif @@ -689,7 +689,7 @@ _nss_winbind_setgrent(void) fprintf(stderr, "[%5d]: setgrent\n", getpid()); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -705,7 +705,7 @@ _nss_winbind_setgrent(void) nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif @@ -722,7 +722,7 @@ _nss_winbind_endgrent(void) fprintf(stderr, "[%5d]: endgrent\n", getpid()); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -738,7 +738,7 @@ _nss_winbind_endgrent(void) nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif @@ -761,7 +761,7 @@ winbind_getgrent(enum winbindd_cmd cmd, fprintf(stderr, "[%5d]: getgrent\n", getpid()); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -846,7 +846,7 @@ winbind_getgrent(enum winbindd_cmd cmd, nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif @@ -884,7 +884,7 @@ _nss_winbind_getgrnam_r(const char *name, fprintf(stderr, "[%5d]: getgrnam %s\n", getpid(), name); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -944,7 +944,7 @@ _nss_winbind_getgrnam_r(const char *name, name, nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif @@ -967,7 +967,7 @@ _nss_winbind_getgrgid_r(gid_t gid, fprintf(stderr, "[%5d]: getgrgid %d\n", getpid(), gid); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -1025,7 +1025,7 @@ _nss_winbind_getgrgid_r(gid_t gid, (unsigned int)gid, nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif return ret; @@ -1048,7 +1048,7 @@ _nss_winbind_initgroups_dyn(const char *user, gid_t group, long int *start, user, group); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_lock(&winbind_nss_mutex); #endif @@ -1140,7 +1140,7 @@ _nss_winbind_initgroups_dyn(const char *user, gid_t group, long int *start, user, nss_err_str(ret), ret); #endif -#if HAVE_PTHREAD +#ifdef HAVE_PTHREAD pthread_mutex_unlock(&winbind_nss_mutex); #endif |