summaryrefslogtreecommitdiffstats
path: root/libc/unistd
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-04-06 17:17:30 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-04-06 17:17:30 +0200
commit384a55ef9f3387ed33eadab3eefe5057b4daeadb (patch)
tree6710b679948e5ed6a7bab77954187edbc422e3d4 /libc/unistd
parente1b4229b5a245fd1d7f1e97f71fec0e7897729c3 (diff)
downloaduClibc-alpine-384a55ef9f3387ed33eadab3eefe5057b4daeadb.tar.bz2
uClibc-alpine-384a55ef9f3387ed33eadab3eefe5057b4daeadb.tar.xz
getconf: print arbitrary GNU_LIBPTHREAD_VERSION string
the NPTL should probably print the version-string of the glibc it's compatible with and not the uClibc version (check what mysql expects). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/unistd')
-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;