fixes PYConfig.cc
authorPeng Wu <alexepico@gmail.com>
Sun, 29 Jan 2012 02:20:35 +0000 (10:20 +0800)
committerPeng Wu <alexepico@gmail.com>
Sun, 29 Jan 2012 02:20:35 +0000 (10:20 +0800)
src/PYConfig.cc
src/PYPConfig.cc

index 1373607..9d29aba 100644 (file)
  */
 #include "PYConfig.h"
 
+#include <strings.h>
 #include "PYTypes.h"
 #include "PYBus.h"
 #include "PYDoublePinyinTable.h"
 
+#ifdef HAVE_IBUS_CONFIG_GET_VALUES
+/* work around gsettings. */
+static bool operator == (const gchar *lhs, const std::string &rhs)
+{
+    return strcasecmp (lhs, rhs.c_str ()) == 0;
+}
+#endif
+
 namespace PY {
 
 const gchar * const CONFIG_CORRECT_PINYIN            = "CorrectPinyin";
index 415e396..155a637 100644 (file)
@@ -27,7 +27,7 @@
 
 #ifdef HAVE_IBUS_CONFIG_GET_VALUES
 /* work around gsettings. */
-bool operator == (const gchar *lhs, const std::string &rhs)
+static bool operator == (const gchar *lhs, const std::string &rhs)
 {
     return strcasecmp (lhs, rhs.c_str ()) == 0;
 }