[gtksourceview] Include config.h in all gtksourceview/**/*.c files
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Include config.h in all gtksourceview/**/*.c files
- Date: Mon, 17 Apr 2017 10:33:13 +0000 (UTC)
commit bbf4959a6b5535cfca48cc211b2c76e66d76f82f
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Apr 17 12:19:14 2017 +0200
Include config.h in all gtksourceview/**/*.c files
The gcu-include-config-h script has been used:
https://github.com/swilmet/gnome-c-utils
config.h needs to be included for _GTK_SOURCE_EXTERN, in every *.c file
where there is a public function. For simplicity, it's easier to include
config.h in all *.c files, so we are sure that we don't miss any public
function.
configure.ac | 6 +++++-
.../words/gtksourcecompletionwordsbuffer.c | 4 ++++
.../words/gtksourcecompletionwordslibrary.c | 4 ++++
.../words/gtksourcecompletionwordsproposal.c | 4 ++++
.../words/gtksourcecompletionwordsutils.c | 4 ++++
gtksourceview/gtksourcebufferinternal.c | 4 ++++
gtksourceview/gtksourcecompletioncontainer.c | 4 ++++
gtksourceview/gtksourceiter.c | 4 ++++
gtksourceview/gtksourcelanguage-parser-2.c | 8 ++++----
gtksourceview/gtksourcemarkssequence.c | 4 ++++
gtksourceview/gtksourcepixbufhelper.c | 4 ++++
gtksourceview/gtksourceundomanagerdefault.c | 4 ++++
gtksourceview/gtksourceutils.c | 8 ++++----
13 files changed, 53 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5a4407f..15b5d62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,7 +115,11 @@ if test "$enable_deprecations" = "no"; then
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
-# Symbol visibility handling
+# Symbol visibility handling.
+#
+# This requires to #include config.h in every *.c file where there is a public
+# symbol. As a simpler rule, it's easier to #include config.h in all
+# gtksourceview/**/*.c files, to be sure that we don't miss any public symbol.
HIDDEN_VISIBILITY_CFLAGS=""
case "$host" in
*-*-mingw*)
diff --git a/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c
b/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c
index 6da9832..0772064 100644
--- a/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c
+++ b/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c
@@ -19,6 +19,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcecompletionwordsbuffer.h"
#include "gtksourcecompletionwordsutils.h"
#include "gtksourceview/gtksourceregion.h"
diff --git a/gtksourceview/completion-providers/words/gtksourcecompletionwordslibrary.c
b/gtksourceview/completion-providers/words/gtksourcecompletionwordslibrary.c
index c9abdce..5f63e41 100644
--- a/gtksourceview/completion-providers/words/gtksourcecompletionwordslibrary.c
+++ b/gtksourceview/completion-providers/words/gtksourcecompletionwordslibrary.c
@@ -19,6 +19,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcecompletionwordslibrary.h"
#include <string.h>
diff --git a/gtksourceview/completion-providers/words/gtksourcecompletionwordsproposal.c
b/gtksourceview/completion-providers/words/gtksourcecompletionwordsproposal.c
index dde8218..cc3b57d 100644
--- a/gtksourceview/completion-providers/words/gtksourcecompletionwordsproposal.c
+++ b/gtksourceview/completion-providers/words/gtksourcecompletionwordsproposal.c
@@ -18,6 +18,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcecompletionwordsproposal.h"
struct _GtkSourceCompletionWordsProposalPrivate
diff --git a/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c
b/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c
index cbb365f..9cebca3 100644
--- a/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c
+++ b/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c
@@ -19,6 +19,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcecompletionwordsutils.h"
#include <string.h>
diff --git a/gtksourceview/gtksourcebufferinternal.c b/gtksourceview/gtksourcebufferinternal.c
index 3295f2e..f182db9 100644
--- a/gtksourceview/gtksourcebufferinternal.c
+++ b/gtksourceview/gtksourcebufferinternal.c
@@ -18,6 +18,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcebufferinternal.h"
#include "gtksourcebuffer.h"
#include "gtksourcesearchcontext.h"
diff --git a/gtksourceview/gtksourcecompletioncontainer.c b/gtksourceview/gtksourcecompletioncontainer.c
index 0d3d50f..d3393c4 100644
--- a/gtksourceview/gtksourcecompletioncontainer.c
+++ b/gtksourceview/gtksourcecompletioncontainer.c
@@ -29,6 +29,10 @@
* limit.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcecompletioncontainer.h"
#define UNREALIZED_WIDTH 350
diff --git a/gtksourceview/gtksourceiter.c b/gtksourceview/gtksourceiter.c
index f138ca9..7ca7516 100644
--- a/gtksourceview/gtksourceiter.c
+++ b/gtksourceview/gtksourceiter.c
@@ -18,6 +18,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourceiter.h"
/* GtkTextIter functions. Contains forward/backward functions for word
diff --git a/gtksourceview/gtksourcelanguage-parser-2.c b/gtksourceview/gtksourcelanguage-parser-2.c
index 2b499c8..77f8f7a 100644
--- a/gtksourceview/gtksourcelanguage-parser-2.c
+++ b/gtksourceview/gtksourcelanguage-parser-2.c
@@ -20,10 +20,6 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#undef ENABLE_DEBUG
#ifdef ENABLE_DEBUG
@@ -32,6 +28,10 @@
#define DEBUG(x)
#endif
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourceview-i18n.h"
#include "gtksourcebuffer.h"
#include "gtksourcelanguage.h"
diff --git a/gtksourceview/gtksourcemarkssequence.c b/gtksourceview/gtksourcemarkssequence.c
index e6e8e9f..e1c1487 100644
--- a/gtksourceview/gtksourcemarkssequence.c
+++ b/gtksourceview/gtksourcemarkssequence.c
@@ -18,6 +18,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcemarkssequence.h"
/* An object for storing GtkTextMarks. The text marks are sorted internally with
diff --git a/gtksourceview/gtksourcepixbufhelper.c b/gtksourceview/gtksourcepixbufhelper.c
index 4d3b127..e6ba062 100644
--- a/gtksourceview/gtksourcepixbufhelper.c
+++ b/gtksourceview/gtksourcepixbufhelper.c
@@ -18,6 +18,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourcepixbufhelper.h"
typedef enum _IconType
diff --git a/gtksourceview/gtksourceundomanagerdefault.c b/gtksourceview/gtksourceundomanagerdefault.c
index b82712b..1ca6702 100644
--- a/gtksourceview/gtksourceundomanagerdefault.c
+++ b/gtksourceview/gtksourceundomanagerdefault.c
@@ -22,6 +22,10 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourceundomanagerdefault.h"
#include <string.h>
#include "gtksourceundomanager.h"
diff --git a/gtksourceview/gtksourceutils.c b/gtksourceview/gtksourceutils.c
index bcb94d1..0789441 100644
--- a/gtksourceview/gtksourceutils.c
+++ b/gtksourceview/gtksourceutils.c
@@ -19,10 +19,6 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
/**
* SECTION:utils
* @title: GtkSourceUtils
@@ -31,6 +27,10 @@
* Utility functions.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "gtksourceutils.h"
#include <string.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]