mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
commit
9452b65680
5
changes/bug4437
Normal file
5
changes/bug4437
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes:
|
||||
- Don't warn about unused log_mutex in log.c when building with
|
||||
--disable-threads using a recent GCC. Fixes bug 4437; bugfix on
|
||||
0.1.0.6-rc which introduced --disable-threads.
|
||||
|
@ -180,6 +180,10 @@ extern INLINE double U64_TO_DBL(uint64_t x) {
|
||||
/** Expands to a syntactically valid empty statement. */
|
||||
#define STMT_NIL (void)0
|
||||
|
||||
/** Expands to a syntactically valid empty statement, explicitly (void)ing its
|
||||
* argument. */
|
||||
#define STMT_VOID(a) while (0) { (void)(a); }
|
||||
|
||||
#ifdef __GNUC__
|
||||
/** STMT_BEGIN and STMT_END are used to wrap blocks inside macros so that
|
||||
* the macro can be used as if it were a single C statement. */
|
||||
@ -618,7 +622,7 @@ void tor_threads_init(void);
|
||||
#else
|
||||
#define tor_mutex_new() ((tor_mutex_t*)tor_malloc(sizeof(int)))
|
||||
#define tor_mutex_init(m) STMT_NIL
|
||||
#define tor_mutex_acquire(m) STMT_NIL
|
||||
#define tor_mutex_acquire(m) STMT_VOID(m)
|
||||
#define tor_mutex_release(m) STMT_NIL
|
||||
#define tor_mutex_free(m) STMT_BEGIN tor_free(m); STMT_END
|
||||
#define tor_mutex_uninit(m) STMT_NIL
|
||||
|
Loading…
Reference in New Issue
Block a user