diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2022-10-27 21:55:09 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2022-10-27 21:55:09 +0000 |
commit | 9f108815740c7bb64bd8fae80d89161ffe49add6 (patch) | |
tree | c5519f5cdf3efda0c746265a615cb1d690e2df25 /gmodule | |
parent | d0b3021f7f06648b437bd24dc9ce7c5e9d1da2c5 (diff) | |
parent | a62dd272d8acc38e90a9320f274ec0a4ddb4e45a (diff) | |
download | glib-9f108815740c7bb64bd8fae80d89161ffe49add6.tar.gz |
Merge branch 'wip/smcv/autofd' into 'main'
gstdio: Silence "Not available before" warnings for inline functions
Closes #2796
See merge request GNOME/glib!3026
Diffstat (limited to 'gmodule')
-rw-r--r-- | gmodule/tests/max-version.c | 46 | ||||
-rw-r--r-- | gmodule/tests/meson.build | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/gmodule/tests/max-version.c b/gmodule/tests/max-version.c new file mode 100644 index 000000000..bae63b7bb --- /dev/null +++ b/gmodule/tests/max-version.c @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Collabora Ltd. + * 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 + * <http://www.gnu.org/licenses/>. + */ + +#ifndef GLIB_VERSION_MAX_ALLOWED +/* This is the oldest version macro available */ +#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_26 +#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_26 +#endif + +#include <glib.h> + +#include <gmodule.h> + +static void +nothing (void) +{ + /* This doesn't really do anything: the real "test" is at compile time. + * Just make sure the GModule library gets linked. */ + g_debug ("GModule supported: %s", g_module_supported () ? "yes" : "no"); +} + +int +main (int argc, + char *argv[]) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/max-version/tested-at-compile-time", nothing); + return g_test_run (); +} diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build index a751f3185..9e4f5a39d 100644 --- a/gmodule/tests/meson.build +++ b/gmodule/tests/meson.build @@ -1,4 +1,5 @@ gmodule_tests = { + 'max-version' : {'install': false}, 'module-test-library' : { 'export_dynamic' : true, 'source': 'module-test.c', |