Merge branch 'matthiasc/for-main' into 'main'

Revert "modules: Fix build on Visual Studio"

See merge request GNOME/gtk!5187
This commit is contained in:
Matthias Clasen 2022-11-01 01:09:51 +00:00
commit fcf00391b4
8 changed files with 21 additions and 17 deletions

View File

@ -161,7 +161,8 @@ gdk_load_jpeg (GBytes *input_bytes,
jpeg_create_decompress (&info);
info.mem->max_memory_to_use = 300 * 1024 * 1024;
/* Limit to 1GB to avoid OOM with large images */
info.mem->max_memory_to_use = 1024 * 1024 * 1024;
jpeg_mem_src (&info,
g_bytes_get_data (input_bytes, NULL),

View File

@ -342,19 +342,15 @@ endif
common_cflags = cc.get_supported_arguments(test_cflags)
# Symbol visibility
if os_win32
visibility_define = '__declspec(dllexport) extern'
else
visibility_define = '__attribute__((visibility("default"))) extern'
endif
if get_option('default_library') != 'static'
cdata.set('_GDK_EXTERN', visibility_define)
if os_win32
cdata.set('DLL_EXPORT', true)
endif
if cc.get_id() != 'msvc'
cdata.set('_GDK_EXTERN', '__declspec(dllexport) extern')
if cc.get_id() != 'msvc'
common_cflags += ['-fvisibility=hidden']
endif
else
cdata.set('_GDK_EXTERN', '__attribute__((visibility("default"))) extern')
common_cflags += ['-fvisibility=hidden']
endif
endif

View File

@ -97,6 +97,7 @@ G_DEFINE_TYPE_EXTENDED (GtkGstMediaFile, gtk_gst_media_file, GTK_TYPE_MEDIA_FILE
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
gtk_gst_media_file_paintable_init))
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -108,6 +109,7 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
G_GNUC_NORETURN
void
g_io_module_unload (GIOModule *module)
@ -115,6 +117,7 @@ g_io_module_unload (GIOModule *module)
g_assert_not_reached ();
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{

View File

@ -2,11 +2,7 @@ media_subdir = 'gtk-4.0/@0@/media'.format(gtk_binary_version)
media_install_dir = join_paths(get_option('libdir'), media_subdir)
media_backends = []
extra_c_args = [
'-DGTK_COMPILATION',
'-D_GLIB_EXTERN=@0@'.format(visibility_define),
]
extra_c_args = ['-DGTK_COMPILATION']
extra_c_args += common_cflags
ffmpeg_opt = get_option('media-ffmpeg')

View File

@ -246,6 +246,7 @@ static void secrets_service_vanished_cb (GDBusConnec
G_DEFINE_DYNAMIC_TYPE(GtkPrintBackendCups, gtk_print_backend_cups, GTK_TYPE_PRINT_BACKEND)
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -260,11 +261,13 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
void
g_io_module_unload (GIOModule *module)
{
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{

View File

@ -103,6 +103,7 @@ static GtkPageSetup * file_printer_get_default_page_size (GtkPrinter
G_DEFINE_DYNAMIC_TYPE(GtkPrintBackendFile, gtk_print_backend_file, GTK_TYPE_PRINT_BACKEND)
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -116,11 +117,13 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
void
g_io_module_unload (GIOModule *module)
{
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{

View File

@ -82,6 +82,7 @@ static void gtk_print_backend_lpr_print_stream (GtkPrintBacke
G_DEFINE_DYNAMIC_TYPE (GtkPrintBackendLpr, gtk_print_backend_lpr, GTK_TYPE_PRINT_BACKEND)
G_MODULE_EXPORT
void
g_io_module_load (GIOModule *module)
{
@ -95,11 +96,13 @@ g_io_module_load (GIOModule *module)
10);
}
G_MODULE_EXPORT
void
g_io_module_unload (GIOModule *module)
{
}
G_MODULE_EXPORT
char **
g_io_module_query (void)
{

View File

@ -8,7 +8,6 @@ printbackends_args = [
'-DGTK_COMPILATION',
'-DGTK_DISABLE_DEPRECATION_WARNINGS',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
'-D_GLIB_EXTERN=@0@'.format(visibility_define),
] + common_cflags
cups_dep = dependency('cups', version : '>=2.0', required: get_option('print-cups'))