]> Savannah Git Hosting - gnulib.git/log
gnulib.git
8 years agostdint: Fix WINT_MAX to match the gnulib provided wint_t on minw.
Bruno Haible [Mon, 19 Dec 2016 20:12:54 +0000 (21:12 +0100)]
stdint: Fix WINT_MAX to match the gnulib provided wint_t on minw.

* m4/wint_t.m4 (gt_TYPE_WINT_T): Define GNULIB_OVERRIDES_WINT_T here.
* m4/stdint.m4 (gl_STDINT_H): Don't define GNULIB_OVERRIDES_WINT_T.
Invoke gt_TYPE_WINT_T instead.
(gl_STDINT_TYPE_PROPERTIES): Test GNULIB_OVERRIDES_WINT_T.
* modules/stdint (Files): Add m4/wint_t.m4.
* modules/wchar (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
* modules/wctype-h (Makefile.am): Likewise.
* lib/wchar.in.h (wint_t): Override if GNULIB_OVERRIDES_WINT_T is set,
not only on MSVC.
* lib/wctype.in.h (wint_t): Likewise.

8 years agogetopt-posix-tests: fix Makefile typo
Paul Eggert [Mon, 19 Dec 2016 16:20:45 +0000 (08:20 -0800)]
getopt-posix-tests: fix Makefile typo

* modules/getopt-posix-tests (test_getopt_posix_LDADD):
Fix typo: the last ‘_’ was missing in the name.
I suspect that the typo explains this build failure:
https://buildfarm.opencsw.org/buildbot/builders/ggrep-solaris10-sparc/builds/39
although I can’t reproduce the problem on Solaris 10 sparc.

8 years agodfa: improve worst-case 'replace' performance
Paul Eggert [Mon, 19 Dec 2016 01:35:19 +0000 (17:35 -0800)]
dfa: improve worst-case 'replace' performance

See my note in Bug#22357#71.
* lib/dfa.c (insert, delete): Rework to avoid duplicate test.
(merge_constrained): New function, which is like
the old 'merge' function, except with a new argument C2.
Simplify the body by avoiding the need for different sections
of code depending on whether one input is exhausted.
(merge): Use the new function.
(delete): Return the constraint of the deleted position,
not the entire position.  Caller changed.
(replace): Change from O(N*(N + log N)) to O(N log N) algorithm.

8 years agodfa: performance improvement for removal of epsilon closure
Norihiro Tanaka [Thu, 15 Dec 2016 00:31:57 +0000 (16:31 -0800)]
dfa: performance improvement for removal of epsilon closure

* lib/dfa.c (delete): Use binary search to find deleted index.
(replace): New function.  It replaces a position with the followed set.
(epsclosure): Replace it with a new algorithm.  Update caller.

8 years agoautoupdate
Karl Berry [Sun, 18 Dec 2016 22:32:40 +0000 (14:32 -0800)]
autoupdate

8 years agoSplit tests for getopt-posix and getopt-gnu.
Bruno Haible [Sun, 18 Dec 2016 13:03:37 +0000 (14:03 +0100)]
Split tests for getopt-posix and getopt-gnu.

* tests/test-getopt-posix.c: New file.
* tests/test-getopt-gnu.c: New file, with code from test-getopt.c.
* tests/test-getopt-main.h: Renamed from tests/test-getopt.c. Remove
stuff moved to test-getopt-gnu.c. Test TEST_GETOPT_GNU instead of
GNULIB_TEST_GETOPT_GNU.
* modules/getopt-posix-tests (Files): Add test-getopt-posix.c,
test-getopt-main.h. Remove test-getopt.c, test-getopt_long.h.
(Makefile.am): Test test-getopt-posix instead of test-getopt.
* modules/getopt-gnu-tests: New file.
* modules/getopt-gnu (configure.ac): Don't define GNULIB_TEST_GETOPT_GNU.

8 years agoposix-modules: Add options for specific platforms.
Bruno Haible [Sat, 17 Dec 2016 10:50:06 +0000 (11:50 +0100)]
posix-modules: Add options for specific platforms.

* posix-modules (func_usage): Document options --for-mingw, --for-msvc.
(exclude_for_mingw, exclude_for_msvc, exclude): New variables.
Invoke func_tmpdir. Filter out the excludes.

8 years agogetopt: Fix link error for users of getopt() in <unistd.h>.
Bruno Haible [Sun, 18 Dec 2016 12:07:43 +0000 (13:07 +0100)]
getopt: Fix link error for users of getopt() in <unistd.h>.

* lib/getopt.in.h (getopt etc.): Do the macro definitions also when
__need_getopt is defined. Undefine all macros before defining them.
* modules/getopt (Include): Clarify that including <unistd.h> is also
OK.
* tests/test-getopt.c: Add comment.

8 years agogetaddrinfo tests: Avoid compilation error on MSVC.
Bruno Haible [Sun, 18 Dec 2016 00:49:50 +0000 (01:49 +0100)]
getaddrinfo tests: Avoid compilation error on MSVC.

* tests/test-getaddrinfo.c: Don't check the prototypes of freeaddrinfo,
getaddrinfo on native Windows.

8 years agogetlogin, getlogin_r: Fix link errors on MSVC.
Bruno Haible [Sat, 17 Dec 2016 23:38:37 +0000 (00:38 +0100)]
getlogin, getlogin_r: Fix link errors on MSVC.

* m4/getlogin.m4 (gl_LIB_GETLOGIN): New macro.
* modules/getlogin (configure.ac): Require gl_LIB_GETLOGIN.
(Link): New section.
* modules/getlogin_r (Files): Add m4/getlogin.m4.
(configure.ac): Require gl_LIB_GETLOGIN.
(Link): New section.
* NEWS: Mention the new link requirements.
* modules/getlogin-tests (test_getlogin_LDADD): New variable.
* modules/getlogin_r-tests (test_getlogin_r_LDADD): New variable.

8 years agoUn-deprecate the 'progname' module.
Bruno Haible [Sat, 17 Dec 2016 23:27:17 +0000 (00:27 +0100)]
Un-deprecate the 'progname' module.

* NEWS: Describe the appropriate use-cases of 'progname' versus
'getprogname'. Based on discussion summary at
http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00105.html

8 years agoReorganize NEWS a bit.
Bruno Haible [Sat, 17 Dec 2016 23:14:59 +0000 (00:14 +0100)]
Reorganize NEWS a bit.

* NEWS: Move some not so important changes away from section
"Important Notes".

8 years agotanhf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:51:33 +0000 (20:51 +0100)]
tanhf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANHF.
* m4/tanhf.m4 (gl_FUNC_TANHF): Set REPLACE_TANHF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_TANHF.
* lib/math.in.h (tanhf): Override if REPLACE_TANHF is 1.

8 years agotanf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:48:34 +0000 (20:48 +0100)]
tanf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_TANF.
* m4/tanf.m4 (gl_FUNC_TANF): Set REPLACE_TANF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_TANF.
* lib/math.in.h (tanf): Override if REPLACE_TANF is 1.

8 years agosqrtf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:44:37 +0000 (20:44 +0100)]
sqrtf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SQRTF.
* m4/sqrtf.m4 (gl_FUNC_SQRTF): Set REPLACE_SQRTF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_SQRTF.
* lib/math.in.h (sqrtf): Override if REPLACE_SQRTF is 1.

8 years agosinhf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:41:36 +0000 (20:41 +0100)]
sinhf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINHF.
* m4/sinhf.m4 (gl_FUNC_SINHF): Set REPLACE_SINHF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_SINHF.
* lib/math.in.h (sinhf): Override if REPLACE_SINHF is 1.

8 years agosinf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:38:33 +0000 (20:38 +0100)]
sinf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_SINF.
* m4/sinf.m4 (gl_FUNC_SINF): Set REPLACE_SINF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_SINF.
* lib/math.in.h (sinf): Override if REPLACE_SINF is 1.

8 years agologf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:34:06 +0000 (20:34 +0100)]
logf: Avoid redefinition error on MSVC.

* m4/logf.m4 (gl_FUNC_LOGF): Set REPLACE_LOGF to 1 if the function
may be defined as an inline function.

8 years agolog10l: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:32:14 +0000 (20:32 +0100)]
log10l: Avoid redefinition error on MSVC.

* m4/log10l.m4 (gl_FUNC_LOG10L): Set REPLACE_LOG10L to 1 if the function
may be defined as an inline function.

8 years agolog10f: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 19:30:33 +0000 (20:30 +0100)]
log10f: Avoid redefinition error on MSVC.

* m4/log10f.m4 (gl_FUNC_LOG10F): Set REPLACE_LOG10F to 1 if the function
may be defined as an inline function.

8 years agohypotl: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:51:29 +0000 (19:51 +0100)]
hypotl: Avoid redefinition error on MSVC.

* m4/hypotl.m4 (gl_FUNC_HYPOTL): Set REPLACE_HYPOTL to 1 if the function
may be defined as an inline function.

8 years agohypotf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:49:31 +0000 (19:49 +0100)]
hypotf: Avoid redefinition error on MSVC.

* m4/hypotf.m4 (gl_FUNC_HYPOTF): Set REPLACE_HYPOTF to 1 if the function
may be defined as an inline function.

8 years agofmodl: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:47:46 +0000 (19:47 +0100)]
fmodl: Avoid redefinition error on MSVC.

* m4/fmodl.m4 (gl_FUNC_FMODL): Set REPLACE_FMODL to 1 if the function
may be defined as an inline function.

8 years agofmodf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:44:34 +0000 (19:44 +0100)]
fmodf: Avoid redefinition error on MSVC.

* m4/fmodf.m4 (gl_FUNC_FMODF): Set REPLACE_FMODF to 1 if the function
may be defined as an inline function.

8 years agoexpf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:41:12 +0000 (19:41 +0100)]
expf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_EXPF.
* m4/expf.m4 (gl_FUNC_EXPF): Set REPLACE_EXPF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_EXPF.
* lib/math.in.h (expf): Override if REPLACE_EXPF is 1.

8 years agocoshf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:36:54 +0000 (19:36 +0100)]
coshf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSHF.
* m4/coshf.m4 (gl_FUNC_COSHF): Set REPLACE_COSHF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_COSHF.
* lib/math.in.h (coshf): Override if REPLACE_COSHF is 1.

8 years agocosf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:31:58 +0000 (19:31 +0100)]
cosf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_COSF.
* m4/cosf.m4 (gl_FUNC_COSF): Set REPLACE_COSF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_COSF.
* lib/math.in.h (cosf): Override if REPLACE_COSF is 1.

8 years agoatan2f: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:26:04 +0000 (19:26 +0100)]
atan2f: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATAN2F.
* m4/atan2f.m4 (gl_FUNC_ATAN2F): Set REPLACE_ATAN2F to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_ATAN2F.
* lib/math.in.h (atan2f): Override if REPLACE_ATAN2F is 1.

8 years agoatanf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:21:51 +0000 (19:21 +0100)]
atanf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ATANF.
* m4/atanf.m4 (gl_FUNC_ATANF): Set REPLACE_ATANF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_ATANF.
* lib/math.in.h (atanf): Override if REPLACE_ATANF is 1.

8 years agoasinf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:15:56 +0000 (19:15 +0100)]
asinf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ASINF.
* m4/asinf.m4 (gl_FUNC_ASINF): Set REPLACE_ASINF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_ASINF.
* lib/math.in.h (asinf): Override if REPLACE_ASINF is 1.

8 years agoacosf: Avoid redefinition error on MSVC.
Bruno Haible [Sat, 17 Dec 2016 18:08:14 +0000 (19:08 +0100)]
acosf: Avoid redefinition error on MSVC.

* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Define REPLACE_ACOSF.
* m4/acosf.m4 (gl_FUNC_ACOSF): Set REPLACE_ACOSF to 1 if the function
may be defined as an inline function.
* modules/math (Makefile.am): Substitute REPLACE_ACOSF.
* lib/math.in.h (acosf): Override if REPLACE_ACOSF is 1.

8 years agoAvoid redefinition errors on MSVC.
Bruno Haible [Sat, 17 Dec 2016 15:44:51 +0000 (16:44 +0100)]
Avoid redefinition errors on MSVC.

* m4/snprintf.m4 (gl_REPLACE_SNPRINTF): Set REPLACE_SNPRINTF to 1 if
the function may be defined as an inline function.
* m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): Set REPLACE_VSNPRINTF to 1 if
the function may be defined as an inline function.

8 years agoAvoid redefinition errors on MSVC.
Bruno Haible [Sat, 17 Dec 2016 13:16:50 +0000 (14:16 +0100)]
Avoid redefinition errors on MSVC.

* lib/stdio.in.h: Include <stdlib.h> and <io.h> when necessary.
* lib/unistd.in.h: Include <stdio.h> when necessary.

8 years agostdint: Fix WINT_MAX to match the gnulib provided wint_t on MSVC.
Bruno Haible [Sat, 17 Dec 2016 17:46:30 +0000 (18:46 +0100)]
stdint: Fix WINT_MAX to match the gnulib provided wint_t on MSVC.

* m4/stdint.m4 (gl_STDINT_H): Define GNULIB_OVERRIDES_WINT_T.
* modules/stdint (Makefile.am): Substitute GNULIB_OVERRIDES_WINT_T.
* lib/stdint.in.h [GNULIB_OVERRIDES_WINT_T]: Redefine WINT_MIN and
WINT_MAX.

8 years agoAvoid autoconf warning.
Bruno Haible [Sat, 17 Dec 2016 16:59:22 +0000 (17:59 +0100)]
Avoid autoconf warning.

* modules/frexpl (configure.ac): Require, not invoke, gl_FUNC_FREXPL.
* modules/frexp (configure.ac): Require, not invoke, gl_FUNC_FREXP.

8 years agofpending: Revert workaround against Emacs bug.
Bruno Haible [Sat, 17 Dec 2016 12:27:08 +0000 (13:27 +0100)]
fpending: Revert workaround against Emacs bug.

* lib/stdio-impl.h [__MINGW32__]: Revert conditional.
The Emacs bug is fixed by Eli Zaretskii in
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00715.html

8 years agogetlogin_r tests: Port to mingw.
Bruno Haible [Sat, 17 Dec 2016 10:02:41 +0000 (11:02 +0100)]
getlogin_r tests: Port to mingw.

* tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows.

8 years agogetlogin: Port to newer mingw.
Bruno Haible [Sat, 17 Dec 2016 10:00:30 +0000 (11:00 +0100)]
getlogin: Port to newer mingw.

* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_GETLOGIN.
* m4/getlogin.m4 (gl_FUNC_GETLOGIN): Set HAVE_DECL_GETLOGIN.
* modules/unistd (Makefile.am): Substibute HAVE_DECL_GETLOGIN, not
HAVE_GETLOGIN.
* lib/unistd.in.h (getlogin): Test HAVE_DECL_GETLOGIN, not
HAVE_GETLOGIN.
* doc/posix-functions/getlogin.texi: Mention the issue.
* tests/test-getlogin.c: Don't include <pwd.h> on native Windows.

8 years agobuiltin-expect: improve port to IBM XL C
Paul Eggert [Sat, 17 Dec 2016 02:20:21 +0000 (18:20 -0800)]
builtin-expect: improve port to IBM XL C

Problem reported for z/OS by Daniel Richard G. in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00079.html
* m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
Test for <builtins.h> directly.

8 years agobuiltin-expect: port to IBM XL C
Paul Eggert [Sat, 17 Dec 2016 00:47:26 +0000 (16:47 -0800)]
builtin-expect: port to IBM XL C

Problem reported for z/OS by Daniel Richard G. in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00074.html
* m4/builtin-expect.m4 (gl___BUILTIN_EXPECT):
Also allow __builtin_expect defined via a standard include file.

8 years agoregex: fix dependency
Paul Eggert [Sat, 17 Dec 2016 00:32:04 +0000 (16:32 -0800)]
regex: fix dependency

Problem reported by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00073.html
* modules/regex: Depend on builtin-expect.

8 years agobuiltin-expect: new module
Paul Eggert [Fri, 16 Dec 2016 22:52:59 +0000 (14:52 -0800)]
builtin-expect: new module

Fix fnmatch to use it.
Problem reported for z/OS by Daniel Richard G.
* lib/fnmatch.c (__builtin_expect):
* lib/glob.c (__builtin_expect):
* lib/grantpt.c (__builtin_expect) [!_LIBC]:
* lib/memmem.c (__builtin_expect) [!_LIBC]:
* lib/scandir.c (__builtin_expect):
* lib/strstr.c (__builtin_expect) [!_LIBC]:
Remove macro; config.h now does this.
* lib/gl_anytreehash_list1.h (add_to_bucket):
* lib/regex_internal.h (BE):
Assume __builtin_expect.
* m4/builtin-expect.m4, modules/builtin-expect: New files.
* modules/avltreehash-list, modules/fnmatch, modules/glob:
* modules/grantpt, modules/memmem-simple, modules/rbtreehash-list:
* modules/scandir, modules/strstr-simple:
Depend on builtin-expect.

8 years agoinit.sh: Add possibility to not delete temporary files.
Bruno Haible [Thu, 15 Dec 2016 21:26:01 +0000 (22:26 +0100)]
init.sh: Add possibility to not delete temporary files.

* tests/init.sh (remove_tmp_): If the environment variable KEEP is set
to yes, don't erase the temporary directory.

8 years agoregex: fix integer-overflow bug in never-used code
Paul Eggert [Fri, 16 Dec 2016 17:34:02 +0000 (09:34 -0800)]
regex: fix integer-overflow bug in never-used code

Problem reported by Clément Pit–Claudel in:
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00654.html
* lib/regex_internal.h: Include intprops.h.
* lib/regexec.c (re_search_2_stub): Use it to avoid undefined
behavior on integer overflow.
* modules/regex (Depends-on): Add intprops.

8 years agofpending: fix port to MinGW on Emacs
Paul Eggert [Fri, 16 Dec 2016 15:38:58 +0000 (07:38 -0800)]
fpending: fix port to MinGW on Emacs

* lib/stdio-impl.h [__MINGW32__]: Do not include errno.h.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00642.html
Is Plan 9 still a valid porting target, anyway?

8 years agosafe-alloc: use xalloc-oversized
Paul Eggert [Thu, 15 Dec 2016 18:00:22 +0000 (10:00 -0800)]
safe-alloc: use xalloc-oversized

* lib/safe-alloc.c: Include xalloc-oversized.h.
(safe_alloc_oversized): Remove.  All uses changed to xalloc_oversized.
* modules/safe-alloc (Depends-on): Add xalloc-oversized.

8 years agoxalloc: do not exceed PTRDIFF_MAX
Paul Eggert [Thu, 15 Dec 2016 17:59:21 +0000 (09:59 -0800)]
xalloc: do not exceed PTRDIFF_MAX

* lib/xmalloc.c (xcalloc) [HAVE_GNU_CALLOC]: Do not omit
xalloc_oversized check, since objects larger than PTRDIFF_MAX
bytes have pointer-subtraction problems.

8 years agomalloca: do not exceed PTRDIFF_MAX
Paul Eggert [Thu, 15 Dec 2016 17:56:53 +0000 (09:56 -0800)]
malloca: do not exceed PTRDIFF_MAX

* lib/malloca.h: Include xalloc-oversized.
(nmalloca): Use xalloc_oversized instead of rolling our own.
* modules/malloca (Depends-on):
* modules/relocatable-prog-wrapper (Depends-on):
Add xalloc-oversized.

8 years agoquotearg: pacify GCC better
Paul Eggert [Thu, 15 Dec 2016 17:53:45 +0000 (09:53 -0800)]
quotearg: pacify GCC better

* modules/quotearg (Depends-on): Add minmax, stdint.
* lib/quotearg.c: Include minmax.h, stdint.h.
(nslots): Now int, as there seems little point to going to extra
work merely to support the INT_MAX slot, which nobody ever uses.
(quotearg_n_options): Redo size-overflow checks to pacify GCC
and to catch (mostly-theoretical) ptrdiff_t problems too.
This can be done via one comparison.

8 years agoxalloc-oversized: check for PTRDIFF_MAX too
Paul Eggert [Thu, 15 Dec 2016 01:09:04 +0000 (17:09 -0800)]
xalloc-oversized: check for PTRDIFF_MAX too

This avoids undefined behavior when subtracting pointers to
objects containing more than PTRDIFF_MAX bytes.
* lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
Also return 1 if the result would exceed PTRDIFF_MAX>
* modules/xalloc-oversized (Depends-on):
Add stdint.

8 years agodfa: fix glitches in previous commit
Paul Eggert [Wed, 14 Dec 2016 23:11:28 +0000 (15:11 -0800)]
dfa: fix glitches in previous commit

Sorry, I don't know how I managed to commit the wrong version.
* lib/dfa.c (MIN): Move up.
(xpalloc): Now static.

8 years agodfa: fix some unlikely integer overflows
Paul Eggert [Wed, 14 Dec 2016 21:21:04 +0000 (13:21 -0800)]
dfa: fix some unlikely integer overflows

I found these while reviewing the recent Coverity-related fix.
This patch changes part of dfa.c to prefer ptrdiff_t instead of
size_t for object counts.  Using ptrdiff_t is the style typically
used in Emacs; although it wastes a sign bit as sizes can never be
negative, it makes -fsanitize=undefined more likely to catch
integer overflows in index calculation, and nowadays the upside is
typically more important than the downside.  Although perhaps the
rest of dfa.c should be changed to prefer ptrdiff_t as well (much
of dfa.c already does, since it uses state_num which is signed),
that is a bigger change and is not needed to fix the bugs I found.
* lib/dfa.c: Include stdint.h and intprops.h.
(TOKEN_MAX): New macro.
(position_set, struct mb_char_classes, struct dfa, maybe_realloc)
(charclass_index, parse_bracket_exp, addtok, insert, merge)
(realloc_trans_if_necessary, free_mbdata):
Use ptrdiff_t instead of size_t for object counts related to xpalloc.
This is safe because xpalloc checks that the sizes do not exceed
either SIZE_MAX or PTRDIFF_MAX.
(xpalloc): New function, mostly taken from Emacs.
(maybe_realloc, copy, realloc_trans_if_necessary): Use it.
(maybe_realloc): Add NITEMS_MAX to signature.  All callers changed.
(charclass_index): Check for integer overflow in computing
charclass index; it must not exceed TOKEN_MAX - CSET, as CSET is
added to it later.
(alloc_position_set): Check for integer overflow.  On typical
platforms this check has zero overhead, since the constant
expression is false.
(realloc_trans_if_necessary):
Remove assertion, which I hope Coverity no longer needs.
* modules/dfa (Depends-on): Add intprops, stdint.

8 years agodfa: add an assertion to avoid coverity false positive
Jim Meyering [Tue, 13 Dec 2016 05:12:14 +0000 (21:12 -0800)]
dfa: add an assertion to avoid coverity false positive

* lib/dfa.c (realloc_trans_if_necessary): Otherwise, coverity
warned that "newalloc1 - 2" could overflow.

8 years agodfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE
Paul Eggert [Tue, 13 Dec 2016 22:44:44 +0000 (14:44 -0800)]
dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE

lib/dfa.c: Fix typo in previous change.

8 years agodfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE
Arnold D. Robbins [Tue, 13 Dec 2016 20:10:08 +0000 (22:10 +0200)]
dfa: remove DFA_CASE_FOLD flag in favor of RE_ICASE

* dfa.h (DFA_CASE_FOLD): Remove.
* dfa.c (dfasyntax): Set dfa->syntax.case_fold based on RE_ICASE.

8 years agolink: fix test to declare use of rename()
John W. Eaton [Tue, 13 Dec 2016 17:43:09 +0000 (12:43 -0500)]
link: fix test to declare use of rename()

The test in link.m4 needs to include <stdio.h> to provide a declaration
for the rename function.  The test fails if building with GCC's
-Werror=implicit-function-declaration option.

This was reported as part of a bug with building Octave on Fedora, which
now uses -Werror=implicit-function-declaration by default.

* m4/link.m4 (gl_FUNC_LINK): Include <stdio.h>.

https://savannah.gnu.org/bugs/?49782

8 years agofpending: Port to native Windows with MSVC.
Bruno Haible [Tue, 13 Dec 2016 10:19:35 +0000 (11:19 +0100)]
fpending: Port to native Windows with MSVC.

* lib/fpending.c: Include stdio-impl.h.
(__fpending): Include all known implementations. Err out if it's not
ported.
* m4/fpending.m4 (gl_PREREQ_FPENDING): Remove macro.
* modules/fpending (Files): Add lib/stdio-impl.h.
(configure.ac): Don't invoke gl_PREREQ_FPENDING.

8 years agostdioext: Port to native Windows with MSVC.
Bruno Haible [Tue, 13 Dec 2016 00:44:06 +0000 (01:44 +0100)]
stdioext: Port to native Windows with MSVC.

* lib/stdio-impl.h (WINDOWS_OPAQUE_FILE): New macro.
(struct _gl_real_FILE): New type.
(fp_, _IOREAD, _IOWRT, _IORW, _IOEOF, _IOERR): New macros, for native
Windows.
* lib/fbufmode.c (fbufmode): Add code for native Windows.
* lib/fflush.c (clear_ungetc_buffer): Treat native Windows like the
other SystemV derived implementations.
* lib/fpurge.c (fpurge): Likewise.
* lib/freadable.c (freadable): Likewise.
* lib/freadahead.c (freadahead): Likewise.
* lib/freading.c (freading): Likewise.
* lib/freadptr.c (freadptr): Likewise.
* lib/freadseek.c (freadptrinc): Likewise.
* lib/fseeko.c (fseeko): Likewise.
* lib/fseterr.c (fseterr): Likewise.
* lib/fwritable.c (fwritable): Likewise.
* lib/fwriting.c (fwriting): Likewise.
Reported by Gisle Vanem <gvanem@yahoo.no>.

8 years agonon-recursive-gnulib-prefix-hack.m4: remove leading "(" in case stmt
Jim Meyering [Mon, 12 Dec 2016 06:39:42 +0000 (22:39 -0800)]
non-recursive-gnulib-prefix-hack.m4: remove leading "(" in case stmt

* m4/non-recursive-gnulib-prefix-hack.m4: That leading "(" happens
to work with most shells, but not with the one provided by many
Solaris 10 systems, so running configure with such a /bin/sh evokes
e.g., "./configure: syntax error at line 33602: `(' unexpected".
Reported by Assaf Gordon in
https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00002.html

8 years agothreadlib: Optimize out runtime test on Solaris >= 10.
Bruno Haible [Sat, 10 Dec 2016 13:04:42 +0000 (14:04 +0100)]
threadlib: Optimize out runtime test on Solaris >= 10.

* m4/threadlib.m4 (gl_THREADLIB_BODY): Don't set
PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.

8 years agostdint: Update doc about Solaris 9.
Bruno Haible [Sat, 10 Dec 2016 11:08:07 +0000 (12:08 +0100)]
stdint: Update doc about Solaris 9.

* doc/posix-headers/stdint.texi: Add info about Solaris 9.

8 years agoc-ctype tests: Fix link error on Solaris 9.
Bruno Haible [Sat, 10 Dec 2016 00:26:47 +0000 (01:26 +0100)]
c-ctype tests: Fix link error on Solaris 9.

* modules/c-ctype-tests (Depends-on): Add 'isblank'.
Reported at <https://savannah.gnu.org/bugs/?46827>.

8 years agodfa: fix performance bug that recomputes trans
Paul Eggert [Fri, 9 Dec 2016 23:09:03 +0000 (15:09 -0800)]
dfa: fix performance bug that recomputes trans

* lib/dfa.c (build_state): Fix performance bug introduced in Nov
25 on-demand changes.  The bug caused build_state to reset all
d->trans elements to -2 even when d->trans was already non-null.
Use C99 style decls after statements in this function.

8 years agosame-inode: port to MinGW
Paul Eggert [Fri, 9 Dec 2016 16:16:13 +0000 (08:16 -0800)]
same-inode: port to MinGW

Here st_ino is always 0, so change the definition of SAME_INODE so
that 1 means the two files are the same, 0 with st_ino != 0 means
they differ, and 0 with st_ino == 0 means we don’t know.  Problem
reported by Bruno Haible (Bug#25146).
* doc/posix-headers/sys_stat.texi (sys/stat.h): Update.
* lib/same-inode.h (SAME_INODE): Return 0 on MinGW.

8 years agojavacomp: Support Java 7 and 8.
Bruno Haible [Sun, 4 Dec 2016 18:50:26 +0000 (19:50 +0100)]
javacomp: Support Java 7 and 8.

* m4/javacomp.m4 (gt_JAVACOMP): Accept source-version 1.7, 1.8 and
target-version 1.7, 1.8.

8 years agognulib-tool: fix the previous change
Daiki Ueno [Fri, 2 Dec 2016 16:16:50 +0000 (17:16 +0100)]
gnulib-tool: fix the previous change

* gnulib-tool (func_import): Relax the regex used for "LGPLv3+ or
GPLv2" rewriting.

8 years agognulib-tool: fix the previous change
Daiki Ueno [Fri, 2 Dec 2016 15:56:11 +0000 (16:56 +0100)]
gnulib-tool: fix the previous change

* gnulib-tool (func_import): Relax the regex for the end marker of
original license text.

8 years agognulib-tool: properly list the LGPL3orGPLv2 license
Nikos Mavrogiannopoulos [Mon, 21 Nov 2016 20:15:25 +0000 (21:15 +0100)]
gnulib-tool: properly list the LGPL3orGPLv2 license

* gnulib-tool (func_import): Adhere to the license guideline when
rewriting the license text to "LGPLv3+ or GPLv2":
https://www.gnu.org/prep/maintain/maintain.html#Licensing-of-GNU-Packages

8 years agolocalcharset: Avoid theoretical buffer overrun.
Bruno Haible [Fri, 2 Dec 2016 12:52:43 +0000 (13:52 +0100)]
localcharset: Avoid theoretical buffer overrun.

* lib/localcharset.c (locale_charset) [WINDOWS_NATIVE]: Don't use the
return value from setlocale if it would lead to a buffer overrun.

8 years agoRelicense some modules under LGPLv2+.
Bruno Haible [Fri, 2 Dec 2016 01:02:09 +0000 (02:02 +0100)]
Relicense some modules under LGPLv2+.

Kevin Cernekee's approval is in
http://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00090.html.
* modules/fseterr (License): Change to LGPLv2+.
* modules/mbchar (License): Likewise.
* modules/mbiter (License): Likewise.
* modules/mbsnlen (License): Likewise.
* modules/wcwidth (License): Likewise.

8 years agoscandir: Fix _D_ALLOC_NAMLEN() on OS/2 kLIBC
KO Myung-Hun [Thu, 1 Dec 2016 10:52:46 +0000 (19:52 +0900)]
scandir: Fix _D_ALLOC_NAMLEN() on OS/2 kLIBC

On OS/2 kLIBC, d_name is not the last field of struct dirent. So
copying struct dirent according to the size calculated based on d_name
blows the fields after d_name up.

The correct way is to allocate the whole size of struct dirent.

* lib/scandir.c (_D_ALLOC_NAMLEN): Consider the fields after d_name on
OS/2 kLIBC.

8 years agoalphasort, scandir: Port to OS/2 kLIBC
KO Myung-Hun [Thu, 1 Dec 2016 10:52:45 +0000 (19:52 +0900)]
alphasort, scandir: Port to OS/2 kLIBC

On OS/2 kLIBC, scandir() declaration is different from POSIX. As a
result, alphasort() declaration is different, too.

* lib/alphasort.c (alphasort): Implement according to OS/2 kLIBC
declaration.
* lib/scandir.c (scandir): Add declaration for OS/2 kLIBC.

8 years agorelocatable: Fix that /@unixroot prefix is not working on OS/2 kLIBC
KO Myung-Hun [Thu, 1 Dec 2016 10:52:44 +0000 (19:52 +0900)]
relocatable: Fix that /@unixroot prefix is not working on OS/2 kLIBC

OS/2 kLIBC has a feature to rewrite some path components. For example,
'/@unixroot' is replaced with a value of $UNIXROOT if it is.

So prepending a drive letter to the path starting with '/' makes the
path starting with '/@unixroot' to 'x:/@unixroot' which is unexpected.

This will breaks the behavior of some programs depending on /@unixroot
prefix.

* lib/relocatable.c (relocate): Do not touch pathname if it is started
with '/@unixroot'.

8 years agosys_socket: typedef sa_family_t correctly on OS/2 kLIBC
KO Myung-Hun [Thu, 1 Dec 2016 10:52:43 +0000 (19:52 +0900)]
sys_socket: typedef sa_family_t correctly on OS/2 kLIBC

On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is
defined.

* lib/sys_socket.in.h (sa_family_t): Typedef to unsigned char on
OS/2 kLIBC unless TCPV40HDRS is defined.

8 years agodfa: avoid new infinite loop
Jim Meyering [Tue, 29 Nov 2016 18:45:46 +0000 (10:45 -0800)]
dfa: avoid new infinite loop

This would infloop: echo cx | LC_ALL=C grep -E 'c\b[x ]'
* lib/dfa.c (dfastate): When constructing a new state table, we could
initially declare that we had found a match, and later find that
constraints eliminate that possibility, yet continue to use the
now stale "matched" indicator.  That would lead to an infinite loop.
The solution is to update "matched" when necessary.
Introduced by commit v0.1-983-g403adf1.

8 years agodfa: do not match middle of multibyte character
Norihiro Tanaka [Mon, 28 Nov 2016 13:26:07 +0000 (22:26 +0900)]
dfa: do not match middle of multibyte character

* lib/dfa.c (transit_state): If it fails in matching a single byte
character in a state including a period expression in a non-UTF8
multibyte locale, skip the trailing bytes.
(dfa_supported): Revert previous change.

8 years agodfa: avoid false match in non-UTF8 multibyte locales
Jim Meyering [Sun, 27 Nov 2016 23:36:51 +0000 (15:36 -0800)]
dfa: avoid false match in non-UTF8 multibyte locales

* lib/dfa.c (dfa_supported): Treat any non-UTF8 multibyte locale
as "not supported" so that callers will resort to using regex-based
matcher.  This will surely hurt performance, but correctness trumps
performance here, and the affected locales are less and less relevant,
these days.  See grep's bug report https://bugs.gnu.org/24975.

8 years agoptsname_r: leverage AC_HEADER_MAJOR
Mike Frysinger [Sun, 27 Nov 2016 03:52:00 +0000 (22:52 -0500)]
ptsname_r: leverage AC_HEADER_MAJOR

Like the mountlist module, ptsname_r uses makedev/major/minor,
so use the existing autoconf macro which will probe some headers
for use and set up some defines.

* lib/ptsname_r.c: Likewise.
[__sun]: Delete sys/sysmacros.h include.
[_AIX || __osf__]: Likewise.
* m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Depend on AC_HEADER_MAJOR.

8 years agomd4,md5,sha*: allow _STRING_INLINE_unaligned enable unaligned operation
Pádraig Brady [Sun, 27 Nov 2016 00:23:14 +0000 (00:23 +0000)]
md4,md5,sha*: allow _STRING_INLINE_unaligned enable unaligned operation

* lib/md4.c (md4_process_bytes): The existing define is made internal
in recent versions of glibc, so also use this new public define.
* lib/md5.c (md5_process_bytes): Likewise.
* lib/sha1.c (sha1_process_bytes): Likewise.
* lib/sha256.c (sha256_process_bytes): Likewise.
* lib/sha512.c (sha512_process_bytes): Likewise.

8 years agomaint: use a more standard return from mbrtowc test
Pádraig Brady [Sat, 26 Nov 2016 15:39:11 +0000 (15:39 +0000)]
maint: use a more standard return from mbrtowc test

With this we can use this check in coreutils to find configure issues:
  grep -E '(program exited with status 1$|core dumped)' config.log

* m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Don't return 1
from the test program as this often indicates an
unhandled case in the test program.
(gl_MBRTOWC_INCOMPLETE_STATE): Likewise.
(gl_MBRTOWC_SANITYCHECK): Likewise.
(gl_MBRTOWC_NULL_ARG2): Likewise.
(gl_MBRTOWC_NUL_RETVAL): Likewise.

8 years agofreopen: fix typo in previous commit
Paul Eggert [Sat, 26 Nov 2016 23:11:55 +0000 (15:11 -0800)]
freopen: fix typo in previous commit

* lib/freopen.c: Include unistd.h.

8 years agofreopen: work around glibc bug with closed fd
Paul Eggert [Sat, 26 Nov 2016 22:53:29 +0000 (14:53 -0800)]
freopen: work around glibc bug with closed fd

Work around glibc bug#15589, where freopen mishandles the case
where stdin etc. are already closed.
* doc/posix-functions/freopen.texi (freopen): Document the bug.
* lib/freopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this
instead of __need_FILE, as the latter does not work with glibc.
Include <fcntl.h>, for open flags.
(rpl_freopen): Work around glibc bug.
* m4/freopen.m4 (gl_FUNC_FREOPEN): Check for bug.
* modules/freopen (Depends-on): Add fcntl-h.
* tests/test-freopen.c (main): Test for bug.

8 years agofnmatch: fix typo introduced on 2016-08-17
Paul Eggert [Sat, 26 Nov 2016 02:45:05 +0000 (18:45 -0800)]
fnmatch: fix typo introduced on 2016-08-17

This fixes the port to non-GCC compilers that lack __builtin_expect.
* lib/fnmatch.c (__builtin_expect): Change A&&B to !A||B.

8 years agomaint: fix ChangeLog typo
Paul Eggert [Fri, 25 Nov 2016 20:45:15 +0000 (12:45 -0800)]
maint: fix ChangeLog typo

8 years agodfa: simplify with new function fillset
Paul Eggert [Fri, 25 Nov 2016 18:43:38 +0000 (10:43 -0800)]
dfa: simplify with new function fillset

* lib/dfa.c (fillset): New function.
Use it for clarity when applicable.

8 years agodfa: fix glitches with on-demand states
Paul Eggert [Fri, 25 Nov 2016 18:43:38 +0000 (10:43 -0800)]
dfa: fix glitches with on-demand states

Also, adjust commentary to better match new code.
Some of these glitches predate the recent change.
* lib/dfa.c (dfaanalyze): Clear trcount here, so that it counts
only non-initial states.
(dfastate): Rename locals to better match new roles.
Move them into nested scopes if this is easy.
Omit unnecessary cdalls to zeroset.
Simplify test for whether to throw in the positions of state 0.
Omit C99-ism (decl after statement) since Gawk still wants C89.
(build_state): Omit unnecessary test and assignment.
Fix some confusion that counted transition tables inaccurately
and could cause a memory leak.
(dfaexec_main): Redo to make it clearer to the compiler that
-1 and -2 are the only negative state numbers here.

8 years agodfa: addition of new state on demand
Norihiro Tanaka [Fri, 25 Nov 2016 18:43:38 +0000 (10:43 -0800)]
dfa: addition of new state on demand

* src/dfa.c (dfastate): Add argument UC, the current input character.
Fill only a group including the character in transition table.
(realloc_trans_if_necessary): Add the dummy state which means that a
transition table is assigned but the next state is not assigned.
(build_state): Return the next state.  All callers updated.
(transit_state_singlebyte): If we get the dummy state,
fill the transition table.
(dfaexec_main): Handle the dummy state.
(free_mbdata, dfafree): Consider the dummy state.

8 years agosrclist: sync with released gettext
Daiki Ueno [Wed, 23 Nov 2016 12:39:30 +0000 (13:39 +0100)]
srclist: sync with released gettext

* config/srclist.txt: Set "release" option to the files under
$GETTEXT.

8 years agosrclist: add "release" option
Daiki Ueno [Wed, 23 Nov 2016 11:46:09 +0000 (12:46 +0100)]
srclist: add "release" option

* config/srclist.txt: Change the format so that the first column
of each line points to the top-level directory of the source
archive.
* config/srclist-update: Accept "release" option that checks files
from the most recently tagged revision in the source archive.

8 years agosnippet/c++defs: Simplify _GL_CXXALIAS_* macros.
Bruno Haible [Sun, 20 Nov 2016 12:24:27 +0000 (13:24 +0100)]
snippet/c++defs: Simplify _GL_CXXALIAS_* macros.

* build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
(_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1,
_GL_CXXALIAS_SYS, _GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2):
Inline and remove member function 'rpl ()' of the wrapper struct.

8 years agodfa: fix logic typo
Paul Eggert [Mon, 21 Nov 2016 04:16:29 +0000 (20:16 -0800)]
dfa: fix logic typo

Problem reported by Stephane Chazelas (Bug#24973).
* lib/dfa.c (using_simple_locale): Fix typo that caused some
non-simple locales like fr_FR to be treated as simple.

8 years agofix test driver leaks: exclude, malloc, realloc
Jim Meyering [Sun, 20 Nov 2016 16:33:38 +0000 (08:33 -0800)]
fix test driver leaks: exclude, malloc, realloc

* tests/test-exclude.c (main): Fix trivial leak.
* tests/test-malloc-gnu.c (main): Likewise.
* tests/test-realloc-gnu.c (main): Likewise.
With these changes, grep's tests are now leak free.
I.e., running them with ASAN elicits no failure:
  make CFLAGS='-O0 -ggdb3' AM_CFLAGS=-fsanitize=address \
    AM_LDFLAGS='-fsanitize=address -static-libasan' check

8 years agoFix gnulib C++ namespace support and std::frexp
Pedro Alves [Sat, 12 Nov 2016 16:22:53 +0000 (17:22 +0100)]
Fix gnulib C++ namespace support and std::frexp

* lib/math.in.h (frexp): Use _GL_CXXALIASWARN1 instead of
_GL_CXXALIASWARN.

8 years agoGNULIB_NAMESPACE::func need not pull in rpl_func
Pedro Alves [Sat, 12 Nov 2016 16:22:54 +0000 (17:22 +0100)]
GNULIB_NAMESPACE::func need not pull in rpl_func

* build-aux/snippet/c++defs.h [__cplusplus && GNULIB_NAMESPACE]
(_GL_CXXALIAS_RPL_1, _GL_CXXALIAS_RPL_CAST_1, _GL_CXXALIAS_SYS)
(_GL_CXXALIAS_SYS_CAST, _GL_CXXALIAS_SYS_CAST2): Define a wrapper
struct instead of a function pointer.

8 years agolibunistring: Relicense under dual "LGPLv3+ or GPLv2" license.
Bruno Haible [Sat, 12 Nov 2016 00:17:26 +0000 (01:17 +0100)]
libunistring: Relicense under dual "LGPLv3+ or GPLv2" license.

* modules/libunistring: (License): Change from LGPL to
"LGPLv3+ or GPLv2".
* modules/libunistring-optional: Likewise.
* modules/unicase/*: Likewise.
* modules/uniconv/*: Likewise.
* modules/unictype/*: Likewise.
* modules/unigbrk/*: Likewise.
* modules/unilbrk/*: Likewise.
* modules/uniname/*: Likewise.
* modules/uninorm/*: Likewise.
* modules/unistdio/*: Likewise.
* modules/unistr/*: Likewise.
* modules/uniwbrk/*: Likewise.
* modules/uniwidth/*: Likewise.

8 years agoRelicense some modules under LGPLv2+.
Bruno Haible [Sun, 13 Nov 2016 03:03:39 +0000 (04:03 +0100)]
Relicense some modules under LGPLv2+.

Paul Eggert's approval is in
http://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00037.html.
Eric Blake's approval is in
http://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00042.html.
Ludovic Courtès's approval is in
http://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00038.html.
* modules/isnand-nolibm (License): Change to LGPLv2+.
* modules/isnanf-nolibm (License): Likewise.
* modules/isnanl-nolibm (License): Likewise.

8 years agoRelicense some modules under LGPLv2+.
Bruno Haible [Sun, 13 Nov 2016 02:58:45 +0000 (03:58 +0100)]
Relicense some modules under LGPLv2+.

lib/float+.h is already under LGPLv2+ since 2007-07-13, per
modules/vasnprintf.
Paolo Bonzini's approval for lib/frexp.c and lib/frexpl.c is in
http://lists.gnu.org/archive/html/bug-gnulib/2016-11/msg00074.html.
All other significant changes to the files in lib/ of these modules
are from me.
* modules/memcmp2 (License): Change to LGPLv2+.
* modules/amemxfrm (License): Likewise.
* modules/fpieee (License): Likewise.
* modules/fpucw (License): Likewise.
* modules/frexp-nolibm (License): Likewise.
* modules/frexpl-nolibm (License): Likewise.
* modules/printf-frexp (License): Likewise.
* modules/printf-frexpl (License): Likewise.
* modules/printf-safe (License): Likewise.
* modules/signbit (License): Likewise.

8 years agoautoupdate
Karl Berry [Sat, 19 Nov 2016 14:45:25 +0000 (06:45 -0800)]
autoupdate

8 years agoEnable Unicode decoder safety unconditionally.
Bruno Haible [Thu, 17 Nov 2016 10:51:55 +0000 (11:51 +0100)]
Enable Unicode decoder safety unconditionally.

* lib/unistr.in.h (u32_mbtouc_unsafe): Assume CONFIG_UNICODE_SAFETY.
* lib/unistr/u8-mblen.c (u8_mblen): Likewise.
* lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
* lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
* lib/unistr/u8-prev.c (u8_prev): Likewise.
* lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
* lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
* lib/unistr/u16-mblen.c (u16_mblen): Likewise.
* lib/unistr/u16-mbtouc-unsafe.c (u16_mbtouc_unsafe): Likewise.
* lib/unistr/u16-mbtouc-unsafe-aux.c (u16_mbtouc_unsafe_aux): Likewise.
* lib/unistr/u16-prev.c (u16_prev): Likewise.
* lib/unistr/u16-strmblen.c (u16_strmblen): Likewise.
* lib/unistr/u16-strmbtouc.c (u16_strmbtouc): Likewise.
* lib/unistr/u32-mblen.c (u32_mblen): Likewise.
* lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Likewise.
* lib/unistr/u32-prev.c (u32_prev): Likewise.
* lib/unistr/u32-next.c (u32_next): Likewise.
* lib/unistr/u32-strmblen.c (u32_strmblen): Likewise.
* lib/unistr/u32-strmbtouc.c (u32_strmbtouc): Likewise.
* lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
* lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
* tests/unistr/test-u16-prev.c (check_invalid): Enable the
CONFIG_UNICODE_SAFETY tests unconditionally.
* tests/unistr/test-u32-mblen.c (main): Likewise.
* tests/unistr/test-u32-mbtouc.h (test_function): Likewise.
* tests/unistr/test-u32-prev.c (check_invalid): Likewise.
* tests/unistr/test-u32-next.c (main): Likewise.
* tests/unistr/test-u32-strmblen.c (main): Likewise.
* tests/unistr/test-u32-strmbtouc.c (main): Likewise.
* tests/unistr/test-u32-mbtouc.c (FULL_SAFETY): Remove macro.
* lib/unistr/u8-check.c (u8_check): Remove old dead code.
* lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
* lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
* lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
* lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
* lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
* lib/unistr/u16-check.c (u16_check): Update comment.
* NEWS: Mention the changes that callers should be aware of.

8 years agoCorrect indentation.
Bruno Haible [Sat, 19 Nov 2016 13:07:58 +0000 (14:07 +0100)]
Correct indentation.