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]

[PATCH] Fix recent <bits/stdio-lock.h> breakage (take 2)


On Sun, Aug 26, 2001 at 04:55:52PM -0400, Roland McGrath wrote:
> That seems kind of ugly to me, especially copying the type definitions.
> 
> Perhaps the simplest thing to do is treat _IO_MTSAFE_IO like _LIBC in
> libc-lock.h, so it defines all the real types when building libio.
> 
> That is sort of unkosher, but using libio's _IO_MTSAFE_IO like this in
> libc seems morally equivalent to libio's unkosher use of <bits/*.h> headers.

Agreed. Here is a patch for this:

2001-08-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
	non-opaque lock types also if _IO_MTSAFE_IO is defined.

--- libc/linuxthreads/sysdeps/pthread/bits/libc-lock.h.jj	Fri Aug 24 11:09:51 2001
+++ libc/linuxthreads/sysdeps/pthread/bits/libc-lock.h	Sun Aug 26 23:25:46 2001
@@ -23,7 +23,7 @@
 #include <pthread.h>
 
 /* Mutex type.  */
-#ifdef _LIBC
+#if defined(_LIBC) || defined(_IO_MTSAFE_IO)
 typedef pthread_mutex_t __libc_lock_t;
 typedef pthread_rwlock_t __libc_rwlock_t;
 typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;


	Jakub


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