Log

Author Commit Date CI Message
Paul Eggert b18e6d98 2015-07-27T07:53:36 time: port __need_time_t to MinGW * lib/time.in.h (__need_time_t): Do not treat specially on MinGW. Fix reported by Eli Zaretskii in: http://bugs.gnu.org/21020#36
Paul Eggert fe699d37 2015-07-25T16:37:17 strftime: fix newly-introduced bug on Solaris * lib/strftime.c (strftime_case_): Set the local variable 'zone' consistently at the start, rather than doing some of the setup at the start and some in the %Z format spec. This is cleaner, and works better with time_rz on platforms like Solaris where struct tm lacks a tm_zone member, as when !HAVE_TM_GMTOFF %z's calls to mktime_z and localtime_rz can mess up the tzname cache.
Paul Eggert c1340b3d 2015-07-25T15:20:57 test-strftime: test for Solaris bug * modules/strftime-tests (Depends-on): Add strerror. * tests/test-strftime.c: Include <errno.h>. (posixtm_test): New function, containing the old 'main'. (struct tzalloc_test, struct localtime_rz_test): New types. (TZ, LT): New static vars. (tzalloc_test): New function. (main): Rewrite in terms of posixtm_test and tzalloc_test.
Paul Eggert 5ed44b37 2015-07-25T15:20:10 time_rz: port to Solaris etc. Works around a tzname problem on platforms like Solaris that have tzname but not tm_zone, by setting tzname at the appropriate time and restoring it later. * lib/time_rz.c (tzname_address, tzname_value) [HAVE_TZNAME]: New static vars. (save_abbr) [HAVE_TZNAME]: Set them. (revert_tz) [HAVE_TZNAME]: Clear or use them. (restore_tzname): New function. (localtime_rz, mktime_z): Use it.
Paul Eggert 1f2146e9 2015-07-25T15:13:13 time_rz: now LGPL * modules/time_rz (License): Now LGPL, because strftime depends on it.
Paul Eggert d3e697dd 2015-07-25T15:11:42 time_rz: make a constant 'const' * lib/time_rz.c (local_tz): Now const.
Paul Eggert 2134fd0a 2015-07-25T15:10:16 time_rz: fix off-by-one typo * lib/time_rz.c (extend_abbrs): Fix off-by-one typo.
Karl Berry 37ff1822 2015-07-24T06:40:45 autoupdate
Paul Eggert a89e3449 2015-07-23T18:28:13 fprintftime, strftime: use timezone_t args * NEWS: Document the change. * lib/fprintftime.h (fprintftime): * lib/strftime.c (extra_args) [my_strftime]: * lib/strftime.h (nstrftime): Time zone arg is now of type timezone_t, not int. * lib/strftime.c (mktime_z) [_LIBC]: New macro. (__gmtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: Remove; no longer used. (my_strftime) [emacs && !my_strftime]: (emacs_strftimeu) [emacs && !FPRINTFTIME]: Remove; Emacs doesn't need this any more. (HAVE_TZSET) [my_strftime]: Unset, since we no longer want fprintftime and nstrftime to call tzset. (ut) [!my_strftime]: Remove, replacing with ... (tz) [!my_stftime]: ... this new macro. All uses changed. (strftime_case_): Use localtime_rz and mktime_z instead of localtime_r and mktime. * modules/fprintftime (Depends-on): Add time_rz. * modules/strftime (Depends-on): Add time_rz. Remove time_r. * tests/test-strftime.c (main): Adjust to new nstrftime API.
Paul Eggert 4bc76593 2015-07-23T17:44:19 time_rz: new module * MODULES.html.sh: Add time_rz. * lib/time_rz.c, m4/time_rz.m4, modules/time_rz: New files. * lib/time.in.h (timezone_t, tzalloc, tzfree, localtime_rz, mktime_z): New decls if _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@. * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_DEFAULTS): New var HAVE_TIMEZONE_T (default 0). * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): New var GNULIB_TIME_RZ (default 0). * modules/time (time.h): Substitute the new vars.
Paul Eggert e187c794 2015-07-23T17:43:33 flexmember: license is now unlimited * modules/flexmember (License): Change to unlimited, since its only source file gives an unlimited license.
Karl Berry eda101a0 2015-07-20T08:59:04 autoupdate
Eric Blake 5db53430 2015-07-14T08:03:02 maint: update copyright paper procedures Requested by Donald R. Robertson III via gnu.org ticket #1028294. * config/srclist.txt: Drop outdated files. * doc/Copyright/conditions.txt: Update to latest. * doc/Copyright/assign.changes.manual: Delete. * doc/Copyright/assign.future.manual: Likewise. * doc/Copyright/assign.manual: Likewise. * doc/Copyright/assign.translation.manual: Likewise. * doc/Copyright/disclaim.changes.manual: Likewise. * doc/Copyright/disclaim.manual: Likewise. * doc/Copyright/disclaim.program: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Karl Berry f31cdc30 2015-07-12T08:11:08 autoupdate
Karl Berry 5d1b1fef 2015-07-08T06:23:50 autoupdate
Daiki Ueno 9b6679dc 2015-07-07T15:36:43 localename: fix link error on Illumos Illumos defines __sun, but does not have getlocalename_l nor the equivalent. This partially reverts commit 387c214. * m4/localename.m4 (gl_LOCALENAME): Check if getlocalename_l is available, as well as uselocale. * lib/localename.c [HAVE_USELOCALE && __sun]: Don't fallback to use getlocalename_l if it is not available.
Daiki Ueno b3b5ecd0 2015-07-07T15:12:52 unistr/uN-strtok-tests: avoid a trivial leak * tests/unistr/test-u-strtok.h (test_u_strtok): Untabify. Free input and delim after the multibyte delimiter tests.
Andreas Gruenbacher 090526e7 2015-07-05T22:46:11 acl-permissions: Document FreeBSD ACL_TYPE_NFS4 acls * lib/set-permissions.c (set_acls): Document where support for FreeBSD ACL_TYPE_NFS4 acls should go. * lib/get-permissions.c (get_permissions): Likewise.
Andreas Gruenbacher da97e2a5 2015-06-30T21:09:28 acl-permissions: Fix on FreeBSD When a directory doesn't have an ACL_TYPE_DEFAULT acl, acl_get_file will return an empty acl, but when trying to set that acl, FreeBSD's acl_set_file will fail with errno == EINVAL. Instead, FreeBSD expects acl_delete_def_file to be used. * lib/acl-internal.c (acl_default_nontrivial): Recognize empty default acls. * lib/set-permissions.c (set_acls): Avoid calling acl_set_file for empty ACL_TYPE_DEFAULT acls.
Andreas Gruenbacher 999724c0 2015-06-30T21:09:28 file-has-acl, acl-permissions: fix some more HP-UX typos Problem reported by John David Anglin in: http://bugs.gnu.org/20979 * lib/set-permissions.c (context_acl_from_mode): Fix some more obvious typos introduced by the recent ACL changes.
Paul Eggert f4664046 2015-07-04T11:05:00 file-has-acl, acl-permissions: fix HP-UX typos Problem reported by John David Anglin in: http://bugs.gnu.org/20979 * lib/file-has-acl.c (file_has_acl): * lib/set-permissions.c (context_acl_from_mode) (context_aclv_from_mode, set_acls): Fix some obvious typos when HAVE_GETCL /* HP-UX */. They were introduced by the recent ACL changes.
Paul Eggert 5a5a9388 2015-07-04T08:25:21 regex: match current GNU grep behavior These symbols have not matched GNU grep behavior for quite some time. Fix prompted by Balazs Kezes bug report at: http://bugs.gnu.org/20974 * lib/regex.h (RE_SYNTAX_GREP, RE_SYNTAX_EGREP): Change to match current GNU behavior. Simplify by expressing it as differences from POSIX BREs and EREs. (RE_SYNTAX_POSIX_EGREP): No longer differs from GNU behavior.
Jim Meyering 7a4daa4d 2015-07-03T14:58:19 set-permissions.c: adjust acl_from_mode's cpp guard * lib/set-permissions.c (acl_from_mode): Guard with #ifdef directives identical to those guarding the sole use. Otherwise, on some systems, we'd get a warning about the function being defined but not used. Also, filter through cppi to correct misleading indentation of cpp directives.
Karl Berry a546dfff 2015-07-03T15:31:16 autoupdate
Pádraig Brady d03962a9 2015-07-03T14:52:47 tests: restrict shells to those that support 'local' The local keyword is very widely supported and used in tests in coreutils and grep at least. Therefore restrict to testing with shells that support it. This mainly excludes /bin/sh on Solaris. Note standard ksh also doesn't support this keyword, but that wasn't in the list of considered shells anyway. For discussion on adding 'local' to POSIX, see: http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/122267/focus=3271 * tests/init.sh (gl_shell_test_script_): Add a test for 'local'.
Daiki Ueno 8a172a2e 2015-07-03T12:00:44 fix mistakes in ChangeLog entries
Seiya Kawashima 2c554339 2015-07-03T11:42:43 unistr/uN-strtok: handle multibyte delimiters Previously, uN_strtok moved PTR to the next unit to the token end. When DELIM contained a multibyte character, the new position could be a middle of a multibyte character. * lib/unistr/u-strtok.h (FUNC): Place PTR at the next character after the token. * lib/unistr/u8-strtok.c (U_STRMBLEN): New macro. * lib/unistr/u16-strtok.c (U_STRMBLEN): New macro. * lib/unistr/u32-strtok.c (U_STRMBLEN): New macro. * modules/unistr/u8-strtok (Depends-on): Depend on unistr/u8-strmblen. * modules/unistr/u16-strtok (Depends-on): Depend on unistr/u16-strmblen. * modules/unistr/u32-strtok (Depends-on): Depend on unistr/u32-strmblen. * tests/unistr/test-u-strtok.h: New file. * tests/unistr/test-u8-strtok.c: New file. * tests/unistr/test-u16-strtok.c: New file. * tests/unistr/test-u32-strtok.c: New file. * modules/unistr/u8-strtok-tests: New file. * modules/unistr/u32-strtok-tests: New file. * modules/unistr/u16-strtok-tests: New file. Copyright-paperwork-exempt: yes Co-authored-by: Daiki Ueno <ueno@gnu.org>
Friedrich Haubensak 841d0dcf 2015-07-02T14:36:33 update-copyright: fix test failure with perl >= 5.22 * build-aux/update-copyright: Escape a literal left curly bracket, required with perl >= 5.22
Daiki Ueno ea309033 2015-07-02T16:48:24 u{16,32}-strstr-tests: relax timeout condition On slower platforms (e.g., Solaris 10/SPARC), u{16,32}-strstr tests can take longer than 5 seconds to complete. Reported by Dagobert Michelsen in: https://lists.gnu.org/archive/html/bug-libunistring/2015-06/msg00006.html * tests/unistr/test-u16-strstr.c (main): Increase timeout from 5 seconds to 10 seconds. * tests/unistr/test-u32-strstr.c (main): Likewise.
Pavel Raiskup 55109802 2015-07-01T09:38:35 gnulib-common.m4: change the ARFLAGS default to 'cr' In some GNU/Linux distributions people started to compile 'ar' binary with --enable-deterministic-archives (binutils project). That, however, in combination with previous autotools long time working default AR{_,}FLAGS=cru causes warnings on such installations: ar: `u' modifier ignored since `D' is the default (see `U') The 'u' option (at least with GNU binutils) did small optimization during repeated builds because it instructed 'ar' to not open/close unchanged *.o files and to rather read their contents from old archive file. However, its removal should not cause a big performance hit for usual workflows. Distributions started using --enable-deterministic-archives knowing that it will disable the 'u', with the benefit of having rather a bit more deterministic builds. Also, to justify this change a bit more, keeping 'u' in ARFLAGS could only result in many per-project changes to override Automake's ARFLAGS default, just to silent such warnings. * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not set already.
Karl Berry f86b4404 2015-07-01T07:25:52 update from texinfo
Karl Berry 1f4c326b 2015-07-01T06:53:25 autoupdate
Pavel Raiskup b6b3ed1f 2015-07-01T12:30:57 selinux-h: avoid double free after *getfilecon() Originally reported by Ben Shelton on bug-tar: http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00009.html * lib/getfilecon.c (map_to_failure): Set the already freed '*con' pointer to NULL. Man getfilecon(3) says that any non-NULL '*con' parameter should be freed by freecon(3) (regardless the return value).
Pavel Fedin 9ba6a008 2015-07-01T10:18:11 fix pty related tests issues on Windows * lib/grantpt.c (grantpt): grantpt.c seems to be never used on Windows, however it's still present in tests/ subdirectory of the final project. Therefore avoid it to pass `make check`. * tests/test-openpty.c (main): Windows has no PTYs and gnulib's openpty() will just return -ENOSYS, so avoid this non applicable test allowing the build to proceed.
Pádraig Brady 716083c1 2015-06-30T20:35:26 acl: fix definition of acl_from_mode on FreeBSD This was causing basic coreutils copy operations to fail with ENOTSUP or ENOENT error messages. * lib/acl-internal.h (acl_from_mode): Only define when ! defined HAVE_ACL_FROM_TEXT. That allows the version of acl_from_mode() defined in lib/set-permissions.c to be used on FreeBSD at least. * lib/set-permissions.c: Fix up comment spelling, and a redundant variable assignment; noticed in passing.
Pádraig Brady 259e4fc2 2015-06-30T22:01:06 readutmp: port to FreeBSD >= 9 * lib/readutmp.h: Map utmpxname() to setutxdb(). With that coreutils who(1) and pinky(1) tests pass.
Paul Eggert 18738862 2015-06-30T09:32:07 mgetgroups: port to strict OS X The previous fix wasn't working, so use a bigger hammer (Bug#20923). * lib/mgetgroups.c: Ignore -Wpointer-sign diagnostics. (getgrouplist_gids) [HAVE_GETGROUPLIST]: Remove. All uses removed. * m4/mgetgroups.m4 (gl_MGETGROUPS): Revert recent changes.
Paul Eggert 8131cd61 2015-06-29T19:12:07 mgetgroups: fix port to strict OS X * m4/mgetgroups.m4 (gl_MGETGROUPS): Use more-sensitive -Werror setting if available.
Jim Meyering 1f90ddd3 2015-06-29T10:05:31 linkat: fix invalid definition of LINKAT_SYMLINK_NOTSUP on OS X It started like this when building coreutils' latest on OS X, invoking ./configure with a nonempty --cache=.cache: lib/linkat.c:46:42: error: operator '||' has no right operand lib/linkat.c: In function 'rpl_linkat': lib/linkat.c:330:27: error: #if with no expression Here's linkat.c's line 46: #if !HAVE_LINKAT || LINKAT_SYMLINK_NOTSUP Here's some context: $ grep linkat_nofoll .cache gl_cv_func_linkat_nofollow=${gl_cv_func_linkat_nofollow=no} $ grep LINKAT_SYM lib/config.h #define LINKAT_SYMLINK_NOTSUP The problem is that m4/linkat.m4's gl_FUNC_LINKAT uses AC_CACHE_CHECK to set LINKAT_SYMLINK_NOTSUP, but that violates a tenet of AC_CACHE_CHECK: it must have no side effect other than setting its cache variable. What happens is that when the cache is set, we'd skip the code in that AC_CACHE_CHECK call, and leave LINKAT_SYMLINK_NOTSUP defined to whatever value it happened to have in configure's environment. In my case, it was not defined, so this later code: AC_DEFINE_UNQUOTED([LINKAT_SYMLINK_NOTSUP], [$LINKAT_SYMLINK_NOTSUP], [Define to 1 if linkat can create hardlinks to symlinks]) would emit code with an empty RHS. * m4/linkat.m4 (gl_FUNC_LINKAT): Move the setting of $LINKAT_SYMLINK_NOTSUP out of the AC_CACHE_CHECK code block.
Paul Eggert b4d1637b 2015-06-28T23:43:35 mgetgroups: port to strict OS X * doc/glibc-functions/getgrouplist.texi (getgrouplist): Document the getgrouplist problem. * lib/mgetgroups.c (getgrouplist_gids) [HAVE_GETGROUPLIST]: New macro. (mgetgroups): Use it. * m4/mgetgroups.m4 (gl_MGETGROUPS): Check for OS X signature for getgrouplist.
Jim Meyering 70551613 2015-06-28T13:11:04 mountlist: avoid an unused-label warning on OS X * lib/mountlist.c (read_file_system_list) [MOUNTED_GETMNTINFO]: Building on OS X, I saw a warning about the "free_then_fail" label being unused. Give it the _GL_UNUSED_LABEL attribute.
Jim Meyering c3cf2ea4 2015-06-28T10:38:46 error.c: correct printf-style format: %d -> %u * lib/error.c (error_at_line): Correct __fxprintf format to use %u, rather than %d, to match the type of "line_number", unsigned int.
Pádraig Brady 49078a78 2015-06-24T23:52:24 fts: avoid reading beyond the heap allocation GCC 5.1.1 with -O2 and -fsanitize=address reports the following from `chmod a+rx ..` for example: ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61200000be48 READ of size 4 at 0x61200000be48 thread T0 #0 0x40f0a1 in fts_stat lib/fts.c:1821 #1 0x4141ec in fts_open lib/fts.c:514 #2 0x40ca6e in xfts_open lib/xfts.c:36 #3 0x402c35 in process_files src/chmod.c:336 #4 0x402c35 in main src/chmod.c:566 #5 0x7f8fdc38678f in __libc_start_main (/lib64/libc.so.6+0x2078f) #6 0x404608 in _start (/home/padraig/git/coreutils/src/chmod+0x404608) 0x61200000be4b is located 0 bytes to the right of 267-byte region [0x61200000bd40,0x61200000be4b) allocated by thread T0 here: #0 0x7f8fdd4cfa0a in malloc (/lib64/libasan.so.2+0x98a0a) #1 0x40f22c in fts_alloc lib/fts.c:1916 The read of size 4 from a heap object of size 3 is indeed invalid, though this may be due to incorrect padding assumptions by GCC, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661 The read is coming from the a[2] access in ISDOT() which GCC seems to assume can access according to the alignment of the main structure, since the flexible array members are being accessed directly. One could cast the parameter to ISDOT() to (char const*) to restrict to byte at a time access, however it seems more correct and maintainable to increase the buffer size to the appropriate alignment to avoid this issue. For reference some notes on alignment and flexible array members are at: https://sites.google.com/site/embeddedmonologue/home/c-programming/data-alignment-structure-padding-and-flexible-array-member * lib/fts.c (fts_alloc): Increase allocation to alignof(FTSENT). * modules/fts: Depend on stdalign.
Pádraig Brady 791147f3 2015-06-24T19:08:08 savedir: avoid undefined behavior in qsort call GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning: "runtime error: null pointer passed as argument 1, which is declared to never be null" * lib/savedir.c (streamsavedir): Avoid the call with no entries.
Pádraig Brady 402f350d 2015-06-24T17:54:16 userspec: avoid undefined behavior in gettext call GCC 5.1.1 -fsanitize=undefined with glibc 2.21 is returning: "runtime error: null pointer passed as argument 2, which is declared to never be null" * lib/userspec.c (parse_with_separator): Avoid passing NULL to gettext()
Karl Berry 95e72405 2015-06-24T15:41:35 update from texinfo
Glenn Morris a6aa0b6f 2015-06-20T10:09:22 gitlog-to-changelog: improve gitmerge.el commits Let the Emacs ChangeLog generation process exclude "skipped" messages from merge commits (Bug#20717). * build-aux/gitlog-to-changelog: Handle gitmerge.el skipped commits.
Paul Eggert e1085f20 2015-06-20T09:57:08 wchar: fix MinGW compilation warnings This lets Texinfo compile cleanly. See Eli Zaretskii in: http://lists.gnu.org/archive/html/bug-gnulib/2015-06/msg00050.html * lib/wchar.in.h: Do not use special invocation convention on MinGW.
Daiki Ueno 447c6753 2015-06-20T15:33:07 uniname/uniname-tests: use pristine data files For copyright and maintenance reasons, use the data files from UCD without modification. * tests/uniname/test-uninames.c (FIELDLEN): Remove. (getfield): Remove. (aliases_count): New global variable. (fill_names): Skip comments and empty lines in the input. Don't use getfield. (fill_aliases): Likewise. (main): Change the expected command line arguments to: NAMES... ["--" ALIASES...]. * tests/uniname/test-uninames.sh: Adjust to the change in test-uninames.c. * tests/uniname/UnicodeDataNames.txt: Remove. * tests/uniname/UnicodeData.txt: New file, from Unicode 8.0.0. * tests/uniname/NameAliases.txt: Use the pristine copy of the data file from Unicode 8.0.0.
Pádraig Brady d0302f00 2015-06-19T14:06:17 linked-list, linkedhash-list: avoid compiler warnings * lib/gl_anytree_list2.h: Add _GL_ATTRIBUTE_PURE to avoid -Werror=suggest-attribute=pure (from GCC 5.1.1).
Daiki Ueno 19e096ae 2015-06-19T14:31:19 libunistring: bump minimum version to 0.9.6 The modules are listed by a script that does: * all modules depending on updated Unicode data: Regenerate. The modules are listed by a script that does: - for each file listed by: git show --oneline --name-only 705f4efc - deduce the containing modules, based on "Files:" - deduce the modules which depend on the containing modules, based on "Depends-on:"
Daiki Ueno 1b23c219 2015-06-18T18:03:53 uniname/uniname: update to Unicode 8.0.0 * lib/uniname/uninames.h: Regenerate. * tests/uniname/NameAliases.txt: Update from Unicode 8.0.0. * tests/uniname/UnicodeDataNames.txt: Update from Unicode 8.0.0.
Daiki Ueno 6a8c2eb8 2015-06-18T17:58:24 * lib/gen-uni-tables.c: Style fixes.
Daiki Ueno 705f4efc 2015-06-18T17:34:54 libunistring: update to Unicode 8.0.0 * lib/gen-uni-tables.c (SIZEOF): New macro. (output_numeric): Increase the maximum number of fractions from 128 to 160. Increase the level3 value width from 7 bits to 8 bits. Use SIZEOF instead of a hard-coded integer. (output_blocks): Decrease the cut-off threshold from 0x30000 to 0x28000. (fill_blocks): Increase the maximum number of blocks from 256 to 384. Use SIZEOF instead of a hard-coded integer. (get_lbp): Adjust to new characters added in Unicode 8.0.0. * lib/unictype/numeric.c (uc_numeric_value): Adjust the level3 value width. * lib/unilbrk/lbrktables.c (unilbrk_table): Implement LBP21b and a new case added to LBP22. * lib/uniwidth/width.c (nonspacing_table_data): Add U+08E3, U+A69E, U+FE2E..U+FE2F, U+111CA..U+111CC, U+11300, U+115DC..U+115DD, U+1171D..U+1171F, U+11722..U+11725, U+11727..U+1172B, U+1DA00..U+1DA36, U+1DA3B..U+1DA6C, U+1DA75, U+1DA84, U+1DA9B..U+1DA9F, and U+1DAA1..U+1DAAF. * tests/uniwidth/test-uc_width2.sh: Same updates as in lib/uniwidth/width.c. * all generated files under lib/uni* and tests/uni*: Regenerate.
Pádraig Brady 9a417cf7 2015-06-16T06:39:42 gnu-web-doc-update: add --mirror to remove stale files * build-aux/gnu-web-doc-update: Add a --mirror option to remove out of date files from the CVS server. Since this is usually appropriate, a prompt is given when the option is not specified, along with the `cvs remove` command that would be run.
Paul Eggert 82990bb4 2015-06-14T22:50:18 * lib/set-permissions.c: Spelling fix.
Karl Berry d7f393ed 2015-06-14T15:34:45 update from texinfo
Paul Eggert 3e53f006 2015-06-06T18:20:40 acl-permissions: pacify -Wsuggest-attribute=const Problem reported by Masanari Iida in: http://bugs.gnu.org/20753 * lib/acl-internal.h (free_permission_context): Declare with attribute const if ! (defined USE_ACL && (HAVE_ACL_GET_FILE || defined GETACL)).
Paul Eggert 848a19c7 2015-06-06T00:56:01 fsync: document AIX misbehavior * doc/posix-functions/fsync.texi (fsync): Document failure on AIX with read-only file descriptor.
Paul Eggert ecabc6b0 2015-06-05T11:47:37 acl-permissions: more porting to AIX * lib/file-has-acl.c (file_has_acl) [HAVE_STATACL]: * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: * lib/set-permissions.c (set_acls) [HAVE_ACLX_GET && ACL_AIX_WIP]: Add cast for AIX, whose system calls are declared to accept char * even though the arguments are really char const *. * lib/mountlist.c (read_file_system_list) [MOUNTED_VMOUNT]: Rework types to pacify xlc.
Jonathan Perkin d6176702 2015-06-04T12:10:34 stdio: Don't redefine gets when using C++ We've hit this failure a few times in pkgsrc with packages which embed gnulib, an example being the latest gnutls: ../../src/gl/stdio.h:1034:1: error: 'char* gets(char*)' conflicts with a previous declaration _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ^ /opt/tools/gcc49/lib/gcc/x86_64-sun-solaris2.11/4.9.2/include-fixed/iso/stdio_iso.h:259:14: note: previous declaration 'char* std::gets(char*)' extern char *gets(char *); ^ Full build log is here: http://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-trunk32/20150602.2233/gnutls-3.3.15/build.log We've fixed it a few different ways over time: https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/devel/m4/patches/patch-lib_stdio.in.h https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/math/octave/patches/patch-libgnu_stdio.in.h https://github.com/joyent/pkgsrc/blob/joyent/release/2015Q1/security/gnutls/patches/patch-gl_stdio.in.h but the cleanest fix appears to be the last, so I am proposing it here for inclusion upstream. Message-Id: <20150604111034.GG66573@joyent.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Paul Eggert e4f78301 2015-06-05T08:20:21 acl-permissions: add a cast to port to older AIX
Paul Eggert fa214897 2015-06-05T07:50:51 acl-permissions: port to older AIX, C89 HP-UX * lib/get-permissions.c (get_permissions): If USE_ACL && HAVE_GETACL /* HP-UX */, don't assume C99. If USE_ACL && HAVE_STATACL /* older AIX */, add missing decl that broke a build, reported by Michael Felt.
Karl Berry b287b621 2015-06-03T16:08:10 update from texinfo
Pádraig Brady 1cc8badf 2015-06-03T04:38:03 vasprintf-posix: avoid compiling vasnprintf where possible * modules/vasprintf-posix: Avoid compiling the large vasnprintf module where not required. For example on a GNU/Linux system when gnulib-tool is run with the --conditional-dependencies option.
Pádraig Brady 98aa8776 2015-06-02T00:53:48 file-has-acl: fix build on Mac OS X 10 This reverts commit f1b37e3a which doesn't work on Mac OS X >= 10.4 which has an incompatible 6 parameter getxattr() call. * doc/glibc-functions/getxattr.texi: Mention the divergent getxattr() call on Mac OS X >= 10.4. * doc/glibc-functions/fgetxattr.texi: Likewise. * lib/file-has-acl.c: Revert to more complete combined check. * m4/acl.m4 (gl_FILE_HAS_ACL): Likewise. Reported by Jack Howarth.
Pádraig Brady 41834ff1 2015-06-02T00:06:52 prefix-gnulib-mk: remove no longer needed special case * build-aux/prefix-gnulib-mk (prefix): Since commit e3704b9c, continued lib_SOURCES lines are no longer present, so special case handling of such entries is not required.
Pádraig Brady 2c2d4d91 2015-06-01T23:59:36 acl: don't depend on the deprecated qacl module * modules/acl (Depends-on): Use q{copy,set}-acl instead.
Pádraig Brady e3704b9c 2015-06-01T21:50:13 gnulib-tool: concatenate lib_SOURCES to a single line * gnulib-tool: Refactor the line merging sed logic, and use that to output a single lib_SOURCES line for each module. gnulib using projects often postprocess this output to prepend subdir paths to each item, and having a single line simplifies this processing allowing better decoupling from the gnulib-tool output. This avoids a new issue with coreutils where it failed to prepend a path on the new {get,set}-permissions.c items (which were on continued lines in modules/acl-permissions).
Pavel Fedin f39477db 2015-06-01T09:43:07 pthread_sigmask: discount system version if a simple macro MinGW64 has: #define pthread_sigmask(H, S1, S2) 0 * m4/pthread_sigmask.m4 (gl_FUNC_PTHREAD_SIGMASK): Call the function to ensure it's available.
Pádraig Brady 8c9cfa07 2015-05-31T03:08:52 readlinkat: avoid OS X 10.10 trailing slash bug * doc/posix-functions/readlink.texi: Mention that OS X 10.10 has this bug. * doc/posix-functions/readlinkat.texi: Likewise. Also mention that OS X 10.10 has this function. * lib/readlinkat.c (rpl_readlinkat): Handle the trailing slash bug, as done for readlink(). * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Check for the readlink() trailing slash bug, and assume readlinkat() has the same issue. Also fix a typo where $gl_cv_decl_readlink_works was tested, rather than the correct $gl_cv_decl_readlinkat_works.
Andreas Gruenbacher 04e44583 2015-05-29T20:47:45 acl-permissions: Fix build on Mac OS X and older AIX (Bug#20681) * lib/set-permissions.c (set_acls): Fix more errors introduced in the acl module rewrite.
Andreas Gruenbacher 188c4b49 2015-05-29T19:47:40 acl-permissions: Fix build on Solaris and Cygwin Reported by Tom G. Christensen <tgc@jupiterrise.com>: * lib/set-permissions.c (set_acls): The count, entries, ace_count, and ace_entries variables have moved into struct permission_context but they were still accessed as local variables here.
Pádraig Brady c79f3527 2015-05-29T03:11:59 linkat: avoid OS X 10.10 trailing slash with symlink bug On Darwin 14.3.0 linkat(,"path1",,"dangling_symlink/",) causes the symlink to be dereferenced, and if it points to a non existent file, that file will be created as a hard link to "path1". This fixes a test failure in test-linkat.c. * m4/linkat.m4 (gl_FUNC_LINKAT): Augment the test with this case. The existing workaround in linkat.c for trailing slash issues, suffices for this case. * doc/posix-functions/linkat.texi: Add OS X 10.10 to the list of platforms with trailing slash issues.
Pádraig Brady e176ee0b 2015-05-28T14:15:08 unlinkat: handle ignoring of ".." on Darwin 14 * lib/unlinkat.c: unlinkat() has the same bug as unlink() on Mac OS X 10.10, where it ignores paths with a trailing "..", so handle in the same manner. * m4/unlinkat.m4: Comment on this Darwin issue. * doc/posix-functions/unlink.texi: Update the latest version where the issue was seen. * doc/posix-functions/unlinkat.texi: Mention this issue. Fixes a test failure in test-unlinkat.c.
Paul Eggert 2b93f1e2 2015-05-27T16:05:44 qacl: split into qcopy-acl and qset-acl Emacs needs the former, but not the latter. * modules/acl-permissions: New file, containing most of the old qacl. * modules/file-has-acl (Depends-on): Depend on acl-permissions, not qacl. * modules/qacl: Now merely depends on qcopy-acl and qset-acl. * modules/qcopy-acl, modules/qset-acl: New files. * MODULES.html.sh (File system functions): Mention the new modules, and mention qacl while we're at it.
Glenn Morris 62484d6e 2015-05-27T14:44:16 gitlog-to-changelog: new option --ignore-line (This patch is imported from the GNU Emacs master.) This option ignores individual commit lines matching a pattern. * build-aux/gitlog-to-changelog: Add --ignore-line option.
Andreas Gruenbacher 2d5ce445 2015-04-11T14:44:30 qacl: Reimplement qset_acl and qcopy_acl (Bug#20666) Implement get_permissions and set_permissions primitives for getting all the permissions of a file, storing them, and later setting them. (In the minimal case, the permissions consist only of a file mode.) Reimplement qset_acl and qcopy_acl based on these new primitives: this avoids code duplication and makes error handling more consistent. The Solaris and Cygwin code still uses duplicate code paths for setting a file mode while making sure that no acls exist and setting an explicit acl; this is no worse than before, but could be cleaned up. The AIX code still doesn't read ACLs, it only makes sure that acls don't get in the way when setting a file mode. * lib/acl-internal.h (struct permission_context): New data structure. (get_permissions, set_permissions, free_permission_context): Declare. * lib/acl-internal.c (free_permission_context): New helper function. * lib/get-permissions.c (get_permissions): New helper function split off from qcopy_acl. * lib/set-permissions.c: (set_acls_from_mode): On Solaris, Cygwin, and AIX, set a file's permissions based only on a file mode. (acl_from_mode, context_acl_from_mode, context_aclv_from_mode): All other platforms construct a temporary acl from the file mode and set that acl in the same way as setting an acl read from the source file. This should help avoid code duplication and inconsistent / buggy behavior. (set_acls): New helper function Split off from qcopy_acl. (chmod_or_fchmod): Moved here from qset-acl.c. (set_permissions): New helper function. * lib/qcopy-acl.c (qcopy_acl): Rewrite using get_permissions and set_permissions. * lib/qset-acl.c (qset_acl): Rewrite using set_permissions. * modules/qacl: Add get-permissions.c and set-permissions.c.
Andreas Gruenbacher f1b37e3a 2015-04-28T12:01:19 file-has-acl: Split feature tests again (Bug#20667) * lib/file-has-acl.c: Instead of testing for XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT, define them when needed. * m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore.
Pádraig Brady 70e0e9ed 2015-05-27T12:59:05 string: fix build failure on BSD/OSX with FORTIFY_SOURCE This avoids a conflict with "FORTIFY_SOURCE" variants of the string functions when they're replaced on NetBSD-6.0.1 and Darwin-14.3.0 at least. On these platforms, the system <string.h> re-includes "string.h" through <strings.h>, before going on to redefine the "FORTIFY_SOURCE" _chk variants. For example rpl_strncat is redefined to __builtin___strncat_chk. Note strncat is being replaced as the configure check is failing with GCC 4.5.0, due to the builtin strncat failing the check. I.E. when compiled with -O2 the test fails, but passes when -fno-builtin-strncat is also specified. -D_FORTIFY_SOURCE has no impact on the configure test result. * lib/string.in.h: Avoid including our "lib/string.h" while including the system <string.h>.
Eric Blake c26527ce 2015-05-26T21:27:44 stdio: limit __gnu_printf__ witness to gcc 4.4+ If we start adding more places that need to conditionally label functions with __gnu_printf__, it will be nicer if the logic for determining that gcc even supports that attribute is done once up front rather than in each caller. * lib/error.h (_GL_ATTRIBUTE_SPEC_PRINTF): Move gcc version probe... * m4/stdio_h.m4 (gl_STDIO_H): ...here. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake b62fec49 2015-05-26T17:26:15 error: use correct printf attributes on mingw Now that we always turn on __USE_MINGW_ANSI_STDIO when extensions are in use, we need to replicate the same logic in error.h as we have in stdio.h, for selecting the correct format string that will squelch gcc -Wformat=2 warnings. Reported by Assaf Gordon. * lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF): New define. Signed-off-by: Eric Blake <eblake@redhat.com>
Karl Berry 7f573b80 2015-05-26T15:05:18 update from texinfo
Eric Blake cc07f45b 2015-05-26T15:00:50 inttypes: force correct mingw PRIdMAX even without <stdio.h> The mingw trick of using __USE_MINGW_ANSI_STDIO only changes the definitions in <inttypes.h> if <stdio.h> is also included. But since we want to always use the __gnu_printf__ flavor when available, we want to make sure that including <inttypes.h> in isolation will give the desired "lld" answer. Reported by Assaf Gordon. * modules/inttypes (Depends-on): Require extensions, so that mingw always uses GNU style inttypes. * lib/inttypes.in.h: On mingw, include <stdio.h>. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 21431dee 2015-05-20T17:18:20 stdio: fix probe on mingw under gcc 5.1 Per https://gcc.gnu.org/gcc-5/porting_to.html, gcc 5.1 intentionally changed the preprocessor to emit multiple lines, rather than one line, when expanding text that includes literal markers combined with a macro expansion obtained from a header. This in turn breaks the probe for whether mingw headers support GNU-style "lld" for PRIdMAX, as the probe text was no longer on one line. This patch changes from grepping preprocessor output (with its indeterminate layout due to differences in preprocessors) to instead using a compile-time check of the length of the macro expansion. It feels a bit gross, but the grossness is limited to mingw, which is the only platform where using __gnu_printf__ instead of __printf__ will make a difference. Based on a report by Suren Hajyan. * m4/stdio_h.m4 (gl_STDIO_H): Change to compile test, to work around new gcc preprocessor rules. Signed-off-by: Eric Blake <eblake@redhat.com>
Karl Berry 875ec93e 2015-05-08T08:35:11 autoupdate
Glenn Morris ed614f9c 2015-05-08T07:58:00 gitlog-to-changelog: parse "Tiny-change" * build-aux/gitlog-to-changelog: Treat "Tiny-change" like "Copyright-paperwork-exempt". (Bug#20324)
Karl Berry 583b5ea8 2015-05-06T11:21:10 update from texinfo
Pádraig Brady 79897201 2015-05-06T16:23:56 doc: document glibc posix_fallocate() issues * doc/posix-functions/posix_fallocate.texi: Mention the glibc efficiency problems and issues with NFS.
Karl Berry fddc6dcf 2015-05-05T16:14:12 gendocs.sh: document new htmlarg default
Paul Eggert 44f73b8d 2015-04-29T19:47:12 extern-inline: no need for workaround in GCC 5.1 * doc/extern-inline.texi (extern inline): * m4/extern-inline.m4 (gl_EXTERN_INLINE): GCC bugs 54113 and 63877 are fixed in GCC 5.1, so don't work around these bugs in GCC 5.1 and later. Maybe in a decade or two we can remove these workarounds.
Karl Berry 23741e57 2015-04-29T12:36:59 update from texinfo
Pádraig Brady 3690e01f 2015-04-28T22:24:45 eealloc, pagealign_alloc, xalloc: avoid clang warnings Avoid [-Wunknown-attributes] warnings like: warning: unknown attribute '__alloc_size__' ignored * lib/xalloc.h: Don't use the __alloc_size__ attribute with clang, as support has been fully removed as of clang 3.5: https://github.com/llvm-mirror/clang/commit/c047507a * lib/eealloc.h: Likewise. * lib/pagealign_alloc.h: Likewise.
Paul Eggert 2aea2c72 2015-04-27T01:23:29 tests: pacify GCC 5.1's stricter printf checking * tests/test-dirname.c (main): * tests/test-getaddrinfo.c (simple): * tests/test-getlogin.c (main): * tests/test-getndelim2.c (main): * tests/test-inttostr.c (CK): * tests/test-md5.c (main): * tests/test-read-file.c (main): * tests/test-sha1.c (main): Fix mismatches between printf format and value signedness. * tests/test-inttostr.c (FMT, CAST_VAL, V_min, V_max): Remove, as CAST_VAL always returned a value of type uintmax_t.
Paul Eggert e4584a9e 2015-04-27T01:19:03 fts: port to GCC 5.1 with --enable-gcc-warnings Without this fix, GCC 5.1 (correctly) warns about a subscript error on the fts_name component of FTSENT. It's actually a flexible member, so define it that way on C99 or later hosts. * lib/fts.c (fts_alloc): Use offsetof, not sizeof, for a structure that now has a flexible array member. * lib/fts_.h (__FLEXIBLE_ARRAY_MEMBER): New macro. (FTSENT): fts_name is now flexible on C99-or-later platforms. * modules/fts (Depends-on): Add flexmember.
Paul Eggert ff714c0a 2015-04-26T09:20:34 file-has-acl: port to CentOS 6 Problem reported by Tom G. Christensen in: http://lists.gnu.org/archive/html/bug-gnulib/2015-04/msg00074.html * lib/file-has-acl.c: Use GETXATTR_WITH_POSIX_ACLS instead of a combination of HAVE_SYS_XATTR_H, HAVE_LINUX_XATTR_H, and HAVE_GETXATTR. * m4/acl.m4 (gl_FILE_HAS_ACL): Test fot the entire combination of linux/xattr.h, sys/xattr.h, getxattr, XATTR_NAME_POSIX_ACL_ACCESS, and XATTR_NAME_POSIX_ACL_DEFAULT, since that's what what file-has-acl.c actually needs.
Pádraig Brady 496c2cf0 2015-04-25T21:49:43 file-has-acl: always return false when ACLs aren't supported * lib/file-has-acl.c (file_has_acl): Consistent with other paths, change the GNU/Linux getxattr path, to transform "not supported" errors to a false return rather than an error. This is handled within file_has_acl() due to the platform specific tests to determine if ACLs are not supported.
Paul Eggert f2f69809 2015-04-25T17:28:45 gettext: propagate po/Makefile.in.in too * build-aux/po/Makefile.in.in: Copy from latest gettext. * config/srclist.txt: In build-aux/po, copy Makefile.in.in and remove-potcdate.sin from $GETTEXT. This fixes a version mismatch between Makefile.in.in and the gettext-runtime m4 files.
Paul Eggert 80080702 2015-04-24T22:07:56 file-has-acl: new module, split from acl And add a new module file-has-acl-tests to match. I ran into a problem with the recent changes to the acl module, as they introduced a typo 'test use_xattrs = 0' into 'configure'. When using the fixed version with Emacs, I discovered that file-has-acl wasn't separated out well enough for Emacs (e.g., it had multiple libraries, but needed only one), so I fixed that too. * NEWS: Document this incompatible change. * modules/file-has-acl, modules/file-has-acl-tests: New files. * m4/acl.m4 (gl_FUNC_ACL_ARG): New macro, split from gl_FUNC_ACL. Initialize gl_need_lib_has_acl. (gl_FUNC_ACL): Require it. Simplify use of 'test'. Set LIB_HAS_ACL if gl_need_lib_has_acl. Move the file-has-acl.c-relevant stuff to ... (gl_FILE_HAS_ACL): ... this new macro. Rewrite to fix 'test use_xattrs = 0' typo, and omit some needless work. Set gl_need_lib_has_acl=1 if we'll need LIB_HAS_ACL to be set when gl_FUNC_ACL is called. * modules/acl (Files, lib_SOURCES): Remove lib/file-has-acl.c. (Link): Remove $(LIB_HAS_ACL). * modules/acl-tests (Files, Depends-on, configure.ac, TESTS) (check_PROGRAMS): Move stuff relevant to file-has-acl to modules/file-has-acl-tests. (test_file_has_acl_LDADD): Move to modules/file-has-acl-tests.
Paul Eggert df82ac05 2015-04-24T12:58:46 manywarnings: add GCC 5.1 warnings * build-aux/gcc-warning.spec: Add -Wabi=, -Warray-bounds, -Warray-bounds=, -Wc++14-compat, -Wc90-c99-compat, -Wc99-c11-compat, -Wshadow-ivar, -Wsized-deallocation, -Wsuggest-override, -Wuse-without-only. Change -Wnormalized=... operands to match 5.1. * m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Add -Wbool-compare, -Wchkp, -Wdesignated-init, -Wdiscarded-array-qualifiers, -Wdiscarded-qualifiers, -Wformat-signedness, -Wincompatible-pointer-types, -Wint-conversion, -Wlogical-not-parentheses, -Wmemset-transposed-args, -Wodr, -Wshift-count-negative, -Wshift-count-overflow, -Wsizeof-array-argument, -Wsuggest-final-methods, -Wsuggest-final-types, -Wswitch-bool. Remove -Warray-bounds, and add -Warray-bounds=2 as a special case.