This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bits/libc-lock.h and _LIBC


Hi,

We install libc-lock.h into /usr/include/bits. But libc-lock.h is
only useable, if it is compiled with -D_LIBC, which breaks now with
libio.h.

I suggest the following patch, or is there any reason for the
ifdef _LIBC around __libc_lock_t ? We don't do this for __libc_key_t
and all the other definitions.

2002-10-17  Thorsten Kukuk  <kukuk@suse.de>

	* sysdeps/pthread/bits/libc-lock.h: Don't protect __libc_lock_t
	with _LIBC.

diff -u -r1.23 libc-lock.h
--- ./linuxthreads/sysdeps/pthread/bits/libc-lock.h
+++ ./linuxthreads/sysdeps/pthread/bits/libc-lock.h
@@ -24,19 +24,9 @@
 #include <pthread.h>
 
 /* Mutex type.  */
-#if defined(_LIBC) || defined(_IO_MTSAFE_IO)
 typedef pthread_mutex_t __libc_lock_t;
 typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
-# ifdef __USE_UNIX98
 typedef pthread_rwlock_t __libc_rwlock_t;
-# else
-typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
-# endif
-#else
-typedef struct __libc_lock_opaque__ __libc_lock_t;
-typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
-typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
-#endif
 
 /* Type for key to thread-specific data.  */
 typedef pthread_key_t __libc_key_t;


-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]