1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-05-13 15:13:36 +00:00
Commit Graph

17622 Commits

Author SHA1 Message Date
Paul Eggert
b9bfe78424 version-etc: new year
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
2014-12-31 17:47:54 -08:00
Karl Berry
bd86632bd0 autoupdate 2014-12-31 14:21:13 -08:00
Karl Berry
b8db7e8831 autoupdate 2014-12-31 06:55:37 -08:00
Pádraig Brady
55cda57aa2 xstrtol: ensure errno is reset
Since commit 3bf75404, on 26-09-1998, errno may not have been reset.
Noticed with a spurious coreutils test failure on Darwin 14.0.0.

* lib/xstrtol.c (__xstrtol): Always reset errno before returning.
2014-12-30 23:42:03 +00:00
Paul Eggert
7177237ead utimens: fix dependency typo
* modules/utimens (Depends-on): Remove 'assure'.
This bug was introduced in the recent 'assure' patch.
2014-12-28 14:04:25 -08:00
Karl Berry
ffaeb0c8fd autoupdate 2014-12-26 08:28:48 -08:00
Eric Blake
16518d9ed8 docs: mention why libgen.h is bad
I just debugged a failure in sharutils-4.14.2-1 for using basename()
without including <libgen.h>.  In the process, I realized that we
aren't doing a good job of explaining why we don't offer a libgen.h
replacement (it is useless because the only two functions it
provides are also useless).

* doc/posix-headers/libgen.texi (libgen.h): Refer to dirname module.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-12-22 11:50:37 -07:00
Karl Berry
8d55a7b7a2 autoupdate 2014-12-21 07:03:14 -08:00
Paul Eggert
034a18049c assure: new module
This works better than 'assert' when compiling with -DNDEBUG,
as it avoids some compiler diagnostics in that case.
Reported by Norihiro Tanaka in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00215.html
* MODULES.html.sh (func_all_modules): Add 'assure'.
* lib/assure.h, modules/assure: New files.
* lib/chdir-long.c, lib/cycle-check.c, lib/fchdir.c, lib/fts.c:
* lib/poll.c, lib/savewd.c, lib/utimens.c, lib/xstrtol.c:
Prefer 'assure' to 'assert'.
* modules/chdir-long, modules/cycle-check, modules/fchdir:
* modules/poll, modules/savewd, modules/utimens, modules/xstrtol:
Depend on 'assure'.
2014-12-20 13:01:10 -08:00
Karl Berry
ca6dede24b autoupdate 2014-12-19 06:56:42 -08:00
Paul Eggert
95c5407b3b stdalign: port better to HP compilers
* m4/stdalign.m4 (gl_STDALIGN_H): Try the test if __HP_cc or
__HP_aCC are nonzero, to be consistent with the 2014-01-20 patch.
2014-12-18 12:49:14 -08:00
Paul Eggert
a8c75ca739 stdalign: work around Apple GCC 4.0 bug
Reported by David Fang in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00194.html
* lib/stdalign.in.h (_Alignas):
* m4/stdalign.m4 (gl_STDALIGN_H):
Do not use aligned attribute with GCC 4.0 on Apple.
2014-12-18 12:49:13 -08:00
Karl Berry
7bf1097e7d gendocs.sh and templates now maintained in gnulib 2014-12-17 14:46:25 -08:00
Pádraig Brady
4f3dc0beed getcwd: fix test failure on OS X 10.9
* m4/getcwd-path-max.m4: Avoid the replacement if it
won't be effective due to the PATH_MAX limitation of lstat().
(gl_cv_func_getcwd_path_max): Adjust to indicate this case.
* m4/getcwd.m4 (gl_FUNC_GETCWD): Define HAVE_GETCWD_SHORTER
for this case for use in tests, and also exclude this
case when setting REPLACE_GETCWD.
* tests/test-getcwd.c (test_long_name): Restrict the
tested path length so that lstat() will not be passed
a path greater than PATH_MAX.
Also key a test condition on HAVE_OPENAT_SUPPORT rather
than AT_FDCWD, since the latter is set unconditionally
since Sep 2009 in commit 52c658e9.
2014-12-16 09:07:27 +00:00
Tim Rühsen
1fafbb302d parse-datetime: avoid a compiler warning with byacc
* lib/parse-datetime.y (yylex): Use the same prototype in the
function definition as the declaration, to avoid a -Wstrict-prototypes
warning seen when using byacc.
2014-12-14 20:36:10 +00:00
Daiki Ueno
e45661b4c8 unicase/locale-language-tests: fix LOCALE_FR test
* tests/unicase/test-locale-language.sh: Really use $LOCALE_FR for
a French locale with traditional encoding.
Reported by umerqayam in:
http://lists.gnu.org/archive/html/bug-libunistring/2014-12/msg00000.html
2014-12-14 10:29:59 +09:00
Karl Berry
98c35a0e40 autoupdate 2014-12-13 06:51:11 -08:00
Karl Berry
3e51cf7079 update from texinfo 2014-12-12 15:24:21 -08:00
Paul Eggert
3ae2441d46 stddef: support C11's max_align_t
* doc/posix-headers/stddef.texi (stddef.h): Document max_align_t.
* lib/stddef.in.h (_@GUARD_PREFIX@_STDDEF_H) [__need_wint_t]:
Do not undef, as that might cause max_align_t to be defined twice.
Instead, change use to check for _GL_STDDEF_WINT_T too.
(max_align_t) [!HAVE_MAX_ALIGN_T]: New decl.
* m4/stddef_h.m4 (gl_STDDEF_H, gl_STDDEF_H_DEFAULTS):
Check for max_align_t.
* modules/stddef (stddef.h): Substitute HAVE_MAX_ALIGN_T.
* modules/stddef-tests (Depends-on): Add stdalign.
* tests/test-stddef.c: Test max_align_t.
2014-12-12 11:28:09 -08:00
Daiki Ueno
73991ca4ba unistd: fix iOS check conditional
On Mac OS X 10.8, the TARGET_* macros are unconditonally defined
as 0 or 1 in <TargetConditionals.h>, and the previous check always
yielded true on non-iOS environment.
* lib/unistd.in.h (environ) [__APPLE__]: Check the values of
TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR, instead of whether
they are defined.
2014-12-12 10:15:26 -08:00
Paul Eggert
89db07c7c6 posixtm: avoid compiler warning in a better way
* lib/posixtm.c (IF_LINT): Remove.
(year, posix_time_parse):
Return true (not 0) if successful.  All callers changed.
(posix_time_parse): Simplify to pacify GCC without need for IF_LINT.
2014-12-09 18:12:14 -08:00
KO Myung-Hun
cc00098501 relocatable: support UNIXROOT in relocate() on EMX
UNIXROOT is used to specify a drive of a root of FHS. So if a path is
started with '/', then it should be translated to "$UNIXROOT/".

* lib/relocatable.c (relocate): Prepend $UNIXROOT to pathname if it is
started with '/' on EMX.
2014-12-08 21:57:09 -08:00
KO Myung-Hun
3c4e083310 freopen: workaround freopen() on OS/2 kLIBC
On OS/2 kLIBC, freopen() returns NULL even if it is successful if
filename is NULL.

* lib/freopen.c (rpl_freopen): Workaround.
* m4/freopen.m4: Add os2* case.
2014-12-08 13:56:55 -07:00
KO Myung-Hun
023ca2dd07 get_shared_library_fullname: port to EMX
* lib/relocatable.c: Define strcmp and strncmp to stricmp and strnicmp
on EMX, respectively.
(_DLL_InitTerm): New on EMX.
(get_shared_library_fullname): Implement on EMX.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-12-08 13:53:40 -07:00
KO Myung-Hun
a457b0c8c9 find_executable: port to EMX
* lib/progreloc.c (find_executable): Implement on EMX.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-12-08 13:45:54 -07:00
KO Myung-Hun
5945e4ee5c sched: check struct sched_param in spawn.h as well
On OS/2 kLIBC, struct sched_param is in spawn.h. So without this a
redefinition error occurs when sched.h is inclued by spawn.h.

* lib/sched.in.h: Include spawn.h on kLIBC.
* lib/sched_h.m4: Check struct sched_param in spawn.h as well.
2014-12-08 13:36:46 -07:00
Pádraig Brady
cf88e56ab3 support GNU format printf and scanf on mingw
Allow %lld and %Lf to work on mingw as per:
http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/
2014-12-08 13:31:58 -07:00
Martin Kletzander
3914f31535 bootstrap: Allow perl modules in $buildreq
With this patch it is possible to put e.g. "perl::XML:XPath -" in
$buildreq in bootstrap.conf which will cause a check for perl module
XML::XPath using:

  perl -m"XML::XPath" -e 'exit 0' >/dev/null 2>&1

If this fails due to any other error than XML::XPath missing, it is left
on the user to fix up his/her bootstrap.conf.  One of the examples
might be perl itself missing, which should be in $buildreq and precede
any perl::Module specifications.  Versioning of perl modules is not
supported.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-12-08 13:22:49 -07:00
Pádraig Brady
3c411c43e5 apply _GL_ATTRIBUTE_PURE to some inline functions
clang 3.4.2 flagged these inline functions as pure

* lib/savewd.h (savewd_errno): Set _GL_ATTRIBUTE_PURE.
* lib/sig-handler.h (get_handler): Likewise.
* lib/stat-time.h (get_stat_{a,c,m,birth}time{,_ns}): Likewise.
* lib/timespec.h (timespec_cmp, timespec_sign): Likewise.
2014-12-08 10:20:34 +00:00
Pádraig Brady
ec6a60bfd9 vasnprintf: fix potential incorrect errno
An adjustment of the previous commit c5c4f53b.

* lib/vasnprintf.c (VASNPRINTF): free() generally doesn't set errno,
but it can potentially in certain edge cases.
Reported by Eric Blake.
2014-12-08 09:49:23 +00:00
Pádraig Brady
c5c4f53b31 vasnprintf: fix potential use after free
* lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
flagged by clang-analyzer 3.4.2.
2014-12-06 01:23:15 +00:00
Karl Berry
79002fdd9f autoupdate 2014-12-05 05:56:18 -08:00
Pádraig Brady
819cfe3c56 filevercmp, posixtm: avoid compiler warnings with -O3
* lib/filevercmp.h (filevercmp): Tag with _GL_ATTRIBUTE_PURE
* lib/posixtm.c: (IF_LINT): Define.
(posix_time_parse): Use it to void a "may be used uninitialized"
warning, seen only with -O3.
2014-12-05 13:22:42 +00:00
Bruno Haible
1000eab5ab Fix LDBL80_WORDS macro on big endian platforms.
* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Add missing parenthesis in
LDBL80_WORDS macro.
* m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
* m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
* tests/test-isfinite.c (test_isfinitel): Likewise.
* tests/test-isinf.c (test_isinfl): Likewise.
* tests/test-isnan.c (test_long_double): Likewise.
* tests/test-isnanl.h (main): Likewise.
* tests/test-snprintf-posix.h (LDBL80_WORDS): Add missing parenthesis.
* tests/test-sprintf-posix.h (LDBL80_WORDS): Likewise.
* tests/test-vasnprintf-posix.c (LDBL80_WORDS): Likewise.
* tests/test-vasprintf-posix.c (LDBL80_WORDS): Likewise.
Reported by Pádraig Brady.
2014-12-05 11:30:27 +01:00
Karl Berry
cab5b4a927 autoupdate 2014-12-03 07:04:40 -08:00
KO Myung-Hun
e5a15adc6d git-version-gen: do not print new line characters
On platforms with CRLF endings (such as OS/2), use of 'echo' may
leave behind an unwanted CR.

* build-aux/git-version-gen: Use printf instead of echo and tr.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-12-02 12:38:14 -07:00
KO Myung-Hun
9a98fdfef2 gnulib-tool: recognize x:* as an absolute path
On OS/2, x:* is an absolute path, too.

* gnulib-tool (func_gnulib_dir): Add ?:* case.
(func_relconcat): Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-12-02 12:30:54 -07:00
Andrei Borzenkov
a545b5e44b argp: avoid extraneous translation and mem leak with empty pre doc
* lib/argp-help.c (argp_doc): Never translate the empty string,
when "\v" is the first or last character of the string, as that
has a reserved meaning to return the header info from a po file.
This also fixes a small memory leak in the !post case.
The issue can be seen with this command for example:
LC_MESSAGES=en_US grub2-mknetdir --help
2014-12-02 16:31:34 +00:00
Karl Berry
1b6c775c6b autoupdate 2014-11-29 06:00:25 -08:00
Pádraig Brady
8b62c05cf0 doc: mention that _BSD_SOURCE is deprecated for _DEFAULT_SOURCE
* doc/posix-functions/setjmp.texi: Defining _BSD_SOURCE will induce
warnings unless _DEFAULT_SOURCE is also defined.
2014-11-28 11:10:09 +00:00
Daiki Ueno
9ee6573b8b uniname/uniname-tests: skip if system's libunistring is used
* modules/uniname/uniname-tests (Makefile.am): Skip test if
uniname/uniname module is not compiled.
2014-11-28 08:18:04 +09:00
Pádraig Brady
4b4ef862eb printf: fix configure check on big endian systems
* m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Add missing bracket.
2014-11-27 11:22:02 +00:00
Daiki Ueno
624ea2886c pipe-filter-gi, pipe-filter-ii: port to AIX
On AIX 7.1, 'select' is defined as static and cannot be referred
to from inline function.
* lib/pipe-filter-aux.h (nointr_select): Remove, manually expand
the definition...
* lib/pipe-filter-gi.c (filter_loop): ...here, and...
* lib/pipe-filter-ii.c (pipe_filter_ii_execute): ...here.
2014-11-22 17:06:18 +09:00
Paul Eggert
6dd16adf3f gitlog-to-changelog: add --until
* build-aux/gitlog-to-changelog: Support new --until option.
Need described by Eli Zaretskii in: http://bugs.gnu.org/19113
2014-11-20 09:30:13 -08:00
Karl Berry
e9dd4906da update from texinfo 2014-11-16 10:41:11 -08:00
Paul Eggert
92b60e6166 extern-inline: update commentary about GCC bugs
* m4/extern-inline.m4: Add another GCC bug number to comments.
2014-11-14 12:11:14 -08:00
Daiki Ueno
46d015f9c3 gen-uni-tables: untabify
* lib/gen-uni-tables.c: Untabify.
2014-11-13 16:57:05 +09:00
Daiki Ueno
15b5d4514a gen-uni-tables: check out-of-range values added to 3-level tables
* lib/gen-uni-tables.c (output_category, output_bidi_category)
(output_joining_type, output_ident_category): Check out-of-range
values added to 3-level tables.
2014-11-13 16:03:24 +09:00
Daiki Ueno
9464ea9d6a gen-uni-tables: utilize 'assert'
* lib/gen-uni-tables.c: Include <assert.h>.
(output_category, output_combclass, output_decimal_digit_test)
(output_decimal_digit, output_digit_test, output_digit)
(output_numeric, get_mirror_value, fill_properties)
(fill_property30, is_property_alphabetic)
(is_property_default_ignorable_code_point)
(is_property_uppercase, is_property_lowercase)
(is_property_cased, is_property_case_ignorable)
(is_property_changes_when_lowercased, is_property_iso_control)
(is_property_math, fill_arabicshaping, output_joining_group)
(fill_scripts, fill_blocks, output_lbp, fill_org_wbp)
(output_wbp, fill_org_gbp, get_decomposition)
(output_decomposition, fill_composition_exclusions)
(debug_output_composition_tables, output_composition_tables)
(redistribute_casefolding_rules, output_casing_rules): Use
'assert (EXPR);' instead of 'if (!EXPR) abort ();' for better error
reporting.
2014-11-13 16:02:54 +09:00
Daiki Ueno
b6ffce655f gen-uni-tables: cosmetic improvements
* lib/gen-uni-tables.c: Escape newlines in the Emacs file local
variables specification.
(is_outdigit): Remove unused function.
2014-11-13 13:08:25 +09:00