svn commit: trunk/uClibc/libc/pwd_grp
psm at uclibc.org
psm at uclibc.org
Thu Oct 20 21:39:50 UTC 2005
Author: psm
Date: 2005-10-20 14:39:48 -0700 (Thu, 20 Oct 2005)
New Revision: 11901
Log:
Remove duplicate locking defines for IMA compiling.
Modified:
trunk/uClibc/libc/pwd_grp/pwd_grp.c
Changeset:
Modified: trunk/uClibc/libc/pwd_grp/pwd_grp.c
===================================================================
--- trunk/uClibc/libc/pwd_grp/pwd_grp.c 2005-10-20 21:25:45 UTC (rev 11900)
+++ trunk/uClibc/libc/pwd_grp/pwd_grp.c 2005-10-20 21:39:48 UTC (rev 11901)
@@ -446,17 +446,20 @@
#endif
/**********************************************************************/
-#ifdef L_getpwent_r
+#if defined(L_getpwent_r) || defined(L_getgrent_r) || defined(L_getspent_r)
#ifdef __UCLIBC_HAS_THREADS__
static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
# define LOCK __pthread_mutex_lock(&mylock)
# define UNLOCK __pthread_mutex_unlock(&mylock);
-#else
+#else
# define LOCK ((void) 0)
# define UNLOCK ((void) 0)
-#endif
+#endif
+#endif
+#ifdef L_getpwent_r
+
static FILE *pwf /*= NULL*/;
void setpwent(void)
@@ -512,15 +515,6 @@
/**********************************************************************/
#ifdef L_getgrent_r
-#ifdef __UCLIBC_HAS_THREADS__
-static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
-# define LOCK __pthread_mutex_lock(&mylock)
-# define UNLOCK __pthread_mutex_unlock(&mylock);
-#else
-# define LOCK ((void) 0)
-# define UNLOCK ((void) 0)
-#endif
-
static FILE *grf /*= NULL*/;
void setgrent(void)
@@ -575,15 +569,6 @@
/**********************************************************************/
#ifdef L_getspent_r
-#ifdef __UCLIBC_HAS_THREADS__
-static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER;
-# define LOCK __pthread_mutex_lock(&mylock)
-# define UNLOCK __pthread_mutex_unlock(&mylock);
-#else
-# define LOCK ((void) 0)
-# define UNLOCK ((void) 0)
-#endif
-
static FILE *spf /*= NULL*/;
void setspent(void)
More information about the uClibc-cvs
mailing list