1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

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 <wk@gnupg.org>
(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.
This commit is contained in:
Werner Koch 2013-11-15 09:08:58 +01:00
parent d8f0b83e4f
commit 0fc71f7277

View File

@ -171,7 +171,8 @@ typedef pth_mutex_t estream_mutex_t;
((pth_mutex_acquire (&(mutex), 1, NULL) == TRUE) ? 0 : -1) ((pth_mutex_acquire (&(mutex), 1, NULL) == TRUE) ? 0 : -1)
# define ESTREAM_MUTEX_INITIALIZE(mutex) \ # define ESTREAM_MUTEX_INITIALIZE(mutex) \
pth_mutex_init (&(mutex)) pth_mutex_init (&(mutex))
#else
#else /*!HAVE_NPTH*/
typedef void *estream_mutex_t; 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_INITIALIZER NULL
# define ESTREAM_MUTEX_LOCK(mutex) dummy_mutex_call_void ((mutex)) # 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_TRYLOCK(mutex) dummy_mutex_call_int ((mutex))
# define ESTREAM_MUTEX_INITIALIZE(mutex) dummy_mutex_call_void ((mutex)) # define ESTREAM_MUTEX_INITIALIZE(mutex) dummy_mutex_call_int ((mutex))
#endif
#endif /*!HAVE_NPTH*/
/* Primitive system I/O. */ /* Primitive system I/O. */