This repository has been archived on 2026-09-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
gtkmathview/fix-cpp-headers.patch

46 lines
1.8 KiB
Diff

Index: gtkmathview-0.8.0/src/widget/gtkmathview_common.h
===================================================================
--- gtkmathview-0.8.0.orig/src/widget/gtkmathview_common.h
+++ gtkmathview-0.8.0/src/widget/gtkmathview_common.h
@@ -22,6 +22,17 @@
#include <gtk/gtkwidget.h>
+/* Include these outside the extern "c" bit */
+#if GTKMATHVIEW_USES_CUSTOM_READER
+#include "c_customXmlReader.h"
+#elif GTKMATHVIEW_USES_LIBXML2_READER
+#include <libxml/xmlreader.h>
+#elif GTKMATHVIEW_USES_LIBXML2
+#include <libxml/tree.h>
+#elif GTKMATHVIEW_USES_GMETADOM
+#include <gdome.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -45,23 +56,19 @@ extern "C" {
typedef void* GtkMathViewReaderData;
#if GTKMATHVIEW_USES_CUSTOM_READER
-#include "c_customXmlReader.h"
#define GTKMATHVIEW_METHOD_NAME(name) gtk_math_view_##name##__##custom_reader
typedef void* GtkMathViewModelId;
typedef const char* GtkMathViewModelString;
#elif GTKMATHVIEW_USES_LIBXML2_READER
-#include <libxml/xmlreader.h>
#define GTKMATHVIEW_METHOD_NAME(name) gtk_math_view_##name##__##libxml2_reader
typedef void* GtkMathViewModelId;
typedef const xmlChar* GtkMathViewModelString;
#elif GTKMATHVIEW_USES_LIBXML2
-#include <libxml/tree.h>
#define GTKMATHVIEW_METHOD_NAME(name) gtk_math_view_##name##__##libxml2
typedef xmlElement* GtkMathViewModelId;
typedef xmlDoc* GtkMathViewModelDocument;
typedef const xmlChar* GtkMathViewModelString;
#elif GTKMATHVIEW_USES_GMETADOM
-#include <gdome.h>
#define GTKMATHVIEW_METHOD_NAME(name) gtk_math_view_##name##__##gmetadom
typedef GdomeElement* GtkMathViewModelId;
typedef GdomeDocument* GtkMathViewModelDocument;