c-stdaux: re-import git-subtree for 'src/c-stdaux'
git subtree pull --prefix src/c-stdaux git@github.com:c-util/c-stdaux.git main --squash
This commit is contained in:
@@ -21,7 +21,7 @@ The requirements for this project are:
|
|||||||
|
|
||||||
At build-time, the following software is required:
|
At build-time, the following software is required:
|
||||||
|
|
||||||
* `meson >= 0.41`
|
* `meson >= 0.60`
|
||||||
* `pkg-config >= 0.29`
|
* `pkg-config >= 0.29`
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
@@ -1,15 +1,18 @@
|
|||||||
project(
|
project(
|
||||||
'c-stdaux',
|
'c-stdaux',
|
||||||
'c',
|
'c',
|
||||||
version: '1',
|
|
||||||
license: 'Apache',
|
|
||||||
default_options: [
|
default_options: [
|
||||||
'c_std=c11'
|
'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'
|
project_description = 'Auxiliary macros and functions for the C standard library'
|
||||||
|
|
||||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||||
mod_pkgconfig = import('pkgconfig')
|
mod_pkgconfig = import('pkgconfig')
|
||||||
|
|
||||||
subdir('src')
|
subdir('src')
|
||||||
|
|
||||||
|
meson.override_dependency('libcstdaux-'+major, libcstdaux_dep, static: true)
|
||||||
|
@@ -13,10 +13,10 @@ if not meson.is_subproject()
|
|||||||
install_headers('c-stdaux.h')
|
install_headers('c-stdaux.h')
|
||||||
|
|
||||||
mod_pkgconfig.generate(
|
mod_pkgconfig.generate(
|
||||||
version: meson.project_version(),
|
|
||||||
name: 'libcstdaux',
|
|
||||||
filebase: 'libcstdaux',
|
|
||||||
description: project_description,
|
description: project_description,
|
||||||
|
filebase: 'libcstdaux-'+major,
|
||||||
|
name: 'libcstdaux',
|
||||||
|
version: meson.project_version(),
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -359,7 +359,7 @@ static void test_destructors(void) {
|
|||||||
|
|
||||||
/* make sure c_closep() deals fine with negative FDs */
|
/* 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;
|
t = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ static void test_destructors(void) {
|
|||||||
* path works as well.
|
* path works as well.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < 2; ++i) {
|
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);
|
t = eventfd(0, EFD_CLOEXEC);
|
||||||
c_assert(t >= 0);
|
c_assert(t >= 0);
|
||||||
@@ -401,7 +401,7 @@ static void test_destructors(void) {
|
|||||||
|
|
||||||
/* make sure c_flosep() deals fine with NULL */
|
/* 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;
|
t = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ static void test_destructors(void) {
|
|||||||
* path works as well.
|
* path works as well.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < 2; ++i) {
|
for (i = 0; i < 2; ++i) {
|
||||||
_c_cleanup_(c_fclosep) FILE *t = NULL;
|
_c_cleanup_(c_fclosep) _c_unused_ FILE *t = NULL;
|
||||||
int tfd;
|
int tfd;
|
||||||
|
|
||||||
tfd = eventfd(0, EFD_CLOEXEC);
|
tfd = eventfd(0, EFD_CLOEXEC);
|
||||||
|
Reference in New Issue
Block a user