summaryrefslogtreecommitdiff
path: root/libc/unistd/confstr.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2010-04-06 08:58:29 -0700
committerAustin Foxley <austinf@cetoncorp.com>2010-04-06 08:58:33 -0700
commitf10d127d36ada5b202cdea521e61b05522beb192 (patch)
tree44ae75bf0745de49fb46616afd4cf577cf7a258a /libc/unistd/confstr.c
parentc3af26045aa44286482fbfe93097f24b48cfb6a3 (diff)
parent384a55ef9f3387ed33eadab3eefe5057b4daeadb (diff)
Merge commit 'origin/master' into nptl
Conflicts: libc/misc/utmp/utent.c libc/sysdeps/linux/i386/bits/syscalls.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/unistd/confstr.c')
-rw-r--r--libc/unistd/confstr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libc/unistd/confstr.c b/libc/unistd/confstr.c
index 16b57bee9..957ee4d27 100644
--- a/libc/unistd/confstr.c
+++ b/libc/unistd/confstr.c
@@ -42,6 +42,24 @@ size_t confstr (int name, char *buf, size_t len)
string_len = sizeof (cs_path);
}
break;
+#ifdef __UCLIBC_HAS_THREADS__
+ case _CS_GNU_LIBPTHREAD_VERSION:
+# if defined __LINUXTHREADS_OLD__
+ string = "linuxthreads-0.01";
+ string_len = sizeof("linuxthreads-x.xx");
+# elif defined __LINUXTHREADS_NEW__
+ string = "linuxthreads-0.10";
+ string_len = sizeof("linuxthreads-x.xx");
+# elif defined __UCLIBC_HAS_THREADS_NATIVE__
+# define __NPTL_VERSION ("NPTL " \
+ #__UCLIBC_MAJOR__ "." \
+ #__UCLIBC_MINOR__ "." \
+ #__UCLIBC_SUBLEVEL__)
+ string = __NPTL_VERSION;
+ string_len = sizeof(__NPTL_VERSION);
+# endif
+ break;
+#endif
default:
__set_errno (EINVAL);
return 0;