X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fgversionmacros.h;h=403fca0afb1e4601aa7ec9fe284ed6b826501e49;hb=30ed5f53e205e6bfc35126a9d3c62dac8a9c5dad;hp=fd675d8ce303f2be626e872e6d0d3f592fe517e7;hpb=40f0f66151c09a02b6355c7da02af081c30dd586;p=platform%2Fupstream%2Fglib.git diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h index fd675d8..403fca0 100644 --- a/glib/gversionmacros.h +++ b/glib/gversionmacros.h @@ -12,9 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library; if not, see . */ /* @@ -24,13 +22,13 @@ * GLib at ftp://ftp.gtk.org/pub/gtk/. */ +#ifndef __G_VERSION_MACROS_H__ +#define __G_VERSION_MACROS_H__ + #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) #error "Only can be included directly." #endif -#ifndef __G_VERSION_MACROS_H__ -#define __G_VERSION_MACROS_H__ - /* Version boundaries checks */ #define G_ENCODE_VERSION(major,minor) ((major) << 16 | (minor) << 8) @@ -87,6 +85,46 @@ */ #define GLIB_VERSION_2_34 (G_ENCODE_VERSION (2, 34)) +/** + * GLIB_VERSION_2_36: + * + * A macro that evaluates to the 2.36 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.36 + */ +#define GLIB_VERSION_2_36 (G_ENCODE_VERSION (2, 36)) + +/** + * GLIB_VERSION_2_38: + * + * A macro that evaluates to the 2.38 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.38 + */ +#define GLIB_VERSION_2_38 (G_ENCODE_VERSION (2, 38)) + +/** + * GLIB_VERSION_2_40: + * + * A macro that evaluates to the 2.40 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.40 + */ +#define GLIB_VERSION_2_40 (G_ENCODE_VERSION (2, 40)) + +/** + * GLIB_VERSION_2_42: + * + * A macro that evaluates to the 2.42 version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.42 + */ +#define GLIB_VERSION_2_42 (G_ENCODE_VERSION (2, 42)) + /* evaluates to the current stable version; for development cycles, * this means the next stable target */ @@ -111,11 +149,13 @@ * The definition should be one of the predefined GLib version * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... * - * This macro defines the lower bound for the GLib API to use. + * This macro defines the earliest version of GLib that the package is + * required to be able to compile against. * - * If a function has been deprecated in a newer version of GLib, - * it is possible to use this symbol to avoid the compiler warnings - * without disabling warning for every deprecated function. + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions that were deprecated in version + * %GLIB_VERSION_MIN_REQUIRED or earlier will cause warnings (but + * using functions deprecated in later releases will not). * * Since: 2.32 */ @@ -138,11 +178,16 @@ * The definition should be one of the predefined GLib version * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... * - * This macro defines the upper bound for the GLib API to use. + * This macro defines the latest version of the GLib API that the + * package is allowed to make use of. * - * If a function has been introduced in a newer version of GLib, - * it is possible to use this symbol to get compiler warnings when - * trying to use that function. + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions added after version + * %GLIB_VERSION_MAX_ALLOWED will cause warnings. + * + * Unless you are using GLIB_CHECK_VERSION() or the like to compile + * different code depending on the GLib version, then this should be + * set to the same value as %GLIB_VERSION_MIN_REQUIRED. * * Since: 2.32 */ @@ -167,6 +212,7 @@ * do *not* use them in other projects. Instead, use G_DEPRECATED * or define your own wrappers around it. */ +#define GLIB_AVAILABLE_IN_ALL _GLIB_EXTERN /* XXX: Every new stable minor release should add a set of macros here */ @@ -174,70 +220,126 @@ # define GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_26 -# define GLIB_DEPRECATED_IN_2_26_FOR(f) +# define GLIB_DEPRECATED_IN_2_26 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_26_FOR(f) _GLIB_EXTERN #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 # define GLIB_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) #else -# define GLIB_AVAILABLE_IN_2_26 +# define GLIB_AVAILABLE_IN_2_26 _GLIB_EXTERN #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 # define GLIB_DEPRECATED_IN_2_28 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_28 -# define GLIB_DEPRECATED_IN_2_28_FOR(f) +# define GLIB_DEPRECATED_IN_2_28 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_28_FOR(f) _GLIB_EXTERN #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 # define GLIB_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) #else -# define GLIB_AVAILABLE_IN_2_28 +# define GLIB_AVAILABLE_IN_2_28 _GLIB_EXTERN #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 # define GLIB_DEPRECATED_IN_2_30 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_30 -# define GLIB_DEPRECATED_IN_2_30_FOR(f) +# define GLIB_DEPRECATED_IN_2_30 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_30_FOR(f) _GLIB_EXTERN #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 # define GLIB_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) #else -# define GLIB_AVAILABLE_IN_2_30 +# define GLIB_AVAILABLE_IN_2_30 _GLIB_EXTERN #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 # define GLIB_DEPRECATED_IN_2_32 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_32 -# define GLIB_DEPRECATED_IN_2_32_FOR(f) +# define GLIB_DEPRECATED_IN_2_32 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_32_FOR(f) _GLIB_EXTERN #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 # define GLIB_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) #else -# define GLIB_AVAILABLE_IN_2_32 +# define GLIB_AVAILABLE_IN_2_32 _GLIB_EXTERN #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 # define GLIB_DEPRECATED_IN_2_34 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR(f) #else -# define GLIB_DEPRECATED_IN_2_34 -# define GLIB_DEPRECATED_IN_2_34_FOR(f) +# define GLIB_DEPRECATED_IN_2_34 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_34_FOR(f) _GLIB_EXTERN #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 # define GLIB_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) #else -# define GLIB_AVAILABLE_IN_2_34 +# define GLIB_AVAILABLE_IN_2_34 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 +# define GLIB_DEPRECATED_IN_2_36 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_36 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_36_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 +# define GLIB_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) +#else +# define GLIB_AVAILABLE_IN_2_36 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38 +# define GLIB_DEPRECATED_IN_2_38 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_38_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_38 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_38_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 +# define GLIB_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE(2, 38) +#else +# define GLIB_AVAILABLE_IN_2_38 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40 +# define GLIB_DEPRECATED_IN_2_40 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_40_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_40 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_40_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 +# define GLIB_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE(2, 40) +#else +# define GLIB_AVAILABLE_IN_2_40 _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42 +# define GLIB_DEPRECATED_IN_2_42 GLIB_DEPRECATED +# define GLIB_DEPRECATED_IN_2_42_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define GLIB_DEPRECATED_IN_2_42 _GLIB_EXTERN +# define GLIB_DEPRECATED_IN_2_42_FOR(f) _GLIB_EXTERN +#endif + +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 +# define GLIB_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE(2, 42) +#else +# define GLIB_AVAILABLE_IN_2_42 _GLIB_EXTERN #endif #endif /* __G_VERSION_MACROS_H__ */