diff options
author | Sébastien Wilmet <swilmet@gnome.org> | 2016-06-24 23:40:04 +0200 |
---|---|---|
committer | Sébastien Wilmet <swilmet@gnome.org> | 2016-06-24 23:46:36 +0200 |
commit | 9c48f5cb06b1937dc1aabf2e26fd03bccced5a24 (patch) | |
tree | 5a5c8f233c45e97289aa083bb18119454386258d /gtksourceview/gtksourcegutter.h | |
parent | 5f5478991938ff2373aaeeb078764a54a9b959f1 (diff) | |
download | gtksourceview-9c48f5cb06b1937dc1aabf2e26fd03bccced5a24.tar.gz |
Use #warning only with GNUC and use a pragma message on win32
#warning is not standard, apparently.
GLib surrounds #warning with #ifdef __GNUC__/#endif.
And follow:
https://en.wikipedia.org/wiki/C_preprocessor
for windows.
Diffstat (limited to 'gtksourceview/gtksourcegutter.h')
-rw-r--r-- | gtksourceview/gtksourcegutter.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtksourceview/gtksourcegutter.h b/gtksourceview/gtksourcegutter.h index 1d6d675c..3c00f9e3 100644 --- a/gtksourceview/gtksourcegutter.h +++ b/gtksourceview/gtksourcegutter.h @@ -23,7 +23,11 @@ #define GTK_SOURCE_GUTTER_H #if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION) -#warning "Only <gtksourceview/gtksource.h> can be included directly." +# if defined (__GNUC__) +# warning "Only <gtksourceview/gtksource.h> can be included directly." +# elif defined (G_OS_WIN32) +# pragma message("Only <gtksourceview/gtksource.h> can be included directly.") +# endif #endif #include <gtk/gtk.h> |