diff --git a/docs/reference/gio/gdbus-object-manager-example/meson.build b/docs/reference/gio/gdbus-object-manager-example/meson.build index 13cae5b48..8a80501c9 100644 --- a/docs/reference/gio/gdbus-object-manager-example/meson.build +++ b/docs/reference/gio/gdbus-object-manager-example/meson.build @@ -3,7 +3,7 @@ gdbus_object_manager_example_doc = gnome.gtkdoc('gdbus-object-manager-example', namespace : 'example', dependencies : [libgdbus_example_objectmanager_dep], src_dir : 'gio/tests/gdbus-object-manager-example', - scan_args : gtkdoc_common_scan_args + [ + scan_args : [ '--rebuild-types', ], install : false, diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build index 8c8e15fd8..b6ce1788f 100644 --- a/docs/reference/gio/meson.build +++ b/docs/reference/gio/meson.build @@ -98,6 +98,7 @@ if get_option('gtk_doc') 'gwin32volumemonitor.h', 'thumbnail-verify.h', 'xdp-dbus.h', + 'gio-visibility.h', ] sections_files = files('gio-sections-common.txt') @@ -187,7 +188,8 @@ if get_option('gtk_doc') mode : 'none', dependencies : [libgio_dep, libgobject_dep, libglib_dep], src_dir : 'gio', - scan_args : gtkdoc_common_scan_args + [ + scan_args : [ + '--ignore-decorators=' + ignore_decorators.replace('GLIB', 'GIO'), '--rebuild-types', '--ignore-headers=' + ' '.join(ignore_headers), ], diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt.in similarity index 86% rename from docs/reference/glib/glib-sections.txt rename to docs/reference/glib/glib-sections.txt.in index 38b35386e..2b500257c 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt.in @@ -116,355 +116,22 @@ GLIB_MICRO_VERSION GLIB_CHECK_VERSION -GLIB_VERSION_2_26 -GLIB_VERSION_2_28 -GLIB_VERSION_2_30 -GLIB_VERSION_2_32 -GLIB_VERSION_2_34 -GLIB_VERSION_2_36 -GLIB_VERSION_2_38 -GLIB_VERSION_2_40 -GLIB_VERSION_2_42 -GLIB_VERSION_2_44 -GLIB_VERSION_2_46 -GLIB_VERSION_2_48 -GLIB_VERSION_2_50 -GLIB_VERSION_2_52 -GLIB_VERSION_2_54 -GLIB_VERSION_2_56 -GLIB_VERSION_2_58 -GLIB_VERSION_2_60 -GLIB_VERSION_2_62 -GLIB_VERSION_2_64 -GLIB_VERSION_2_66 -GLIB_VERSION_2_68 -GLIB_VERSION_2_70 -GLIB_VERSION_2_72 -GLIB_VERSION_2_74 GLIB_VERSION_CUR_STABLE GLIB_VERSION_PREV_STABLE GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_MAX_ALLOWED GLIB_DISABLE_DEPRECATION_WARNINGS +@GLIB_VERSIONS@ G_ENCODE_VERSION -GLIB_AVAILABLE_ENUMERATOR_IN_2_26 -GLIB_AVAILABLE_ENUMERATOR_IN_2_28 -GLIB_AVAILABLE_ENUMERATOR_IN_2_30 -GLIB_AVAILABLE_ENUMERATOR_IN_2_32 -GLIB_AVAILABLE_ENUMERATOR_IN_2_34 -GLIB_AVAILABLE_ENUMERATOR_IN_2_36 -GLIB_AVAILABLE_ENUMERATOR_IN_2_38 -GLIB_AVAILABLE_ENUMERATOR_IN_2_40 -GLIB_AVAILABLE_ENUMERATOR_IN_2_42 -GLIB_AVAILABLE_ENUMERATOR_IN_2_44 -GLIB_AVAILABLE_ENUMERATOR_IN_2_46 -GLIB_AVAILABLE_ENUMERATOR_IN_2_48 -GLIB_AVAILABLE_ENUMERATOR_IN_2_50 -GLIB_AVAILABLE_ENUMERATOR_IN_2_52 -GLIB_AVAILABLE_ENUMERATOR_IN_2_54 -GLIB_AVAILABLE_ENUMERATOR_IN_2_56 -GLIB_AVAILABLE_ENUMERATOR_IN_2_58 -GLIB_AVAILABLE_ENUMERATOR_IN_2_60 -GLIB_AVAILABLE_ENUMERATOR_IN_2_62 -GLIB_AVAILABLE_ENUMERATOR_IN_2_64 -GLIB_AVAILABLE_ENUMERATOR_IN_2_66 -GLIB_AVAILABLE_ENUMERATOR_IN_2_68 -GLIB_AVAILABLE_ENUMERATOR_IN_2_70 -GLIB_AVAILABLE_ENUMERATOR_IN_2_72 -GLIB_AVAILABLE_ENUMERATOR_IN_2_74 GLIB_AVAILABLE_IN_ALL -GLIB_AVAILABLE_IN_2_26 -GLIB_AVAILABLE_IN_2_28 -GLIB_AVAILABLE_IN_2_30 -GLIB_AVAILABLE_IN_2_32 -GLIB_AVAILABLE_IN_2_34 -GLIB_AVAILABLE_IN_2_36 -GLIB_AVAILABLE_IN_2_38 -GLIB_AVAILABLE_IN_2_40 -GLIB_AVAILABLE_IN_2_42 -GLIB_AVAILABLE_IN_2_44 -GLIB_AVAILABLE_IN_2_46 -GLIB_AVAILABLE_IN_2_48 -GLIB_AVAILABLE_IN_2_50 -GLIB_AVAILABLE_IN_2_52 -GLIB_AVAILABLE_IN_2_54 -GLIB_AVAILABLE_IN_2_56 -GLIB_AVAILABLE_IN_2_58 -GLIB_AVAILABLE_IN_2_60 -GLIB_AVAILABLE_IN_2_62 -GLIB_AVAILABLE_IN_2_64 -GLIB_AVAILABLE_IN_2_66 -GLIB_AVAILABLE_IN_2_68 -GLIB_AVAILABLE_IN_2_70 -GLIB_AVAILABLE_IN_2_72 -GLIB_AVAILABLE_IN_2_74 -GLIB_AVAILABLE_MACRO_IN_2_26 -GLIB_AVAILABLE_MACRO_IN_2_28 -GLIB_AVAILABLE_MACRO_IN_2_30 -GLIB_AVAILABLE_MACRO_IN_2_32 -GLIB_AVAILABLE_MACRO_IN_2_34 -GLIB_AVAILABLE_MACRO_IN_2_36 -GLIB_AVAILABLE_MACRO_IN_2_38 -GLIB_AVAILABLE_MACRO_IN_2_40 -GLIB_AVAILABLE_MACRO_IN_2_42 -GLIB_AVAILABLE_MACRO_IN_2_44 -GLIB_AVAILABLE_MACRO_IN_2_46 -GLIB_AVAILABLE_MACRO_IN_2_48 -GLIB_AVAILABLE_MACRO_IN_2_50 -GLIB_AVAILABLE_MACRO_IN_2_52 -GLIB_AVAILABLE_MACRO_IN_2_54 -GLIB_AVAILABLE_MACRO_IN_2_56 -GLIB_AVAILABLE_MACRO_IN_2_58 -GLIB_AVAILABLE_MACRO_IN_2_60 -GLIB_AVAILABLE_MACRO_IN_2_62 -GLIB_AVAILABLE_MACRO_IN_2_64 -GLIB_AVAILABLE_MACRO_IN_2_66 -GLIB_AVAILABLE_MACRO_IN_2_68 -GLIB_AVAILABLE_MACRO_IN_2_70 -GLIB_AVAILABLE_MACRO_IN_2_72 -GLIB_AVAILABLE_MACRO_IN_2_74 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_66 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_68 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_70 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_72 -GLIB_AVAILABLE_STATIC_INLINE_IN_2_74 -GLIB_AVAILABLE_TYPE_IN_2_26 -GLIB_AVAILABLE_TYPE_IN_2_28 -GLIB_AVAILABLE_TYPE_IN_2_30 -GLIB_AVAILABLE_TYPE_IN_2_32 -GLIB_AVAILABLE_TYPE_IN_2_34 -GLIB_AVAILABLE_TYPE_IN_2_36 -GLIB_AVAILABLE_TYPE_IN_2_38 -GLIB_AVAILABLE_TYPE_IN_2_40 -GLIB_AVAILABLE_TYPE_IN_2_42 -GLIB_AVAILABLE_TYPE_IN_2_44 -GLIB_AVAILABLE_TYPE_IN_2_46 -GLIB_AVAILABLE_TYPE_IN_2_48 -GLIB_AVAILABLE_TYPE_IN_2_50 -GLIB_AVAILABLE_TYPE_IN_2_52 -GLIB_AVAILABLE_TYPE_IN_2_54 -GLIB_AVAILABLE_TYPE_IN_2_56 -GLIB_AVAILABLE_TYPE_IN_2_58 -GLIB_AVAILABLE_TYPE_IN_2_60 -GLIB_AVAILABLE_TYPE_IN_2_62 -GLIB_AVAILABLE_TYPE_IN_2_64 -GLIB_AVAILABLE_TYPE_IN_2_66 -GLIB_AVAILABLE_TYPE_IN_2_68 -GLIB_AVAILABLE_TYPE_IN_2_70 -GLIB_AVAILABLE_TYPE_IN_2_72 -GLIB_AVAILABLE_TYPE_IN_2_74 GLIB_DEPRECATED_ENUMERATOR GLIB_DEPRECATED_ENUMERATOR_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_26 -GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_28 -GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_30 -GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_32 -GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_34 -GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_36 -GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_38 -GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_40 -GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_42 -GLIB_DEPRECATED_ENUMERATOR_IN_2_42_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_44 -GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_46 -GLIB_DEPRECATED_ENUMERATOR_IN_2_46_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_48 -GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_50 -GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_52 -GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_54 -GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_56 -GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_58 -GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_60 -GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_62 -GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_64 -GLIB_DEPRECATED_ENUMERATOR_IN_2_64_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_66 -GLIB_DEPRECATED_ENUMERATOR_IN_2_66_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_68 -GLIB_DEPRECATED_ENUMERATOR_IN_2_68_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_70 -GLIB_DEPRECATED_ENUMERATOR_IN_2_70_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_72 -GLIB_DEPRECATED_ENUMERATOR_IN_2_72_FOR -GLIB_DEPRECATED_ENUMERATOR_IN_2_74 -GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR -GLIB_DEPRECATED_IN_2_26 -GLIB_DEPRECATED_IN_2_26_FOR -GLIB_DEPRECATED_IN_2_28 -GLIB_DEPRECATED_IN_2_28_FOR -GLIB_DEPRECATED_IN_2_30 -GLIB_DEPRECATED_IN_2_30_FOR -GLIB_DEPRECATED_IN_2_32 -GLIB_DEPRECATED_IN_2_32_FOR -GLIB_DEPRECATED_IN_2_34 -GLIB_DEPRECATED_IN_2_34_FOR -GLIB_DEPRECATED_IN_2_36 -GLIB_DEPRECATED_IN_2_36_FOR -GLIB_DEPRECATED_IN_2_38 -GLIB_DEPRECATED_IN_2_38_FOR -GLIB_DEPRECATED_IN_2_40 -GLIB_DEPRECATED_IN_2_40_FOR -GLIB_DEPRECATED_IN_2_42 -GLIB_DEPRECATED_IN_2_42_FOR -GLIB_DEPRECATED_IN_2_44 -GLIB_DEPRECATED_IN_2_44_FOR -GLIB_DEPRECATED_IN_2_46 -GLIB_DEPRECATED_IN_2_46_FOR -GLIB_DEPRECATED_IN_2_48 -GLIB_DEPRECATED_IN_2_48_FOR -GLIB_DEPRECATED_IN_2_50 -GLIB_DEPRECATED_IN_2_50_FOR -GLIB_DEPRECATED_IN_2_52 -GLIB_DEPRECATED_IN_2_52_FOR -GLIB_DEPRECATED_IN_2_54 -GLIB_DEPRECATED_IN_2_54_FOR -GLIB_DEPRECATED_IN_2_56 -GLIB_DEPRECATED_IN_2_56_FOR -GLIB_DEPRECATED_IN_2_58 -GLIB_DEPRECATED_IN_2_58_FOR -GLIB_DEPRECATED_IN_2_60 -GLIB_DEPRECATED_IN_2_60_FOR -GLIB_DEPRECATED_IN_2_62 -GLIB_DEPRECATED_IN_2_62_FOR -GLIB_DEPRECATED_IN_2_64 -GLIB_DEPRECATED_IN_2_64_FOR -GLIB_DEPRECATED_IN_2_66 -GLIB_DEPRECATED_IN_2_66_FOR -GLIB_DEPRECATED_IN_2_68 -GLIB_DEPRECATED_IN_2_68_FOR -GLIB_DEPRECATED_IN_2_70 -GLIB_DEPRECATED_IN_2_70_FOR -GLIB_DEPRECATED_IN_2_72 -GLIB_DEPRECATED_IN_2_72_FOR -GLIB_DEPRECATED_IN_2_74 -GLIB_DEPRECATED_IN_2_74_FOR GLIB_DEPRECATED_MACRO GLIB_DEPRECATED_MACRO_FOR -GLIB_DEPRECATED_MACRO_IN_2_26 -GLIB_DEPRECATED_MACRO_IN_2_26_FOR -GLIB_DEPRECATED_MACRO_IN_2_28 -GLIB_DEPRECATED_MACRO_IN_2_28_FOR -GLIB_DEPRECATED_MACRO_IN_2_30 -GLIB_DEPRECATED_MACRO_IN_2_30_FOR -GLIB_DEPRECATED_MACRO_IN_2_32 -GLIB_DEPRECATED_MACRO_IN_2_32_FOR -GLIB_DEPRECATED_MACRO_IN_2_34 -GLIB_DEPRECATED_MACRO_IN_2_34_FOR -GLIB_DEPRECATED_MACRO_IN_2_36 -GLIB_DEPRECATED_MACRO_IN_2_36_FOR -GLIB_DEPRECATED_MACRO_IN_2_38 -GLIB_DEPRECATED_MACRO_IN_2_38_FOR -GLIB_DEPRECATED_MACRO_IN_2_40 -GLIB_DEPRECATED_MACRO_IN_2_40_FOR -GLIB_DEPRECATED_MACRO_IN_2_42 -GLIB_DEPRECATED_MACRO_IN_2_42_FOR -GLIB_DEPRECATED_MACRO_IN_2_44 -GLIB_DEPRECATED_MACRO_IN_2_44_FOR -GLIB_DEPRECATED_MACRO_IN_2_46 -GLIB_DEPRECATED_MACRO_IN_2_46_FOR -GLIB_DEPRECATED_MACRO_IN_2_48 -GLIB_DEPRECATED_MACRO_IN_2_48_FOR -GLIB_DEPRECATED_MACRO_IN_2_50 -GLIB_DEPRECATED_MACRO_IN_2_50_FOR -GLIB_DEPRECATED_MACRO_IN_2_52 -GLIB_DEPRECATED_MACRO_IN_2_52_FOR -GLIB_DEPRECATED_MACRO_IN_2_54 -GLIB_DEPRECATED_MACRO_IN_2_54_FOR -GLIB_DEPRECATED_MACRO_IN_2_56 -GLIB_DEPRECATED_MACRO_IN_2_56_FOR -GLIB_DEPRECATED_MACRO_IN_2_58 -GLIB_DEPRECATED_MACRO_IN_2_58_FOR -GLIB_DEPRECATED_MACRO_IN_2_60 -GLIB_DEPRECATED_MACRO_IN_2_60_FOR -GLIB_DEPRECATED_MACRO_IN_2_62 -GLIB_DEPRECATED_MACRO_IN_2_62_FOR -GLIB_DEPRECATED_MACRO_IN_2_64 -GLIB_DEPRECATED_MACRO_IN_2_64_FOR -GLIB_DEPRECATED_MACRO_IN_2_66 -GLIB_DEPRECATED_MACRO_IN_2_66_FOR -GLIB_DEPRECATED_MACRO_IN_2_68 -GLIB_DEPRECATED_MACRO_IN_2_68_FOR -GLIB_DEPRECATED_MACRO_IN_2_70 -GLIB_DEPRECATED_MACRO_IN_2_70_FOR -GLIB_DEPRECATED_MACRO_IN_2_72 -GLIB_DEPRECATED_MACRO_IN_2_72_FOR -GLIB_DEPRECATED_MACRO_IN_2_74 -GLIB_DEPRECATED_MACRO_IN_2_74_FOR GLIB_DEPRECATED_TYPE GLIB_DEPRECATED_TYPE_FOR -GLIB_DEPRECATED_TYPE_IN_2_26 -GLIB_DEPRECATED_TYPE_IN_2_26_FOR -GLIB_DEPRECATED_TYPE_IN_2_28 -GLIB_DEPRECATED_TYPE_IN_2_28_FOR -GLIB_DEPRECATED_TYPE_IN_2_30 -GLIB_DEPRECATED_TYPE_IN_2_30_FOR -GLIB_DEPRECATED_TYPE_IN_2_32 -GLIB_DEPRECATED_TYPE_IN_2_32_FOR -GLIB_DEPRECATED_TYPE_IN_2_34 -GLIB_DEPRECATED_TYPE_IN_2_34_FOR -GLIB_DEPRECATED_TYPE_IN_2_36 -GLIB_DEPRECATED_TYPE_IN_2_36_FOR -GLIB_DEPRECATED_TYPE_IN_2_38 -GLIB_DEPRECATED_TYPE_IN_2_38_FOR -GLIB_DEPRECATED_TYPE_IN_2_40 -GLIB_DEPRECATED_TYPE_IN_2_40_FOR -GLIB_DEPRECATED_TYPE_IN_2_42 -GLIB_DEPRECATED_TYPE_IN_2_42_FOR -GLIB_DEPRECATED_TYPE_IN_2_44 -GLIB_DEPRECATED_TYPE_IN_2_44_FOR -GLIB_DEPRECATED_TYPE_IN_2_46 -GLIB_DEPRECATED_TYPE_IN_2_46_FOR -GLIB_DEPRECATED_TYPE_IN_2_48 -GLIB_DEPRECATED_TYPE_IN_2_48_FOR -GLIB_DEPRECATED_TYPE_IN_2_50 -GLIB_DEPRECATED_TYPE_IN_2_50_FOR -GLIB_DEPRECATED_TYPE_IN_2_52 -GLIB_DEPRECATED_TYPE_IN_2_52_FOR -GLIB_DEPRECATED_TYPE_IN_2_54 -GLIB_DEPRECATED_TYPE_IN_2_54_FOR -GLIB_DEPRECATED_TYPE_IN_2_56 -GLIB_DEPRECATED_TYPE_IN_2_56_FOR -GLIB_DEPRECATED_TYPE_IN_2_58 -GLIB_DEPRECATED_TYPE_IN_2_58_FOR -GLIB_DEPRECATED_TYPE_IN_2_60 -GLIB_DEPRECATED_TYPE_IN_2_60_FOR -GLIB_DEPRECATED_TYPE_IN_2_62 -GLIB_DEPRECATED_TYPE_IN_2_62_FOR -GLIB_DEPRECATED_TYPE_IN_2_64 -GLIB_DEPRECATED_TYPE_IN_2_64_FOR -GLIB_DEPRECATED_TYPE_IN_2_66 -GLIB_DEPRECATED_TYPE_IN_2_66_FOR -GLIB_DEPRECATED_TYPE_IN_2_68 -GLIB_DEPRECATED_TYPE_IN_2_68_FOR -GLIB_DEPRECATED_TYPE_IN_2_70 -GLIB_DEPRECATED_TYPE_IN_2_70_FOR -GLIB_DEPRECATED_TYPE_IN_2_72 -GLIB_DEPRECATED_TYPE_IN_2_72_FOR -GLIB_DEPRECATED_TYPE_IN_2_74 -GLIB_DEPRECATED_TYPE_IN_2_74_FOR GLIB_VERSION_CUR_STABLE GLIB_VERSION_PREV_STABLE diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build index 838a4f777..64c867f59 100644 --- a/docs/reference/glib/meson.build +++ b/docs/reference/glib/meson.build @@ -38,6 +38,8 @@ if get_option('gtk_doc') 'gutilsprivate.h', 'gvalgrind.h', 'dirent.h', + 'glib-visibility.h', + 'gmodule-visibility.h', ] docpath = join_paths(glib_datadir, 'gtk-doc', 'html') @@ -49,13 +51,20 @@ if get_option('gtk_doc') configuration: version_conf ) + configure_file( + input: 'glib-sections.txt.in', + output: 'glib-sections.txt', + command: [gen_visibility_macros, meson.project_version(), 'doc-sections', '@INPUT@', '@OUTPUT@'], + ) + gnome.gtkdoc('glib', main_xml : 'glib-docs.xml', namespace : 'g', mode : 'none', src_dir : [ 'glib', 'gmodule' ], dependencies : libglib_dep, - scan_args : gtkdoc_common_scan_args + [ + scan_args : [ + '--ignore-decorators=' + ignore_decorators + '|' + ignore_decorators.replace('GLIB', 'GMODULE'), '--ignore-headers=' + ' '.join(ignore_headers), ], content_files : [ diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt index 4107f8356..6fd650394 100644 --- a/docs/reference/gobject/gobject-sections.txt +++ b/docs/reference/gobject/gobject-sections.txt @@ -185,9 +185,6 @@ G_TYPE_RESERVED_GLIB_LAST G_TYPE_RESERVED_BSE_FIRST G_TYPE_RESERVED_BSE_LAST G_TYPE_RESERVED_USER_FIRST - - -GOBJECT_VAR
diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build index a9a654354..dd3e53dbf 100644 --- a/docs/reference/gobject/meson.build +++ b/docs/reference/gobject/meson.build @@ -8,6 +8,7 @@ if get_option('gtk_doc') 'gobject_trace.h', 'gtype-private.h', 'glib-enumtypes.h', + 'gobject-visibility.h', ] docpath = join_paths(glib_datadir, 'gtk-doc', 'html') @@ -28,7 +29,8 @@ if get_option('gtk_doc') dependencies : [libgobject_dep, libglib_dep], include_directories : [gtkdocincl], src_dir : 'gobject', - scan_args : gtkdoc_common_scan_args + [ + scan_args : [ + '--ignore-decorators=' + '|'.join(ignore_decorators.replace('GLIB', 'GOBJECT')), '--rebuild-types', '--ignore-headers=' + ' '.join(ignore_headers), ], diff --git a/docs/reference/meson.build b/docs/reference/meson.build index dcaa5c276..fb4b26bc9 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -37,9 +37,7 @@ foreach i : range(first_version, last_version + 2, 2) ] endforeach -gtkdoc_common_scan_args = [ - '--ignore-decorators=' + '|'.join(ignore_decorators), -] +ignore_decorators = '|'.join(ignore_decorators) if get_option('gtk_doc') # Check we have the minimum gtk-doc version required. Older versions won't diff --git a/gio/gioenums.h b/gio/gioenums.h index 1d109aad2..24b67df81 100644 --- a/gio/gioenums.h +++ b/gio/gioenums.h @@ -28,6 +28,7 @@ #endif #include +#include G_BEGIN_DECLS diff --git a/gio/gioenumtypes.h.template b/gio/gioenumtypes.h.template index 1ab3c3727..dc51b90cf 100644 --- a/gio/gioenumtypes.h.template +++ b/gio/gioenumtypes.h.template @@ -24,6 +24,7 @@ #define __GIO_ENUM_TYPES_H__ #include +#include G_BEGIN_DECLS /*** END file-header ***/ diff --git a/gio/gnetworking.h.in b/gio/gnetworking.h.in index 96430bdec..a59180673 100644 --- a/gio/gnetworking.h.in +++ b/gio/gnetworking.h.in @@ -22,6 +22,7 @@ #define __G_NETWORKING_H__ #include +#include #ifdef G_OS_WIN32 #include diff --git a/gio/gsettingsschema.h b/gio/gsettingsschema.h index ff2da2986..bcb7bb058 100644 --- a/gio/gsettingsschema.h +++ b/gio/gsettingsschema.h @@ -22,6 +22,7 @@ #define __G_SETTINGS_SCHEMA_H__ #include +#include G_BEGIN_DECLS diff --git a/gio/meson.build b/gio/meson.build index 14f0d8259..afe865f45 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -6,8 +6,6 @@ gio_c_args = [ '-DLOCALSTATEDIR="@0@"'.format(glib_localstatedir), ] -gio_c_args += glib_hidden_visibility_args - # FIXME: Install empty glib_giomodulesdir gnetworking_h_conf = configuration_data() @@ -742,6 +740,12 @@ gio_headers = files( 'gliststore.h', ) +gvisibility_h = configure_file( + output: 'gio-visibility.h', + command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GIO', '@OUTPUT@'], +) + +gio_headers += gvisibility_h gio_headers += application_headers gio_headers += settings_headers gio_headers += gdbus_headers @@ -835,6 +839,7 @@ libgio = library('gio-2.0', gioenumtypes_dep, gvdb_dep], c_args : gio_c_args, objc_args : gio_c_args, + gnu_symbol_visibility : 'hidden', # intl.lib is not compatible with SAFESEH link_args : [noseh_link_args, glib_link_flags], ) diff --git a/gio/xdgmime/meson.build b/gio/xdgmime/meson.build index 4c8a552a2..1f7e88f33 100644 --- a/gio/xdgmime/meson.build +++ b/gio/xdgmime/meson.build @@ -14,4 +14,6 @@ xdgmime_lib = static_library('xdgmime', include_directories : [configinc], pic : true, c_args : [ '-DHAVE_CONFIG_H', - '-DXDG_PREFIX=_gio_xdg' ] + glib_hidden_visibility_args) + '-DXDG_PREFIX=_gio_xdg' ], + gnu_symbol_visibility : 'hidden', +) diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in index 0632e0b2f..fb85daf99 100644 --- a/glib/glibconfig.h.in +++ b/glib/glibconfig.h.in @@ -12,17 +12,20 @@ #include #mesondefine GLIB_HAVE_ALLOCA_H +#mesondefine GLIB_STATIC_COMPILATION +#mesondefine GOBJECT_STATIC_COMPILATION +#mesondefine GIO_STATIC_COMPILATION +#mesondefine GMODULE_STATIC_COMPILATION +#mesondefine G_INTL_STATIC_COMPILATION +#mesondefine FFI_STATIC_BUILD +#include + /* Specifies that GLib's g_print*() functions wrap the * system printf functions. This is useful to know, for example, * when using glibc's register_printf_function(). */ #mesondefine GLIB_USING_SYSTEM_PRINTF -#mesondefine GLIB_STATIC_COMPILATION -#mesondefine GOBJECT_STATIC_COMPILATION -#mesondefine G_INTL_STATIC_COMPILATION -#mesondefine FFI_STATIC_BUILD - G_BEGIN_DECLS #define G_MINFLOAT FLT_MIN diff --git a/glib/gmacros.h b/glib/gmacros.h index 2ef7587ce..f9e20407e 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -1227,28 +1227,12 @@ #define G_UNAVAILABLE(maj,min) G_DEPRECATED #endif -#ifndef _GLIB_EXTERN -#define _GLIB_EXTERN extern -#endif - /* These macros are used to mark deprecated symbols in GLib headers, * and thus have to be exposed in installed headers. But please * do *not* use them in other projects. Instead, use G_DEPRECATED * or define your own wrappers around it. */ -#ifdef GLIB_DISABLE_DEPRECATION_WARNINGS -#define GLIB_DEPRECATED _GLIB_EXTERN -#define GLIB_DEPRECATED_FOR(f) _GLIB_EXTERN -#define GLIB_UNAVAILABLE(maj,min) _GLIB_EXTERN -#define GLIB_UNAVAILABLE_STATIC_INLINE(maj,min) -#else -#define GLIB_DEPRECATED G_DEPRECATED _GLIB_EXTERN -#define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GLIB_EXTERN -#define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN -#define GLIB_UNAVAILABLE_STATIC_INLINE(maj,min) G_UNAVAILABLE(maj,min) -#endif - #if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \ (G_GNUC_CHECK_VERSION(4, 6) || \ __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) diff --git a/glib/gnulib/meson.build b/glib/gnulib/meson.build index 38b530aa0..8de095864 100644 --- a/glib/gnulib/meson.build +++ b/glib/gnulib/meson.build @@ -366,6 +366,9 @@ gnulib_lib = static_library('gnulib', gnulib_sources, dependencies : [libm], include_directories : [configinc, glibinc, include_directories ('.')], pic : true, - c_args : ['-DGCC_LINT=1', '-DLIBDIR="@0@"'.format(glib_libdir), '-DGLIB_COMPILATION', '-DG_LOG_DOMAIN="GLib"' ] + glib_hidden_visibility_args + extra_gnulib_args) + c_args : ['-DGCC_LINT=1', '-DLIBDIR="@0@"'.format(glib_libdir), '-DG_LOG_DOMAIN="GLib"', + glib_c_args_internal, extra_gnulib_args], + gnu_symbol_visibility : 'hidden', +) gnulib_libm_dependency = [libm] diff --git a/glib/gtypes.h b/glib/gtypes.h index 8ef190961..15ead8da3 100644 --- a/glib/gtypes.h +++ b/glib/gtypes.h @@ -584,27 +584,4 @@ typedef gint gatomicrefcount; /* should be accessed only using atomics */ G_END_DECLS -/* We prefix variable declarations so they can - * properly get exported in Windows DLLs. - */ -#ifndef GLIB_VAR -# ifdef G_PLATFORM_WIN32 -# ifdef GLIB_STATIC_COMPILATION -# define GLIB_VAR extern -# else /* !GLIB_STATIC_COMPILATION */ -# ifdef GLIB_COMPILATION -# ifdef DLL_EXPORT -# define GLIB_VAR extern __declspec(dllexport) -# else /* !DLL_EXPORT */ -# define GLIB_VAR extern -# endif /* !DLL_EXPORT */ -# else /* !GLIB_COMPILATION */ -# define GLIB_VAR extern __declspec(dllimport) -# endif /* !GLIB_COMPILATION */ -# endif /* !GLIB_STATIC_COMPILATION */ -# else /* !G_PLATFORM_WIN32 */ -# define GLIB_VAR _GLIB_EXTERN -# endif /* !G_PLATFORM_WIN32 */ -#endif /* GLIB_VAR */ - #endif /* __G_TYPES_H__ */ diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h deleted file mode 100644 index 4ec9e06b6..000000000 --- a/glib/gversionmacros.h +++ /dev/null @@ -1,1213 +0,0 @@ -/* GLIB - Library of useful routines for C programming - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * SPDX-License-Identifier: LGPL-2.1-or-later - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * 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, see . - */ - -/* - * Modified by the GLib Team and others 1997-2000. See the AUTHORS - * file for a list of people on the GLib Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * 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 - -/* Version boundaries checks */ - -#define G_ENCODE_VERSION(major,minor) ((major) << 16 | (minor) << 8) - -/* XXX: Every new stable minor release bump should add a macro here */ - -/** - * GLIB_VERSION_2_26: - * - * A macro that evaluates to the 2.26 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.32 - */ -#define GLIB_VERSION_2_26 (G_ENCODE_VERSION (2, 26)) - -/** - * GLIB_VERSION_2_28: - * - * A macro that evaluates to the 2.28 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.32 - */ -#define GLIB_VERSION_2_28 (G_ENCODE_VERSION (2, 28)) - -/** - * GLIB_VERSION_2_30: - * - * A macro that evaluates to the 2.30 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.32 - */ -#define GLIB_VERSION_2_30 (G_ENCODE_VERSION (2, 30)) - -/** - * GLIB_VERSION_2_32: - * - * A macro that evaluates to the 2.32 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.32 - */ -#define GLIB_VERSION_2_32 (G_ENCODE_VERSION (2, 32)) - -/** - * GLIB_VERSION_2_34: - * - * A macro that evaluates to the 2.34 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.34 - */ -#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)) - -/** - * GLIB_VERSION_2_44: - * - * A macro that evaluates to the 2.44 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.44 - */ -#define GLIB_VERSION_2_44 (G_ENCODE_VERSION (2, 44)) - -/** - * GLIB_VERSION_2_46: - * - * A macro that evaluates to the 2.46 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.46 - */ -#define GLIB_VERSION_2_46 (G_ENCODE_VERSION (2, 46)) - -/** - * GLIB_VERSION_2_48: - * - * A macro that evaluates to the 2.48 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.48 - */ -#define GLIB_VERSION_2_48 (G_ENCODE_VERSION (2, 48)) - -/** - * GLIB_VERSION_2_50: - * - * A macro that evaluates to the 2.50 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.50 - */ -#define GLIB_VERSION_2_50 (G_ENCODE_VERSION (2, 50)) - -/** - * GLIB_VERSION_2_52: - * - * A macro that evaluates to the 2.52 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.52 - */ -#define GLIB_VERSION_2_52 (G_ENCODE_VERSION (2, 52)) - -/** - * GLIB_VERSION_2_54: - * - * A macro that evaluates to the 2.54 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.54 - */ -#define GLIB_VERSION_2_54 (G_ENCODE_VERSION (2, 54)) - -/** - * GLIB_VERSION_2_56: - * - * A macro that evaluates to the 2.56 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.56 - */ -#define GLIB_VERSION_2_56 (G_ENCODE_VERSION (2, 56)) - -/** - * GLIB_VERSION_2_58: - * - * A macro that evaluates to the 2.58 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.58 - */ -#define GLIB_VERSION_2_58 (G_ENCODE_VERSION (2, 58)) - -/** - * GLIB_VERSION_2_60: - * - * A macro that evaluates to the 2.60 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.60 - */ -#define GLIB_VERSION_2_60 (G_ENCODE_VERSION (2, 60)) - -/** - * GLIB_VERSION_2_62: - * - * A macro that evaluates to the 2.62 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.62 - */ -#define GLIB_VERSION_2_62 (G_ENCODE_VERSION (2, 62)) - -/** - * GLIB_VERSION_2_64: - * - * A macro that evaluates to the 2.64 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.64 - */ -#define GLIB_VERSION_2_64 (G_ENCODE_VERSION (2, 64)) - -/** - * GLIB_VERSION_2_66: - * - * A macro that evaluates to the 2.66 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.66 - */ -#define GLIB_VERSION_2_66 (G_ENCODE_VERSION (2, 66)) - -/** - * GLIB_VERSION_2_68: - * - * A macro that evaluates to the 2.68 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.68 - */ -#define GLIB_VERSION_2_68 (G_ENCODE_VERSION (2, 68)) - -/** - * GLIB_VERSION_2_70: - * - * A macro that evaluates to the 2.70 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.70 - */ -#define GLIB_VERSION_2_70 (G_ENCODE_VERSION (2, 70)) - -/** - * GLIB_VERSION_2_72: - * - * A macro that evaluates to the 2.72 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.72 - */ -#define GLIB_VERSION_2_72 (G_ENCODE_VERSION (2, 72)) - -/** - * GLIB_VERSION_2_74: - * - * A macro that evaluates to the 2.74 version of GLib, in a format - * that can be used by the C pre-processor. - * - * Since: 2.74 - */ -#define GLIB_VERSION_2_74 (G_ENCODE_VERSION (2, 74)) - -/** - * GLIB_VERSION_CUR_STABLE: - * - * A macro that evaluates to the current stable version of GLib, in a format - * that can be used by the C pre-processor. - * - * During an unstable development cycle, this evaluates to the next stable - * (unreleased) version which will be the result of the development cycle. - * - * Since: 2.32 - */ -#if (GLIB_MINOR_VERSION % 2) -#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION + 1)) -#else -#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION)) -#endif - -/** - * GLIB_VERSION_PREV_STABLE: - * - * A macro that evaluates to the previous stable version of GLib, in a format - * that can be used by the C pre-processor. - * - * During an unstable development cycle, this evaluates to the most recent - * released stable release, which preceded this development cycle. - * - * Since: 2.32 - */ -#if (GLIB_MINOR_VERSION % 2) -#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 1)) -#else -#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 2)) -#endif - -/** - * GLIB_VERSION_MIN_REQUIRED: - * - * A macro that should be defined by the user prior to including - * the glib.h header. - * The definition should be one of the predefined GLib version - * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... - * - * This macro defines the earliest version of GLib that the package is - * required to be able to compile against. - * - * 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 - */ -/* If the package sets GLIB_VERSION_MIN_REQUIRED to some future - * GLIB_VERSION_X_Y value that we don't know about, it will compare as - * 0 in preprocessor tests. - */ -#ifndef GLIB_VERSION_MIN_REQUIRED -# define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE) -#elif GLIB_VERSION_MIN_REQUIRED == 0 -# undef GLIB_VERSION_MIN_REQUIRED -# define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE + 2) -#endif - -/** - * GLIB_VERSION_MAX_ALLOWED: - * - * A macro that should be defined by the user prior to including - * the glib.h header. - * The definition should be one of the predefined GLib version - * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... - * - * This macro defines the latest version of the GLib API that the - * package is allowed to make use of. - * - * 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 - */ -#if !defined (GLIB_VERSION_MAX_ALLOWED) || (GLIB_VERSION_MAX_ALLOWED == 0) -# undef GLIB_VERSION_MAX_ALLOWED -# define GLIB_VERSION_MAX_ALLOWED (GLIB_VERSION_CUR_STABLE) -#endif - -/* sanity checks */ -#if GLIB_VERSION_MIN_REQUIRED > GLIB_VERSION_CUR_STABLE -#error "GLIB_VERSION_MIN_REQUIRED must be <= GLIB_VERSION_CUR_STABLE" -#endif -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_MIN_REQUIRED -#error "GLIB_VERSION_MAX_ALLOWED must be >= GLIB_VERSION_MIN_REQUIRED" -#endif -#if GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_26 -#error "GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26" -#endif - -/* These macros are used to mark deprecated functions in GLib headers, - * and thus have to be exposed in installed headers. But please - * 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 */ - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26 -# define GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_26 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_26 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_26 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_26_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_26 -# define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_26 -# define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 -# define GLIB_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) -# define GLIB_AVAILABLE_MACRO_IN_2_26 GLIB_UNAVAILABLE_MACRO(2, 26) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_26 GLIB_UNAVAILABLE_ENUMERATOR(2, 26) -# define GLIB_AVAILABLE_TYPE_IN_2_26 GLIB_UNAVAILABLE_TYPE(2, 26) -#else -# define GLIB_AVAILABLE_IN_2_26 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_26 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_26 -# define GLIB_AVAILABLE_TYPE_IN_2_26 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_28 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_28 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_28 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_28_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_28 -# define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_28 -# define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 -# define GLIB_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) -# define GLIB_AVAILABLE_MACRO_IN_2_28 GLIB_UNAVAILABLE_MACRO(2, 28) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_28 GLIB_UNAVAILABLE_ENUMERATOR(2, 28) -# define GLIB_AVAILABLE_TYPE_IN_2_28 GLIB_UNAVAILABLE_TYPE(2, 28) -#else -# define GLIB_AVAILABLE_IN_2_28 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_28 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_28 -# define GLIB_AVAILABLE_TYPE_IN_2_28 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_30 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_30 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_30 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_30_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_30 -# define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_30 -# define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 -# define GLIB_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) -# define GLIB_AVAILABLE_MACRO_IN_2_30 GLIB_UNAVAILABLE_MACRO(2, 30) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_30 GLIB_UNAVAILABLE_ENUMERATOR(2, 30) -# define GLIB_AVAILABLE_TYPE_IN_2_30 GLIB_UNAVAILABLE_TYPE(2, 30) -#else -# define GLIB_AVAILABLE_IN_2_30 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_30 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_30 -# define GLIB_AVAILABLE_TYPE_IN_2_30 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_32 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_32 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_32_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_32 -# define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_32 -# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_32 -# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 -# define GLIB_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) -# define GLIB_AVAILABLE_MACRO_IN_2_32 GLIB_UNAVAILABLE_MACRO(2, 32) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_32 GLIB_UNAVAILABLE_ENUMERATOR(2, 32) -# define GLIB_AVAILABLE_TYPE_IN_2_32 GLIB_UNAVAILABLE_TYPE(2, 32) -#else -# define GLIB_AVAILABLE_IN_2_32 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_32 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_32 -# define GLIB_AVAILABLE_TYPE_IN_2_32 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_34 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_34 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_34 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_34_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_34 -# define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_34 -# define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 -# define GLIB_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) -# define GLIB_AVAILABLE_MACRO_IN_2_34 GLIB_UNAVAILABLE_MACRO(2, 34) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_34 GLIB_UNAVAILABLE_ENUMERATOR(2, 34) -# define GLIB_AVAILABLE_TYPE_IN_2_34 GLIB_UNAVAILABLE_TYPE(2, 34) -#else -# define GLIB_AVAILABLE_IN_2_34 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_34 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_34 -# define GLIB_AVAILABLE_TYPE_IN_2_34 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_36 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_36 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_36_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_36 -# define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_36 -# define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 -# define GLIB_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) -# define GLIB_AVAILABLE_MACRO_IN_2_36 GLIB_UNAVAILABLE_MACRO(2, 36) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_36 GLIB_UNAVAILABLE_ENUMERATOR(2, 36) -# define GLIB_AVAILABLE_TYPE_IN_2_36 GLIB_UNAVAILABLE_TYPE(2, 36) -#else -# define GLIB_AVAILABLE_IN_2_36 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_36 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_36 -# define GLIB_AVAILABLE_TYPE_IN_2_36 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_38 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_38 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_38 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_38_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_38 -# define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_38 -# define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 -# define GLIB_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE(2, 38) -# define GLIB_AVAILABLE_MACRO_IN_2_38 GLIB_UNAVAILABLE_MACRO(2, 38) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_38 GLIB_UNAVAILABLE_ENUMERATOR(2, 38) -# define GLIB_AVAILABLE_TYPE_IN_2_38 GLIB_UNAVAILABLE_TYPE(2, 38) -#else -# define GLIB_AVAILABLE_IN_2_38 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_38 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_38 -# define GLIB_AVAILABLE_TYPE_IN_2_38 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_40 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_40 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_40 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_40_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_40 -# define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_40 -# define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 -# define GLIB_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE(2, 40) -# define GLIB_AVAILABLE_MACRO_IN_2_40 GLIB_UNAVAILABLE_MACRO(2, 40) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_40 GLIB_UNAVAILABLE_ENUMERATOR(2, 40) -# define GLIB_AVAILABLE_TYPE_IN_2_40 GLIB_UNAVAILABLE_TYPE(2, 40) -#else -# define GLIB_AVAILABLE_IN_2_40 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_40 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_40 -# define GLIB_AVAILABLE_TYPE_IN_2_40 -#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) -# define GLIB_DEPRECATED_MACRO_IN_2_42 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_42 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_42_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_42 -# define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_42 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_42 -# define GLIB_DEPRECATED_TYPE_IN_2_42_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 -# define GLIB_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE(2, 42) -# define GLIB_AVAILABLE_MACRO_IN_2_42 GLIB_UNAVAILABLE_MACRO(2, 42) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_42 GLIB_UNAVAILABLE_ENUMERATOR(2, 42) -# define GLIB_AVAILABLE_TYPE_IN_2_42 GLIB_UNAVAILABLE_TYPE(2, 42) -#else -# define GLIB_AVAILABLE_IN_2_42 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_42 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_42 -# define GLIB_AVAILABLE_TYPE_IN_2_42 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44 -# define GLIB_DEPRECATED_IN_2_44 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_44_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_44 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_44 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_44 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_44_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_44 -# define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_44 -# define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44 -# define GLIB_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(2, 44) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 GLIB_UNAVAILABLE_STATIC_INLINE(2, 44) -# define GLIB_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO(2, 44) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR(2, 44) -# define GLIB_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE(2, 44) -#else -# define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_44 -# define GLIB_AVAILABLE_MACRO_IN_2_44 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 -# define GLIB_AVAILABLE_TYPE_IN_2_44 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46 -# define GLIB_DEPRECATED_IN_2_46 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_46_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_46 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_46 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_46_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_46 -# define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_46 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_46 -# define GLIB_DEPRECATED_TYPE_IN_2_46_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46 -# define GLIB_AVAILABLE_IN_2_46 GLIB_UNAVAILABLE(2, 46) -# define GLIB_AVAILABLE_MACRO_IN_2_46 GLIB_UNAVAILABLE_MACRO(2, 46) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_46 GLIB_UNAVAILABLE_ENUMERATOR(2, 46) -# define GLIB_AVAILABLE_TYPE_IN_2_46 GLIB_UNAVAILABLE_TYPE(2, 46) -#else -# define GLIB_AVAILABLE_IN_2_46 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_46 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_46 -# define GLIB_AVAILABLE_TYPE_IN_2_46 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48 -# define GLIB_DEPRECATED_IN_2_48 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_48_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_48 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_48 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_48 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_48_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_48 -# define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_48 -# define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48 -# define GLIB_AVAILABLE_IN_2_48 GLIB_UNAVAILABLE(2, 48) -# define GLIB_AVAILABLE_MACRO_IN_2_48 GLIB_UNAVAILABLE_MACRO(2, 48) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_48 GLIB_UNAVAILABLE_ENUMERATOR(2, 48) -# define GLIB_AVAILABLE_TYPE_IN_2_48 GLIB_UNAVAILABLE_TYPE(2, 48) -#else -# define GLIB_AVAILABLE_IN_2_48 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_48 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_48 -# define GLIB_AVAILABLE_TYPE_IN_2_48 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50 -# define GLIB_DEPRECATED_IN_2_50 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_50_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_50 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_50 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_50 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_50_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_50 -# define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_50 -# define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50 -# define GLIB_AVAILABLE_IN_2_50 GLIB_UNAVAILABLE(2, 50) -# define GLIB_AVAILABLE_MACRO_IN_2_50 GLIB_UNAVAILABLE_MACRO(2, 50) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_50 GLIB_UNAVAILABLE_ENUMERATOR(2, 50) -# define GLIB_AVAILABLE_TYPE_IN_2_50 GLIB_UNAVAILABLE_TYPE(2, 50) -#else -# define GLIB_AVAILABLE_IN_2_50 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_50 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_50 -# define GLIB_AVAILABLE_TYPE_IN_2_50 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52 -# define GLIB_DEPRECATED_IN_2_52 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_52_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_52 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_52 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_52 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_52_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_52 -# define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_52 -# define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52 -# define GLIB_AVAILABLE_IN_2_52 GLIB_UNAVAILABLE(2, 52) -# define GLIB_AVAILABLE_MACRO_IN_2_52 GLIB_UNAVAILABLE_MACRO(2, 52) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_52 GLIB_UNAVAILABLE_ENUMERATOR(2, 52) -# define GLIB_AVAILABLE_TYPE_IN_2_52 GLIB_UNAVAILABLE_TYPE(2, 52) -#else -# define GLIB_AVAILABLE_IN_2_52 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_52 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_52 -# define GLIB_AVAILABLE_TYPE_IN_2_52 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54 -# define GLIB_DEPRECATED_IN_2_54 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_54_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_54 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_54 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_54 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_54_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_54 -# define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_54 -# define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54 -# define GLIB_AVAILABLE_IN_2_54 GLIB_UNAVAILABLE(2, 54) -# define GLIB_AVAILABLE_MACRO_IN_2_54 GLIB_UNAVAILABLE_MACRO(2, 54) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_54 GLIB_UNAVAILABLE_ENUMERATOR(2, 54) -# define GLIB_AVAILABLE_TYPE_IN_2_54 GLIB_UNAVAILABLE_TYPE(2, 54) -#else -# define GLIB_AVAILABLE_IN_2_54 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_54 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_54 -# define GLIB_AVAILABLE_TYPE_IN_2_54 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56 -# define GLIB_DEPRECATED_IN_2_56 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_56_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_56 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_56 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_56 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_56_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_56 -# define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_56 -# define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56 -# define GLIB_AVAILABLE_IN_2_56 GLIB_UNAVAILABLE(2, 56) -# define GLIB_AVAILABLE_MACRO_IN_2_56 GLIB_UNAVAILABLE_MACRO(2, 56) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_56 GLIB_UNAVAILABLE_ENUMERATOR(2, 56) -# define GLIB_AVAILABLE_TYPE_IN_2_56 GLIB_UNAVAILABLE_TYPE(2, 56) -#else -# define GLIB_AVAILABLE_IN_2_56 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_56 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_56 -# define GLIB_AVAILABLE_TYPE_IN_2_56 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_58 -# define GLIB_DEPRECATED_IN_2_58 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_58_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_58 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_58 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_58 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_58_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_58 -# define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_58 -# define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58 -# define GLIB_AVAILABLE_IN_2_58 GLIB_UNAVAILABLE(2, 58) -# define GLIB_AVAILABLE_MACRO_IN_2_58 GLIB_UNAVAILABLE_MACRO(2, 58) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_58 GLIB_UNAVAILABLE_ENUMERATOR(2, 58) -# define GLIB_AVAILABLE_TYPE_IN_2_58 GLIB_UNAVAILABLE_TYPE(2, 58) -#else -# define GLIB_AVAILABLE_IN_2_58 _GLIB_EXTERN -# define GLIB_AVAILABLE_MACRO_IN_2_58 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_58 -# define GLIB_AVAILABLE_TYPE_IN_2_58 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60 -# define GLIB_DEPRECATED_IN_2_60 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_60_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_60 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_60 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_60 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_60_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_60 -# define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_60 -# define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60 -# define GLIB_AVAILABLE_IN_2_60 GLIB_UNAVAILABLE(2, 60) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 GLIB_UNAVAILABLE_STATIC_INLINE(2, 60) -# define GLIB_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO(2, 60) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR(2, 60) -# define GLIB_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE(2, 60) -#else -# define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_60 -# define GLIB_AVAILABLE_MACRO_IN_2_60 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 -# define GLIB_AVAILABLE_TYPE_IN_2_60 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62 -# define GLIB_DEPRECATED_IN_2_62 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_62_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_62 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_62 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_62 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_62_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_62 -# define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_62 -# define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62 -# define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE(2, 62) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 GLIB_UNAVAILABLE_STATIC_INLINE(2, 62) -# define GLIB_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO(2, 62) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR(2, 62) -# define GLIB_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE(2, 62) -#else -# define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_62 -# define GLIB_AVAILABLE_MACRO_IN_2_62 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 -# define GLIB_AVAILABLE_TYPE_IN_2_62 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_64 -# define GLIB_DEPRECATED_IN_2_64 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_64_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_64 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_64_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_64 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_64 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_64_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_64 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_64_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_64 -# define GLIB_DEPRECATED_MACRO_IN_2_64_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_64 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_64_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_64 -# define GLIB_DEPRECATED_TYPE_IN_2_64_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64 -# define GLIB_AVAILABLE_IN_2_64 GLIB_UNAVAILABLE(2, 64) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 GLIB_UNAVAILABLE_STATIC_INLINE(2, 64) -# define GLIB_AVAILABLE_MACRO_IN_2_64 GLIB_UNAVAILABLE_MACRO(2, 64) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_64 GLIB_UNAVAILABLE_ENUMERATOR(2, 64) -# define GLIB_AVAILABLE_TYPE_IN_2_64 GLIB_UNAVAILABLE_TYPE(2, 64) -#else -# define GLIB_AVAILABLE_IN_2_64 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_64 -# define GLIB_AVAILABLE_MACRO_IN_2_64 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_64 -# define GLIB_AVAILABLE_TYPE_IN_2_64 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_66 -# define GLIB_DEPRECATED_IN_2_66 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_66_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_66 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_66_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_66 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_66 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_66_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_66 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_66_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_66 -# define GLIB_DEPRECATED_MACRO_IN_2_66_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_66 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_66_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_66 -# define GLIB_DEPRECATED_TYPE_IN_2_66_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_66 -# define GLIB_AVAILABLE_IN_2_66 GLIB_UNAVAILABLE(2, 66) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_66 GLIB_UNAVAILABLE_STATIC_INLINE(2, 66) -# define GLIB_AVAILABLE_MACRO_IN_2_66 GLIB_UNAVAILABLE_MACRO(2, 66) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_66 GLIB_UNAVAILABLE_ENUMERATOR(2, 66) -# define GLIB_AVAILABLE_TYPE_IN_2_66 GLIB_UNAVAILABLE_TYPE(2, 66) -#else -# define GLIB_AVAILABLE_IN_2_66 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_66 -# define GLIB_AVAILABLE_MACRO_IN_2_66 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_66 -# define GLIB_AVAILABLE_TYPE_IN_2_66 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_68 -# define GLIB_DEPRECATED_IN_2_68 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_68_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_68 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_68_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_68 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_68 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_68_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_68 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_68_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_68 -# define GLIB_DEPRECATED_MACRO_IN_2_68_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_68 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_68_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_68 -# define GLIB_DEPRECATED_TYPE_IN_2_68_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_68 -# define GLIB_AVAILABLE_IN_2_68 GLIB_UNAVAILABLE(2, 68) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_68 GLIB_UNAVAILABLE_STATIC_INLINE(2, 68) -# define GLIB_AVAILABLE_MACRO_IN_2_68 GLIB_UNAVAILABLE_MACRO(2, 68) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_68 GLIB_UNAVAILABLE_ENUMERATOR(2, 68) -# define GLIB_AVAILABLE_TYPE_IN_2_68 GLIB_UNAVAILABLE_TYPE(2, 68) -#else -# define GLIB_AVAILABLE_IN_2_68 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_68 -# define GLIB_AVAILABLE_MACRO_IN_2_68 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_68 -# define GLIB_AVAILABLE_TYPE_IN_2_68 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_70 -# define GLIB_DEPRECATED_IN_2_70 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_70_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_70 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_70_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_70 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_70 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_70_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_70 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_70_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_70 -# define GLIB_DEPRECATED_MACRO_IN_2_70_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_70 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_70_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_70 -# define GLIB_DEPRECATED_TYPE_IN_2_70_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_70 -# define GLIB_AVAILABLE_IN_2_70 GLIB_UNAVAILABLE(2, 70) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_70 GLIB_UNAVAILABLE_STATIC_INLINE(2, 70) -# define GLIB_AVAILABLE_MACRO_IN_2_70 GLIB_UNAVAILABLE_MACRO(2, 70) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_70 GLIB_UNAVAILABLE_ENUMERATOR(2, 70) -# define GLIB_AVAILABLE_TYPE_IN_2_70 GLIB_UNAVAILABLE_TYPE(2, 70) -#else -# define GLIB_AVAILABLE_IN_2_70 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_70 -# define GLIB_AVAILABLE_MACRO_IN_2_70 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_70 -# define GLIB_AVAILABLE_TYPE_IN_2_70 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_72 -# define GLIB_DEPRECATED_IN_2_72 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_72_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_72 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_72_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_72 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_72 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_72_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_72 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_72_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_72 -# define GLIB_DEPRECATED_MACRO_IN_2_72_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_72 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_72_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_72 -# define GLIB_DEPRECATED_TYPE_IN_2_72_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_72 -# define GLIB_AVAILABLE_IN_2_72 GLIB_UNAVAILABLE(2, 72) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_72 GLIB_UNAVAILABLE_STATIC_INLINE(2, 72) -# define GLIB_AVAILABLE_MACRO_IN_2_72 GLIB_UNAVAILABLE_MACRO(2, 72) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_72 GLIB_UNAVAILABLE_ENUMERATOR(2, 72) -# define GLIB_AVAILABLE_TYPE_IN_2_72 GLIB_UNAVAILABLE_TYPE(2, 72) -#else -# define GLIB_AVAILABLE_IN_2_72 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_72 -# define GLIB_AVAILABLE_MACRO_IN_2_72 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_72 -# define GLIB_AVAILABLE_TYPE_IN_2_72 -#endif - -#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_74 -# define GLIB_DEPRECATED_IN_2_74 GLIB_DEPRECATED -# define GLIB_DEPRECATED_IN_2_74_FOR(f) GLIB_DEPRECATED_FOR(f) -# define GLIB_DEPRECATED_MACRO_IN_2_74 GLIB_DEPRECATED_MACRO -# define GLIB_DEPRECATED_MACRO_IN_2_74_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74 GLIB_DEPRECATED_ENUMERATOR -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_74 GLIB_DEPRECATED_TYPE -# define GLIB_DEPRECATED_TYPE_IN_2_74_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) -#else -# define GLIB_DEPRECATED_IN_2_74 _GLIB_EXTERN -# define GLIB_DEPRECATED_IN_2_74_FOR(f) _GLIB_EXTERN -# define GLIB_DEPRECATED_MACRO_IN_2_74 -# define GLIB_DEPRECATED_MACRO_IN_2_74_FOR(f) -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74 -# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f) -# define GLIB_DEPRECATED_TYPE_IN_2_74 -# define GLIB_DEPRECATED_TYPE_IN_2_74_FOR(f) -#endif - -#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_74 -# define GLIB_AVAILABLE_IN_2_74 GLIB_UNAVAILABLE(2, 74) -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_74 GLIB_UNAVAILABLE_STATIC_INLINE(2, 74) -# define GLIB_AVAILABLE_MACRO_IN_2_74 GLIB_UNAVAILABLE_MACRO(2, 74) -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_74 GLIB_UNAVAILABLE_ENUMERATOR(2, 74) -# define GLIB_AVAILABLE_TYPE_IN_2_74 GLIB_UNAVAILABLE_TYPE(2, 74) -#else -# define GLIB_AVAILABLE_IN_2_74 _GLIB_EXTERN -# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_74 -# define GLIB_AVAILABLE_MACRO_IN_2_74 -# define GLIB_AVAILABLE_ENUMERATOR_IN_2_74 -# define GLIB_AVAILABLE_TYPE_IN_2_74 -#endif - -#endif /* __G_VERSION_MACROS_H__ */ diff --git a/glib/gversionmacros.h.in b/glib/gversionmacros.h.in new file mode 100644 index 000000000..edae63fda --- /dev/null +++ b/glib/gversionmacros.h.in @@ -0,0 +1,140 @@ +/* GLIB - Library of useful routines for C programming + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * 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, see . + */ + +/* + * Modified by the GLib Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GLib Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * 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 + +/* Version boundaries checks */ + +#define G_ENCODE_VERSION(major, minor) ((major) << 16 | (minor) << 8) + +@GLIB_VERSIONS@ + +/** + * GLIB_VERSION_CUR_STABLE: + * + * A macro that evaluates to the current stable version of GLib, in a format + * that can be used by the C pre-processor. + * + * During an unstable development cycle, this evaluates to the next stable + * (unreleased) version which will be the result of the development cycle. + * + * Since: 2.32 + */ +#if (GLIB_MINOR_VERSION % 2) +#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION + 1)) +#else +#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION)) +#endif + +/** + * GLIB_VERSION_PREV_STABLE: + * + * A macro that evaluates to the previous stable version of GLib, in a format + * that can be used by the C pre-processor. + * + * During an unstable development cycle, this evaluates to the most recent + * released stable release, which preceded this development cycle. + * + * Since: 2.32 + */ +#if (GLIB_MINOR_VERSION % 2) +#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 1)) +#else +#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 2)) +#endif + +/** + * GLIB_VERSION_MIN_REQUIRED: + * + * A macro that should be defined by the user prior to including + * the glib.h header. + * The definition should be one of the predefined GLib version + * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... + * + * This macro defines the earliest version of GLib that the package is + * required to be able to compile against. + * + * 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 + */ +/* If the package sets GLIB_VERSION_MIN_REQUIRED to some future + * GLIB_VERSION_X_Y value that we don't know about, it will compare as + * 0 in preprocessor tests. + */ +#ifndef GLIB_VERSION_MIN_REQUIRED +#define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE) +#elif GLIB_VERSION_MIN_REQUIRED == 0 +#undef GLIB_VERSION_MIN_REQUIRED +#define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_CUR_STABLE + 2) +#endif + +/** + * GLIB_VERSION_MAX_ALLOWED: + * + * A macro that should be defined by the user prior to including + * the glib.h header. + * The definition should be one of the predefined GLib version + * macros: %GLIB_VERSION_2_26, %GLIB_VERSION_2_28,... + * + * This macro defines the latest version of the GLib API that the + * package is allowed to make use of. + * + * 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 + */ +#if !defined(GLIB_VERSION_MAX_ALLOWED) || (GLIB_VERSION_MAX_ALLOWED == 0) +#undef GLIB_VERSION_MAX_ALLOWED +#define GLIB_VERSION_MAX_ALLOWED (GLIB_VERSION_CUR_STABLE) +#endif + +/* sanity checks */ +#if GLIB_VERSION_MIN_REQUIRED > GLIB_VERSION_CUR_STABLE +#error "GLIB_VERSION_MIN_REQUIRED must be <= GLIB_VERSION_CUR_STABLE" +#endif +#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_MIN_REQUIRED +#error "GLIB_VERSION_MAX_ALLOWED must be >= GLIB_VERSION_MIN_REQUIRED" +#endif +#if GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_26 +#error "GLIB_VERSION_MIN_REQUIRED must be >= GLIB_VERSION_2_26" +#endif + +#endif /* __G_VERSION_MACROS_H__ */ diff --git a/glib/libcharset/meson.build b/glib/libcharset/meson.build index 5a02666df..f286b4877 100644 --- a/glib/libcharset/meson.build +++ b/glib/libcharset/meson.build @@ -1,4 +1,6 @@ charset_lib = static_library('charset', 'localcharset.c', include_directories : configinc, pic : true, - c_args : [ '-DGLIB_CHARSETALIAS_DIR="@0@"'.format(glib_charsetaliasdir) ] + glib_hidden_visibility_args) + c_args : [ '-DGLIB_CHARSETALIAS_DIR="@0@"'.format(glib_charsetaliasdir) ], + gnu_symbol_visibility : 'hidden', +) diff --git a/glib/meson.build b/glib/meson.build index c365901a1..56a8a7d62 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -3,6 +3,21 @@ glibconfig_h = configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h' install_tag : 'devel', configuration : glibconfig_conf) +gversionmacros_h = configure_file( + input: 'gversionmacros.h.in', + output: 'gversionmacros.h', + command: [gen_visibility_macros, meson.project_version(), 'versions-macros', '@INPUT@', '@OUTPUT@'], +) + +gvisibility_h = configure_file( + output: 'glib-visibility.h', + command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GLIB', '@OUTPUT@'], +) + +glib_c_args_internal = [ + '-DGLIB_COMPILATION', +] + subdir('libcharset') # libsysprof-capture support @@ -212,10 +227,12 @@ glib_sub_headers = files( 'gvarianttype.h', 'gvariant.h', 'gversion.h', - 'gversionmacros.h', 'gwin32.h', 'gprintf.h', ) + +glib_sub_headers += [gversionmacros_h, gvisibility_h] + install_headers(glib_sub_headers, subdir : 'glib-2.0/glib') deprecated_sources = files( @@ -368,7 +385,7 @@ if use_pcre2_static_flag pcre2_static_args = ['-DPCRE2_STATIC'] endif -glib_c_args = ['-DG_LOG_DOMAIN="GLib"', '-DGLIB_COMPILATION'] + pcre2_static_args + glib_hidden_visibility_args +glib_c_args = ['-DG_LOG_DOMAIN="GLib"'] + glib_c_args_internal + pcre2_static_args libglib = library('glib-2.0', glib_dtrace_obj, glib_dtrace_hdr, sources : [deprecated_sources, glib_sources], @@ -383,6 +400,7 @@ libglib = library('glib-2.0', dependencies : [pcre2, thread_dep, librt] + libintl_deps + libiconv + platform_deps + [gnulib_libm_dependency, libm] + [libsysprof_capture_dep], c_args : glib_c_args, objc_args : glib_c_args, + gnu_symbol_visibility : 'hidden', ) libglib_dep = declare_dependency( diff --git a/gmodule/gmodule.h b/gmodule/gmodule.h index 974489041..ec14f4e10 100644 --- a/gmodule/gmodule.h +++ b/gmodule/gmodule.h @@ -28,6 +28,7 @@ #define __GMODULE_H__ #include +#include G_BEGIN_DECLS diff --git a/gmodule/meson.build b/gmodule/meson.build index 0c5aad311..54b25a0c5 100644 --- a/gmodule/meson.build +++ b/gmodule/meson.build @@ -66,6 +66,12 @@ gmodule_c = files('gmodule.c') install_headers([gmodule_h], subdir : 'glib-2.0') +gvisibility_h = configure_file( + output: 'gmodule-visibility.h', + command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GMODULE', '@OUTPUT@'], +) +install_headers(gvisibility_h, subdir : 'glib-2.0/gmodule') + gmodule_sources = [gmodule_c] if host_system == 'windows' gmodule_win_rc = configure_file( @@ -85,7 +91,8 @@ libgmodule = library('gmodule-2.0', install : true, include_directories : [configinc, gmoduleinc], dependencies : [libdl_dep, libglib_dep], - c_args : ['-DG_LOG_DOMAIN="GModule"'] + glib_hidden_visibility_args, + c_args : ['-DG_LOG_DOMAIN="GModule"', '-DGMODULE_COMPILATION'], + gnu_symbol_visibility : 'hidden', link_args : [glib_link_flags], ) diff --git a/gobject/gparamspecs.h b/gobject/gparamspecs.h index 250531eed..0ef7f8fc8 100644 --- a/gobject/gparamspecs.h +++ b/gobject/gparamspecs.h @@ -1144,30 +1144,6 @@ GParamSpec* g_param_spec_variant (const gchar *name, GVariant *default_value, GParamFlags flags); -/* --- internal --- */ -/* We prefix variable declarations so they can - * properly get exported in windows dlls. - */ -#ifndef GOBJECT_VAR -# ifdef G_PLATFORM_WIN32 -# ifdef GOBJECT_STATIC_COMPILATION -# define GOBJECT_VAR extern -# else /* !GOBJECT_STATIC_COMPILATION */ -# ifdef GOBJECT_COMPILATION -# ifdef DLL_EXPORT -# define GOBJECT_VAR extern __declspec(dllexport) -# else /* !DLL_EXPORT */ -# define GOBJECT_VAR extern -# endif /* !DLL_EXPORT */ -# else /* !GOBJECT_COMPILATION */ -# define GOBJECT_VAR extern __declspec(dllimport) -# endif /* !GOBJECT_COMPILATION */ -# endif /* !GOBJECT_STATIC_COMPILATION */ -# else /* !G_PLATFORM_WIN32 */ -# define GOBJECT_VAR _GLIB_EXTERN -# endif /* !G_PLATFORM_WIN32 */ -#endif /* GOBJECT_VAR */ - GOBJECT_VAR GType *g_param_spec_types; G_END_DECLS diff --git a/gobject/gtype.h b/gobject/gtype.h index 3f2afb31e..5e28498ce 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -23,7 +23,8 @@ #error "Only can be included directly." #endif -#include +#include +#include G_BEGIN_DECLS diff --git a/gobject/meson.build b/gobject/meson.build index bc44d5db1..09c07f306 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -22,6 +22,14 @@ gobject_install_headers = files( 'gvaluetypes.h', 'gobjectnotifyqueue.c', # sic ) + +gvisibility_h = configure_file( + output: 'gobject-visibility.h', + command: [gen_visibility_macros, meson.project_version(), 'visibility-macros', 'GOBJECT', '@OUTPUT@'], +) + +gobject_install_headers += gvisibility_h + install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject') gobject_sources = files( @@ -135,7 +143,8 @@ libgobject = library('gobject-2.0', install : true, include_directories : [configinc], dependencies : [libffi_dep, libglib_dep], - c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args, + c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'], + gnu_symbol_visibility : 'hidden', link_args : glib_link_flags, ) diff --git a/gthread/meson.build b/gthread/meson.build index 94a9ce5b5..4df201f35 100644 --- a/gthread/meson.build +++ b/gthread/meson.build @@ -19,7 +19,8 @@ libgthread = library('gthread-2.0', darwin_versions : darwin_versions, install : true, dependencies : [libglib_dep], - c_args : ['-DG_LOG_DOMAIN="GThread"' ] + glib_hidden_visibility_args, + c_args : ['-DG_LOG_DOMAIN="GThread"', glib_c_args_internal], + gnu_symbol_visibility : 'hidden', link_args : glib_link_flags, ) diff --git a/meson.build b/meson.build index 4307c20dc..c6f7b7a4f 100644 --- a/meson.build +++ b/meson.build @@ -210,29 +210,15 @@ if host_system == 'windows' and cc.get_id() != 'msvc' and cc.get_id() != 'clang- glib_conf.set('_FILE_OFFSET_BITS', 64) endif -# Detect and set symbol visibility -glib_hidden_visibility_args = [] -if get_option('default_library') != 'static' - if host_system == 'windows' or host_system == 'cygwin' - if get_option('default_library') != 'shared' - error('On Windows default_library must be "shared" or "static" but not "both"') - endif - glib_conf.set('DLL_EXPORT', true) - if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' - glib_conf.set('_GLIB_EXTERN', '__declspec(dllexport) extern') - elif cc.has_argument('-fvisibility=hidden') - glib_conf.set('_GLIB_EXTERN', '__attribute__((visibility("default"))) __declspec(dllexport) extern') - glib_hidden_visibility_args = ['-fvisibility=hidden'] - endif - elif cc.has_argument('-fvisibility=hidden') - glib_conf.set('_GLIB_EXTERN', '__attribute__((visibility("default"))) extern') - glib_hidden_visibility_args = ['-fvisibility=hidden'] - endif +if get_option('default_library') == 'both' and (host_system == 'windows' or host_system == 'cygwin') + error('On Windows default_library must be "shared" or "static" but not "both"') endif if get_option('default_library') == 'static' glibconfig_conf.set('GLIB_STATIC_COMPILATION', '1') glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1') + glibconfig_conf.set('GIO_STATIC_COMPILATION', '1') + glibconfig_conf.set('GMODULE_STATIC_COMPILATION', '1') glibconfig_conf.set('G_INTL_STATIC_COMPILATION', '1') glibconfig_conf.set('FFI_STATIC_BUILD', '1') endif @@ -2349,13 +2335,13 @@ test_timeout_slow = 180 pkg = import('pkgconfig') windows = import('windows') +subdir('tools') subdir('glib') subdir('gobject') subdir('gthread') subdir('gmodule') subdir('gio') subdir('fuzzing') -subdir('tools') # xgettext is optional (on Windows for instance) if find_program('xgettext', required : get_option('nls')).found() diff --git a/tools/gen-visibility-macros.py b/tools/gen-visibility-macros.py new file mode 100755 index 000000000..e94d7f3e0 --- /dev/null +++ b/tools/gen-visibility-macros.py @@ -0,0 +1,171 @@ +#!/usr/bin/env python3 +# +# Copyright © 2022 Collabora Inc. +# +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# Original author: Xavier Claessens + +import argparse +import textwrap +from pathlib import Path + +def gen_versions_macros(args, current_minor_version): + with args.out_path.open('w', encoding='utf-8') as ofile, \ + args.in_path.open('r', encoding='utf-8') as ifile: + for line in ifile.readlines(): + if '@GLIB_VERSIONS@' in line: + for minor in range(2, current_minor_version + 2, 2): + ofile.write(textwrap.dedent(f'''\ + /** + * GLIB_VERSION_2_{minor}: + * + * A macro that evaluates to the 2.{minor} version of GLib, in a format + * that can be used by the C pre-processor. + * + * Since: 2.{max(minor, 32)} + */ + #define GLIB_VERSION_2_{minor} (G_ENCODE_VERSION (2, {minor})) + ''')) + else: + ofile.write(line) + +def gen_doc_sections(args, current_minor_version): + with args.out_path.open('w', encoding='utf-8') as ofile, \ + args.in_path.open('r', encoding='utf-8') as ifile: + for line in ifile.readlines(): + if '@GLIB_VERSIONS@' in line: + for minor in range(2, current_minor_version + 2, 2): + ofile.write(textwrap.dedent(f'''\ + GLIB_VERSION_2_{minor} + ''')) + else: + ofile.write(line) + +def gen_visibility_macros(args, current_minor_version): + ''' + Generates a set of macros for each minor stable version of GLib + + - GLIB_VAR + + - GLIB_DEPRECATED + - GLIB_DEPRECATED_IN_… + - GLIB_DEPRECATED_MACRO_IN_… + - GLIB_DEPRECATED_ENUMERATOR_IN_… + - GLIB_DEPRECATED_TYPE_IN_… + + - GLIB_AVAILABLE_IN_ALL + - GLIB_AVAILABLE_IN_… + - GLIB_AVAILABLE_STATIC_INLINE_IN_… + - GLIB_AVAILABLE_MACRO_IN_… + - GLIB_AVAILABLE_ENUMERATOR_IN_… + - GLIB_AVAILABLE_TYPE_IN_… + + - GLIB_UNAVAILABLE(maj,min) + - GLIB_UNAVAILABLE_STATIC_INLINE(maj,min) + + The GLIB namespace can be replaced with one of GOBJECT, GIO, GMODULE. + ''' + + ns = args.namespace + with args.out_path.open('w', encoding='utf-8') as f: + f.write(textwrap.dedent(f'''\ + #pragma once + + #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined({ns}_STATIC_COMPILATION) + # define _{ns}_EXPORT __declspec(dllexport) + # define _{ns}_IMPORT __declspec(dllimport) + #elif __GNUC__ >= 4 + # define _{ns}_EXPORT __attribute__((visibility("default"))) + # define _{ns}_IMPORT + #else + # define _{ns}_EXPORT + # define _{ns}_IMPORT + #endif + #ifdef {ns}_COMPILATION + # define _{ns}_API _{ns}_EXPORT + #else + # define _{ns}_API _{ns}_IMPORT + #endif + + #define _{ns}_EXTERN _{ns}_API extern + + #define {ns}_VAR _{ns}_EXTERN + #define {ns}_AVAILABLE_IN_ALL _{ns}_EXTERN + + #ifdef GLIB_DISABLE_DEPRECATION_WARNINGS + #define {ns}_DEPRECATED _{ns}_EXTERN + #define {ns}_DEPRECATED_FOR(f) _{ns}_EXTERN + #define {ns}_UNAVAILABLE(maj,min) _{ns}_EXTERN + #define {ns}_UNAVAILABLE_STATIC_INLINE(maj,min) + #else + #define {ns}_DEPRECATED G_DEPRECATED _{ns}_EXTERN + #define {ns}_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _{ns}_EXTERN + #define {ns}_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _{ns}_EXTERN + #define {ns}_UNAVAILABLE_STATIC_INLINE(maj,min) G_UNAVAILABLE(maj,min) + #endif + ''')) + for minor in range(26, current_minor_version + 2, 2): + f.write(textwrap.dedent(f''' + #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_{minor} + #define {ns}_DEPRECATED_IN_2_{minor} {ns}_DEPRECATED + #define {ns}_DEPRECATED_IN_2_{minor}_FOR(f) {ns}_DEPRECATED_FOR (f) + #define {ns}_DEPRECATED_MACRO_IN_2_{minor} GLIB_DEPRECATED_MACRO + #define {ns}_DEPRECATED_MACRO_IN_2_{minor}_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f) + #define {ns}_DEPRECATED_ENUMERATOR_IN_2_{minor} GLIB_DEPRECATED_ENUMERATOR + #define {ns}_DEPRECATED_ENUMERATOR_IN_2_{minor}_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f) + #define {ns}_DEPRECATED_TYPE_IN_2_{minor} GLIB_DEPRECATED_TYPE + #define {ns}_DEPRECATED_TYPE_IN_2_{minor}_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f) + #else + #define {ns}_DEPRECATED_IN_2_{minor} _{ns}_EXTERN + #define {ns}_DEPRECATED_IN_2_{minor}_FOR(f) _{ns}_EXTERN + #define {ns}_DEPRECATED_MACRO_IN_2_{minor} + #define {ns}_DEPRECATED_MACRO_IN_2_{minor}_FOR(f) + #define {ns}_DEPRECATED_ENUMERATOR_IN_2_{minor} + #define {ns}_DEPRECATED_ENUMERATOR_IN_2_{minor}_FOR(f) + #define {ns}_DEPRECATED_TYPE_IN_2_{minor} + #define {ns}_DEPRECATED_TYPE_IN_2_{minor}_FOR(f) + #endif + + #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_{minor} + #define {ns}_AVAILABLE_IN_2_{minor} {ns}_UNAVAILABLE (2, {minor}) + #define {ns}_AVAILABLE_STATIC_INLINE_IN_2_{minor} GLIB_UNAVAILABLE_STATIC_INLINE (2, {minor}) + #define {ns}_AVAILABLE_MACRO_IN_2_{minor} GLIB_UNAVAILABLE_MACRO (2, {minor}) + #define {ns}_AVAILABLE_ENUMERATOR_IN_2_{minor} GLIB_UNAVAILABLE_ENUMERATOR (2, {minor}) + #define {ns}_AVAILABLE_TYPE_IN_2_{minor} GLIB_UNAVAILABLE_TYPE (2, {minor}) + #else + #define {ns}_AVAILABLE_IN_2_{minor} _{ns}_EXTERN + #define {ns}_AVAILABLE_STATIC_INLINE_IN_2_{minor} + #define {ns}_AVAILABLE_MACRO_IN_2_{minor} + #define {ns}_AVAILABLE_ENUMERATOR_IN_2_{minor} + #define {ns}_AVAILABLE_TYPE_IN_2_{minor} + #endif + ''')) + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('glib_version', help='Current GLib version') + subparsers = parser.add_subparsers() + + versions_parser = subparsers.add_parser('versions-macros', help='Generate versions macros') + versions_parser.add_argument('in_path', help='input file', type=Path) + versions_parser.add_argument('out_path', help='output file', type=Path) + versions_parser.set_defaults(func=gen_versions_macros) + + doc_parser = subparsers.add_parser('doc-sections', help='Generate glib-sections.txt') + doc_parser.add_argument('in_path', help='input file', type=Path) + doc_parser.add_argument('out_path', help='output file', type=Path) + doc_parser.set_defaults(func=gen_doc_sections) + + visibility_parser = subparsers.add_parser('visibility-macros', help='Generate visibility macros') + visibility_parser.add_argument('namespace', help='Macro namespace') + visibility_parser.add_argument('out_path', help='output file', type=Path) + visibility_parser.set_defaults(func=gen_visibility_macros) + + args = parser.parse_args() + version = [int(i) for i in args.glib_version.split('.')] + assert version[0] == 2 + args.func(args, version[1]) + +if __name__ == '__main__': + main() diff --git a/tools/meson.build b/tools/meson.build index e91c8a2f9..2d4192e46 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -22,3 +22,5 @@ if host_system != 'windows' install_tag : 'devel', ) endif + +gen_visibility_macros = find_program('gen-visibility-macros.py')