[libxml++] Disable deprecated API in dependencies if --enable-warnings=fatal
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml++] Disable deprecated API in dependencies if --enable-warnings=fatal
- Date: Wed, 4 Mar 2015 09:57:42 +0000 (UTC)
commit 09ca556d780fb3dad8cf9d8a1b37d3228fecaba0
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Wed Mar 4 10:53:23 2015 +0100
Disable deprecated API in dependencies if --enable-warnings=fatal
* configure.ac: Disable deprecated API in glib, glibmm and libsigc++ when
building with --enable-warnings=fatal.
* libxml++/validators/parser.cc: Put #include <glibmm/threads.h> first.
Necessary when G_DISABLE_DEPRECATED is defined.
configure.ac | 3 ++-
libxml++/parsers/parser.cc | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index fe880bf..6f69f81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,8 @@ MM_ARG_WITH_TAGFILE_DOC([glibmm-2.4.tag], [glibmm-2.4])
# Evaluate the --enable-warnings=level option.
MM_ARG_ENABLE_WARNINGS([LIBXMLXX_WXXFLAGS],
[-Wall],
- [-pedantic -Wall -Wextra -Wno-long-long])
+ [-pedantic -Wall -Wextra -Wno-long-long],
+ [G GLIBMM SIGCXX])
# Offer the ability to omit some API from the library.
MM_ARG_DISABLE_DEPRECATED_API([LIBXMLXX])
diff --git a/libxml++/parsers/parser.cc b/libxml++/parsers/parser.cc
index e32567e..f6f4fce 100644
--- a/libxml++/parsers/parser.cc
+++ b/libxml++/parsers/parser.cc
@@ -4,13 +4,16 @@
* included with libxml++ as the file COPYING.
*/
+// Include glibmm/threads.h first. It must be the first file to include glib.h,
+// because it temporarily undefines G_DISABLE_DEPRECATED while it includes glib.h.
+#include <glibmm/threads.h> // For Glib::Threads::Mutex. Needed until the next API/ABI break.
+
#include "libxml++/parsers/parser.h"
#include <libxml/parser.h>
#include <memory> //For auto_ptr.
#include <map>
-#include <glibmm/threads.h> // For Glib::Threads::Mutex. Needed until the next API/ABI break.
//TODO: See several TODOs in parser.h for changes at the next API/ABI break.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]