mate_grammar.lemon:
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 7 Aug 2011 18:35:36 +0000 (18:35 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 7 Aug 2011 18:35:36 +0000 (18:35 +0000)
- Fix a bug my previous patch introduced.

mate/:
- Unset G_DISABLE_DEPRECATED for the mate files.

CMakeLists.txt
configure.in:
- Build with -DG_DISABLE_DEPRECATED so further usage of
  deprecated glib functions will be detected.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38393 f5534014-38df-0310-8fa8-9805f1628bb7

CMakeLists.txt
configure.in
plugins/mate/mate.h
plugins/mate/mate_grammar.lemon
plugins/mate/mate_parser.l

index 8e8329825cd8822d3a5caf6092e17dd7fda9c3fa..32051badfd97241259560ee46d3664800736d27f 100644 (file)
@@ -27,9 +27,11 @@ cmake_minimum_required(VERSION 2.6)
 set(CMAKE_BACKWARDS_COMPATIBILITY 2.6)
 
 # Needs to be set after cmake_minimum_required or cmake_policy(VERSION)
-#if(COMMAND cmake_policy)
+if(COMMAND cmake_policy)
+       # Backward compatibility for versions < 2.6.3
+       cmake_policy(SET CMP0011 OLD)
 #      cmake_policy(SET CMP0015 NEW)
-#endif(COMMAND cmake_policy)
+endif(COMMAND cmake_policy)
 
 # set(PROJECT_VERSION "1.3.4-rc5")
 # set(PROJECT_VERSION "1.3.4rc5")
@@ -158,6 +160,7 @@ endif()
 
 add_definitions(
        -DHAVE_CONFIG_H
+       -DG_DISABLE_DEPRECATED
 )
 
 # Counterhack to work around some cache magic in CHECK_C_SOURCE_COMPILES
index e171b7cdc6ff981fbf7798bf9c1802f61a694c36..a522a1d31f70579a1791172b880efd0c7a548c95 100644 (file)
@@ -885,6 +885,8 @@ AC_MSG_CHECKING(whether GLib supports loadable modules)
 ac_save_CFLAGS="$CFLAGS"
 ac_save_LIBS="$LIBS"
 CFLAGS="$CFLAGS $GLIB_CFLAGS"
+# Error out on the usage of deprecated glib functions
+CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
 LIBS="$GLIB_LIBS $LIBS"
 AC_TRY_RUN([
 #include <glib.h>
index 4d062808ad8b35fcf0cefe6d480176e5d34a5aea..5f38953fc93933e96bf9acb418958685bd62910e 100644 (file)
@@ -32,6 +32,8 @@
 # include "config.h"
 #endif
 
+#undef G_DISABLE_DEPRECATED
+
 #ifndef ENABLE_STATIC
 #include "moduleinfo.h"
 #include <gmodule.h>
index f6236ba766d6cc0e8d3c9d5fa3bc4b7731784f52..a783740c6e1f10b5daa51e4967510dd0602c7035 100644 (file)
@@ -132,7 +132,7 @@ static gchar* recolonize(mate_config* mc, gchar* s) {
        vec = g_strsplit(s,":",0);
 
        for (i = 0; vec[i]; i++) {
-               g_ascii_strdown(vec[i]);
+               g_ascii_strdown(vec[i], -1);
 
                v = 0;
                switch ( strlen(vec[i]) ) {
index 4fb4b509e972f1e279d9fd30a29eee0c75fa9c6a..792e6b7fa5ecae9d951db72fb6def958c1c93371 100644 (file)
        * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
        */
 
-#include <wsutil/file_util.h>
-
 #include "mate.h"
 #include "mate_grammar.h"
 #include "mate_parser_lex.h"
 
+#include <wsutil/file_util.h>
+
 #ifdef _WIN32
 /* disable Windows VC compiler warning "signed/unsigned mismatch" associated  */
 /* with YY_INPUT code generated by flex versions such as 2.5.35.              */