[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: pthread_rwlock_t & __USE_UNIX98 problem



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hu, Boris wrote:
> arm-linux-gcc -g -c tst-rwlock1.c  -I../sysdeps/pthread 
> -I../sysdeps/unix/sysv/linux/arm
> tst-rwlock1.c:27: `pthread_rwlock_t' undeclared (first use in this function)
> tst-rwlock1.c:27: (Each undeclared identifier is reported only once
> tst-rwlock1.c:27: for each function it appears in.)
> tst-rwlock1.c:27: parse error before "r"
> tst-rwlock1.c:30: `r' undeclared (first use in this function)
> 
> Check  /nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h.
> We could find the pthread_rwlock_t is protected by 
> __USE_UNIX98.  We could compile tst-rwlock1.c with 
> -D_GNU_SOURCE or -D_XOPEN_SOURCE=500 but how about the 
> nptl library's compilation?

I don't understand.  nptl compiles just fine.  All of glibc is compiled
with _GNU_SOURCE defined.  rwlocks were not par tof the original POSIX
threads and therefore have to be protected.


> another strange problem is that I add the following line
> to sysdeps/geneic/lib-start.c
> printf("  %p \n" __pthread_initialize_minimal );
> 
> output is (nil) to run tst-rwlock1 while it has a specified value when 
> run other test cases. 

Only when you link statically and then there is nothing strange about
it.  The program doesn't create threads.  So, no initialization necessary.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+Zo2F2ijCOnn/RHQRAjNJAJ4pIJ6jlqp1sp8A4w/H9DGgJbliKQCggRNh
oDrTWG6Wf0/Xf7FAJxpP2pM=
=mGfZ
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]