summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-05-02 20:45:17 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-05-02 20:45:17 +0000
commit7a76168b662c4e4fa0eec3859e500cb0b2ac65e7 (patch)
tree96ca0c74513f1ec8e442b8ee0b3fe9ef64ff3ece /libs/pbd
parenta562e5f7f2c9c10bfabb100efa15783260573f39 (diff)
more fixes/tweaks from the land of the lion
git-svn-id: svn://localhost/ardour2/branches/3.0@12150 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/convert.cc8
-rw-r--r--libs/pbd/pbd/semaphore.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/libs/pbd/convert.cc b/libs/pbd/convert.cc
index 07407e2fad..1787d3b70d 100644
--- a/libs/pbd/convert.cc
+++ b/libs/pbd/convert.cc
@@ -28,6 +28,8 @@
#endif
#include <inttypes.h>
+#include <glib.h>
+
#include "pbd/convert.h"
#include "i18n.h"
@@ -264,15 +266,15 @@ string_is_affirmative (const std::string& str)
return false;
}
- /* the use of g_strncasecmp() is solely to get around issues with
+ /* the use of g_ascii_strncasecmp() is solely to get around issues with
* charsets posed by trying to use C++ for the same
* comparison. switching a std::string to its lower- or upper-case
* version has several issues, but handled by default
* in the way we desire when doing it in C.
*/
- return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())) ||
- (!g_strncasecmp(str.c_str(), "true", str.length()));
+ return str == "1" || str == "y" || str == "Y" || (!g_ascii_strncasecmp(str.c_str(), "yes", str.length())) ||
+ (!g_ascii_strncasecmp(str.c_str(), "true", str.length()));
}
/** A wrapper for dgettext that takes a msgid of the form Context|Text.
diff --git a/libs/pbd/pbd/semaphore.h b/libs/pbd/pbd/semaphore.h
index f1b07ea4f5..51e0ae409d 100644
--- a/libs/pbd/pbd/semaphore.h
+++ b/libs/pbd/pbd/semaphore.h
@@ -81,7 +81,7 @@ private:
inline
Semaphore::Semaphore(unsigned initial)
{
- if (semaphore_create(mach_task_self(), &sem->sem, SYNC_POLICY_FIFO, 0)) {
+ if (semaphore_create(mach_task_self(), &_sem, SYNC_POLICY_FIFO, initial)) {
throw failed_constructor();
}
}