bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH 2/4] thread: port --enable-gcc-warnings to clang


From: Paul Eggert
Subject: [PATCH 2/4] thread: port --enable-gcc-warnings to clang
Date: Wed, 15 May 2013 20:53:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

 ChangeLog             | 4 ++++
 lib/glthread/thread.h | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 3544972..fbd47fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-05-15  Paul Eggert  <address@hidden>
 
+       thread: port --enable-gcc-warnings to clang
+       * lib/glthread/thread.h [__clang__ && USE_POSIX_THREADS_WEAK]:
+       Include <signal.h>, to pacify a warning about pthread_sigmask.
+
        stdio: use __REDIRECT for fwrite, fwrite_unlocked
        * lib/stdio.in.h (fwrite):
        When working around bug 11959, use __REDIRECT rather than '#define
diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h
index 166a50c..e52b615 100644
--- a/lib/glthread/thread.h
+++ b/lib/glthread/thread.h
@@ -120,7 +120,13 @@ extern int glthread_in_use (void);
    address of a function in libpthread that we don't use.  */
 
 #  pragma weak pthread_create
+
+#  ifdef __clang__
+  /* Without this, clang complains that pthread_sigmask is never declared.  */
+#   include <signal.h>
+#  endif
 #  pragma weak pthread_sigmask
+
 #  pragma weak pthread_join
 #  ifndef pthread_self
 #   pragma weak pthread_self
-- 
1.7.11.7





reply via email to

[Prev in Thread] Current Thread [Next in Thread]