| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This attempts to fix <https://bugs.gnu.org/61386>, a bug in GNU cp
caused by a serious data corruption bug in FreeBSD and macOS.
* doc/posix-functions/lseek.texi: Mention the bug.
* lib/unistd.in.h (SEEK_DATA, SEEK_HOLE): Undef in macOS < 13 and
FreeBSD < 14. FreeBSD fixed the bug sometime during FreeBSD 13
<https://bugs.freebsd.org/256205>, so the "FreeBSD < 14" is
conservative. It’s unknown when Apple will fix macOS so use
macOS "9999" as a placeholder.
* m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek if on one of the
above platforms.
|
|
|
|
|
| |
* doc/posix-functions/sigprocmask.texi: Mention a NetBSD 9.0 bug.
* doc/posix-functions/pthread_sigmask.texi: Likewise.
|
|
|
|
|
|
|
| |
* tests/test-mbrtowc.c (main): On Android 5.0 or newer, when testing
the "C" locale, verify that the encoding is UTF-8.
* tests/test-mbrtoc32.c (main): Likewise.
* doc/posix-functions/setlocale.texi: Mention the Android problems.
|
|
|
|
|
| |
* m4/perror.m4 (gl_FUNC_PERROR): Set REPLACE_PERROR to 1 on Android.
* doc/posix-functions/perror.texi: Mention the Android problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/freading.m4 (gl_FUNC_FREADING): Likewise.
* m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise.
* m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
* m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise.
* m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
* m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
* m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise.
* doc/glibc-functions/getentropy.texi: Mark function as existing in
Android 9.0.
* doc/glibc-functions/getrandom.texi: Likewise.
* doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise.
* doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.
|
|
|
|
|
| |
* doc/posix-functions/ffs.texi: Mention Android problem.
* m4/ffs.m4: Update comment.
|
| |
|
|
|
|
|
|
|
|
| |
C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
* NEWS, doc/posix-functions/asctime.texi:
* doc/posix-functions/ctime.texi: Mention this.
* lib/time.in.h (ctime): Deprecate any ctime replacement.
* modules/ctime: Now obsolete.
|
|
|
|
|
|
| |
* doc/posix-functions/poll.texi: Reinstate (updated) macOS info,
removed in recent cleanup re removal of support for Mac OS X <= 10.4.
* m4/poll.m4: Update macOS to latest tested version.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/memset_explicit.texi, lib/memset_explicit.c:
* m4/memset_explicit.m4, modules/memset_explicit:
* modules/memset_explicit-tests, tests/test-memset_explicit.c:
New files.
* lib/string.in.h (memset_explict): New decl.
* m4/string_h.m4 (gl_STRING_H, gl_STRING_H_REQUIRE_DEFAULTS)
(gl_STRING_H_DEFAULTS):
* modules/string (string.h):
Support memset_explicit.
|
|
|
|
|
| |
* doc/posix-functions/sprintf.texi, doc/posix-functions/vsnprintf.texi:
Mention that these functions are deprecated.
|
|
|
|
|
|
| |
* doc/posix-functions/getdelim.texi: Mention the macOS bug.
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Let the "checking for working
getdelim function" test answer 'no' on macOS.
|
|
|
|
|
|
| |
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Test for 32-bit mingw bug.
* tests/test-nanosleep.c (main): Add another test.
* doc/posix-functions/nanosleep.texi: Mention the mingw bug.
|
|
|
|
|
|
| |
* m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Test against bug seen on glibc 2.17
x86_64.
* doc/posix-functions/fmal.texi: Update info.
|
|
|
|
|
|
|
| |
Reported by Eric Gallager <egall@gwmail.gwu.edu> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00045.html>.
* doc/posix-functions/mmap.texi: Add parenthesis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/sys_stat.in.h (chmod): Declare when GNULIB_CHMOD is 1.
* lib/chmod.c: New file, based on lib/lchmod.c.
* m4/chmod.m4: New file, based on m4/fchmodat.m4.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H): Test whether chmod is declared.
(gl_SYS_STAT_H_REQUIRE_DEFAULTS): Initialize GNULIB_CHMOD.
(gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_CHMOD.
* modules/sys_stat (Makefile.am): Substitute GNULIB_CHMOD,
REPLACE_CHMOD.
* modules/chmod: New file, based on modules/lchmod.
* doc/posix-functions/chmod.texi: Mention the new module and the
problems on IRIX and Windows.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00075.html
* lib/lchmod.c: Include string.h, for strlen.
(lchmod): Do not depend on HAVE_READLINK since we now depend on
the readlink module. Check for AIX 7.2 bug.
* m4/lchmod.m4 (gl_PREREQ_LCHMOD): Do not check for readlink
since we now depend on the readlink module.
* modules/lchmod (Depends-on): Depend on readlink.
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Benno Schulenberg in:
https://lists.gnu.org/r/bug-gnulib/2022-04/msg00052.html
* doc/posix-functions/dirfd.texi: Document NetBSD 9.2 portability
bugs. Remove an old common about errno that is no longer true
of POSIX 2018.
* lib/glob.c (glob_in_dir): Convert dirfd arg from void *
to DIR * before passing it to dirfd.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/aligned_alloc.texi (aligned_alloc):
Mention AddressSanitizer bug.
* lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC):
Define to 0 if AddressSanitizer is in use.
* tests/test-alignalloc.c (test_alignalloc): New function,
which tests for non-aligned sizes too.
(main): Use it. Don’t bother checking for alignments
greater than 16 MiB, as this flummoxes AddressSanitizer
and there seems little point to testing them.
|
|
|
|
|
|
| |
* doc/posix-functions/clock_getres.texi:
* doc/posix-functions/timespec_getres.texi:
Document problems with timestamp resolution.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/time.in.h (timespec_getres): New decl.
* lib/timespec_getres.c, m4/timespec_getres.m4:
* modules/timespec_getres, modules/timespec_getres-tests:
* tests/test-timespec_getres.c:
New files.
* m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS, gl_TIME_H_DEFAULTS):
* modules/time (time.h):
Support timespec_getres.
|
|
|
|
|
|
|
| |
* lib/gettime-res.c, modules/gettime-res: New files.
* lib/timespec.h (gettime_res): New decl.
* m4/clock_time.m4 (gl_CLOCK_TIME): Also check for clock_getres.
* m4/gettime.m4 (gl_GETTIME_RES): New macro.
|
| |
|
|
|
|
|
|
| |
* lib/sys_select.in.h (pselect): Use _GL_CXXALIAS_SYS_CAST instead of
_GL_CXXALIAS_SYS.
* doc/posix-functions/pselect.texi: Mention the AIX problem.
|
|
|
|
|
| |
* doc/glibc-functions/ptsname_r.texi: Update info regarding Mac OS X.
* doc/posix-functions/getlogin_r.texi: Update info regarding FreeBSD.
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Sudhip Nashi (Bug#51857).
* doc/posix-functions/lseek.texi (lseek): Mention macOS SEEK_DATA
issue.
* lib/lseek.c (rpl_lseek): Work around macOS portability glitch.
* m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek on Darwin.
* modules/lseek (Depends-on): Depend on msvc-nothrow
and fstat only if needed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/timespec_getres.texi: New file.
* doc/glibc-functions/_Fork.texi: New file.
* doc/glibc-functions/closefrom.texi: New file.
* doc/glibc-functions/dn_comp.texi: New file.
* doc/glibc-functions/dn_skipname.texi: New file.
* doc/glibc-functions/execveat.texi: New file.
* doc/glibc-functions/posix_spawn_file_actions_addclosefrom_np.texi: New
file.
* doc/glibc-functions/res_dnok.texi: New file.
* doc/glibc-functions/res_hnok.texi: New file.
* doc/glibc-functions/res_mailok.texi: New file.
* doc/glibc-functions/res_nmkquery.texi: New file.
* doc/glibc-functions/res_nquery.texi: New file.
* doc/glibc-functions/res_nquerydomain.texi: New file.
* doc/glibc-functions/res_nsearch.texi: New file.
* doc/glibc-functions/res_nsend.texi: New file.
* doc/glibc-functions/res_ownok.texi: New file.
* doc/glibc-functions/res_send.texi: New file.
* doc/gnulib.texi: Include them.
* doc/glibc-functions/inet_neta.texi: Remove file.
* doc/glibc-functions/malloc_get_state.texi: Remove file.
* doc/glibc-functions/malloc_set_state.texi: Remove file.
* doc/glibc-functions/pthread_mutex_consistent_np.texi: Remove file.
* doc/glibc-functions/pthread_mutexattr_getrobust_np.texi: Remove file.
* doc/glibc-functions/pthread_mutexattr_setrobust_np.texi: Remove file.
* doc/glibc-functions/pthread_yield.texi: Remove file.
* doc/gnulib.texi: Don't include them.
* doc/glibc-headers/resolv.texi: Update.
* doc/pastposix-functions/h_errno.texi: Likewise.
* doc/posix-functions/*.texi: Likewise.
* doc/glibc-functions/*.texi: Likewise.
|
|
|
|
|
| |
* doc/posix-functions/fstatat.texi (fstatat):
Mention AT_EMPTY_PATH when talking about empty strings.
|
|
|
|
| |
* doc/posix-functions/fstatat.texi: Document an old glibc 2.7 bug.
|
|
|
|
|
|
|
| |
* m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): If posix_spawn does not exist
but is declared, set REPLACE_POSIX_SPAWN.
* doc/posix-functions/posix_spawn.texi: Update platforms list.
* doc/posix-functions/posix_spawnp.texi: Likewise.
|
|
|
|
|
|
| |
* doc/posix-functions/malloc.texi: Re-add platforms list.
* doc/posix-functions/realloc.texi: Likewise.
* doc/posix-functions/calloc.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In glibc 2.30 and later, malloc, realloc and calloc reject
attempts to create objects larger than PTRDIFF_MAX bytes.
This patch changes malloc-gnu etc. to support this behavior
on non-GNU hosts. It also makes this change for malloc-posix etc.
since it’s a safety measure that ought to be in POSIX (perhaps
we can talk them into that...).
In writing this patch I found a complicated set of code that had
accumulated over the years, some written by yours truly. I got
rid of the code I couldn’t see the need for nowadays. Among other
things, the GNU realloc behavior is no longer incompatible with
the C standard, because in C17 the latter was relaxed to allow the
former. If I went too far in cleaning up, the old stuff can be
resurrected.
This change is mostly for 32-bit platforms, since practical 64-bit
platforms cannot create objects larger than PTRDIFF_MAX bytes anyway.
* doc/posix-functions/calloc.texi:
* doc/posix-functions/malloc.texi:
* doc/posix-functions/realloc.texi:
Mention ptrdiff_t issues, and go into more detail about what
the gnu extension module does.
* doc/posix-functions/realloc.texi: Fix now-obsolete commentary
about C99 vs glibc, as C17 allows the glibc behavior and POSIX
will follow suit when it gets around to it.
* lib/calloc.c, lib/malloc.c, lib/realloc.c:
Simplify by always supplying a GNU-compatible version,
as that suffices for correctness and is good enough for performance.
Include xalloc-oversized.h, and use xalloc_oversized to
check for ptrdiff_t overflow.
(NEED_CALLOC_GNU, NEED_MALLOC_GNU, NEED_REALLOC_GNU): Remove.
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
* m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
* m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
Don’t start with a newline. Fix message to match behavior.
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don’t test for size_t overflow,
as the ptrdiff_t test is good enough.
* m4/calloc.m4 (gl_FUNC_CALLOC_GNU):
* m4/malloc.m4 (gl_FUNC_MALLOC_GNU):
* m4/realloc.m4 (gl_FUNC_REALLOC_GNU):
Do not define HAVE_CALLOC_GNU, HAVE_MALLOC_GNU, HAVE_REALLOC_GNU.
It’s not worth the aggravation of maintaining these, as they
are confusing (they don’t really mean GNU-compatible anyway).
Don’t bother testing for GNU behavior if we have already decided
to replace the function, since the replacement is always GNUish.
* m4/calloc.m4 (gl_FUNC_CALLOC_POSIX):
* m4/realloc.m4 (gl_FUNC_REALLOC_POSIX):
Defer to gl_FUNC_MALLOC_POSIX.
* m4/malloc.m4 (gl_FUNC_MALLOC_PTRDIFF, gl_CHECK_MALLOC_PTRDIFF):
New macros.
(gl_FUNC_MALLOC_POSIX): Use them to check for ptrdiff_t overflow.
* modules/calloc-gnu, modules/malloc-gnu, modules/realloc-gnu:
Remove no-longer-needed module indicators.
* modules/calloc-posix, modules/malloc-posix, modules/realloc-posix:
Depend on xalloc-oversized.
* modules/malloc-posix: Require gl_FUNC_MALLOC_POSIX instead of
calling it directly, so that other code can require it.
* modules/realloc-posix: Depend on free-posix and malloc-posix.
|
|
|
|
|
|
|
|
|
| |
* doc/posix-headers/*.texi: Update.
* doc/glibc-headers/*.texi: Update.
* doc/posix-functions/*.texi: Likewise.
* doc/pastposix-functions/*.texi: Likewise.
* doc/glibc-functions/*.texi: Likewise.
* m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Update cross-compilation guess.
|
|
|
|
| |
* doc/posix-functions/strtol.texi: Put @item inside @itemize block.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (strtoll): Override if REPLACE_STRTOLL is 1.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOLL.
* m4/strtoll.m4 (gl_FUNC_STRTOLL): Test whether strtoll works. Set
REPLACE_STRTOLL.
* modules/stdlib (Makefile.am): Substitute REPLACE_STRTOLL.
* modules/strtoll (configure.ac): Test REPLACE_STRTOLL.
* tests/test-strtoll.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtoll.texi: Mention the bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (strtol): New declaration.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtol is declared.
(gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOL, HAVE_STRTOL,
REPLACE_STRTOL.
* m4/strtol.m4 (gl_FUNC_STRTOL): Require gl_STDLIB_H_DEFAULTS. Test
whether strtol works. Set REPLACE_STRTOL.
* modules/stdlib (Makefile.am): Substitute GNULIB_STRTOL, HAVE_STRTOL,
REPLACE_STRTOL.
* modules/strtol (Status, Notice): Remove.
(Depends-on): Add stdlib.
(configure.ac): Test HAVE_STRTOL and REPLACE_STRTOL. Invoke
gl_STDLIB_MODULE_INDICATOR.
* tests/test-strtol.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtol.texi: Mention the bug.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/stdlib.in.h (strtoull): Override if REPLACE_STRTOULL is 1.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_STRTOULL.
* m4/strtoull.m4 (gl_FUNC_STRTOULL): Test whether strtoull works. Set
REPLACE_STRTOULL.
* modules/stdlib (Makefile.am): Substitute REPLACE_STRTOULL.
* modules/strtoull (configure.ac): Test REPLACE_STRTOULL.
* tests/test-strtoull.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtoull.texi: Mention the bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Eric Blake <eblake@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00082.html>.
* lib/stdlib.in.h (strtoul): New declaration.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtoul is declared.
(gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOUL, HAVE_STRTOUL,
REPLACE_STRTOUL.
* m4/strtoul.m4 (gl_FUNC_STRTOUL): Require gl_STDLIB_H_DEFAULTS. Test
whether strtoul works. Set REPLACE_STRTOUL.
* modules/stdlib (Makefile.am): Substitute GNULIB_STRTOUL, HAVE_STRTOUL,
REPLACE_STRTOUL.
* modules/strtoul (Status, Notice): Remove.
(Depends-on): Add stdlib.
(configure.ac): Test HAVE_STRTOUL and REPLACE_STRTOUL. Invoke
gl_STDLIB_MODULE_INDICATOR.
* tests/test-strtoul.c (main): Add tests of hexadecimal integer syntax.
* doc/posix-functions/strtoul.texi: Mention the bug.
|
|
|
|
|
|
| |
* doc/posix-functions/mbrtowc.texi: Mention the possible out-of-range
wchar_t values returned by this function on glibc.
* doc/posix-functions/mbtowc.texi: Likewise.
|
|
|
|
|
| |
* doc/glibc-functions/sethostname.texi: Update regarding macOS.
* doc/glibc-functions/sethostname.texi: List the affected platforms.
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-headers/*.texi: Update.
* doc/glibc-headers/*.texi: Update.
* doc/posix-functions/*.texi: Likewise.
* doc/pastposix-functions/*.texi: Likewise.
* doc/glibc-functions/*.texi: Likewise.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update cross-compilation
guess.
|
|
|
|
| |
* doc/posix-functions/ftell.texi: Mention the macOS bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Martin Storsjö <martin@martin.st> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00002.html>.
* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): On macOS, don't define
FUNC_UNGETC_BROKEN. Instead, set gl_ftello_broken_after_ungetc to yes.
* m4/ftello.m4 (gl_FUNC_FTELLO): Invoke gl_FUNC_UNGETC_WORKS, and
arrange to provide the workaround if ftello is broken after ungetc.
* lib/ftello.c: Include <errno.h>, intprops.h.
(ftello) [FTELLO_BROKEN_AFTER_UNGETC]: Implement from scratch.
* modules/ftello (Files): Add m4/ungetc.m4.
(Depends-on): Add intprops.
* doc/posix-functions/ftello.texi: Mention the macOS bug.
|
|
|
|
| |
* doc/posix-functions/free.texi: Add platform details.
|
|
|
|
|
|
|
|
|
|
| |
* doc/glibc-functions/mallinfo2.texi: New file.
* doc/gnulib.texi: Include it.
(Glibc sys/vtimes.h): Remove section.
* doc/glibc-functions/vtimes.texi: Remove file.
* doc/pastposix-functions/h_errno.texi: Update.
* doc/posix-functions/*.texi: Likewise.
* doc/glibc-functions/*.texi: Likewise.
|
|
|
|
|
|
|
| |
* lib/string-buffer.h: New file.
* lib/string-buffer.c: New file.
* modules/string-buffer: New file.
* doc/posix-functions/open_memstream.texi: Mention the new module.
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/initstate.texi: Mention different prototype on
MidnightBSD 2.0.
* doc/posix-functions/srandom.texi: Likewise.
* doc/posix-functions/getlogin_r.texi: Likewise.
* doc/glibc-functions/sethostname.texi: Likewise.
|
|
|
|
|
|
| |
* doc/posix-functions/wcwidth.texi: Mention MidnightBSD as an affected
platform.
* m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Update comments.
|
|
|
|
|
|
|
| |
* doc/posix-functions/pthread_sigmask.texi: Mention MidnightBSD as an
affected platform.
* m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Update
cross-compilation guess accordingly.
|
|
|
|
| |
* doc/posix-functions/fmaf.texi: Add note about QEMU bug.
|