diff options
Diffstat (limited to 'libc/unistd/confstr.c')
| -rw-r--r-- | libc/unistd/confstr.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/libc/unistd/confstr.c b/libc/unistd/confstr.c index 67a9d585a..373644265 100644 --- a/libc/unistd/confstr.c +++ b/libc/unistd/confstr.c @@ -13,16 +13,14 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ #include <stddef.h> #include <errno.h> #include <unistd.h> #include <string.h> -/* Experimentally off - libc_hidden_proto(memcpy) */ #define CS_PATH "/bin:/usr/bin" @@ -43,6 +41,26 @@ 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 " \ + __stringify(__UCLIBC_MAJOR__) "." \ + __stringify(__UCLIBC_MINOR__) "." \ + __stringify(__UCLIBC_SUBLEVEL__)) + string = __NPTL_VERSION; + string_len = sizeof(__NPTL_VERSION); +# else +# error unable to determine thread impl +# endif + break; +#endif default: __set_errno (EINVAL); return 0; |
