diff --git a/src/c-stdaux/README.md b/src/c-stdaux/README.md index 51bff9778..124c692e1 100644 --- a/src/c-stdaux/README.md +++ b/src/c-stdaux/README.md @@ -21,7 +21,7 @@ The requirements for this project are: At build-time, the following software is required: - * `meson >= 0.41` + * `meson >= 0.60` * `pkg-config >= 0.29` ### Build diff --git a/src/c-stdaux/meson.build b/src/c-stdaux/meson.build index c8c5da536..367d8b5fe 100644 --- a/src/c-stdaux/meson.build +++ b/src/c-stdaux/meson.build @@ -1,15 +1,18 @@ project( 'c-stdaux', 'c', - version: '1', - license: 'Apache', default_options: [ 'c_std=c11' ], + license: 'Apache', + version: '1.0.0', ) +major = meson.project_version().split('.')[0] project_description = 'Auxiliary macros and functions for the C standard library' add_project_arguments('-D_GNU_SOURCE', language: 'c') mod_pkgconfig = import('pkgconfig') subdir('src') + +meson.override_dependency('libcstdaux-'+major, libcstdaux_dep, static: true) diff --git a/src/c-stdaux/src/meson.build b/src/c-stdaux/src/meson.build index f6db824d2..7c2e3a13c 100644 --- a/src/c-stdaux/src/meson.build +++ b/src/c-stdaux/src/meson.build @@ -13,10 +13,10 @@ if not meson.is_subproject() install_headers('c-stdaux.h') mod_pkgconfig.generate( - version: meson.project_version(), - name: 'libcstdaux', - filebase: 'libcstdaux', description: project_description, + filebase: 'libcstdaux-'+major, + name: 'libcstdaux', + version: meson.project_version(), ) endif diff --git a/src/c-stdaux/src/test-basic.c b/src/c-stdaux/src/test-basic.c index d58d561d2..15499353c 100644 --- a/src/c-stdaux/src/test-basic.c +++ b/src/c-stdaux/src/test-basic.c @@ -359,7 +359,7 @@ static void test_destructors(void) { /* make sure c_closep() deals fine with negative FDs */ { - _c_cleanup_(c_closep) int t = 0; + _c_cleanup_(c_closep) _c_unused_ int t = 0; t = -1; } @@ -370,7 +370,7 @@ static void test_destructors(void) { * path works as well. */ for (i = 0; i < 2; ++i) { - _c_cleanup_(c_closep) int t = -1; + _c_cleanup_(c_closep) _c_unused_ int t = -1; t = eventfd(0, EFD_CLOEXEC); c_assert(t >= 0); @@ -401,7 +401,7 @@ static void test_destructors(void) { /* make sure c_flosep() deals fine with NULL */ { - _c_cleanup_(c_fclosep) FILE *t = (void *)0xdeadbeef; + _c_cleanup_(c_fclosep) _c_unused_ FILE *t = (void *)0xdeadbeef; t = NULL; } @@ -412,7 +412,7 @@ static void test_destructors(void) { * path works as well. */ for (i = 0; i < 2; ++i) { - _c_cleanup_(c_fclosep) FILE *t = NULL; + _c_cleanup_(c_fclosep) _c_unused_ FILE *t = NULL; int tfd; tfd = eventfd(0, EFD_CLOEXEC);