| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
I hit a testsuite failure due to a failure removing test-getopt.tmp,
when running tests in parallel.
* tests/test-getopt-posix.c (TEST_GETOPT_TMP_NAME): Set name.
* tests/test-getopt-gnu.c (TEST_GETOPT_TMP_NAME): Likewise.
* tests/test-getopt-main.h (main): Use different file names
in case test-getopt-gnu and test-getopt-posix run in parallel.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-lock.c (USE_VOLATILE): New macro.
(struct atomic_int): New type.
(init_atomic_int, get_atomic_int_value, set_atomic_int_value): New
functions.
(lock_checker_done, rwlock_checker_done, reclock_checker_done): Define
as 'struct atomic_int'.
(lock_checker_thread, test_lock, rwlock_checker_thread, test_rwlock,
reclock_checker_thread, test_recursive_lock): Use the new functions.
Reported by Eric Blake in
https://www.redhat.com/archives/libvir-list/2012-March/msg00854.html
and by Pádraig Brady in
http://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00117.html.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* tests/test-getaddrinfo.c: Don't check the prototypes of freeaddrinfo,
getaddrinfo on native Windows.
|
|
|
|
| |
* tests/test-getlogin_r.c: Don't include <pwd.h> on native Windows.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* tests/init.sh (remove_tmp_): If the environment variable KEEP is set
to yes, don't erase the temporary directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, define isfinite, isinf, isnan, signbit in the gnulib
namespace instead of in the global namespace.
* build-aux/snippet/c++defs.h (_GL_BEGIN_NAMESPACE)
(_GL_END_NAMESPACE): New.
* lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Use them.
(isfinite, isinf, isnan, signbit) [__cplusplus &&
GNULIB_NAMESPACE]: Define them in the GNULIB_NAMESPACE namespace
instead of in the global namespace.
* tests/test-math-c++.cc: Check that the isfinite, isinf, isnan,
signbit overloads exist in the GNULIB_NAMESPACE namespace, instead
of in the global namespace.
|
|
|
|
|
|
| |
* lib/strftime.c (strftime_case_): Add %q case.
* lib/strptime.c (__strptime_internal): Likewise.
* tests/test-strftime.c (quarter_test): A new test case.
|
|
|
|
|
|
|
| |
See Bug#24805.
* lib/getprogname.c (getprogname) [__hpux]: Port.
* tests/test-getprogname.c (STREQ) [__hpux]:
Special-case for HP-UX limitations on program name length.
|
|
|
|
|
| |
* tests/test-system-quote-child.c (fopen): Redefine like the system's
<stdio.h> does.
|
|
|
|
|
|
|
|
| |
* tests/test-ffsl.c (main): Use variable x, not i.
* tests/test-posix_spawn3.c (parent_main): Consider the return value of
freopen.
* tests/test-sethostname1.c (main): Explicitly ignore the return value
of sethostname.
|
|
|
|
|
|
|
| |
Problem reported by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00066.html
* tests/test-quotearg-simple.c (use_quote_double_quotes): Move here ...
* tests/test-quotearg.h: ... from here.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/quotearg.c (quotearg_buffer_restyled): Switch to a read-only
scan of the string when we initially encounter a single quote when
shell quoting, so that if we then switch to a more concise quoting method
we will not have written beyond that returned length.
This is significant for sh-quote, which has separate routines
to determine the length and do the actual quoting.
* tests/test-quotearg.h: Reinstate the buffer bounds checking
now that we never write more than the returned length.
|
|
|
|
|
| |
* tests/test-getprogname.c (main): Strip "lt-" prefix.
Based on a patch by Jim Meyering.
|
|
|
|
|
|
|
| |
* lib/getprogname.h: Add comments.
* lib/getprogname.c: Add comments. Fix #elif indentation.
* tests/test-getprogname.c (main): On Cygwin, expect a result without
".exe" suffix.
|
|
|
|
|
| |
* tests/test-sh-quote.c (check_one): Do detect buffer overruns.
* tests/test-system-quote-main.c (check_one): Likewise.
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-quotearg.c [locale_results]: Add the missing str7
entries to the expected results.
tests/test-system-quote-main.c (check_one): Don't enforce that we
don't write beyond the returned length, since that's no longer the
case if we switch to a more concise quoting style.
* tests/test-sh-quote.c (check_one): Likewise.
(main): Adjust for the new more concise quoting style.
Reported by Bruno Haible.
|
|
|
|
|
| |
* tests/test-duplocale.c (main): Skip the test if the 'newlocale' call
fails.
|
|
|
|
| |
* tests/test-limits-h.c [__GNUC__]: Ignore -Woverlength-strings.
|
|
|
|
|
|
|
| |
* tests/test-stdint.c (verify_width): Implement with _GL_VERIFY
and an abbreviated diagnostic rather than verify with the full one,
because the full-length strings would evoke warnings from gcc with
-Woverlength-strings.
|
|
|
|
|
|
|
|
|
|
|
| |
I.E. 'it'\''s awkward like this'; "it's better like this"
* lib/quotearg.c (quotearg_buffer_restyled): If an ASCII single
quote in encountered then use double quotes (c style quoting)
when possible, as it simplifies the quoting.
* tests/test-quotearg-simple.c: Add test cases.
* tests/test-quotearg.h (use_quotearg_buffer): Adjust to account
for the fact we now may write beyond the returned length.
|
|
|
|
|
| |
* tests/init.sh (compare_): When attempting to use diff -U3,
prefer diff -u to -U3 to -c to plain diff. Do not insist on
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/posix-headers/stdint.texi: Document this.
* lib/stdint.in.h: Add support for INTMAX_WIDTH. etc.
* m4/stdint.m4 (gl_STDINT_H): Require gl_LIMITS_H. Check for
support for INTMAX_WIDTH, etc. as well as for support for just C99.
* modules/stdint (Depends-on): Add limits-h.
(Makefile.am): Substitute HAVE_C99_STDINT_H.
* modules/stdint-tests (Depends-on): Add extensions, so that
INTMAX_MAX etc. are defined.
* tests/test-stdint.c: Verify the new macros.
|
|
|
|
|
|
|
|
| |
This adds ISO/IEC TS 18661-1:2014 support to limits.h.
* MODULES.html.sh: Add limits-h,and move size_max to stdint section.
* doc/posix-headers/limits.texi: Document new module.
* lib/limits.in.h, m4/limits-h.m4, modules/limits-h:
* modules/limit-h-tests, tests/test-limits-h.c: New files.
|
|
|
|
|
|
|
|
|
| |
Problems reported by Tom G. Christensen in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-09/msg00031.html
* modules/dfa (Depends-on): Add isblank.
* modules/dfa-tests (dfa_match_aux_LDADD):
Rename from test_stat_LDADD, to fix typo.
* tests/dfa-match.sh: Don't require 'timeout'; use it if available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since grep's DFA matcher is now being used by two gnulib-enabled
projects, grep and sed, it makes sense to version-control its
sources and unit tests in one place: here.
* modules/dfa: New module.
* modules/dfa-tests: New file.
* lib/dfa.c: New file, from grep.
* lib/dfa.h: Likewise.
* lib/localeinfo.c: Likewise.
* lib/localeinfo.h: Likewise.
* tests/dfa-match-aux.c: Likewise.
* tests/dfa-invalid-char-class.sh: Likewise.
* tests/dfa-match.sh: Likewise, with minor changes.
* MODULES.html.sh (Misc): Add "dfa" to this list.
|
|
|
|
|
|
| |
* modules/getprogname-tests (Makefile.am): Define EXEEXT.
* tests/test-getprogname.c (main): Use it.
Suggested by Gisle Vanem.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/getprogname.c (getprogname): Include "dirname.h" and use
last_component: more general than open coding it with hard-coded "/".
* lib/getprogname.h (getprogname): Prefer "char const *" consistently.
* modules/getprogname (Depends-on): Add dirname-lgpl.
(configure.ac): Check for __argv in <stdlib.h>.
* modules/getprogname-tests: New file.
* tests/test-getprogname.c: New file.
Suggested by Gisle Vanem in
https://lists.gnu.org/archive/html/bug-gnulib/2016-09/msg00014.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modules that need the program name already
depend on getprogname.
* modules/acl-tests (Depends-on): Remove progname.
* modules/argmatch (Depends-on): Likewise.
* modules/argmatch-tests (Depends-on): Likewise.
* modules/argp-tests (Depends-on): Likewise.
* modules/argp-version-etc-tests (Depends-on): Likewise.
* modules/array-list-tests (Depends-on): Likewise.
* modules/array-oset-tests (Depends-on): Likewise.
* modules/avltree-list-tests (Depends-on): Likewise.
* modules/avltree-oset-tests (Depends-on): Likewise.
* modules/avltreehash-list-tests (Depends-on): Likewise.
* modules/carray-list-tests (Depends-on): Likewise.
* modules/copy-file-tests (Depends-on): Likewise.
* modules/exclude-tests (Depends-on): Likewise.
* modules/fchownat-tests (Depends-on): Likewise.
* modules/fdopendir-tests (Depends-on): Likewise.
* modules/filenamecat-tests (Depends-on): Likewise.
* modules/fstatat-tests (Depends-on): Likewise.
* modules/fstrcmp-tests (Depends-on): Likewise.
* modules/linked-list-tests (Depends-on): Likewise.
* modules/linkedhash-list-tests (Depends-on): Likewise.
* modules/mkdirat-tests (Depends-on): Likewise.
* modules/nonblocking-pipe-tests (Depends-on): Likewise.
* modules/nonblocking-socket-tests (Depends-on): Likewise.
* modules/obstack-printf-tests (Depends-on): Likewise.
* modules/openat-tests (Depends-on): Likewise.
* modules/parse-datetime-tests (Depends-on): Likewise.
* modules/pipe-filter-gi-tests (Depends-on): Likewise.
* modules/pipe-filter-ii-tests (Depends-on): Likewise.
* modules/quotearg-simple-tests (Depends-on): Likewise.
* modules/quotearg-tests (Depends-on): Likewise.
* modules/rbtree-list-tests (Depends-on): Likewise.
* modules/rbtree-oset-tests (Depends-on): Likewise.
* modules/rbtreehash-list-tests (Depends-on): Likewise.
* modules/spawn-pipe-tests (Depends-on): Likewise.
* modules/system-quote-tests (Depends-on): Likewise.
* modules/uniname/uniname-tests (Depends-on): Likewise.
* modules/uninorm/nfc-tests (Depends-on): Likewise.
* modules/uninorm/nfd-tests (Depends-on): Likewise.
* modules/uninorm/nfkc-tests (Depends-on): Likewise.
* modules/uninorm/nfkd-tests (Depends-on): Likewise.
* modules/unistdio/u16-vsnprintf-tests (Depends-on): Likewise.
* modules/unistdio/u16-vsprintf-tests (Depends-on): Likewise.
* modules/unistdio/u32-vsnprintf-tests (Depends-on): Likewise.
* modules/unistdio/u32-vsprintf-tests (Depends-on): Likewise.
* modules/unistdio/u8-vsnprintf-tests (Depends-on): Likewise.
* modules/unistdio/u8-vsprintf-tests (Depends-on): Likewise.
* modules/unistdio/ulc-vsnprintf-tests (Depends-on): Likewise.
* modules/unistdio/ulc-vsprintf-tests (Depends-on): Likewise.
* modules/unlinkat-tests (Depends-on): Likewise.
* modules/version-etc-tests (Depends-on): Likewise.
* modules/xalloc-die-tests (Depends-on): Likewise.
* modules/xmemdup0-tests (Depends-on): Likewise.
* modules/xprintf-posix-tests (Depends-on): Likewise.
* modules/xvasprintf-tests (Depends-on): Likewise.
* tests/test-argmatch.c: Do not include progname.h.
(main) Stop calling set_program_name.
* tests/test-argp-version-etc.c: Likewise.
* tests/test-argp.c: Likewise.
* tests/test-argv-iter.c: Likewise.
* tests/test-array_list.c: Likewise.
* tests/test-array_oset.c: Likewise.
* tests/test-avltree_list.c: Likewise.
* tests/test-avltree_oset.c: Likewise.
* tests/test-avltreehash_list.c: Likewise.
* tests/test-carray_list.c: Likewise.
* tests/test-copy-acl.c: Likewise.
* tests/test-copy-file.c: Likewise.
* tests/test-exclude.c: Likewise.
* tests/test-fchownat.c: Likewise.
* tests/test-fdopendir.c: Likewise.
* tests/test-filenamecat.c: Likewise.
* tests/test-fstatat.c: Likewise.
* tests/test-fstrcmp.c: Likewise.
* tests/test-linked_list.c: Likewise.
* tests/test-linkedhash_list.c: Likewise.
* tests/test-mkdirat.c: Likewise.
* tests/test-nonblocking-pipe-main.c: Likewise.
* tests/test-nonblocking-socket-main.c: Likewise.
* tests/test-obstack-printf.c: Likewise.
* tests/test-openat.c: Likewise.
* tests/test-parse-datetime.c: Likewise.
* tests/test-pipe-filter-gi1.c: Likewise.
* tests/test-pipe-filter-gi2-main.c: Likewise.
* tests/test-pipe-filter-ii1.c: Likewise.
* tests/test-pipe-filter-ii2-main.c: Likewise.
* tests/test-quotearg-simple.c: Likewise.
* tests/test-quotearg.c: Likewise.
* tests/test-rbtree_list.c: Likewise.
* tests/test-rbtree_oset.c: Likewise.
* tests/test-rbtreehash_list.c: Likewise.
* tests/test-sameacls.c: Likewise.
* tests/test-set-mode-acl.c: Likewise.
* tests/test-spawn-pipe-main.c: Likewise.
* tests/test-system-quote-main.c: Likewise.
* tests/test-unlinkat.c: Likewise.
* tests/test-version-etc.c: Likewise.
* tests/test-xalloc-die.c: Likewise.
* tests/test-xfprintf-posix.c: Likewise.
* tests/test-xmemdup0.c: Likewise.
* tests/test-xprintf-posix.c: Likewise.
* tests/test-xvasprintf.c: Likewise.
* tests/uniname/test-uninames.c: Likewise.
* tests/uninorm/test-u32-nfc-big.c: Likewise.
* tests/uninorm/test-u32-nfd-big.c: Likewise.
* tests/uninorm/test-u32-nfkc-big.c: Likewise.
* tests/uninorm/test-u32-nfkd-big.c: Likewise.
* tests/unistdio/test-u16-vsnprintf1.c: Likewise.
* tests/unistdio/test-u16-vsprintf1.c: Likewise.
* tests/unistdio/test-u32-vsnprintf1.c: Likewise.
* tests/unistdio/test-u32-vsprintf1.c: Likewise.
* tests/unistdio/test-u8-vsnprintf1.c: Likewise.
* tests/unistdio/test-u8-vsprintf1.c: Likewise.
* tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
* tests/unistdio/test-ulc-vsprintf1.c: Likewise.
* tests/test-c-stack.c: (program_name): Do not define.
(main): Do not set program_name.
* tests/test-closein.c: Likewise.
* tests/test-xstrtol.c: Likewise.
* tests/test-yesno.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although this doesn't exactly synchronize with glibc
byte-for-byte, it makes the code behave the same as glibc.
* lib/strverscmp.c (S_I, S_F, S_Z): Now masks, not powers of 2.
(ISDIGIT): Remove, as glibc is sticking with isdigit, and the
difference shouldn't matter in practical use. All uses changed
back to isdigit.
(__strverscmp, strverscmp): Use new glibc method for weak aliases.
(next_state): Now unsigned char array; redo elements.
(result_type): Now signed char array; redo elements.
(__strverscmp): Fix glibc bug 9913 by using new states.
* tests/test-strverscmp.c (main): Test glibc bug 9913.
|
|
|
|
|
|
| |
* tests/test-c-strncasecmp.c: Allow two c_strncasecmp calls
which assume ASCII encoding semantics to run only in ASCII
mode, as they fail in EBCDIC.
|
|
|
|
| |
* tests/test-sigpipe.sh: C, not B.
|
|
|
|
|
|
|
|
| |
* tests/test-nonblocking-reader.h:
* tests/test-nonblocking-writer.h:
Accommodate z/OS errno code preferences. (I believe this should
still be within spec; IBM is good at following the letter if not
the spirit of such things.)
|
|
|
|
|
|
|
| |
* lib/alloca.in.h, lib/fnmatch.c, lib/get-rusage-as.c:
* lib/glob.c, lib/math.in.h, lib/ptsname_r.c:
* tests/infinity.h, tests/nan.h, tests/test-canonicalize-lgpl.c:
* tests/test-nonblocking-pipe.h:
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-iconv-utf.c, tests/test-iconv.c:
Added appropriately conditional #pragmas so that the test strings
in test-iconv-utf.c are correctly interpreted in ASCII instead of
EBCDIC (i.e. 'J' == 0x4A and not 0xD1). This issue could be
addressed in a more portable way by simply rewriting all the ASCII
literal characters as octal escapes, but then you would lose the
partial readability that the strings have now. Also, iconv_open()
on z/OS does not recognize "ISO-8859-1", but "ISO8859-1" works.
|
|
|
|
|
|
| |
* tests/test-c-strcasecmp.c: Include c-ctype.h.
(main) [!C_CTYPE_ASCII]: Skip tests that assume ASCII.
* tests/test-wcwidth.c: Likewise.
|
|
|
|
|
|
|
| |
* tests/init.sh (gl_shell_test_script_): Add a function to
eliminate a shell like "dash" (unlike bash, zsh) that has
surprising/risky "local var='...'" semantics. Inspired by
the problem and discussion in https://bugs.gnu.org/24116#11.
|
|
|
|
|
| |
* tests/test-intprops.c: Ignore -Woverflow if any GCC version,
since the bug is not fixed in GCC 6.1.
|
|
|
|
|
|
|
| |
Problem reported by Young Mo Kang in: http://bugs.gnu.org/23388
* lib/xstrtol.c (__xstrtol): Allow trailing second suffixes like
"B" only if the first suffix needs a base.
* tests/test-xstrtol.sh: Test this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These macros were not portable to every conforming C11 ones'
complement platform. It's not worth the hassle of porting to some
platforms that use ones' complement or signed magnitude, as such
platforms are almost purely theoretical nowadays and porting even
to some of them makes the code harder to review for little
practical benefit. Problem reported by Florian Weimer in:
https://sourceware.org/ml/libc-alpha/2016-04/msg00295.html
* lib/intprops.h (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
(TYPE_SIGNED_MAGNITUDE, _GL_INT_TWOS_COMPLEMENT):
* lib/mktime.c (TYPE_TWOS_COMPLEMENT):
* lib/strtol.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT)
(TYPE_SIGNED_MAGNITUDE):
Remove. All uses rewritten to assume two's complement, which is
all we can reasonably test nowadays anyway.
* top/maint.mk (_intprops_names): Remove the removed macros.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix mbrtowc so that it never returns -1 in the C locale,
as this conflicts with a future version of POSIX
http://austingroupbugs.net/view.php?id=663#c2738
and causes problems with GNU grep: http://bugs.gnu.org/23234
See glibc bug 19932:
https://sourceware.org/bugzilla/show_bug.cgi?id=19932
* doc/posix-functions/mbrlen.texi (mbrlen):
* doc/posix-functions/mbrtowc.texi (mbrtowc):
Document the glibc bug.
* lib/mbrtowc.c [C_LOCALE_MAYBE_EILSEQ]:
Include hard-locale.h, locale.h.
(rpl_mbrtowc): Work around the C_LOCALE_MAYBE_EILSEQ bug,
if the bug is possible.
* m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): New macro.
(gl_FUNC_MBRTOWC): Use it, and define C_LOCALE_MAYBE_EILSEQ as needed.
* modules/hard-locale (License): Now LGPLv2+, for mbrtowc.
* modules/mbrtowc (Depends-on): Add hard-locale.
* modules/mbrtowc-tests (Files, TESTS): Add tests/test-mbrtowc5.sh.
* tests/test-mbrtowc.c (main): Test for bug fix if arg is '5'.
* tests/test-mbrtowc5.sh: New file.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Among other things, this should fix problems found by a Coverity
scan and reported by Andrei Borzenkov:
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00015.html
http://lists.gnu.org/archive/html/bug-gnulib/2016-01/msg00016.html
* lib/argp-ba.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h:
* lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h:
* lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c:
* lib/argp.h:
Merge changes from glibc.
* tests/test-argp-2.sh: Adjust to match new behavior.
|
|
|
|
|
|
|
|
|
|
| |
* tests/init.sh (testdir_prefix_): Output a trailing newline,
since strictly speaking POSIX requires this.
(setup_): Do not use the variable 'fail', as that makes the
trace output harder to read ('fail' is typically used by
tests to mean the test failed). Treat // portably.
Check that new directory is not merely a sibling of the tmp dir.
Avoid unnecessary invocation of tr.
|
|
|
|
|
|
|
|
|
| |
It was a false alarm; I misinterpreted Assaf Gordon's report.
* tests/init.sh (testdir_prefix_, pfx_, template_length_):
Restore.
(test_dir_): Adjust to mktempd_ change.
(mktempd_): Restore 2nd arg. Use -t again.
(base_template_, template_, nx_): Resurrect old code.
|
|
|
|
|
|
|
| |
Its diff implementation does not support -c, but does support -U3.
Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
* tests/init.sh (diff_opt_): New var.
(compare_): Prefer diff -U3 to diff -c to plain diff.
|