From 3ff104ba302d7cccbdf21014e68ab4cfff468d5c Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 7 Jul 2014 00:38:37 -0700 Subject: [PATCH] Rename lock_t to mutex_lock_t to fix Solaris compilation Fixes #1510 --- common.cpp | 2 +- common.h | 8 ++++---- parse_util.cpp | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common.cpp b/common.cpp index 81d7b8396..001eab0fc 100644 --- a/common.cpp +++ b/common.cpp @@ -2225,7 +2225,7 @@ scoped_lock::scoped_lock(pthread_mutex_t &mutex) : lock_obj(&mutex), locked(fals this->lock(); } -scoped_lock::scoped_lock(lock_t &lock) : lock_obj(&lock.mutex), locked(false) +scoped_lock::scoped_lock(mutex_lock_t &lock) : lock_obj(&lock.mutex), locked(false) { this->lock(); } diff --git a/common.h b/common.h index ca4c83371..ff12760d5 100644 --- a/common.h +++ b/common.h @@ -538,16 +538,16 @@ public: bool is_forked_child(); -class lock_t +class mutex_lock_t { public: pthread_mutex_t mutex; - lock_t() + mutex_lock_t() { pthread_mutex_init(&mutex, NULL); } - ~lock_t() + ~mutex_lock_t() { pthread_mutex_destroy(&mutex); } @@ -567,7 +567,7 @@ public: void lock(void); void unlock(void); scoped_lock(pthread_mutex_t &mutex); - scoped_lock(lock_t &lock); + scoped_lock(mutex_lock_t &lock); ~scoped_lock(); }; diff --git a/parse_util.cpp b/parse_util.cpp index ae7d7e5fb..26e864a83 100644 --- a/parse_util.cpp +++ b/parse_util.cpp @@ -1197,6 +1197,7 @@ parser_test_error_bits_t parse_util_detect_errors_in_argument(const parse_node_t err=1; if (out_errors) { + fprintf(stderr, "HELLO!\n"); parse_util_expand_variable_error(node, unesc, idx, node.source_start, out_errors); } }