summaryrefslogtreecommitdiff
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* glob tests: Fix a warning (regression from 2022-03-23).Bruno Haible2022-05-141-0/+1
| | | | | * tests/test-glob.c: Include <fcntl.h>. * modules/glob-tests (Depends-on): Add fcntl-h.
* Say that it is not the old interfacePaul Eggert2022-05-091-0/+3
|
* glob: improve config and test cleanupPaul Eggert2022-04-281-0/+5
| | | | | | | | | | Config problem reported by Benno Schulenberg in: https://lists.gnu.org/r/bug-gnulib/2022-04/msg00071.html * m4/glob.m4 (gl_GLOB): Clean up temporary file. Also, name it conf$$-file not conf-file, so it’s cleaned up on interrupt. * modules/glob-tests (MOSTLYCLEANFILES): Append test-glob.tglobfile, test-glob.tgloblink[123].
* gettime-res: add testsPaul Eggert2022-04-191-0/+12
| | | | * modules/gettime-res-tests, tests/test-gettime-res.c: New files.
* glob: fix symlink and // issues; improve speedPaul Eggert2022-03-231-2/+3
| | | | | | | | | | | | | | | | * lib/glob.c: Include fcntl.h. (dirfd) [_LIBC]: New macro. (GLOB_STAT64, GLOB_LSTAT64): Remove. Replace all uses with ... (GLOB_FSTATAT64): ... this new macro. (glob_in_dir): Treat DT_LNK like DT_UNKNOWN. Use directory-relative fstatat unless GLOB_ALTDIRFUNC, or dirfd fails. Avoid duplicate strlen (directory). Work even if directory is "/", without turning it into "//". Use a scratch buffer instead of by-hand alloca stuff. Use mempcpy and memcpy instead of stpcpy and strcpy. * modules/glob (Depends-on): Add dirfd, fstatat. Remove stat. (License): Change from LGPLv2+ to GPL, since it depends on fstatat.
* sigsegv: Add support for Linux/PowerPC (32-bit) with musl libc.Bruno Haible2022-03-131-0/+3
| | | | | | | | | | Reported by Khem Raj <raj.khem@gmail.com> in <https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html>. * src/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): In the Linux/PowerPC 32-bit case, handle musl libc differently. * modules/sigsegv (Files): Add m4/musl.m4. (configure.ac): Invoke gl_MUSL_LIBC.
* statat: now obsoletePaul Eggert2022-03-094-3/+7
| | | | | | | | | * lib/openat.h (statat, lstatat): Now deprecated. All uses removed, and replaced with fstatat. * modules/statat: Mark as obsolete, because it’s confusing: it’s not clear whether it should use AT_NO_AUTOMOUNT, which is implied by stat and by lstat, but not by fstatat. * tests/test-statat.c: Disable deprecated-declarations warnings.
* modules/unicase/special-casing: Fix compilation errorDarshit Shah2022-02-251-1/+1
| | | | | | * modules/unicase/special-casing: Don't prepend $(AM_V_at) to the second part of a compound command. It causes make to try and execute the command "@sed" which doesn't exist.
* nanosleep: simplify by using pselectPaul Eggert2022-02-251-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | GNU Emacs avoids Gnulib’s ‘select’ module and uses only pselect, which it implements in a special way on MS-DOS. Unfortunately, though, nanosleep uses ‘select’; problem reported by Lars Ingebrigtsen (Bug#32452#74). As far as I can tell, Gnulib nanosleep's use of ‘select’ with signals is only for ancient platforms that Gnulib no longer cares about, so remove that use of ‘select’. I don’t know of any platforms that still need this fallback code, but just in case, fall back to pselect instead, while removing signal handling that it shouldn’t be needed nowadays. * lib/nanosleep.c: Do not include sig-handler.h, sys/time.h. (SIGCONT, suspended, sighandler, my_usleep): Remove. (nanosleep) [!HAVE_BUG_BIG_NANOSLEEP && !(_WIN32 && !__CYGWIN__)]: Just call pselect. * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Do not check for sys/time.h or call gl_FUNC_SELECT. Do not include sys/time.h or worry about LIBSOCKET. (gl_PREREQ_NANOSLEEP): Remove as it’s no longer needed. All uses removed. * modules/nanosleep (Depends-on): Add pselect. Remove select, sigaction, sys_time.
* close-stream: don't depend on fclosePaul Eggert2022-02-211-1/+0
| | | | | | | | This reverts 2022-01-26T17:33:03Z!eggert@cs.ucla.edu. Depending on fclose broke Emacs, and since this dependency didn't help GNU m4 let's remove it for now. Problem reported by Lars Ingebrigtsen <https://bugs.gnu.org/32452#47>. * modules/close-stream (Depends-on): Remove fclose.
* filevercmp: fix several unexpected resultsPaul Eggert2022-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems reported by Michael Debertol in <https://bugs.gnu.org/49239>. While looking into this, I spotted some more areas where the code and documentation did not agree, or where the documentation was unclear. The biggest change needed by coreutils is a new function filenvercmp that can compare byte strings containing NUL. * lib/filevercmp.c: Do not include sys/types.h, stdlib.h, string.h. Include idx.h, verify.h. (match_suffix): Remove, replacing all uses with calls to ... (file_prefixlen): ... this new function. Simplify it by avoiding the need for a confusing READ_ALPHA state variable. Change its API to something more useful, with a *LEN arg. it with a new *LEN arg. (file_prefixlen, verrevcmp): Prefer idx_t to size_t where either will do. (order): Change args to S, POS, LEN instead of just S[POS]. This lets us handle NUL bytes correctly. Callers changed. Verify that ints are sufficiently wide for its API. (verrevcmp): Don't assume that S1[S1_LEN] is a non-digit, and likewise for S2[S2_LEN]. The byte might not be accessible if filenvercmp is being called. (filevercmp): Reimplement by calling filenvercmp. (filenvercmp): New function, rewritten without the assumption that the inputs are null-terminated. Remove "easy comparison to see if strings are identical", as the use of it later (a) was undocumented, and (b) caused sort -V to be unstable. When both strings start with ".", do not skip past the "."s before looking for suffixes, as this disagreed with the documentation. * lib/filevercmp.h: Fix comments, which had many mistakes. (filenvercmp): New decl. * modules/filevercmp (Depends-on): Add idx, verify. Remove string. * tests/test-filevercmp.c: Include string.h. (examples): Reorder examples ".0" and ".9" that matched the code but not the documentation. The code has been fixed to match the documentation. Add some examples involving \1 so that they can be tried with both \1 and \0. Add some other examples taken from the bug report. (equals): New set of test cases. (sign, test_filevercmp): New functions. (main): Remove test case where the fixed filevercmp disagrees with strverscmp. Use test_filevercmp instead of filevercmp, so that we also test filenvercmp. Test the newly-introduced EQUALS cases.
* unictype/category-byname: Fix test failure.Bruno Haible2022-02-091-1/+1
| | | | | * modules/unictype/category-byname (configure.ac): Bump required libunistring version.
* termcap, termcap-h: Deprecate.Bruno Haible2022-02-062-0/+14
| | | | | * modules/termcap (Status, Notice): Add deprecation. * modules/termcap-h (Status, Notice): Likewise.
* terminfo: Add tests.Bruno Haible2022-01-301-0/+13
| | | | | * tests/test-terminfo.c: New file. * modules/terminfo-tests: New file.
* terminfo, terminfo-h: New modules.Bruno Haible2022-01-302-0/+50
| | | | | | | * lib/terminfo.h: New file, from GNU gettext. * m4/terminfo.m4: New file, from GNU gettext. * modules/terminfo: New file, from GNU gettext. * modules/terminfo-h: New file, from GNU gettext.
* termcap: Add tests.Bruno Haible2022-01-301-0/+13
| | | | | * tests/test-termcap.c: New file. * modules/termcap-tests: New file.
* termcap, termcap-h: New modules.Bruno Haible2022-01-302-0/+50
| | | | | | | | | | * lib/termcap.h: New file, from GNU gettext. * lib/tparm.c: New file, from GNU gettext. * lib/tputs.c: New file, from GNU gettext. * m4/termcap.m4: New file, from GNU gettext. * m4/curses.m4: New file, from GNU gettext. * modules/termcap: New file, from GNU gettext. * modules/termcap-h: New file, from GNU gettext.
* calloc-gnu: fix misspelling in 2022-01-03 patchPaul Eggert2022-01-262-2/+2
| | | | | | | | Problem reported by Thien-Thi Nguyen in: https://lists.gnu.org/r/bug-gnulib/2022-01/msg00170.html * modules/calloc-gnu (Depends-on): * modules/calloc-posix (Depends-on): Fix misspelling of REPLACE_CALLOC_FOR_CALLOC_POSIX.
* close-stream: avoid crash on MSVC Debug modePaul Eggert2022-01-261-0/+1
| | | | | | Problem reported by Julien Marrec in: https://lists.gnu.org/r/bug-m4/2022-01/msg00000.html * modules/close-stream (Depends-on): Depend on fclose.
* xstrtoimax, xstrtoumax: depend on inttypes-incompletePaul Eggert2022-01-232-0/+2
| | | | | | | | | | This fixes a call to strtoimax without declaring it, and similarly for strtoumax. * lib/xstrtoimax.c, lib/xstrtoumax.c (XSTRTOL_INCLUDE_INTTYPES_H): Define, so that strtoimax and strtoumax are declared. * lib/xstrtol.c [XSTRTOL_INCLUDE_INTTYPES_H]: Include inttypes.h. * modules/xstrtoimax, modules/xstrtoumax (Depends-on): Add inttypes-incomplete.
* alignalloc, xalignalloc: new modulesPaul Eggert2022-01-233-0/+69
| | | | | | | * lib/alignalloc.c, lib/alignalloc.h, lib/xalignalloc.c: * m4/alignalloc.m4, modules/alignalloc, modules/alignalloc-tests: * modules/xalignalloc, tests/test-alignalloc.c: New files.
* xstrtol: Trim dependencies.Bruno Haible2022-01-171-1/+1
| | | | | * lib/xstrtol.h: Include <stdint.h>, not <inttypes.h>. * modules/xstrtol (Depends-on): Add stdint. Remove inttypes-incomplete.
* xstrtol: Fix compilation error (regression 2022-01-16).Bruno Haible2022-01-171-0/+1
| | | | * modules/xstrtol (Depends-on): Add intprops.
* copy-file-range: work around Linux kernel bugPaul Eggert2022-01-142-1/+4
| | | | | | | | | | | | | | | | This workaround is adapted from Coreutils. * lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]: Include <sys/utsname.h>. (copy_file_range): Use a stub to replace the copy_file_range of Linux kernel versions 4.5 through 5.2. * lib/unistd.in.h (copy_file_range): * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): * modules/copy-file-range (configure.ac): * modules/unistd (unistd.h): Support replacement of copy_file_range. * m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): Define HAVE_COPY_FILE_RANGE if the system has copy_file_range, and on Linux check whether the system’s is known to work.
* stdio: Fix "missing file" errors (regression from today).Bruno Haible2022-01-101-0/+2
| | | | | * modules/stdio (Files): Add stdio-read.c, stdio-write.c. * m4/stdio_h.m4 (gl_STDIO_H): Update comments.
* Use the GL_CFLAG_GNULIB_WARNINGS for most AC_LIBOBJ compilation units.Bruno Haible2022-01-09447-1425/+2364
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * modules/_Exit (configure.ac): Define an Automake conditional. Remove the AC_LIBOBJ invocation. (Makefile.am): Augment lib_SOURCES, guarded by that Automake conditional. * modules/accept: Likewise. * modules/access: Likewise. * modules/acosf: Likewise. * modules/acosl: Likewise. * modules/aligned_alloc: Likewise. * modules/alphasort: Likewise. * modules/argz: Likewise. * modules/asinf: Likewise. * modules/asinl: Likewise. * modules/atan2f: Likewise. * modules/atanf: Likewise. * modules/atanl: Likewise. * modules/atexit: Likewise. * modules/atoll: Likewise. * modules/bind: Likewise. * modules/btowc: Likewise. * modules/c32rtomb: Likewise. * modules/canonicalize-lgpl: Likewise. * modules/cbrt: Likewise. * modules/cbrtf: Likewise. * modules/cbrtl: Likewise. * modules/ceil: Likewise. * modules/ceilf: Likewise. * modules/ceill: Likewise. * modules/chdir-long: Likewise. * modules/chown: Likewise. * modules/close: Likewise. * modules/closedir: Likewise. * modules/cnd: Likewise. * modules/connect: Likewise. * modules/copy-file-range: Likewise. * modules/copysign: Likewise. * modules/copysignf: Likewise. * modules/copysignl: Likewise. * modules/cosf: Likewise. * modules/coshf: Likewise. * modules/cosl: Likewise. * modules/creat: Likewise. * modules/crypto/gc: Likewise. * modules/ctime: Likewise. * modules/dirfd: Likewise. * modules/dup: Likewise. * modules/dup2: Likewise. * modules/duplocale: Likewise. * modules/error: Likewise. * modules/euidaccess: Likewise. * modules/execinfo: Likewise. * modules/execl: Likewise. * modules/execle: Likewise. * modules/execlp: Likewise. * modules/execv: Likewise. * modules/execve: Likewise. * modules/execvp: Likewise. * modules/execvpe: Likewise. * modules/exp2: Likewise. * modules/exp2f: Likewise. * modules/exp2l: Likewise. * modules/expf: Likewise. * modules/expl: Likewise. * modules/explicit_bzero: Likewise. * modules/expm1: Likewise. * modules/expm1f: Likewise. * modules/expm1l: Likewise. * modules/fabsf: Likewise. * modules/fabsl: Likewise. * modules/faccessat: Likewise. * modules/fchdir: Likewise. * modules/fchmodat: Likewise. * modules/fchownat: Likewise. * modules/fclose: Likewise. * modules/fcntl: Likewise. * modules/fdatasync: Likewise. * modules/fdopen: Likewise. * modules/fdopendir: Likewise. * modules/fflush: Likewise. * modules/ffs: Likewise. * modules/ffsl: Likewise. * modules/ffsll: Likewise. * modules/fileblocks: Likewise. * modules/float: Likewise. * modules/flock: Likewise. * modules/floor: Likewise. * modules/floorf: Likewise. * modules/floorl: Likewise. * modules/fma: Likewise. * modules/fmaf: Likewise. * modules/fmal: Likewise. * modules/fmod: Likewise. * modules/fmodf: Likewise. * modules/fmodl: Likewise. * modules/forkpty: Likewise. * modules/fpending: Likewise. * modules/fpurge: Likewise. * modules/freadable: Likewise. * modules/freadahead: Likewise. * modules/freadptr: Likewise. * modules/free-posix: Likewise. * modules/freopen: Likewise. * modules/frexpf: Likewise. * modules/fseek: Likewise. * modules/fseeko: Likewise. * modules/fseterr: Likewise. * modules/fstat: Likewise. * modules/fstatat: Likewise. * modules/fsusage: Likewise. * modules/fsync: Likewise. * modules/ftell: Likewise. * modules/ftello: Likewise. * modules/ftruncate: Likewise. * modules/fts: Likewise. * modules/futimens: Likewise. * modules/fwritable: Likewise. * modules/fwriting: Likewise. * modules/getaddrinfo: Likewise. * modules/getcwd: Likewise. * modules/getcwd-lgpl: Likewise. * modules/getdelim: Likewise. * modules/getdomainname: Likewise. * modules/getdtablesize: Likewise. * modules/getentropy: Likewise. * modules/getgroups: Likewise. * modules/gethostname: Likewise. * modules/getline: Likewise. * modules/getloadavg: Likewise. * modules/getlogin: Likewise. * modules/getlogin_r: Likewise. * modules/getopt-posix: Likewise. * modules/getpagesize: Likewise. * modules/getpeername: Likewise. * modules/getrandom: Likewise. * modules/getrusage: Likewise. * modules/getsockname: Likewise. * modules/getsockopt: Likewise. * modules/getsubopt: Likewise. * modules/gettimeofday: Likewise. * modules/getumask: Likewise. * modules/getusershell: Likewise. * modules/glob: Likewise. * modules/grantpt: Likewise. * modules/group-member: Likewise. * modules/hypot: Likewise. * modules/hypotf: Likewise. * modules/hypotl: Likewise. * modules/iconv_open: Likewise. * modules/ilogb: Likewise. * modules/ilogbf: Likewise. * modules/ilogbl: Likewise. * modules/imaxabs: Likewise. * modules/imaxdiv: Likewise. * modules/inet_ntop: Likewise. * modules/inet_pton: Likewise. * modules/ioctl: Likewise. * modules/isapipe: Likewise. * modules/isatty: Likewise. * modules/isblank: Likewise. * modules/isfinite: Likewise. * modules/isinf: Likewise. * modules/iswblank: Likewise. * modules/iswctype: Likewise. * modules/iswdigit: Likewise. * modules/iswxdigit: Likewise. * modules/lchmod: Likewise. * modules/lchown: Likewise. * modules/ldexpf: Likewise. * modules/ldexpl: Likewise. * modules/libgmp: Likewise. * modules/link: Likewise. * modules/linkat: Likewise. * modules/listen: Likewise. * modules/localeconv: Likewise. * modules/localtime: Likewise. * modules/log: Likewise. * modules/log10: Likewise. * modules/log10f: Likewise. * modules/log10l: Likewise. * modules/log1p: Likewise. * modules/log1pf: Likewise. * modules/log1pl: Likewise. * modules/log2: Likewise. * modules/log2f: Likewise. * modules/log2l: Likewise. * modules/logb: Likewise. * modules/logbf: Likewise. * modules/logbl: Likewise. * modules/logf: Likewise. * modules/login_tty: Likewise. * modules/logl: Likewise. * modules/lseek: Likewise. * modules/lstat: Likewise. * modules/mbrlen: Likewise. * modules/mbrtoc32: Likewise. * modules/mbrtowc: Likewise. * modules/mbsinit: Likewise. * modules/mbsnrtowcs: Likewise. * modules/mbsrtowcs: Likewise. * modules/mbtowc: Likewise. * modules/memalign: Likewise. * modules/memchr: Likewise. * modules/memcmp: Likewise. * modules/memcpy: Likewise. * modules/memmove: Likewise. * modules/mempcpy: Likewise. * modules/memrchr: Likewise. * modules/memset: Likewise. * modules/mkdir: Likewise. * modules/mkdirat: Likewise. * modules/mkdtemp: Likewise. * modules/mkfifo: Likewise. * modules/mkfifoat: Likewise. * modules/mknod: Likewise. * modules/mkostemp: Likewise. * modules/mkostemps: Likewise. * modules/mkstemp: Likewise. * modules/mkstemps: Likewise. * modules/modf: Likewise. * modules/modff: Likewise. * modules/modfl: Likewise. * modules/mountlist: Likewise. * modules/msvc-inval: Likewise. * modules/msvc-nothrow: Likewise. * modules/mtx: Likewise. * modules/nanosleep: Likewise. * modules/nl_langinfo: Likewise. * modules/obstack: Likewise. * modules/open: Likewise. * modules/openat: Likewise. * modules/opendir: Likewise. * modules/openpty: Likewise. * modules/pclose: Likewise. * modules/perror: Likewise. * modules/pipe-posix: Likewise. * modules/poll: Likewise. * modules/popen: Likewise. * modules/posix_memalign: Likewise. * modules/posix_openpt: Likewise. * modules/posix_spawn: Likewise. * modules/posix_spawn-internal: Likewise. * modules/posix_spawn_file_actions_addchdir: Likewise. * modules/posix_spawn_file_actions_addclose: Likewise. * modules/posix_spawn_file_actions_adddup2: Likewise. * modules/posix_spawn_file_actions_addfchdir: Likewise. * modules/posix_spawn_file_actions_addopen: Likewise. * modules/posix_spawn_file_actions_destroy: Likewise. * modules/posix_spawn_file_actions_init: Likewise. * modules/posix_spawnattr_destroy: Likewise. * modules/posix_spawnattr_getflags: Likewise. * modules/posix_spawnattr_getpgroup: Likewise. * modules/posix_spawnattr_getschedparam: Likewise. * modules/posix_spawnattr_getschedpolicy: Likewise. * modules/posix_spawnattr_getsigdefault: Likewise. * modules/posix_spawnattr_getsigmask: Likewise. * modules/posix_spawnattr_init: Likewise. * modules/posix_spawnattr_setflags: Likewise. * modules/posix_spawnattr_setpgroup: Likewise. * modules/posix_spawnattr_setschedparam: Likewise. * modules/posix_spawnattr_setschedpolicy: Likewise. * modules/posix_spawnattr_setsigdefault: Likewise. * modules/posix_spawnattr_setsigmask: Likewise. * modules/posix_spawnp: Likewise. * modules/powf: Likewise. * modules/pread: Likewise. * modules/pselect: Likewise. * modules/pthread-cond: Likewise. * modules/pthread-mutex: Likewise. * modules/pthread-once: Likewise. * modules/pthread-rwlock: Likewise. * modules/pthread-spin: Likewise. * modules/pthread-thread: Likewise. * modules/pthread-tss: Likewise. * modules/pthread_mutex_timedlock: Likewise. * modules/pthread_sigmask: Likewise. * modules/ptsname: Likewise. * modules/ptsname_r: Likewise. * modules/putenv: Likewise. * modules/pwrite: Likewise. * modules/qsort_r: Likewise. * modules/raise: Likewise. * modules/random: Likewise. * modules/random_r: Likewise. * modules/rawmemchr: Likewise. * modules/read: Likewise. * modules/readdir: Likewise. * modules/readline: Likewise. * modules/readlink: Likewise. * modules/readlinkat: Likewise. * modules/readutmp: Likewise. * modules/reallocarray: Likewise. * modules/recv: Likewise. * modules/recvfrom: Likewise. * modules/regex: Likewise. * modules/relocatable-prog: Likewise. * modules/remainder: Likewise. * modules/remainderf: Likewise. * modules/remainderl: Likewise. * modules/remove: Likewise. * modules/rename: Likewise. * modules/renameat: Likewise. * modules/rewinddir: Likewise. * modules/rint: Likewise. * modules/rintf: Likewise. * modules/rintl: Likewise. * modules/rmdir: Likewise. * modules/round: Likewise. * modules/roundf: Likewise. * modules/roundl: Likewise. * modules/rpmatch: Likewise. * modules/scandir: Likewise. * modules/sched_yield: Likewise. * modules/secure_getenv: Likewise. * modules/select: Likewise. * modules/selinux-h: Likewise. * modules/send: Likewise. * modules/sendto: Likewise. * modules/setenv: Likewise. * modules/sethostname: Likewise. * modules/setlocale: Likewise. * modules/setlocale-null: Likewise. * modules/setsockopt: Likewise. * modules/shutdown: Likewise. * modules/sig2str: Likewise. * modules/sigabbrev_np: Likewise. * modules/sigaction: Likewise. * modules/sigdescr_np: Likewise. * modules/signbit: Likewise. * modules/sigprocmask: Likewise. * modules/sinf: Likewise. * modules/sinhf: Likewise. * modules/sinl: Likewise. * modules/sleep: Likewise. * modules/socket: Likewise. * modules/spawn-pipe: Likewise. * modules/sqrtf: Likewise. * modules/sqrtl: Likewise. * modules/stat: Likewise. * modules/stdio: Likewise. * modules/stpcpy: Likewise. * modules/stpncpy: Likewise. * modules/strcase: Likewise. * modules/strchrnul: Likewise. * modules/strcspn: Likewise. * modules/strdup-posix: Likewise. * modules/strerror: Likewise. * modules/strerror-override: Likewise. * modules/strerrorname_np: Likewise. * modules/strfmon_l: Likewise. * modules/strftime-fixes: Likewise. * modules/strncat: Likewise. * modules/strndup: Likewise. * modules/strnlen: Likewise. * modules/strpbrk: Likewise. * modules/strptime: Likewise. * modules/strsep: Likewise. * modules/strsignal: Likewise. * modules/strtod: Likewise. * modules/strtoimax: Likewise. * modules/strtok_r: Likewise. * modules/strtol: Likewise. * modules/strtold: Likewise. * modules/strtoll: Likewise. * modules/strtoul: Likewise. * modules/strtoull: Likewise. * modules/strtoumax: Likewise. * modules/strverscmp: Likewise. * modules/symlink: Likewise. * modules/symlinkat: Likewise. * modules/tanf: Likewise. * modules/tanhf: Likewise. * modules/tanl: Likewise. * modules/tcgetsid: Likewise. * modules/thrd: Likewise. * modules/time_r: Likewise. * modules/time_rz: Likewise. * modules/timegm: Likewise. * modules/times: Likewise. * modules/timespec_get: Likewise. * modules/timespec_getres: Likewise. * modules/tmpfile: Likewise. * modules/towctrans: Likewise. * modules/trunc: Likewise. * modules/truncate: Likewise. * modules/truncf: Likewise. * modules/truncl: Likewise. * modules/tsearch: Likewise. * modules/tss: Likewise. * modules/ttyname_r: Likewise. * modules/tzset: Likewise. * modules/uname: Likewise. * modules/unlink: Likewise. * modules/unlinkat: Likewise. * modules/unlockpt: Likewise. * modules/unsetenv: Likewise. * modules/usleep: Likewise. * modules/utime: Likewise. * modules/utimensat: Likewise. * modules/waitpid: Likewise. * modules/wcpcpy: Likewise. * modules/wcpncpy: Likewise. * modules/wcrtomb: Likewise. * modules/wcscasecmp: Likewise. * modules/wcscat: Likewise. * modules/wcschr: Likewise. * modules/wcscmp: Likewise. * modules/wcscoll: Likewise. * modules/wcscpy: Likewise. * modules/wcscspn: Likewise. * modules/wcsdup: Likewise. * modules/wcsftime: Likewise. * modules/wcslen: Likewise. * modules/wcsncasecmp: Likewise. * modules/wcsncat: Likewise. * modules/wcsncmp: Likewise. * modules/wcsncpy: Likewise. * modules/wcsnlen: Likewise. * modules/wcsnrtombs: Likewise. * modules/wcspbrk: Likewise. * modules/wcsrchr: Likewise. * modules/wcsrtombs: Likewise. * modules/wcsspn: Likewise. * modules/wcsstr: Likewise. * modules/wcstok: Likewise. * modules/wcswidth: Likewise. * modules/wcsxfrm: Likewise. * modules/wctob: Likewise. * modules/wctomb: Likewise. * modules/wctrans: Likewise. * modules/wctype: Likewise. * modules/wcwidth: Likewise. * modules/windows-cond: Likewise. * modules/windows-mutex: Likewise. * modules/windows-once: Likewise. * modules/windows-recmutex: Likewise. * modules/windows-rwlock: Likewise. * modules/windows-spawn: Likewise. * modules/windows-spin: Likewise. * modules/windows-thread: Likewise. * modules/windows-timedmutex: Likewise. * modules/windows-timedrecmutex: Likewise. * modules/windows-timedrwlock: Likewise. * modules/windows-tls: Likewise. * modules/wmemchr: Likewise. * modules/wmemcmp: Likewise. * modules/wmemcpy: Likewise. * modules/wmemmove: Likewise. * modules/wmempcpy: Likewise. * modules/wmemset: Likewise. * modules/write: Likewise.
* obstack: Move AC_LIBOBJ invocation to the module description.Bruno Haible2022-01-091-2/+4
| | | | | | * m4/obstack.m4 (gl_FUNC_OBSTACK): Renamed from AC_FUNC_OBSTACK. Don't invoke AC_LIBSOURCES nor AC_LIBOBJ. * modules/obstack (configure.ac): Update. Invoke AC_LIBOBJ here.
* stdio: Move AC_LIBOBJ invocations to the module description.Bruno Haible2022-01-091-0/+6
| | | | | * m4/stdio_h.m4 (gl_STDIO_H): Don't invoke AC_LIBOBJ. * modules/stdio (configure.ac): Invoke AC_LIBOBJ here.
* fchdir: Move AC_LIBOBJ invocation to the module description.Bruno Haible2022-01-091-0/+4
| | | | | | * m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke AC_LIBOBJ and gl_PREREQ_FCHDIR. * modules/fchdir (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_FCHDIR.
* Remove influence of Automake conditionals on conditional dependencies.Bruno Haible2022-01-092-2/+2
| | | | | | | | | | | | * m4/gnulib-common.m4 (gl_CONDITIONAL): New macro. (gl_CONDITIONAL_HEADER): Use it instead of AM_CONDITIONAL. * m4/libgmp.m4 (gl_LIBGMP): Likewise. * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac): Likewise. * modules/uchar-c++-tests (configure.ac): Likewise. * gnulib-tool (func_modules_transitive_closure): Don't inhibit conditional dependencies processing on a module that uses an Automake conditional.
* getpass-gnu: Allow use as dependency from test modules.Bruno Haible2022-01-032-2/+4
| | | | | | | | | | | | | | | | * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS. * m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Initialize the getpass-gnu module indicator. (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETPASS_FOR_GETPASS_GNU. * modules/unistd (Makefile.am): Substitute GNULIB_GETPASS_GNU, REPLACE_GETPASS_FOR_GETPASS_GNU. * modules/getpass-gnu (configure.ac): Test REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS. Set a module indicator. * lib/unistd.in.h (getpass): Test REPLACE_GETPASS, REPLACE_GETPASS_FOR_GETPASS_GNU, and the respective module indicators instead of just REPLACE_GETPASS.
* fopen-gnu: Allow use as dependency from test modules.Bruno Haible2022-01-032-2/+9
| | | | | | | | | | | | | | | | * m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Set REPLACE_FOPEN_FOR_FOPEN_GNU instead of REPLACE_FOPEN. * m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize the fopen-gnu module indicator. (gl_STDIO_H_DEFAULTS): Initialize REPLACE_FOPEN_FOR_FOPEN_GNU. * modules/stdio (Makefile.am): Substitute GNULIB_FOPEN_GNU, REPLACE_FOPEN_FOR_FOPEN_GNU. * modules/fopen-gnu (Depends-on): Add more dependencies. (configure.ac): Test REPLACE_FOPEN_FOR_FOPEN_GNU instead of REPLACE_FOPEN. * lib/stdio.in.h (fopen): Test REPLACE_FOPEN, REPLACE_FOPEN_FOR_FOPEN_GNU, and the respective module indicators instead of just REPLACE_FOPEN.
* realloc-gnu: Allow use as dependency from test modules.Bruno Haible2022-01-033-11/+12
| | | | | | | | | | | | | | | | | | | | | | | * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Set REPLACE_REALLOC_FOR_REALLOC_GNU instead of REPLACE_REALLOC. (gl_FUNC_REALLOC_POSIX): Set REPLACE_REALLOC_FOR_REALLOC_POSIX instead of REPLACE_REALLOC. * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the realloc-gnu module indicator. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC_FOR_REALLOC_GNU, REPLACE_REALLOC_FOR_REALLOC_POSIX, not REPLACE_REALLOC. * modules/stdlib (Makefile.am): Substitute GNULIB_REALLOC_GNU, REPLACE_REALLOC_FOR_REALLOC_GNU, REPLACE_REALLOC_FOR_REALLOC_POSIX, not REPLACE_REALLOC. * modules/realloc-posix (Depends-on, configure.ac): Test REPLACE_REALLOC_FOR_REALLOC_POSIX instead of REPLACE_REALLOC. * modules/realloc-gnu (Comment): Remove section. (Depends-on): Add free-posix, malloc-gnu, xalloc-oversized. (configure.ac): Test REPLACE_REALLOC_FOR_REALLOC_GNU instead of REPLACE_REALLOC. Set a module indicator. * lib/stdlib.in.h (realloc): Test REPLACE_REALLOC_FOR_REALLOC_POSIX, REPLACE_REALLOC_FOR_REALLOC_GNU, and the respective module indicators instead of just REPLACE_REALLOC.
* calloc-gnu: Allow use as dependency from test modules.Bruno Haible2022-01-033-4/+8
| | | | | | | | | | | | | | | | | | | | | | * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Set REPLACE_CALLOC_FOR_CALLOC_GNU instead of REPLACE_CALLOC. (gl_FUNC_CALLOC_POSIX): Set REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC. * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the calloc-gnu module indicator. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC. * modules/stdlib (Makefile.am): Substitute GNULIB_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC. * modules/calloc-posix (Depends-on, configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC. * modules/calloc-gnu (Depends-on): Add xalloc-oversized. (configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_GNU instead of REPLACE_CALLOC. Set a module indicator. * lib/stdlib.in.h (calloc): Test REPLACE_CALLOC_FOR_CALLOC_POSIX, REPLACE_CALLOC_FOR_CALLOC_GNU, and the respective module indicators instead of just REPLACE_CALLOC.
* malloc-gnu: Allow use as dependency from test modules.Bruno Haible2022-01-033-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Set REPLACE_MALLOC_FOR_MALLOC_GNU instead of REPLACE_MALLOC. (gl_FUNC_MALLOC_PTRDIFF, gl_FUNC_MALLOC_POSIX): Set REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC. * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Test REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC. * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the malloc-gnu module indicator. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC. * modules/stdlib (Makefile.am): Substitute GNULIB_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC. * modules/malloc-posix (Depends-on, configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC. * modules/malloc-gnu (Comment): Remove section. (Depends-on): Add xalloc-oversized. (configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_GNU instead of REPLACE_MALLOC. Set a module indicator. * lib/stdlib.in.h (malloc): Test REPLACE_MALLOC_FOR_MALLOC_POSIX, REPLACE_MALLOC_FOR_MALLOC_GNU, and the respective module indicators instead of just REPLACE_MALLOC.
* gen-header: port to BusyBox ‘sed’Paul Eggert2022-01-011-12/+5
| | | | | | | | | Problem reported by Tim Rühsen in: https://lists.gnu.org/r/bug-gnulib/2022-01/msg00004.html * modules/gen-header (SED_HEADER_NOEDIT): Replace instead of prepend. (SED_HEADER_STDOUT, SED_HEADER_TO_AT_t): Adjust to that change. Do not use ‘w foo’ twice in the same script, as BusyBox ‘sed’ mistakenly opens ‘foo’ for output twice, thus losing some output.
* maint: run 'make update-copyright'Paul Eggert2022-01-012-2/+2
|
* unistdio: Prefer newer version to older, buggy one.Bruno Haible2022-01-0110-10/+10
| | | | | | | | | | | | | | | * modules/unistdio/ulc-vasnprintf (configure.ac): Bump required libunistring version. This is needed because of the heap overrun fix (2018-09-23) and the need to avoid %n on more platforms (2020-10-04). * modules/unistdio/ulc-asnprintf (configure.ac): Likewise. * modules/unistdio/ulc-asprintf (configure.ac): Likewise. * modules/unistdio/ulc-fprintf (configure.ac): Likewise. * modules/unistdio/ulc-snprintf (configure.ac): Likewise. * modules/unistdio/ulc-sprintf (configure.ac): Likewise. * modules/unistdio/ulc-vasprintf (configure.ac): Likewise. * modules/unistdio/ulc-vfprintf (configure.ac): Likewise. * modules/unistdio/ulc-vsnprintf (configure.ac): Likewise. * modules/unistdio/ulc-vsprintf (configure.ac): Likewise.
* uniwidth: Optimize.Bruno Haible2021-12-311-0/+3
| | | | | | | | | | | | | | | * lib/gen-uni-tables.c (output_nonspacing_property): Add version parameter. Emit the usual boilerplate header for generated files. (is_width2): New function, based on lib/uniwidth/width.c. (output_width2_property): New function. (main): Create uniwidth/width0.h instead of uniwidth/width.c.part. Create uniwidth/width2.h. * lib/uniwidth/width.c: Include width0.h, width2.h, bitmap.h. (nonspacing_table_data, nonspacing_table_ind): Remove here. (uc_width): Replace the double-width character with an u_width2 bitmap lookup. * modules/uniwidth/width (Files): Add lib/uniwidth/width0.h, lib/uniwidth/width2.h, lib/unictype/bitmap.h.
* Update to Unicode 14.0.0.Bruno Haible2021-12-316-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (UC_JOINING_GROUP_THIN_YEH, UC_JOINING_GROUP_VERTICAL_TAIL): New enum values. (fill_arabicshaping, joining_group_as_c_identifier): Recognize these joining groups. * lib/unictype.in.h (UC_JOINING_GROUP_THIN_YEH, UC_JOINING_GROUP_VERTICAL_TAIL): New enum values. * lib/unictype/joininggroup_name.h: Add the THIN_YEH, VERTICAL_TAIL joining groups. * lib/unictype/joininggroup_byname.gperf: Likewise. * lib/gen-uni-tables.c (LBP_ID1, LBP_ID2): New enum values. (LBP_ID): Assign artificial value. (get_lbp): Use the extended_pictographic property to assign LBP_ID1, LBP_ID2 instead of LBP_ID. Update such that unilbrk/lbrkprop.txt comes out as expected. (debug_output_lbp): Print either LBP_ID1 or LBP_ID2 as LBP_ID. (lbp_value_to_string): Handle LBP_ID1, LBP_ID2 instead of LBP_ID. (output_lbrk_rules_as_tables): Treat LBP_ID as macro that maps to two table rows/columns. In rule LB30b, use LBP_ID2 in addition to LBP_EB. Remove redundant part of rule LB27. * lib/unilbrk/lbrktables.h (LBP_ID1, LBP_ID2): New enum values. (LBP_ID): Remove enum value. (unilbrk_table): Update declaration. * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop): Use LBP_ID1 instead of LBP_ID. * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop): Likewise. * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop): Likewise. * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a test of potential future emoji. * tests/unilbrk/test-u16-possible-linebreaks.c (test_function): Likewise. * tests/unilbrk/test-u32-possible-linebreaks.c (test_function): Likewise. * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind): Update. (uc_width): Assign width 2 to the characters 0x1AFF0..0x1AFF3, 0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122, 0x1F6DD..0x1F6DF, 0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC, 0x1FAB7..0x1FABA, 0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7, 0x1FAF0..0x1FAF6. * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters 0x0890..0x0891, 0x0898..0x089F, 0x08CA..0x0902, 0x0C3C, 0x180F, 0x1AC1..0x1ACE, 0x1DFA, 0x10F82..0x10F85, 0x11070, 0x11073..0x11074, 0x110C2, 0x1CF00..0x1CF2D, 0x1CF30..0x1CF46, 0x1E2AE. Expect ambiguous width for the character 0x1734. Expect width 2 for the characters 0x1AFF0..0x1AFF3, 0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122, 0x1F6DD..0x1F6DF, 0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC, 0x1FAB7..0x1FABA, 0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7, 0x1FAF0..0x1FAF6. * All generated files under lib/uni* and tests/uni*: Regenerate. * tests/uniname/NameAliases.txt: Update. * tests/uniname/UnicodeData.txt: Update. * tests/uninorm/NormalizationTest.txt: Update. * tests/unigbrk/GraphemeBreakTest.txt: Update. * tests/uniwbrk/WordBreakTest.txt: Update. * All the affected modules: Bump required libunistring version.
* Update to Unicode 13.0.0.Bruno Haible2021-12-314-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (is_WBP_MIDLETTER): Add character 0x055F. (get_wbp): Assign value WBP_ALETTER to the characters 0x02E5..0x02EB, 0x055A, 0x058A, 0xA708..0xA716. * lib/gen-uni-tables.c (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New enum values. (LBP_OP, LBP_CP): Assign artificial values. (get_lbp): Use the unicode_width[] table to assign LBP_CP1, LBP_CP2 instead of LBP_CP, and LBP_OP1, LBP_OP2 instead of LBP_OP. Update such that unilbrk/lbrkprop.txt comes out as expected. (debug_output_lbp): Print either LBP_CP1 or LBP_CP2 as LBP_CP. Print either LBP_OP1 or LBP_OP2 as LBP_OP. (lbp_value_to_string): Handle LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2 instead of LBP_CP, LBP_OP. (output_lbrk_rules_as_tables): Treat LBP_CP and LBP_OP as macros that map to two table rows/columns. In rule LB30, use only LBP_OP1 instead of LBP_OP, and only LBP_CP1 instead of LBP_CP. Simplify rule LB22. * lib/unilbrk/lbrktables.h (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New enum values. (LBP_OP, LBP_CP): Remove enum values. (unilbrk_table): Update declaration. * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop): Add a test for East Asian opening parenthesis. * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop): Likewise. * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop): Likewise. * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind): Update. (uc_width): Assign width 2 to the characters 0x16FF0..0x16FF1, 0x18AF3..0x18CD5, 0x18D00..0x18D08, 0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC, 0x1F90C, 0x1FA74, 0x1FA83..0x1FA86, 0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6, 0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6. Assign width 1 to the characters 0x1F93B, 0x1F946. * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters 0x0B55, 0x0D81, 0x1ABF..0x1AC0, 0xA82C, 0x10EAB..0x10EAC, 0x111CF, 0x1193B..0x1193C, 0x1193E, 0x11943, 0x16FE4. Expect width 2 for the characters 0x16FF0..0x16FF1, 0x18AF3..0x18CD5, 0x18D00..0x18D08, 0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC, 0x1F90C, 0x1FA74, 0x1FA83..0x1FA86, 0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6, 0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6. Expect width 1 for the characters 0x1F93B, 0x1F946. * All generated files under lib/uni* and tests/uni*: Regenerate. * tests/uniname/NameAliases.txt: Update. * tests/uniname/UnicodeData.txt: Update. * tests/uninorm/NormalizationTest.txt: Update. * tests/unigbrk/GraphemeBreakTest.txt: Update. * tests/uniwbrk/WordBreakTest.txt: Update. * All the affected modules: Bump required libunistring version.
* Update to Unicode 12.0.0.Bruno Haible2021-12-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (is_property_default_ignorable_code_point): Exclude 0x13430..0x13438. (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected. (get_wbp): Map 0xFF10..0xFF19 to WBP_NUMERIC. * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind): Update. (uc_width): Assign width 2 to the characters 0x16FE2..0x16FE3, 0x187F2..0x187F7, 0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA, 0x1F7E0..0x1F7EB, 0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A, 0x1FA80..0x1FA82, 0x1FA90..0x1FA95. * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters 0x0EBA, 0xA9BD, 0x119D4..0x119D7, 0x119DA..0x119DB, 0x119E0, 0x13430..0x13438, 0x16F4F, 0x1E130..0x1E136, 0x1E2EC..0x1E2EF. Expect width 2 for the characters 0x16FE2..0x16FE3, 0x187F2..0x187F7, 0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA, 0x1F7E0..0x1F7EB, 0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A, 0x1FA80..0x1FA82, 0x1FA90..0x1FA95. * All generated files under lib/uni* and tests/uni*: Regenerate. * tests/uniname/NameAliases.txt: Update. * tests/uniname/UnicodeData.txt: Update. * tests/uninorm/NormalizationTest.txt: Update. * tests/unigbrk/GraphemeBreakTest.txt: Update. * tests/uniwbrk/WordBreakTest.txt: Update. * All the affected modules: Bump required libunistring version.
* Update to Unicode 11.0.0.Bruno Haible2021-12-3027-19/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (is_property_default_ignorable_code_point): Simplify by use of PROP_PREPENDED_CONCATENATION_MARK. (UC_JOINING_GROUP_HANIFI_ROHINGYA_PA, UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA): New enum values. (fill_arabicshaping, joining_group_as_c_identifier): Recognize these joining groups. (get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected. (WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): Remove enum values. (WBP_WSS): New enum value. (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected. (debug_output_wbp, fill_org_wbp, debug_output_org_wbp, output_wbp): Update for changed enum values. * lib/unictype.in.h (UC_JOINING_GROUP_HANIFI_ROHINGYA_*): New enum values. * lib/unictype/joininggroup_name.h: Add the HANIFI_ROHINGYA_* joining groups. * lib/unictype/joininggroup_byname.gperf: Likewise. * lib/unigbrk.in.h: Mark 4 enum values as obsolete. * lib/unigbrk/u-grapheme-breaks.h (FUNC): Handle emoji modifier sequence according to Unicode 11.0.0. * lib/unigbrk/u8-grapheme-breaks.c: Include <stdbool.h>, unictype.h. * lib/unigbrk/u16-grapheme-breaks.c: Likewise. * lib/unigbrk/u32-grapheme-breaks.c: Likewise. * lib/unigbrk/uc-grapheme-breaks.c: Likewise. * modules/unigbrk/u8-grapheme-breaks (Depends-on): Add unictype/property-extended-pictographic, stdbool. * modules/unigbrk/u16-grapheme-breaks (Depends-on): Likewise. * modules/unigbrk/u32-grapheme-breaks (Depends-on): Likewise. * modules/unigbrk/uc-grapheme-breaks (Depends-on): Likewise. * tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test for emoji modifier / ZWJ sequence. * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise. * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise. * tests/unigbrk/test-uc-is-grapheme-break.c: Include <stdbool.h>, unictype.h. (main): Update workaround logic to match the one in lib/unigbrk/u-grapheme-breaks.h. * modules/unigbrk/uc-is-grapheme-break-tests (Depends-on): Add unictype/property-extended-pictographic, stdbool. * lib/uniwbrk.in.h: Mark 4 enum values as obsolete. (WBP_WSS): New enum value. * lib/uniwbrk/u-wordbreaks.h (FUNC): Handle emoji ZWJ sequences and horizontal whitespace according to Unicode 11.0.0. * lib/uniwbrk/u8-wordbreaks.c: Include unictype.h. * lib/uniwbrk/u16-wordbreaks.c: Likewise. * lib/uniwbrk/u32-wordbreaks.c: Likewise. * lib/uniwbrk/wbrktable.c (uniwbrk_prop_index, uniwbrk_table): Add a row and column for WBP_WSS. * lib/uniwbrk/wbrktable.h (uniwbrk_prop_index, uniwbrk_table): Update declarations. * modules/uniwbrk/u8-wordbreaks (Depends-on): Add unictype/property-extended-pictographic. * modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise. * modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise. * tests/uniwbrk/test-u8-wordbreaks.c (main): Update expected results. * tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise. * tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise. * tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string): Update. * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop): Handle ZWJ according to Unicode 11.0.0. * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop): Likewise. * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop): Likewise. * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind): Update. (uc_width): Assign width 2 to the characters 0x187ED..0x187F1, 0x1F6F9, 0x1F9E7..0x1F9FF. * tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters 0x07FD, 0x08D3, 0x09FE, 0x0C04, 0xA8FF, 0x10D24..0x10D27, 0x10F46..0x10F50, 0x110CD, 0x111C9, 0x1133B, 0x1145E, 0x1182F..0x11837, 0x11839..0x1183A, 0x11D90..0x11D91, 0x11D95, 0x11D97, 0x11EF3..0x11EF4. Expect width 2 for the characters 0x187ED..0x187F1, 0x1F6F9, 0x1F9E7..0x1F9FF. * All generated files under lib/uni* and tests/uni*: Regenerate. * tests/uniname/NameAliases.txt: Update. * tests/uniname/UnicodeData.txt: Update. * tests/uninorm/NormalizationTest.txt: Update. * tests/unigbrk/GraphemeBreakTest.txt: Update. * tests/uniwbrk/WordBreakTest.txt: Update. * All the affected modules: Bump required libunistring version.
* unictype: Add Emoji properties from Unicode 11.0.0.Bruno Haible2021-12-3013-0/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (PROP_EMOJI*, PROP_EXTENDED_PICTOGRAPHIC): New enum values. (fill_properties): Don't require a space between the property name and the comment. Handle the property names from emoji-data.txt. (is_property_emoji, is_property_emoji_presentation, is_property_emoji_modifier, is_property_emoji_modifier_base, is_property_emoji_component, is_property_extended_pictographic): New declarations. (output_properties): Emit the properties emoji, emoji_presentation, emoji_modifier, emoji_modifier_base, emoji_component, extended_pictographic. (get_lbp): Use the emoji_modifier property. (main): Expect one more argument, for the emoji-data.txt file. * lib/unictype.in.h (UC_PROPERTY_EMOJI, UC_PROPERTY_EMOJI_PRESENTATION, UC_PROPERTY_EMOJI_MODIFIER, UC_PROPERTY_EMOJI_MODIFIER_BASE, UC_PROPERTY_EMOJI_COMPONENT, UC_PROPERTY_EXTENDED_PICTOGRAPHIC, uc_is_property_emoji, uc_is_property_emoji_presentation, uc_is_property_emoji_modifier, uc_is_property_emoji_modifier_base, uc_is_property_emoji_component, uc_is_property_extended_pictographic): New declarations. * lib/unictype/pr_emoji.c: New file. * lib/unictype/pr_emoji_presentation.c: New file. * lib/unictype/pr_emoji_modifier.c: New file. * lib/unictype/pr_emoji_modifier_base.c: New file. * lib/unictype/pr_emoji_component.c: New file. * lib/unictype/pr_extended_pictographic.c: New file. * modules/unictype/property-emoji: New file. * modules/unictype/property-emoji-tests: New file. * modules/unictype/property-emoji-presentation: New file. * modules/unictype/property-emoji-presentation-tests: New file. * modules/unictype/property-emoji-modifier: New file. * modules/unictype/property-emoji-modifier-tests: New file. * modules/unictype/property-emoji-modifier-base: New file. * modules/unictype/property-emoji-modifier-base-tests: New file. * modules/unictype/property-emoji-component: New file. * modules/unictype/property-emoji-component-tests: New file. * modules/unictype/property-extended-pictographic: New file. * modules/unictype/property-extended-pictographic-tests: New file. * modules/unictype/property-all (Depends-on): Depend on the new modules.
* unilbrk: Improve support for strings that contain CR-LF sequences.Bruno Haible2021-12-294-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (LBP_CR, LBP_LF): New enum values. (get_lbp): For '\r' and '\n', return LBP_CR and LBP_LF, respectively, instead of LBP_BK. (debug_output_lbp, fill_org_lbp, debug_output_org_lbp, lbp_value_to_string): Handle LBP_CR, LBP_LF. * lib/unilbrk/lbrkprop2.h: Regenerated. * lib/unilbrk/lbrktables.h (LBP_CR, LBP_LF): New enum values. * lib/unilbrk.in.h (UC_BREAK_CR_BEFORE_LF): New enum value. (u8_possible_linebreaks, u16_possible_linebreaks, u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks, u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks): Declare also a _v2 variant, and use a C macro to activate it by default. * lib/unilbrk/internal.h: New file. * lib/unilbrk/u8-possible-linebreaks.c: Include unilbrk/internal.h. (u8_possible_linebreaks_loop): Renamed from u8_possible_linebreaks. Add 'cr' parameter. (u8_possible_linebreaks, u8_possible_linebreaks_v2): New functions. (main): Update. * lib/unilbrk/u16-possible-linebreaks.c: Include unilbrk/internal.h. (u16_possible_linebreaks_loop): Renamed from u16_possible_linebreaks. Add 'cr' parameter. (u16_possible_linebreaks, u16_possible_linebreaks_v2): New functions. * lib/unilbrk/u32-possible-linebreaks.c: Include unilbrk/internal.h. (u32_possible_linebreaks_loop): Renamed from u32_possible_linebreaks. Add 'cr' parameter. (u32_possible_linebreaks, u32_possible_linebreaks_v2): New functions. * lib/unilbrk/ulc-possible-linebreaks.c: Include unilbrk/internal.h, unilbrk/lbrktables.h. (ulc_possible_linebreaks_internal): Renamed from ulc_possible_linebreaks. Add 'cr' parameter. (ulc_possible_linebreaks, ulc_possible_linebreaks_v2): New functions. (main): Update. * lib/unilbrk/u8-width-linebreaks.c: Include unilbrk/internal.h, unilbrk/lbrktables.h. (u8_width_linebreaks_internal): Renamed from u8_width_linebreaks. Add 'cr' parameter. (u8_width_linebreaks, u8_width_linebreaks_v2): New functions. (main): Update. * lib/unilbrk/u16-width-linebreaks.c: Include unilbrk/internal.h, unilbrk/lbrktables.h. (u16_width_linebreaks_internal): Renamed from u16_width_linebreaks. Add 'cr' parameter. (u16_width_linebreaks, u16_width_linebreaks_v2): New functions. * lib/unilbrk/u32-width-linebreaks.c: Include unilbrk/internal.h, unilbrk/lbrktables.h. (u32_width_linebreaks_internal): Renamed from u32_width_linebreaks. Add 'cr' parameter. (u32_width_linebreaks, u32_width_linebreaks_v2): New functions. * lib/unilbrk/ulc-width-linebreaks.c: Include unilbrk/internal.h, unilbrk/lbrktables.h. (ulc_width_linebreaks_internal): Renamed from ulc_width_linebreaks. Add 'cr' parameter. (ulc_width_linebreaks, ulc_width_linebreaks_v2): New functions. (main): Update. * modules/unilbrk/u8-possible-linebreaks (Files): Add lib/unilbrk/internal.h. * modules/unilbrk/u16-possible-linebreaks (Files): Likewise. * modules/unilbrk/u32-possible-linebreaks (Files): Likewise. * modules/unilbrk/u8-width-linebreaks (Files): Likewise. * tests/unilbrk/test-u8-possible-linebreaks.c (test_function): New function, extracted from main. Add a test of CR-LF handling. (main): Invoke it twice. * tests/unilbrk/test-u16-possible-linebreaks.c (test_function): New function, extracted from main. Add a test of CR-LF handling. (main): Invoke it twice. * tests/unilbrk/test-u32-possible-linebreaks.c (test_function): New function, extracted from main. Add a test of CR-LF handling. (main): Invoke it twice. * tests/unilbrk/test-ulc-possible-linebreaks.c (test_function): New function, extracted from main. (main): Invoke it twice. * tests/unilbrk/test-u8-width-linebreaks.c (test_function): New function, extracted from main. (main): Invoke it twice. * tests/unilbrk/test-u16-width-linebreaks.c (test_function): New function, extracted from main. (main): Invoke it twice. * tests/unilbrk/test-u32-width-linebreaks.c (test_function): New function, extracted from main. (main): Invoke it twice. * tests/unilbrk/test-ulc-width-linebreaks.c (test_function): New function, extracted from main. (main): Invoke it twice.
* timespec_getres: new modulePaul Eggert2021-12-283-0/+47
| | | | | | | | | | | * 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.
* gettime-res: new modulePaul Eggert2021-12-281-0/+30
| | | | | | | * 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.
* Update to Unicode 10.0.0.Bruno Haible2021-12-26189-186/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/gen-uni-tables.c (PROP_REGIONAL_INDICATOR): New enum value. (fill_properties): Recognize property "Regional_Indicator". (is_property_regional_indicator): New function. (output_properties): Also output the data for regional_indicator. (UC_JOINING_GROUP_MALAYALAM_*): New enum values. (fill_arabicshaping, joining_group_as_c_identifier): Recognize these joining groups. * lib/unictype/pr_regional_indicator.c: New file. * modules/unictype/property-regional-indicator: New file. * modules/unictype/property-regional-indicator-tests: New file. * modules/unictype/property-all (Depends-on): Add unictype/property-regional-indicator. * lib/unictype.in.h (UC_JOINING_GROUP_MALAYALAM_*): New enum values. * lib/unictype/joininggroup_name.h: Add the MALAYALAM_* joining groups. * lib/unictype/joininggroup_byname.gperf: Likewise. * lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind): Update. * tests/uniwidth/test-uc_width2.sh: Update. * All generated files under lib/uni* and tests/uni*: Regenerate. * tests/uniname/NameAliases.txt: Update. * tests/uniname/UnicodeData.txt: Update. * tests/uninorm/NormalizationTest.txt: Update. * tests/unigbrk/GraphemeBreakTest.txt: Update. * tests/uniwbrk/WordBreakTest.txt: Update. * All the affected modules: Bump required libunistring version.
* maint: avoid empty lines in recipesPaul Eggert2021-12-2469-202/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AIX 7.2 ‘make’ complains about recipe lines that are empty after macro expansion, and I suppose there’s a good chance some non-POSIX ‘make’ would prohibit them. Rework macros so that we can avoid them. * gnulib-tool (func_emit_lib_Makefile_am) (func_emit_lib_Makefile_am): Support @!NMD@ too. * modules/gen-header (@gl_V_at): New macro. * modules/alloca-opt, modules/argz, modules/assert-h: * modules/byteswap, modules/configmake, modules/ctype: * modules/dirent, modules/errno, modules/execinfo, modules/fcntl-h: * modules/float, modules/fnmatch-h, modules/getopt-posix: * modules/glob-h, modules/iconv-h, modules/ieee754-h: * modules/inttypes-incomplete, modules/langinfo: * modules/libtextstyle-optional, modules/limits-h, modules/locale: * modules/malloc-h, modules/math, modules/monetary, modules/netdb: * modules/openmp-init, modules/poll-h, modules/posix-shell: * modules/pthread-h, modules/pty, modules/sched, modules/search: * modules/signal-h, modules/sigsegv, modules/snippet/link-warning: * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool: * modules/stddef, modules/stdint, modules/stdio, modules/stdlib: * modules/stdnoreturn, modules/string, modules/strings: * modules/sysexits, modules/termios, modules/threads-h: * modules/time, modules/uchar, modules/unicase/base: * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base: * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base: * modules/unistd, modules/unistdio/base, modules/unistr/base: * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base: * modules/utime-h, modules/wchar, modules/wctype-h: Use it.
* maint: break out '&& mv $@-t $@'Paul Eggert2021-12-243-10/+8
| | | | | | | * build-aux/git-version-gen, config/argz.mk, modules/configmake: * modules/posix_spawnp-tests, modules/snippet/link-warning: Break out '&& mv $@-t $@' to a separate line in the Make recipe, as this makes things a bit easier to debug.