Bug#324338: pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE not available?
Package: libc6-dev
Version: 2.3.5-4
Hi,
compiling this simple (non functional) test program
#include <pthread.h>
int main() {
pthread_mutexattr_t attr;
pthread_mutexattr_settype(&attr,0);
}
generates this warning:
~$ gcc foo.c -lpthread -Wall
foo.c: In function 'main':
foo.c:4: warning: implicit declaration of function 'pthread_mutexattr_settype'
foo.c:5: warning: control reaches end of non-void function
but the linking "works" and the symbol shows up as:
U pthread_mutexattr_settype@@GLIBC_2.1
in nm a.out output. i'm not proficient enough to judge what exactly this
means :)
But this code
#include <pthread.h>
int main() {
pthread_mutexattr_t attr;
phread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
}
gives me:
~$ gcc foo.c -lpthread -Wall
foo.c: In function 'main':
foo.c:5: warning: implicit declaration of function 'phread_mutexattr_settype'
foo.c:5: error: 'PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function)
foo.c:5: error: (Each undeclared identifier is reported only once
foo.c:5: error: for each function it appears in.)
foo.c:6: warning: control reaches end of non-void function
So something is broken, no?
Regards,
Florian Schmidt
P.S.:
~$ uname -a
Linux mango.fruits.de 2.6.13-rc4-RT-V0.7.52-10 #1 Wed Aug 3 19:55:31 CEST 2005 i686 GNU/Linux
~$ /lib/libc-2.3.5.so
GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.0.2 20050725 (prerelease) (Debian 4.0.1-3).
Compiled on a Linux 2.6.13 system on 2005-08-19.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - what's up with that?
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
~$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.5
^^^^^^^^^^ - and with this?
--
Palimm Palimm!
http://tapas.affenbande.org
Reply to: