[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new module 'hasmntopt'
From: |
Bruno Haible |
Subject: |
new module 'hasmntopt' |
Date: |
Mon, 19 Aug 2024 17:23:52 +0200 |
In GNU libffcall, I need to use the function hasmntopt(). Since it does not
exist on Android API levels <= 25, I'm adding a gnulib module for it.
The unit tests of this module reveal that the implementation of hasmntopt()
is broken on musl libc: it confuses the "atime" option with the "noatime"
option; but these options have opposite meanings.
These patches provide the module, with the necessary override.
2024-08-19 Bruno Haible <bruno@clisp.org>
hasmntopt: Add tests.
* tests/test-hasmntopt.c: New file.
* modules/hasmntopt-tests: New file.
hasmntopt: New module.
* lib/mntent.in.h: Add config.h check.
(hasmntopt): New declaration.
* lib/hasmntopt.c: New file, based on glibc/misc/mntent_r.c.
* m4/hasmntopt.m4: New file.
* m4/mntent_h.m4 (gl_MNTENT_H): Test whether hasmntopt is declared.
(gl_MNTENT_H_REQUIRE_DEFAULTS): Initialize GNULIB_HASMNTOPT.
(gl_MNTENT_H_DEFAULTS): Initialize HAVE_HASMNTOPT, HAVE_SETMNTENT,
REPLACE_HASMNTOPT.
* modules/mntent (Depends-on): Add snippet/arg-nonnull, snippet/c++defs,
snippet/warn-on-use.
(Makefile.am): Insert c++defs.h, arg-nonnull.h, warn-on-use.h into
mntent.h. Substitute GNULIB_HASMNTOPT, HAVE_HASMNTOPT, HAVE_SETMNTENT,
REPLACE_HASMNTOPT.
* modules/hasmntopt: New file.
* doc/glibc-functions/hasmntopt.texi: Mention the new module and the
musl bug.
* doc/glibc-functions/setmntent.texi: Update info about Android.
* doc/glibc-functions/getmntent_r.texi: Likewise.
* doc/glibc-functions/endmntent.texi: Likewise.
2024-08-19 Bruno Haible <bruno@clisp.org>
mntent: New module.
* lib/mntent.in.h: New file.
* m4/mntent_h.m4: New file.
* modules/mntent: New file.
* doc/glibc-headers/mntent.texi: Mention the new module.
* top/maint.mk (gl_prefer_angle_bracket_headers_): Add mntent.h.
* doc/gnulib-tool.texi (Style of #include statements): Add mntent.h to
the list.
0001-mntent-New-module.patch
Description: Text Data
0002-hasmntopt-New-module.patch
Description: Text Data
0003-hasmntopt-Add-tests.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- new module 'hasmntopt',
Bruno Haible <=