| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* doc/posix-functions/remainderl.texi: Document musl libc bug.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL_WORKS): Add more tests. Update
cross compilation guess.
|
|
|
|
|
|
| |
* doc/posix-functions/log2l.texi: Document musl libc bugs.
* m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Add more tests. Update cross
compilation guess.
|
|
|
|
|
|
| |
* doc/posix-functions/log1pl.texi: Document musl libc bug.
* m4/log1pl.m4 (gl_FUNC_LOG1PL_WORKS): New macro.
(gl_FUNC_LOG1PL): Invoke it.
|
|
|
|
|
|
| |
* doc/posix-functions/log10l.texi: Document musl libc bug.
* m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Update comment and cross
compilation guess.
|
|
|
|
|
|
| |
* doc/posix-functions/logl.texi: Document musl libc bug.
* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Update comment and cross
compilation guess.
|
|
|
|
|
|
| |
* doc/posix-functions/expm1l.texi: Document musl libc bug.
* m4/expm1l.m4 (gl_FUNC_EXPM1L): Update comment and cross
compilation guess.
|
|
|
|
|
|
| |
* doc/posix-functions/expl.texi: Document musl libc bug.
* m4/expl.m4 (gl_FUNC_EXPL): Update comment and cross
compilation guess.
|
|
|
|
|
|
|
| |
* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE): Test a
negative file descriptor, not an out-of-range file descriptor.
* tests/test-posix_spawn_file_actions_addclose.c (main): Add comment.
* doc/posix-functions/posix_spawn_file_actions_addclose.texi: Update.
|
|
|
|
|
| |
* doc/posix-functions/getaddrinfo.texi (getaddrinfo): Gnulib does
not support IDN.
|
|
|
|
|
|
| |
* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Guess no also on
musl libc.
* doc/posix-functions/getcwd.texi: Update platform info.
|
|
|
|
|
|
| |
* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Test for lstat. Add a
test case that involves a symbolic link to an existing file.
* doc/posix-functions/realpath.texi: Mention the Cygwin bug.
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by Natanael Copa <ncopa@alpinelinux.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2021-01/msg00021.html>.
* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Add a test whether // is
the same as /, on Linux only.
* lib/canonicalize-lgpl.c: Correct indentation of preprocessor
directives.
* doc/posix-functions/realpath.texi: Mention the musl 1.2.2 bug.
|
|
|
|
| |
* doc/posix-functions/realpath.texi: Update info about macOS.
|
|
|
|
|
|
|
|
|
|
| |
* m4/fchmodat.m4 (gl_FUNC_FCHMODAT): In the test whether fchmodat works,
also test for the trailing slashes behaviour. Define
HAVE_NEARLY_WORKING_FCHMODAT if this is the only missing feature.
* lib/fchmodat.c (fchmodat): If HAVE_NEARLY_WORKING_FCHMODAT, handle
trailing slashes here.
* modules/fchmodat (Depends-on): Sort by condition, not alphabetically.
* doc/posix-functions/fchmodat.texi: Document the AIX bug.
|
|
|
|
| |
* doc/posix-functions/truncate.texi: Document the AIX bug.
|
|
|
|
|
|
| |
* doc/posix-functions/logb.texi: Update platform info.
* m4/logb.m4 (gl_FUNC_LOGB_WORKS): Test against bug with negative
subnormal numbers.
|
|
|
|
|
|
| |
* m4/ilogbl.m4 (gl_FUNC_ILOGBL_WORKS): Test also some denormalized
argument.
* doc/posix-functions/ilogbl.texi: Mention the AIX bug.
|
|
|
|
|
|
| |
* m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Test also some denormalized
argument.
* doc/posix-functions/ilogb.texi: Mention the AIX bug.
|
|
|
|
|
|
|
| |
* m4/fclose.m4 (gl_FUNC_FCLOSE_STDIN): New macro.
(gl_FUNC_FCLOSE): Invoke it. Set REPLACE_FCLOSE accordingly.
* doc/posix-functions/fclose.texi: Update platform information.
* doc/posix-functions/fflush.texi: Likewise.
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Require AC_CANONICAL_HOST. Add a
test for trailing slash handling. Improve cross-compilation guesses.
Conditionally define HAVE_NEARLY_WORKING_UTIMENSAT.
* lib/utimensat.c (rpl_utimensat): Add alternative implementation when
HAVE_NEARLY_WORKING_UTIMENSAT is defined.
* lib/utimens.c: Use the overridden utimensat when
HAVE_NEARLY_WORKING_UTIMENSAT is defined.
* doc/posix-functions/utimensat.texi: Mention the AIX bug.
|
|
|
|
|
|
|
|
|
|
| |
* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Set also REPLACE_MKNODAT.
* lib/sys_stat.in.h (mknodat): Consider REPLACE_MKNODAT.
* lib/mknodat.c: Add an overriding implementation of mknodat().
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize REPLACE_MKNODAT.
* modules/sys_stat (Makefile.am): Substitute REPLACE_MKNODAT.
* modules/mkfifoat (Depends-on, configure.ac): Consider REPLACE_MKNODAT.
* doc/posix-functions/mknodat.texi: Mention the AIX bug.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Add a test whether mkfifoat rejects
trailing slashes. Set REPLACE_MKFIFOAT if not.
* lib/sys_stat.in.h (mkfifoat): Consider REPLACE_MKFIFOAT.
* lib/mkfifoat.c: Add an overriding implementation of mkfifoat().
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Initialize
REPLACE_MKFIFOAT.
* modules/sys_stat (Makefile.am): Substitute REPLACE_MKFIFOAT.
* modules/mkfifoat (Depends-on): Add fstatat.
(configure.ac): Consider REPLACE_MKFIFOAT.
* doc/posix-functions/mkfifoat.texi: Mention the AIX bug.
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/expm1f.m4 (gl_FUNC_EXPM1F): Initialize gl_expm1f_required. If
module 'expm1f-ieee' is in use, check whether expm1f works according to
IEEE.
* m4/expm1f-ieee.m4: New file.
* modules/expm1f-ieee (Files): Add it.
(Depends-on): Update conditions.
(configure.ac): Invoke gl_FUNC_EXPM1F_IEEE.
* doc/posix-functions/expm1f.texi: Mention the AIX bug.
|
|
|
|
|
|
|
|
|
|
| |
Reported by Noah Misch <noah@leadboat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00172.html>.
* doc/posix-functions/iconv_open.texi: Add new paragraph "Portability
problems handled by Gnulib".
* doc/posix-functions/iconv.texi: Likewise. Update info about AIX.
* m4/iconv.m4 (AM_ICONV_LINK): Improve comments.
|
|
|
|
|
|
|
|
| |
* doc/posix-functions/gmtime.texi, doc/posix-functions/gmtime_r.texi:
* doc/posix-functions/localtime.texi:
* doc/posix-functions/localtime_r.texi:
* doc/posix-functions/mktime.texi:
Mention year-0 bugs in localtime etc.
|
|
|
|
|
|
| |
* tests/test-poll.c (test_pipe): Disable the "expecting POLLHUP after
shutdown" test on AIX.
* doc/posix-functions/poll.texi: Mention the AIX bug.
|