[PATCH] Fixes for _CS_GNU_* handling in confstr()
Alexandre Julliard
julliard@winehq.com
Wed Mar 5 02:45:00 GMT 2003
confstr() doesn't work quite right for the new _CS_GNU_*
constants. This should fix it.
2003-03-04 Alexandre Julliard <julliard@winehq.com>
* posix/confstr.c (confstr): Fix returned string length for
_CS_GNU_LIBC_VERSION and _CS_GNU_LIBPTHREAD_VERSION. Add missing
break in the _CS_GNU_LIBC_VERSION case.
Index: posix/confstr.c
===================================================================
RCS file: /cvs/glibc/libc/posix/confstr.c,v
retrieving revision 1.14
diff -u -r1.14 confstr.c
--- posix/confstr.c 12 Feb 2003 22:25:40 -0000 1.14
+++ posix/confstr.c 5 Mar 2003 02:06:28 -0000
@@ -143,12 +143,13 @@
case _CS_GNU_LIBC_VERSION:
string = "glibc " VERSION;
- string_len = strlen (string);
+ string_len = strlen (string) + 1;
+ break;
case _CS_GNU_LIBPTHREAD_VERSION:
#ifdef LIBPTHREAD_VERSION
string = LIBPTHREAD_VERSION;
- string_len = strlen (string);
+ string_len = strlen (string) + 1;
break;
#else
/* No thread library. */
--
Alexandre Julliard
julliard@winehq.com
More information about the Libc-alpha
mailing list