1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-06-15 23:35:50 +00:00

19090 Commits

Author SHA1 Message Date
Dmitry Selyutin 3bb495a9d4 private import even for standard modules 2017-09-09 23:01:51 +03:00
Dmitry Selyutin 8c9c625cad type_assert helper (unify type error handling) 2017-09-09 22:54:55 +03:00
Dmitry Selyutin 5bf19be1f8 private import; yet another naming simplification 2017-09-09 21:58:23 +03:00
Dmitry Selyutin 066ed5b79f module: do not export private class members into inherited classes 2017-09-09 20:33:55 +03:00
Dmitry Selyutin 59f22bd113 module: alternate naming for some properties 2017-09-09 20:22:10 +03:00
Dmitry Selyutin d3dfe41e39 [backport] Assume gnulib is checked out from Git, not CVS
commit 435f1d7ad9
Author: Stefano Lattarini <stefano.lattarini@gmail.com>
Date:   Sat May 4 10:30:14 2013 +0200

    Assume gnulib is checked out from Git, not CVS

    In fact, access to the gnulib repository through CVS has been disabled,
    or more precisely, got broken and was never restored; see:
    <http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00008.html>
2017-09-09 19:56:33 +03:00
Dmitry Selyutin 835b8bc969 [backport] gnulib-tool: fix incompatibility with autopoint 0.18.2
commit 8e858e6d77
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Jan 5 08:03:10 2013 -0800

    gnulib-tool: fix incompatibility with autopoint 0.18.2

    * gnulib-tool: Don't indent AM_GNU_GETTEXT_VERSION line.
    Problem reported by Tom G. Christensen in
    <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00053.html>.
2017-09-09 19:53:05 +03:00
Dmitry Selyutin 38b9fa0be9 generator: do not export private class members into inherited classes 2017-09-09 19:42:55 +03:00
Dmitry Selyutin 75ab5910bf filesystem: do not export private class members into inherited classes 2017-09-09 19:42:34 +03:00
Dmitry Selyutin bbbc6e35f8 config: do not export private class members into inherited classes 2017-09-09 19:35:00 +03:00
Dmitry Selyutin 782f7fa38d almost full support of command-line options (except --version) 2017-09-09 19:20:34 +03:00
Dmitry Selyutin f4274dd934 [python] python gnulib API development branch 2017-09-08 23:35:13 +03:00
Paul Eggert 5f9d911a92 * lib/fts.c: Fix XFS comments. 2017-09-08 23:33:20 +03:00
Bruno Haible 3ba4dbaefe stddef: Avoid conflict with system-defined max_align_t.
The configure-determined HAVE_MAX_ALIGN_T may not always be accurate.
Reported by Werner Lemberg <wl@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00185.html>.

* lib/stddef.in.h (rpl_max_align_t): Renamed from max_align_t.
(max_align_t): Define as a macro.
(GNULIB_defined_max_align_t): New macro. Guards against multiple
definitions of rpl_max_align_t in different copies of gnulib-generated
<stddef.h>.
2017-09-08 10:02:47 +02:00
Paul Eggert 2890b02100 libc-config: port to MSVC
Problems reported by Gisle Vanem in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-09/msg00016.html
* lib/libc-config.h (__inline): Don't define if HAVE___INLINE.
(libc_hidden_proto): Stick to Standard C syntax for varargs macro.
* m4/__inline.m4: New file.
* modules/libc-config (Files): Add it.
(Depends-on): Use it.
2017-09-05 23:33:59 -07:00
Paul Eggert 8ffefc19a6 glob: Use enum for __glob_pattern_type result
From a patch proposed by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-09/msg00212.html
* lib/glob_internal.h (GLOBPAT_NONE, GLOBPAT_SPECIAL)
(GLOBPAT_BACKSLASH, GLOBPAT_BRACKET): New constants.
* lib/glob_internal.h (__glob_pattern_type):
* lib/glob.c (glob):
* lib/glob_pattern_p.c (__glob_pattern_p):
Use them.
2017-09-05 21:15:55 -07:00
Paul Eggert ef5de27602 glob: fix for use in glibc
Problem reported by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-09/msg00213.html
* lib/glob.c (DT_UNKNOWN, DT_DIR, DT_LINK):
Do not redefine if _LIBC.
2017-09-05 19:00:26 -07:00
Paul Eggert 064df0b0c4 glob: fix bugs with long login names
Problem reported by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00455.html
* lib/glob.c (GET_LOGIN_NAME_MAX): Remove.
(glob): Use the same scratch buffer for both getlogin_r and
getpwnam_r.  Don’t require preallocation of the login name.  This
simplifies storage allocation, and corrects the handling of
long login names.
2017-09-02 15:45:55 -07:00
Bruno Haible 5f7d5f2b78 dirent: Update doc.
* doc/posix-headers/dirent.texi: More concrete list of platforms.
2017-09-02 13:23:15 +02:00
Paul Eggert 5db9301320 glob: fix getpwnam_r errno typo
* lib/glob.c (glob): Fix longstanding misuse of errno after
getpwnam_r, which returns an error number rather than setting
errno.
2017-09-02 03:57:04 -07:00
Paul Eggert ae55644a46 glob: fix typo in recent change
* lib/glob.c (glob) [!HAVE_GETPWNAM_R && !_LIBC]:
Fix recently-introduced typo.
2017-09-02 03:38:21 -07:00
Paul Eggert 8ac17a6ad4 glob: don't save and restore errno unnecessarily
* lib/glob.c (glob): Don't save and restore errno
merely because we have getpwnam_r.
2017-09-02 02:06:58 -07:00
Paul Eggert 742b1c1441 glob: don't assume getpwnam_r
* lib/glob.c (glob): Port recent patches to platforms
lacking getpwnam_r.
2017-09-02 02:06:58 -07:00
Paul Eggert dca11d0f59 scratch_buffer: don’t use private glibc API
Suggested by Florian Weimer in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-09/msg00004.html
* lib/scratch_buffer.h: Rename to lib/malloc/scratch_buffer.h.
* lib/scratch_buffer_grow.c: Rename to
lib/malloc/scratch_buffer_grow.c.
* lib/scratch_buffer_grow_preserve.c: Rename to
lib/malloc/scratch_buffer_grow_preserve.c.
* lib/scratch_buffer_set_array_size.c: Rename to
lib/malloc/scratch_buffer_set_array_size.c.
* lib/scratch_buffer.h: New file.
* modules/scratch_buffer (Files, Makefile.am):
Adjust to source-file renaming.
2017-09-02 01:23:21 -07:00
Paul Eggert e1e842053e glob: use scratch_buffer instead of extend_alloca
Much of the lib/glob.c part of this patch comes from a glibc patch
proposed by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00456.html
* lib/glob.c: Do not include <config.h>, since <libc-config.h>,
included via glob.h, does this for us now.
(__set_errno): Remove, as libc-config does this for us now.
Include <scratch_buffer.h>.
(GETPW_R_SIZE_MAX): Remove.
(glob): Use struct scratch_buffer instead of extend_alloca.
* lib/glob.in.h: Include libc-config.h rather than
including <sys/cdefs.h> conditionally.
(__BEGIN_DECLS, __END_DECLS, __THROW, __THROWNL, attribute_hidden)
(__glibc_unlikely, __restrict, weak_alias):
Remove, as libc-config does this for us now.
* m4/glob.m4 (gl_PREREQ_GLOB):
Remove sys/cdefs.h tests; no longer needed.
* modules/glob (Depends-on): Add libc-config, scratch_buffer.
(glob.h): Do not replace HAVE_SYS_CDEFS_H.
2017-09-01 16:32:53 -07:00
Paul Eggert 3866ef6158 scratch_buffer: new module
* lib/scratch_buffer.h, lib/scratch_buffer_grow.c:
* lib/scratch_buffer_grow_preserve.c:
* lib/scratch_buffer_set_array_size.c:
New files, copied from glibc with very minor changes that can be
copied back.
* modules/scratch_buffer: New file.
2017-09-01 16:32:53 -07:00
Paul Eggert 38885c864e libc-config: new module
* MODULES.html.sh: Add libc-config.
* lib/cdefs.h: New file, copied from the GNU C Library with very
minor changes that can be copied back.
* lib/libc-config.h, modules/libc-config: New files.
2017-09-01 16:32:53 -07:00
Paul Eggert fd1daf4e18 glob: match dangling symlinks
This fixes a bug I inadvertently introduced to Gnulib when I
merged glibc glob back into gnulib on 2007-10-16.  This fix is
inspired by a patch proposed for glibc by Adhemerval Zanella in:
https://sourceware.org/ml/libc-alpha/2017-08/msg00446.html
* doc/posix-functions/glob.texi: Update list of affected platforms.
* lib/glob.c (__lstat64): New macro.
(is_dir): New function.
(glob, glob_in_dir): Match symlinks even if they are dangling.
(link_stat, link_exists_p): Remove.  All uses removed.
* lib/glob.in.h (__attribute_noinline__): Remove; no longer used.
* m4/glob.m4 (gl_PREREQ_GLOB): Do not check for fstatat.
* modules/glob (Depends-on): Remove dirfd.
* modules/glob-tests (Depends-on): Add symlink.
* tests/test-glob.c: Include errno.h, unistd.h.
(BASE): New macro.
(main): Test dangling symlinks, if symlinks are supported.
2017-08-31 15:08:44 -07:00
Paul Eggert c8e57c1ad7 glob, backupfile: inode 0 is a valid inode number
* doc/posix-functions/readdir.texi (readdir):
* doc/posix-headers/dirent.texi (dirent.h):
Document more readdir portability issues.
* lib/backupfile.c (REAL_DIR_ENTRY): Remove.
(numbered_backup): Don’t treat inode 0 any differently from
other inode values.
* lib/glob.c (struct readdir_result): Remove skip_entry member.
(readdir_result_skip_entry, D_INO_TO_RESULT): Remove.
All uses removed.
* modules/glob (Depends-on): Remove d-ino.
2017-08-31 15:08:44 -07:00
Paul Eggert b5ec983e13 glob: simplify symlink detection
* lib/glob.c (dirent_type): New type.  Use uint_fast8_t not
uint8_t, as C99 does not require uint8_t.
(DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]:
New macros.
(struct readdir_result): Use dirent_type.  Do not define skip_entry
unless it is needed; this saves a byte on platforms lacking d_ino.
(readdir_result_type, readdir_result_skip_entry):
New functions, replacing ...
(readdir_result_might_be_symlink, readdir_result_might_be_dir):
... these functions, which were removed.  This makes the callers
easier to read.  All callers changed.
(D_INO_TO_RESULT): Now empty if there is no d_ino.
2017-08-31 15:08:44 -07:00
Pádraig Brady a20922f105 fts-tests: tag as a longrunning-test so not included by default
* modules/fts-tests: This test takes about 20s on current systems,
and uses about 285M of space on ext4.
2017-08-30 22:46:07 -07:00
Pádraig Brady 58c0514fa3 renameat2: fix compilation on alpine linux
* m4/renameat.m4: Check for <linux/fs.h> presence.
* lib/renameat2.h: Only include <linux/fs.h> if present.
Reported by Assaf Gordon on Alpine Linux.
2017-08-30 00:18:10 -07:00
Paul Eggert 8d116e3f65 glob: try to port recent changes to MS-Windows
Problem reported by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00170.html
* lib/glob.c (__glob_pattern_p) [!_LIBC]: Move from here ...
* lib/glob.in.h (__glob_pattern_p): ... to here.
2017-08-24 23:52:24 -07:00
Eric Blake fa96a1883e warnings: fix compilation with old autoconf
Autoconf older than 2.63b (such as what ships on CentOS 6) had
a bug that any AC_DEFUN'd macro name that includes shell meta-
characters causes failure due to missing shell quoting during
aclocal's use of autom4te.  We can work around the problem by
using m4_defun instead (same semantics in autom4te, but no
longer traced by aclocal, so no longer tickles the shell
quoting bug).

* m4/warnings.m4 (gl_UNKNOWN_WARNINGS_ARE_ERRORS(C))
(gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)): Use m4_defun rather than
AC_DEFUN.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C))
(gl_MANYWARN_ALL_GCC(C++)): Likewise.

Reported-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-24 20:48:57 -05:00
Bruno Haible a103699d83 * doc/gnulib-intro.texi: Add comment regarding IRIX. 2017-08-24 23:49:59 +02:00
Karl Berry 6c12411d54 autoupdate 2017-08-24 08:10:28 -07:00
Bruno Haible 8e0845e2f3 glob: Fix compilation error on NetBSD 7.0 and OpenBSD 6.0.
* modules/glob (Depends-on): Add c99.
2017-08-24 12:12:31 +02:00
Paul Eggert 47c634c05a glob: fix typo that broke platforms lacking d_ino
This typo also hurt performance on GNU/Linux and similar hosts.
* lib/glob.c (D_INO_TO_RESULT): Fix typo (reversed ifdef)
in previous change.
2017-08-24 00:47:57 -07:00
Paul Eggert d93b573ba7 flexmember: fix typo in previous patch
* lib/flexmember.h: Fix comment typo.
2017-08-23 14:47:06 -07:00
Paul Eggert 32107c10ed glob: merge from glibc with Zanella glob changes
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.
2017-08-23 14:41:54 -07:00
Paul Eggert f320c1ebec glob: port to clang's Undefined Sanitizer
Problem reported by Tim Rühsen in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-08/msg00144.html
* lib/glob.c (FLEXIBLE_ARRAY_MEMBER) [_LIBC]: Define to empty.
(glob_in_dir): Do not rely on undefined behavior in accessing
struct members beyond their bounds.  Use a flexible array member
instead.
2017-08-22 10:26:40 -07:00
Bruno Haible b23000de1e ) -> } -> }) 2017-08-21 22:20:11 +02:00
Paul Eggert efec5175a6 vc-list-files: port to Solaris 10
* build-aux/vc-list-files: Don't assume test -e works.
2017-08-21 12:41:47 -07:00
Karl Berry b2372a5428 ) -> } 2017-08-21 08:00:44 -07:00
Karl Berry 2c309a373e autoupdate 2017-08-21 07:57:47 -07:00
Paul Eggert dd76853a03 git-version-gen: port to Solaris 10
Problem reported by Dagobert Michelsen in:
http://lists.gnu.org/archive/html/grep-devel/2017-08/msg00002.html
* build-aux/git-version-gen (v_from_git):
Use expr instead of shell substitution.
2017-08-20 17:04:21 -07:00
Bruno Haible ec2d725580 host-cpu-c-abi: Improve detection of MIPS ABI.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): For MIPS, test the value of
_MIPS_SIM.
2017-08-20 01:19:50 +02:00
Bruno Haible 5408b0e0cd hypot tests: Fix test failure on FreeBSD 11.0/x86.
* tests/test-hypot.h (test_function): Declare z as 'volatile'.
2017-08-17 22:15:10 +02:00
Bruno Haible 02a6dd29a6 float: Fix LDBL_MIN value on FreeBSD/x86.
* lib/float.in.h (LDBL_MIN) [__FreeBSD__]: Add more precision.
2017-08-17 21:32:28 +02:00
Bruno Haible 299d6d5f9a random: Fix test compilation failure on Cygwin 1.5.25.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_INITSTATE,
HAVE_DECL_SETSTATE.
* m4/random.m4 (gl_FUNC_RANDOM): Test whether initstate and setstate are
declared.
* modules/stdlib (Makefile.am): Substitute HAVE_DECL_INITSTATE,
HAVE_DECL_SETSTATE.
* lib/stdlib.in.h (initstate): Declare also if HAVE_DECL_INITSTATE is 0.
(setstate): Declare also if HAVE_DECL_SETSTATE is 0.
* doc/posix-functions/initstate.texi: Mention the Cygwin 1.5.x problem.
* doc/posix-functions/random.texi: Likewise.
* doc/posix-functions/setstate.texi: Likewise.
* doc/posix-functions/srandom.texi: Likewise.
2017-08-17 14:17:58 +02:00