From 0fc71f7277c6f833f838bbd384f1a22d0c333e8e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 15 Nov 2013 09:08:58 +0100 Subject: common: Fix build problem with Sun Studio compiler. * common/estream.c (ESTREAM_MUTEX_UNLOCK): Use int dummy dummy functions. (ESTREAM_MUTEX_INITIALIZE): Ditto. -- GnuPG-bug-id: 1566 Signed-off-by: Werner Koch (cherry picked from commit 571bcd4662a351cfa55bbf1a79ed1bc26da5780f) Reolved conflicts: common/estream.c Warning: estream.c still uses pth_mutex_* which is definitely wrong. Needs to be investigated. --- common/estream.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/estream.c b/common/estream.c index 79e3efbb1..9c15100f0 100644 --- a/common/estream.c +++ b/common/estream.c @@ -171,7 +171,8 @@ typedef pth_mutex_t estream_mutex_t; ((pth_mutex_acquire (&(mutex), 1, NULL) == TRUE) ? 0 : -1) # define ESTREAM_MUTEX_INITIALIZE(mutex) \ pth_mutex_init (&(mutex)) -#else + +#else /*!HAVE_NPTH*/ typedef void *estream_mutex_t; @@ -190,10 +191,11 @@ dummy_mutex_call_int (estream_mutex_t mutex) # define ESTREAM_MUTEX_INITIALIZER NULL # define ESTREAM_MUTEX_LOCK(mutex) dummy_mutex_call_void ((mutex)) -# define ESTREAM_MUTEX_UNLOCK(mutex) dummy_mutex_call_void ((mutex)) +# define ESTREAM_MUTEX_UNLOCK(mutex) dummy_mutex_call_int ((mutex)) # define ESTREAM_MUTEX_TRYLOCK(mutex) dummy_mutex_call_int ((mutex)) -# define ESTREAM_MUTEX_INITIALIZE(mutex) dummy_mutex_call_void ((mutex)) -#endif +# define ESTREAM_MUTEX_INITIALIZE(mutex) dummy_mutex_call_int ((mutex)) + +#endif /*!HAVE_NPTH*/ /* Primitive system I/O. */ -- cgit v1.2.3