[uClibc-cvs] uClibc/libc/pwd_grp pwd_grp.c,1.5,1.6
Manuel Novoa III
mjn3 at uclibc.org
Wed Feb 11 23:48:44 UTC 2004
- Previous message: [uClibc-cvs] uClibc/libc/misc/wchar Makefile, 1.9, 1.10 wchar.c, 1.12, 1.13 wstdio.c, 1.5, 1.6
- Next message: [uClibc-cvs] uClibc/libc/stdlib abort.c, 1.16, 1.17 ptsname.c, 1.8, 1.9 stdlib.c, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/uClibc/libc/pwd_grp
In directory nail:/tmp/cvs-serv16121/libc/pwd_grp
Modified Files:
pwd_grp.c
Log Message:
New stdio core. Should be more maintainable. Fixes a couple of bugs.
Codepaths streamlined. Improved performance for nonthreaded apps
when linked with a thread-enabled libc.
Minor iconv bug and some locale/thread related startup issues fixed.
These showed up in getting a gcj-compiled java helloworld app running.
Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
Index: pwd_grp.c
===================================================================
RCS file: /var/cvs/uClibc/libc/pwd_grp/pwd_grp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pwd_grp.c 27 Dec 2003 23:30:39 -0000 1.5
+++ pwd_grp.c 11 Feb 2004 23:48:41 -0000 1.6
@@ -777,11 +777,12 @@
char **m;
const char *fmt;
int rv = -1;
+ __STDIO_AUTO_THREADLOCK_VAR;
if (!p || !f) { /* Sigh... glibc checks. */
__set_errno(EINVAL);
} else {
- __STDIO_THREADLOCK(f);
+ __STDIO_AUTO_THREADLOCK(f);
if (fprintf(f, "%s:%s:%lu:",
p->gr_name, p->gr_passwd,
@@ -809,7 +810,7 @@
}
- __STDIO_THREADUNLOCK(f);
+ __STDIO_AUTO_THREADUNLOCK(f);
}
return rv;
@@ -835,10 +836,11 @@
long int x;
int i;
int rv = -1;
+ __STDIO_AUTO_THREADLOCK_VAR;
/* Unlike putpwent and putgrent, glibc does not check the args. */
- __STDIO_THREADLOCK(stream);
+ __STDIO_AUTO_THREADLOCK(stream);
if (fprintf(stream, "%s:%s:", p->sp_namp,
(p->sp_pwdp ? p->sp_pwdp : "")) < 0
@@ -865,7 +867,7 @@
}
DO_UNLOCK:
- __STDIO_THREADUNLOCK(stream);
+ __STDIO_AUTO_THREADUNLOCK(stream);
return rv;
}
@@ -1117,11 +1119,12 @@
int line_len;
int skip;
int rv = ERANGE;
+ __STDIO_AUTO_THREADLOCK_VAR;
if (buflen < PWD_BUFFER_SIZE) {
__set_errno(rv);
} else {
- __STDIO_THREADLOCK(f);
+ __STDIO_AUTO_THREADLOCK(f);
skip = 0;
do {
@@ -1165,7 +1168,7 @@
}
} while (1);
- __STDIO_THREADUNLOCK(f);
+ __STDIO_AUTO_THREADUNLOCK(f);
}
return rv;
- Previous message: [uClibc-cvs] uClibc/libc/misc/wchar Makefile, 1.9, 1.10 wchar.c, 1.12, 1.13 wstdio.c, 1.5, 1.6
- Next message: [uClibc-cvs] uClibc/libc/stdlib abort.c, 1.16, 1.17 ptsname.c, 1.8, 1.9 stdlib.c, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the uClibc-cvs
mailing list