#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
/* 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
fprintf(stderr, "[%5d]: setpwent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
return ret;
fprintf(stderr, "[%5d]: endpwent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
fprintf(stderr, "[%5d]: getpwent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
return ret;
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
(unsigned int)uid, nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
fprintf(stderr, "[%5d]: getpwnam_r %s\n", getpid(), name);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
name, nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
fprintf(stderr, "[%5d]: setgrent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
fprintf(stderr, "[%5d]: endgrent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
fprintf(stderr, "[%5d]: getgrent\n", getpid());
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
fprintf(stderr, "[%5d]: getgrnam %s\n", getpid(), name);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
name, nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
fprintf(stderr, "[%5d]: getgrgid %d\n", getpid(), gid);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
(unsigned int)gid, nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif
return ret;
user, group);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif
user, nss_err_str(ret), ret);
#endif
-#if HAVE_PTHREAD
+#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&winbind_nss_mutex);
#endif