[libsoup/wip/nacho/soup-extern: 8/12] Provide a _SOUP_EXTERN so we ensure the methods get externalized



commit 21b7971f474ceba9276c78e2bf52adfa0e21a607
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Oct 26 15:47:13 2015 +0100

    Provide a _SOUP_EXTERN so we ensure the methods get externalized
    
    Change the defines to endup using _SOUP_EXTERN so we get
    them externalized.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757146

 libsoup/soup-version.h.in |   70 +++++++++++++++++++++++++-------------------
 1 files changed, 40 insertions(+), 30 deletions(-)
---
diff --git a/libsoup/soup-version.h.in b/libsoup/soup-version.h.in
index 86a352d..399a4ba 100644
--- a/libsoup/soup-version.h.in
+++ b/libsoup/soup-version.h.in
@@ -8,6 +8,10 @@
 #ifndef SOUP_VERSION_H
 #define SOUP_VERSION_H
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <glib.h>
 
 G_BEGIN_DECLS
@@ -22,6 +26,10 @@ G_BEGIN_DECLS
     (SOUP_MAJOR_VERSION == (major) && SOUP_MINOR_VERSION == (minor) && \
      SOUP_MICRO_VERSION >= (micro)))
 
+#ifndef _SOUP_EXTERN
+#define _SOUP_EXTERN extern
+#endif
+
 guint    soup_get_major_version (void);
 
 guint    soup_get_minor_version (void);
@@ -89,6 +97,8 @@ gboolean soup_check_version     (guint major,
 #error "SOUP_VERSION_MIN_REQUIRED must be >= SOUP_VERSION_2_24"
 #endif
 
+#define SOUP_AVAILABLE_IN_2_4                   _SOUP_EXTERN
+
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_24
 # define SOUP_DEPRECATED_IN_2_24                G_DEPRECATED
 # define SOUP_DEPRECATED_IN_2_24_FOR(f)         G_DEPRECATED_FOR(f)
@@ -98,9 +108,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_24
-# define SOUP_AVAILABLE_IN_2_24                 GLIB_UNAVAILABLE(2, 24)
+# define SOUP_AVAILABLE_IN_2_24                 G_UNAVAILABLE(2, 24)
 #else
-# define SOUP_AVAILABLE_IN_2_24
+# define SOUP_AVAILABLE_IN_2_24                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_26
@@ -112,9 +122,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_26
-# define SOUP_AVAILABLE_IN_2_26                 GLIB_UNAVAILABLE(2, 26)
+# define SOUP_AVAILABLE_IN_2_26                 G_UNAVAILABLE(2, 26)
 #else
-# define SOUP_AVAILABLE_IN_2_26
+# define SOUP_AVAILABLE_IN_2_26                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_28
@@ -126,9 +136,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_28
-# define SOUP_AVAILABLE_IN_2_28                 GLIB_UNAVAILABLE(2, 28)
+# define SOUP_AVAILABLE_IN_2_28                 G_UNAVAILABLE(2, 28)
 #else
-# define SOUP_AVAILABLE_IN_2_28
+# define SOUP_AVAILABLE_IN_2_28                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_30
@@ -140,9 +150,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_30
-# define SOUP_AVAILABLE_IN_2_30                 GLIB_UNAVAILABLE(2, 30)
+# define SOUP_AVAILABLE_IN_2_30                 G_UNAVAILABLE(2, 30)
 #else
-# define SOUP_AVAILABLE_IN_2_30
+# define SOUP_AVAILABLE_IN_2_30                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_32
@@ -154,9 +164,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_32
-# define SOUP_AVAILABLE_IN_2_32                 GLIB_UNAVAILABLE(2, 32)
+# define SOUP_AVAILABLE_IN_2_32                 G_UNAVAILABLE(2, 32)
 #else
-# define SOUP_AVAILABLE_IN_2_32
+# define SOUP_AVAILABLE_IN_2_32                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_34
@@ -168,9 +178,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_34
-# define SOUP_AVAILABLE_IN_2_34                 GLIB_UNAVAILABLE(2, 34)
+# define SOUP_AVAILABLE_IN_2_34                 G_UNAVAILABLE(2, 34)
 #else
-# define SOUP_AVAILABLE_IN_2_34
+# define SOUP_AVAILABLE_IN_2_34                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_36
@@ -182,9 +192,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_36
-# define SOUP_AVAILABLE_IN_2_36                 GLIB_UNAVAILABLE(2, 36)
+# define SOUP_AVAILABLE_IN_2_36                 G_UNAVAILABLE(2, 36)
 #else
-# define SOUP_AVAILABLE_IN_2_36
+# define SOUP_AVAILABLE_IN_2_36                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_38
@@ -196,9 +206,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_38
-# define SOUP_AVAILABLE_IN_2_38                 GLIB_UNAVAILABLE(2, 38)
+# define SOUP_AVAILABLE_IN_2_38                 G_UNAVAILABLE(2, 38)
 #else
-# define SOUP_AVAILABLE_IN_2_38
+# define SOUP_AVAILABLE_IN_2_38                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_40
@@ -210,9 +220,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_40
-# define SOUP_AVAILABLE_IN_2_40                 GLIB_UNAVAILABLE(2, 40)
+# define SOUP_AVAILABLE_IN_2_40                 G_UNAVAILABLE(2, 40)
 #else
-# define SOUP_AVAILABLE_IN_2_40
+# define SOUP_AVAILABLE_IN_2_40                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_42
@@ -224,9 +234,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_42
-# define SOUP_AVAILABLE_IN_2_42                 GLIB_UNAVAILABLE(2, 42)
+# define SOUP_AVAILABLE_IN_2_42                 G_UNAVAILABLE(2, 42)
 #else
-# define SOUP_AVAILABLE_IN_2_42
+# define SOUP_AVAILABLE_IN_2_42                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_44
@@ -238,9 +248,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_44
-# define SOUP_AVAILABLE_IN_2_44                 GLIB_UNAVAILABLE(2, 44)
+# define SOUP_AVAILABLE_IN_2_44                 G_UNAVAILABLE(2, 44)
 #else
-# define SOUP_AVAILABLE_IN_2_44
+# define SOUP_AVAILABLE_IN_2_44                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_46
@@ -252,9 +262,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_46
-# define SOUP_AVAILABLE_IN_2_46                 GLIB_UNAVAILABLE(2, 46)
+# define SOUP_AVAILABLE_IN_2_46                 G_UNAVAILABLE(2, 46)
 #else
-# define SOUP_AVAILABLE_IN_2_46
+# define SOUP_AVAILABLE_IN_2_46                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_48
@@ -266,9 +276,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_48
-# define SOUP_AVAILABLE_IN_2_48                 GLIB_UNAVAILABLE(2, 48)
+# define SOUP_AVAILABLE_IN_2_48                 G_UNAVAILABLE(2, 48)
 #else
-# define SOUP_AVAILABLE_IN_2_48
+# define SOUP_AVAILABLE_IN_2_48                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_50
@@ -280,9 +290,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_50
-# define SOUP_AVAILABLE_IN_2_50                 GLIB_UNAVAILABLE(2, 50)
+# define SOUP_AVAILABLE_IN_2_50                 G_UNAVAILABLE(2, 50)
 #else
-# define SOUP_AVAILABLE_IN_2_50
+# define SOUP_AVAILABLE_IN_2_50                 _SOUP_EXTERN
 #endif
 
 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_52
@@ -294,9 +304,9 @@ gboolean soup_check_version     (guint major,
 #endif
 
 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_52
-# define SOUP_AVAILABLE_IN_2_52                 GLIB_UNAVAILABLE(2, 52)
+# define SOUP_AVAILABLE_IN_2_52                 G_UNAVAILABLE(2, 52)
 #else
-# define SOUP_AVAILABLE_IN_2_52
+# define SOUP_AVAILABLE_IN_2_52                 _SOUP_EXTERN
 #endif
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]