|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge glob from glibc, with changes for glob proposed
by Adhemerval Zanella in the thread starting here:
https://sourceware.org/ml/libc-alpha/2017-08/msg01079.html
plus some fixes for this merge.
* lib/flexmember.h: Change license wording to something that
works unchanged in Glibc, since this code might be used in
Glibc and this will minimize 'diff' output.
* lib/glob_internal.h, lib/glob_pattern_p.c, lib/globfree.c:
New files, ported from glibc.
* lib/glob_pattern_p.c, lib/globfree.c, lib/glob.c [!_LIBC]:
Include <config.h> first.
* lib/glob-libc.h (_Restrict_): Remove. All uses replaced
with __restrict.
(__size_t): Remove. All uses replaced by size_t.
(size_t): Define by defining __need_size_t and including <stddef.h>.
This should work even in non-glibc platforms, where any name
pollution is OK.
Use __USE_MISC instead of __USE_BSD || __USE_GNU.
(struct stat64): Don’t worry about __GLOB_GNULIB.
(glob, globfree, glob_pattern_p): Remove macros for
__USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB
case. Remove _GL_ARG_NONNULL as GNU behavior is to accept NULL
but set errno.
* lib/glob.c (_GL_ARG_NONNULL) [!_LIBC]: Remove. All uses
removed since the glibc behavior works on null pointers.
Do not include stdio.h; old SunOS is irrelevant now.
Do not worry about GLOB_ONLY_P as we now mimic glibc here.
Include glob_internal.h.
(D_INO_TO_RESULT): Depend on (_LIBC || D_INO_IN_DIRENT), not
((POSIX || WINDOWS32) && !__GNU_LIBRARY__). The latter probably
worked only coincidentally.
(attribute_hidden, __attribute_noinline__, __glibc_unlikely):
Remove macros; now done in glob.in.h.
(size_add_wrapv): Do not use __builtin_add_overflow if __ICC.
(glob): Properly initialize glob structure with
GLOB_BRACE|GLOB_DOOFFS (bug 20707).
Remove old code using SHELL since Bash no longer
uses this.
(glob, prefix_array): Separate MS code better.
(glob, glob_in_dir): Use C99 decls before statements when glibc
does.
(glob_in_dir): Remove old Amiga and VMS code.
(globfree, __glob_pattern_type, __glob_pattern_p): Move to
separate files.
* lib/glob.in.h (attribute_hidden, __attribute_noinline__)
(__glibc_unlikely):
Move here from glob.c.
(__restrict): New macro here, replacing the _Restrict_ in glob.c.
(weak_alias): New macro.
(__size_t): Remove. All uses replaced by size_t.
* modules/d-ino (License): Now LGPLv2+, for compatibility with glob.
* modules/flexmember (License): Now LGPLv2+, which it should have
been anyway since flexmember.h is not unlimited-license.
* modules/glob (Files): Add +lib/glob_internal.h,
lib/glob_pattern_p.c, lib/globfree.c.
(Depends-on): Remove snippet/arg-nonnull.
|
|
gnulib-tool.
* lib/cycle-check.h: Include <stdint.h> unconditionally, since we
now assume the stdint module. Do not include inttypes.h.
* lib/fsusage.h: Likewise.
* lib/getndelim2.c: Likewise.
* lib/human.h: Likewise.
* lib/inttostr.h: Likewise.
* lib/obstack.c: Likewise.
* lib/regex_internal.h: Likewise.
* lib/tempname.c: Likewise.
* lib/utimecmp.c: Likewise.
* lib/xstrtol.h: Likewise.
* lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
* lib/strtoimax.c: Adjust to macro name changes in Autoconf,
e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
* lib/xtime.h: Likewise.
Remove files that are no longer needed by their respective modules.
* m4/obstack.m4: Remove.
* m4/strerror_r.m4: Remove.
* m4/uint32_t.m4: Remove.
* m4/uintptr_t.m4: Remove.
* m4/ullong_max.m4: Remove.
* m4/xstrtoimax.m4: Remove.
* m4/xstrtoumax.m4: Remove.
* cycle-check.m4 (gl_CYCLE_CHECK): Do not require gl_AC_TYPE_UINTMAX_T,
gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib dependencies now
capture this.
* cycle-check.m4 (gl_CYCLE_CHECK):
Do not use AC_LIBSOURCES, since gnulib modules now do this.
* fsusage.m4 (gl_FSUSAGE): Likewise.
* human.m4 (gl_HUMAN): Likewise.
* inttostr.m4 (gl_INTTOSTR): Likewise.
* xstrtol.m4 (gl_XSTRTOL): Likewise.
* filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
* filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
stdint.
* human.m4 (gl_HUMAN): Likewise.
* inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
* mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
* strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
* strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
* xstrtol (gl_XSTRTOL): Likewise.
* gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
AC_TYPE_LONG_LONG_INT.
* strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
* strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
* strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
* strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
* human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
on stdbool.
* xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
(gl_PREREQ_XSTRTOUL): Remove.
* ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
* posixver.m4: Fix comment since head -1 now works even in POSIX mode.
* modules/backupfile (Files): Remove m4/d-ino.m4.
(Depends-on): Add d-ino.
* modules/cycle-check (Depends-on): Add stdint.
(lib_SOURCES): Add cycle-check.h.
* modules/d-ino: New module.
* modules/d-type: New module.
* modules/error (Files): Remove m4/strerror_r.m4.
* modules/filemode (Files): Add m4/st_dm_mode.m4.
* modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
m4/inttypes_h.m4, m4/uintmax_t.m4.
(Depends-on): Add stdint.
(lib_SOURCES): Add fsusage.h.
* modules/getcwd (Files): Remove d-ino.m4.
(Depends-on): Add d-ino.
* modules/getndelim2 (Depends-on): Add stdint.
* modules/glob (Files): Remove m4/d-type.m4.
(Depends-on): Add d-type.
* modules/host-os: New module.
* modules/human (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
m4/inttypes_h.m4, m4/uintmax_t.m4.
* Depends-on: Add stdint.
(lib_SOURCES): Add human.h.
* modules/inttostr (Files): Remove m4/intmax_t.m4,
m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
m4/uintmax_t.m4, m4/ulonglong.m4.
(Depends-on): Add stdint.
(EXTRA_DIST): Add inttostr.h.
* modules/lchmod: New module.
* modules/link-follow: New module.
* modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
(Depends-on): Add lchmod.
* modules/mkstemp (Files): Remove m4/ulonglong.m4,
m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
(Depends-on): Add stdint.
* modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
(Depends-on): Add stdint.
(configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
* modules/perl: New module.
* modules/regex (Depends-on): Add stdint.
* modules/rmdir-errno: New module.
* modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
m4/intmax_t.m4.
(Depends-on): Add stdint.
* modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
m4/uintmax_t.m4.
(Depends-on): Add stdint.
* modules/unlink-busy: New module.
* modules/utimecmp (Depends-on): Add stdint.
* modules/uptime: New module.
* modules/winsz-ioctl: New module.
* modules/winsz-termios: New module.
* modules/xnanosleep (Depends-on): Add nanosleep.
* modules/ullong_max: Remove.
* modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
(configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
* modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
(Depends-on): Add inttypes.
(lib_SOURCES): Add xstrtol.h.
* modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
(configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
* MODULES.html.sh: Move 'assert' into the assert section.
Move 'dummy' into the linking section.
Remove ullong_max.
Add section for compatibility checks for POSIX:2001 functions,
and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
winsz-ioctl, and winsz-termios into it.
Add lchmod.
Add top-level Misc section and put host-os, perl, and uptime
into it.
|