git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Windows: only add a no-op pthread_sigmask() when needed
@ 2016-05-10 13:00 Johannes Schindelin
  2016-05-10 17:57 ` Junio C Hamano
  2016-05-11 15:10 ` [PATCH v2] " Johannes Schindelin
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Schindelin @ 2016-05-10 13:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Johannes Sixt

In f924b52 (Windows: add pthread_sigmask() that does nothing,
2016-05-01), we introduced a no-op for Windows. However, this breaks
building Git in Git for Windows' SDK because pthread_sigmask() is
already a no-op there, #define'd in the pthread_signal.h header in
/mingw64/x86_64-w64-mingw32/include/.

Let's guard the definition of pthread_sigmask() in #ifndef...#endif to
make the code compile both with modern MinGW-w64 as well as with the
previously common MinGW headers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---

	This patch is obviously based on 'next' (because 'master' does not
	have the referenced commit yet).

Published-As: https://github.com/dscho/git/releases/tag/mingw-sigmask-v1
 compat/win32/pthread.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index d336451..8df702c 100644
--- a/compat/win32/pthread.h
+++ b/compat/win32/pthread.h
@@ -104,9 +104,11 @@ static inline void *pthread_getspecific(pthread_key_t key)
 	return TlsGetValue(key);
 }
 
+#ifndef pthread_sigmask
 static inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
 {
 	return 0;
 }
+#endif
 
 #endif /* PTHREAD_H */
-- 
2.8.2.463.g99156ee

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

end of thread, other threads:[~2016-05-11 21:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-10 13:00 [PATCH] Windows: only add a no-op pthread_sigmask() when needed Johannes Schindelin
2016-05-10 17:57 ` Junio C Hamano
2016-05-11 15:06   ` Johannes Schindelin
2016-05-11 21:01     ` Junio C Hamano
2016-05-11 15:10 ` [PATCH v2] " Johannes Schindelin

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 NNTP newsgroup(s).