public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix <semaphore.h>
@ 2002-04-02 10:22 Jakub Jelinek
  2002-04-02 16:34 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2002-04-02 10:22 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

echo '#include <semaphore.h>' | gcc -std=c99 -xc -
fails because <bits/types.h> has:
/* Now add the thread types.  */
#if defined __USE_POSIX199506 || defined __USE_UNIX98
# include <bits/pthreadtypes.h>
#endif
so for ISO C99 _pthread_fastlock is not defined.
Below is one solution (assuming semaphore.h can bring in pthread types),
alternatively something like #ifdef _PTHREAD_FASTLOCK_DEFINED could be
used).

2002-04-02  Jakub Jelinek  <jakub@redhat.com>

	* semaphore.h: Include bits/pthreadtypes.h.

--- libc/linuxthreads/semaphore.h.jj	Mon Jun 25 10:34:10 2001
+++ libc/linuxthreads/semaphore.h	Tue Apr  2 20:25:27 2002
@@ -21,6 +21,7 @@
 # define __need_timespec
 # include <time.h>
 #endif
+#include <bits/pthreadtypes.h>
 
 #ifndef _PTHREAD_DESCR_DEFINED
 /* Thread descriptors.  Needed for `sem_t' definition.  */


	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-03  0:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-02 10:22 [PATCH] Fix <semaphore.h> Jakub Jelinek
2002-04-02 16:34 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).