diff options
Diffstat (limited to 'tests')
430 files changed, 2240 insertions, 1327 deletions
diff --git a/tests/Makefile.gnulib b/tests/Makefile.gnulib index 118363b..4ad1a41 100644 --- a/tests/Makefile.gnulib +++ b/tests/Makefile.gnulib @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2015 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -98,7 +98,6 @@ EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h TESTS += test-c-ctype check_PROGRAMS += test-c-ctype - EXTRA_DIST += test-c-ctype.c macros.h ## end gnulib module c-ctype-tests @@ -112,6 +111,56 @@ EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros. ## end gnulib module c-strcase-tests +## begin gnulib module ctype + +BUILT_SOURCES += ctype.h + +# We need the following in order to create <ctype.h> when the system +# doesn't have one that works with the given compiler. +ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ + -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ + -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/ctype.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += ctype.h ctype.h-t + +EXTRA_DIST += ctype.in.h + +## end gnulib module ctype + +## begin gnulib module ctype-tests + +TESTS += test-ctype +check_PROGRAMS += test-ctype +EXTRA_DIST += test-ctype.c + +## end gnulib module ctype-tests + +## begin gnulib module dirname-lgpl + +libtests_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c + +EXTRA_DIST += dirname.h + +## end gnulib module dirname-lgpl + +## begin gnulib module dosname + + +EXTRA_DIST += dosname.h + +## end gnulib module dosname + ## begin gnulib module environ-tests TESTS += test-environ @@ -240,6 +289,22 @@ EXTRA_libtests_a_SOURCES += getpagesize.c ## end gnulib module getpagesize +## begin gnulib module getprogname + +libtests_a_SOURCES += getprogname.h getprogname.c + +## end gnulib module getprogname + +## begin gnulib module getprogname-tests + +DEFS += -DEXEEXT=\"@EXEEXT@\" +TESTS += test-getprogname +check_PROGRAMS += test-getprogname +test_getprogname_LDADD = $(LDADD) +EXTRA_DIST += test-getprogname.c + +## end gnulib module getprogname-tests + ## begin gnulib module gettext-h libtests_a_SOURCES += gettext.h @@ -375,6 +440,14 @@ EXTRA_DIST += test-langinfo.c ## end gnulib module langinfo-tests +## begin gnulib module limits-h-tests + +TESTS += test-limits-h +check_PROGRAMS += test-limits-h +EXTRA_DIST += test-limits-h.c + +## end gnulib module limits-h-tests + ## begin gnulib module locale BUILT_SOURCES += locale.h @@ -458,6 +531,7 @@ EXTRA_DIST += test-math.c macros.h TESTS += \ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ + test-mbrtowc5.sh \ test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \ test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh TESTS_ENVIRONMENT += \ @@ -466,8 +540,7 @@ TESTS_ENVIRONMENT += \ LOCALE_JA='@LOCALE_JA@' \ LOCALE_ZH_CN='@LOCALE_ZH_CN@' check_PROGRAMS += test-mbrtowc test-mbrtowc-w32 - -EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h +EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h ## end gnulib module mbrtowc-tests @@ -532,12 +605,6 @@ EXTRA_DIST += test-printf-frexpl.c macros.h ## end gnulib module printf-frexpl-tests -## begin gnulib module progname - -libtests_a_SOURCES += progname.h progname.c - -## end gnulib module progname - ## begin gnulib module putenv @@ -5140,6 +5207,11 @@ EXTRA_DIST += test-unsetenv.c signature.h macros.h TESTS_ENVIRONMENT += MAKE='$(MAKE)' TESTS += test-verify test-verify.sh check_PROGRAMS += test-verify + +# This test expects compilation of test-verify.c to fail, and +# each time it fails, the makefile rule does not perform the usual +# "mv -f $name.Tpo $name.po, so tell make clean to remove that file. +MOSTLYCLEANFILES += .deps/test-verify.Tpo EXTRA_DIST += test-verify.c test-verify.sh ## end gnulib module verify-tests @@ -5208,7 +5280,6 @@ EXTRA_DIST += test-wctype-h.c macros.h TESTS += test-wcwidth check_PROGRAMS += test-wcwidth - EXTRA_DIST += test-wcwidth.c signature.h macros.h ## end gnulib module wcwidth-tests diff --git a/tests/Makefile.in b/tests/Makefile.in index ea30f88..c8f1352 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2015 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -113,20 +113,21 @@ build_triplet = @build@ host_triplet = @host@ TESTS = test-alloca-opt$(EXEEXT) test-array-mergesort$(EXEEXT) \ test-btowc1.sh test-btowc2.sh test-c-ctype$(EXEEXT) \ - test-c-strcase.sh test-environ$(EXEEXT) test-errno$(EXEEXT) \ - test-fdopen$(EXEEXT) test-fgetc$(EXEEXT) test-float$(EXEEXT) \ - test-fputc$(EXEEXT) test-fread$(EXEEXT) \ + test-c-strcase.sh test-ctype$(EXEEXT) test-environ$(EXEEXT) \ + test-errno$(EXEEXT) test-fdopen$(EXEEXT) test-fgetc$(EXEEXT) \ + test-float$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \ test-fseterr$(EXEEXT) test-fwrite$(EXEEXT) \ - test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \ - test-intprops$(EXEEXT) test-inttypes$(EXEEXT) \ - test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ - test-isnanl-nolibm$(EXEEXT) test-iswblank$(EXEEXT) \ - test-langinfo$(EXEEXT) test-locale$(EXEEXT) \ + test-getprogname$(EXEEXT) test-iconv-h$(EXEEXT) \ + test-iconv$(EXEEXT) test-intprops$(EXEEXT) \ + test-inttypes$(EXEEXT) test-isnand-nolibm$(EXEEXT) \ + test-isnanf-nolibm$(EXEEXT) test-isnanl-nolibm$(EXEEXT) \ + test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ + test-limits-h$(EXEEXT) test-locale$(EXEEXT) \ test-localename$(EXEEXT) test-lock$(EXEEXT) \ test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \ test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ - test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ + test-mbrtowc5.sh test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \ test-mbrtowc-w32-5.sh test-mbsinit.sh test-memchr$(EXEEXT) \ test-printf-frexp$(EXEEXT) test-printf-frexpl$(EXEEXT) \ @@ -395,51 +396,53 @@ noinst_PROGRAMS = check_PROGRAMS = test-alloca-opt$(EXEEXT) \ test-array-mergesort$(EXEEXT) test-btowc$(EXEEXT) \ test-c-ctype$(EXEEXT) test-c-strcasecmp$(EXEEXT) \ - test-c-strncasecmp$(EXEEXT) test-environ$(EXEEXT) \ - test-errno$(EXEEXT) test-fdopen$(EXEEXT) test-fgetc$(EXEEXT) \ - test-float$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ - test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \ - test-fseterr$(EXEEXT) test-fwrite$(EXEEXT) \ + test-c-strncasecmp$(EXEEXT) test-ctype$(EXEEXT) \ + test-environ$(EXEEXT) test-errno$(EXEEXT) test-fdopen$(EXEEXT) \ + test-fgetc$(EXEEXT) test-float$(EXEEXT) test-fputc$(EXEEXT) \ + test-fread$(EXEEXT) test-frexp-nolibm$(EXEEXT) \ + test-frexpl-nolibm$(EXEEXT) test-fseterr$(EXEEXT) \ + test-fwrite$(EXEEXT) test-getprogname$(EXEEXT) \ test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \ test-intprops$(EXEEXT) test-inttypes$(EXEEXT) \ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ test-isnanl-nolibm$(EXEEXT) test-iswblank$(EXEEXT) \ - test-langinfo$(EXEEXT) test-locale$(EXEEXT) \ - test-localename$(EXEEXT) test-lock$(EXEEXT) \ - test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc$(EXEEXT) \ - test-mbrtowc-w32$(EXEEXT) test-mbsinit$(EXEEXT) \ - test-memchr$(EXEEXT) test-printf-frexp$(EXEEXT) \ - test-printf-frexpl$(EXEEXT) test-setenv$(EXEEXT) \ - test-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \ - test-signbit$(EXEEXT) test-stdalign$(EXEEXT) \ - test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ - test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ - test-strerror$(EXEEXT) test-striconveh$(EXEEXT) \ - test-striconveha$(EXEEXT) test-string$(EXEEXT) \ - test-strncat$(EXEEXT) test-strstr$(EXEEXT) \ - test-sys_types$(EXEEXT) test-thread_self$(EXEEXT) \ - test-thread_create$(EXEEXT) test-cased$(EXEEXT) \ - test-ignorable$(EXEEXT) test-locale-language$(EXEEXT) \ - test-uc_tolower$(EXEEXT) test-uc_totitle$(EXEEXT) \ - test-uc_toupper$(EXEEXT) test-u16-casecmp$(EXEEXT) \ - test-u16-casecoll$(EXEEXT) test-u16-casefold$(EXEEXT) \ - test-u16-is-cased$(EXEEXT) test-u16-is-casefolded$(EXEEXT) \ - test-u16-is-lowercase$(EXEEXT) test-u16-is-titlecase$(EXEEXT) \ - test-u16-is-uppercase$(EXEEXT) test-u16-tolower$(EXEEXT) \ - test-u16-totitle$(EXEEXT) test-u16-toupper$(EXEEXT) \ - test-u32-casecmp$(EXEEXT) test-u32-casecoll$(EXEEXT) \ - test-u32-casefold$(EXEEXT) test-u32-is-cased$(EXEEXT) \ - test-u32-is-casefolded$(EXEEXT) test-u32-is-lowercase$(EXEEXT) \ - test-u32-is-titlecase$(EXEEXT) test-u32-is-uppercase$(EXEEXT) \ - test-u32-tolower$(EXEEXT) test-u32-totitle$(EXEEXT) \ - test-u32-toupper$(EXEEXT) test-u8-casecmp$(EXEEXT) \ - test-u8-casecoll$(EXEEXT) test-u8-casefold$(EXEEXT) \ - test-u8-is-cased$(EXEEXT) test-u8-is-casefolded$(EXEEXT) \ - test-u8-is-lowercase$(EXEEXT) test-u8-is-titlecase$(EXEEXT) \ - test-u8-is-uppercase$(EXEEXT) test-u8-tolower$(EXEEXT) \ - test-u8-totitle$(EXEEXT) test-u8-toupper$(EXEEXT) \ - test-ulc-casecmp$(EXEEXT) test-ulc-casecoll$(EXEEXT) \ - test-u16-conv-from-enc$(EXEEXT) test-u16-conv-to-enc$(EXEEXT) \ + test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \ + test-locale$(EXEEXT) test-localename$(EXEEXT) \ + test-lock$(EXEEXT) test-malloca$(EXEEXT) test-math$(EXEEXT) \ + test-mbrtowc$(EXEEXT) test-mbrtowc-w32$(EXEEXT) \ + test-mbsinit$(EXEEXT) test-memchr$(EXEEXT) \ + test-printf-frexp$(EXEEXT) test-printf-frexpl$(EXEEXT) \ + test-setenv$(EXEEXT) test-setlocale1$(EXEEXT) \ + test-setlocale2$(EXEEXT) test-signbit$(EXEEXT) \ + test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \ + test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ + test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \ + test-striconveh$(EXEEXT) test-striconveha$(EXEEXT) \ + test-string$(EXEEXT) test-strncat$(EXEEXT) \ + test-strstr$(EXEEXT) test-sys_types$(EXEEXT) \ + test-thread_self$(EXEEXT) test-thread_create$(EXEEXT) \ + test-cased$(EXEEXT) test-ignorable$(EXEEXT) \ + test-locale-language$(EXEEXT) test-uc_tolower$(EXEEXT) \ + test-uc_totitle$(EXEEXT) test-uc_toupper$(EXEEXT) \ + test-u16-casecmp$(EXEEXT) test-u16-casecoll$(EXEEXT) \ + test-u16-casefold$(EXEEXT) test-u16-is-cased$(EXEEXT) \ + test-u16-is-casefolded$(EXEEXT) test-u16-is-lowercase$(EXEEXT) \ + test-u16-is-titlecase$(EXEEXT) test-u16-is-uppercase$(EXEEXT) \ + test-u16-tolower$(EXEEXT) test-u16-totitle$(EXEEXT) \ + test-u16-toupper$(EXEEXT) test-u32-casecmp$(EXEEXT) \ + test-u32-casecoll$(EXEEXT) test-u32-casefold$(EXEEXT) \ + test-u32-is-cased$(EXEEXT) test-u32-is-casefolded$(EXEEXT) \ + test-u32-is-lowercase$(EXEEXT) test-u32-is-titlecase$(EXEEXT) \ + test-u32-is-uppercase$(EXEEXT) test-u32-tolower$(EXEEXT) \ + test-u32-totitle$(EXEEXT) test-u32-toupper$(EXEEXT) \ + test-u8-casecmp$(EXEEXT) test-u8-casecoll$(EXEEXT) \ + test-u8-casefold$(EXEEXT) test-u8-is-cased$(EXEEXT) \ + test-u8-is-casefolded$(EXEEXT) test-u8-is-lowercase$(EXEEXT) \ + test-u8-is-titlecase$(EXEEXT) test-u8-is-uppercase$(EXEEXT) \ + test-u8-tolower$(EXEEXT) test-u8-totitle$(EXEEXT) \ + test-u8-toupper$(EXEEXT) test-ulc-casecmp$(EXEEXT) \ + test-ulc-casecoll$(EXEEXT) test-u16-conv-from-enc$(EXEEXT) \ + test-u16-conv-to-enc$(EXEEXT) \ test-u16-strconv-from-enc$(EXEEXT) \ test-u16-strconv-to-enc$(EXEEXT) \ test-u32-conv-from-enc$(EXEEXT) test-u32-conv-to-enc$(EXEEXT) \ @@ -679,6 +682,9 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib-m4/00gnulib.m4 \ $(top_srcdir)/gnulib-m4/btowc.m4 \ $(top_srcdir)/gnulib-m4/codeset.m4 \ $(top_srcdir)/gnulib-m4/configmake.m4 \ + $(top_srcdir)/gnulib-m4/ctype.m4 \ + $(top_srcdir)/gnulib-m4/dirname.m4 \ + $(top_srcdir)/gnulib-m4/double-slash-root.m4 \ $(top_srcdir)/gnulib-m4/eealloc.m4 \ $(top_srcdir)/gnulib-m4/environ.m4 \ $(top_srcdir)/gnulib-m4/errno_h.m4 \ @@ -690,15 +696,18 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib-m4/00gnulib.m4 \ $(top_srcdir)/gnulib-m4/extern-inline.m4 \ $(top_srcdir)/gnulib-m4/fcntl-o.m4 \ $(top_srcdir)/gnulib-m4/fdopen.m4 \ + $(top_srcdir)/gnulib-m4/flexmember.m4 \ $(top_srcdir)/gnulib-m4/float_h.m4 \ $(top_srcdir)/gnulib-m4/fpieee.m4 \ $(top_srcdir)/gnulib-m4/frexp.m4 \ $(top_srcdir)/gnulib-m4/frexpl.m4 \ $(top_srcdir)/gnulib-m4/fseterr.m4 \ $(top_srcdir)/gnulib-m4/getpagesize.m4 \ + $(top_srcdir)/gnulib-m4/getprogname.m4 \ $(top_srcdir)/gnulib-m4/glibc21.m4 \ $(top_srcdir)/gnulib-m4/gnulib-common.m4 \ $(top_srcdir)/gnulib-m4/gnulib-comp.m4 \ + $(top_srcdir)/gnulib-m4/hard-locale.m4 \ $(top_srcdir)/gnulib-m4/iconv.m4 \ $(top_srcdir)/gnulib-m4/iconv_h.m4 \ $(top_srcdir)/gnulib-m4/iconv_open.m4 \ @@ -720,6 +729,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib-m4/00gnulib.m4 \ $(top_srcdir)/gnulib-m4/lib-link.m4 \ $(top_srcdir)/gnulib-m4/lib-prefix.m4 \ $(top_srcdir)/gnulib-m4/libunistring-base.m4 \ + $(top_srcdir)/gnulib-m4/limits-h.m4 \ $(top_srcdir)/gnulib-m4/localcharset.m4 \ $(top_srcdir)/gnulib-m4/locale-ar.m4 \ $(top_srcdir)/gnulib-m4/locale-fr.m4 \ @@ -807,7 +817,8 @@ am__v_AR_1 = libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp -am_libtests_a_OBJECTS = exitfail.$(OBJEXT) progname.$(OBJEXT) \ +am_libtests_a_OBJECTS = dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \ + stripslash.$(OBJEXT) exitfail.$(OBJEXT) getprogname.$(OBJEXT) \ glthread/thread.$(OBJEXT) xmalloc.$(OBJEXT) \ xalloc-die.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) @@ -1055,6 +1066,11 @@ test_compat_decomposition_DEPENDENCIES = $(am__DEPENDENCIES_2) am_test_composition_OBJECTS = uninorm/test-composition.$(OBJEXT) test_composition_OBJECTS = $(am_test_composition_OBJECTS) test_composition_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_ctype_SOURCES = test-ctype.c +test_ctype_OBJECTS = test-ctype.$(OBJEXT) +test_ctype_LDADD = $(LDADD) +test_ctype_DEPENDENCIES = libtests.a ../lib/libunistring.la libtests.a \ + $(am__DEPENDENCIES_1) am_test_ctype_alnum_OBJECTS = unictype/test-ctype_alnum.$(OBJEXT) test_ctype_alnum_OBJECTS = $(am_test_ctype_alnum_OBJECTS) test_ctype_alnum_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -1160,6 +1176,9 @@ test_fwrite_OBJECTS = test-fwrite.$(OBJEXT) test_fwrite_LDADD = $(LDADD) test_fwrite_DEPENDENCIES = libtests.a ../lib/libunistring.la \ libtests.a $(am__DEPENDENCIES_1) +test_getprogname_SOURCES = test-getprogname.c +test_getprogname_OBJECTS = test-getprogname.$(OBJEXT) +test_getprogname_DEPENDENCIES = $(am__DEPENDENCIES_2) test_iconv_SOURCES = test-iconv.c test_iconv_OBJECTS = test-iconv.$(OBJEXT) test_iconv_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -1237,6 +1256,11 @@ test_langinfo_OBJECTS = test-langinfo.$(OBJEXT) test_langinfo_LDADD = $(LDADD) test_langinfo_DEPENDENCIES = libtests.a ../lib/libunistring.la \ libtests.a $(am__DEPENDENCIES_1) +test_limits_h_SOURCES = test-limits-h.c +test_limits_h_OBJECTS = test-limits-h.$(OBJEXT) +test_limits_h_LDADD = $(LDADD) +test_limits_h_DEPENDENCIES = libtests.a ../lib/libunistring.la \ + libtests.a $(am__DEPENDENCIES_1) test_locale_SOURCES = test-locale.c test_locale_OBJECTS = test-locale.$(OBJEXT) test_locale_LDADD = $(LDADD) @@ -2691,34 +2715,35 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ $(test_combiningclass_longname_SOURCES) \ $(test_combiningclass_name_SOURCES) \ $(test_compat_decomposition_SOURCES) \ - $(test_composition_SOURCES) $(test_ctype_alnum_SOURCES) \ - $(test_ctype_alpha_SOURCES) $(test_ctype_blank_SOURCES) \ - $(test_ctype_cntrl_SOURCES) $(test_ctype_digit_SOURCES) \ - $(test_ctype_graph_SOURCES) $(test_ctype_lower_SOURCES) \ - $(test_ctype_print_SOURCES) $(test_ctype_punct_SOURCES) \ - $(test_ctype_space_SOURCES) $(test_ctype_upper_SOURCES) \ - $(test_ctype_xdigit_SOURCES) $(test_decdigit_SOURCES) \ - $(test_decomposing_form_SOURCES) $(test_decomposition_SOURCES) \ - $(test_digit_SOURCES) test-environ.c test-errno.c \ - test-fdopen.c test-fgetc.c test-float.c test-fputc.c \ - test-fread.c $(test_frexp_nolibm_SOURCES) \ - $(test_frexpl_nolibm_SOURCES) test-fseterr.c test-fwrite.c \ - test-iconv.c test-iconv-h.c $(test_ignorable_SOURCES) \ - test-intprops.c test-inttypes.c test-isnand-nolibm.c \ - test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ + $(test_composition_SOURCES) test-ctype.c \ + $(test_ctype_alnum_SOURCES) $(test_ctype_alpha_SOURCES) \ + $(test_ctype_blank_SOURCES) $(test_ctype_cntrl_SOURCES) \ + $(test_ctype_digit_SOURCES) $(test_ctype_graph_SOURCES) \ + $(test_ctype_lower_SOURCES) $(test_ctype_print_SOURCES) \ + $(test_ctype_punct_SOURCES) $(test_ctype_space_SOURCES) \ + $(test_ctype_upper_SOURCES) $(test_ctype_xdigit_SOURCES) \ + $(test_decdigit_SOURCES) $(test_decomposing_form_SOURCES) \ + $(test_decomposition_SOURCES) $(test_digit_SOURCES) \ + test-environ.c test-errno.c test-fdopen.c test-fgetc.c \ + test-float.c test-fputc.c test-fread.c \ + $(test_frexp_nolibm_SOURCES) $(test_frexpl_nolibm_SOURCES) \ + test-fseterr.c test-fwrite.c test-getprogname.c test-iconv.c \ + test-iconv-h.c $(test_ignorable_SOURCES) test-intprops.c \ + test-inttypes.c test-isnand-nolibm.c test-isnanf-nolibm.c \ + test-isnanl-nolibm.c test-iswblank.c \ $(test_joininggroup_byname_SOURCES) \ $(test_joininggroup_name_SOURCES) \ $(test_joininggroup_of_SOURCES) \ $(test_joiningtype_byname_SOURCES) \ $(test_joiningtype_longname_SOURCES) \ $(test_joiningtype_name_SOURCES) \ - $(test_joiningtype_of_SOURCES) test-langinfo.c test-locale.c \ - $(test_locale_language_SOURCES) test-localename.c test-lock.c \ - test-malloca.c test-math.c test-mbrtowc.c test-mbrtowc-w32.c \ - test-mbsinit.c test-memchr.c $(test_mirror_SOURCES) \ - $(test_nfc_SOURCES) $(test_nfd_SOURCES) $(test_nfkc_SOURCES) \ - $(test_nfkd_SOURCES) $(test_numeric_SOURCES) \ - $(test_pr_alphabetic_SOURCES) \ + $(test_joiningtype_of_SOURCES) test-langinfo.c test-limits-h.c \ + test-locale.c $(test_locale_language_SOURCES) \ + test-localename.c test-lock.c test-malloca.c test-math.c \ + test-mbrtowc.c test-mbrtowc-w32.c test-mbsinit.c test-memchr.c \ + $(test_mirror_SOURCES) $(test_nfc_SOURCES) $(test_nfd_SOURCES) \ + $(test_nfkc_SOURCES) $(test_nfkd_SOURCES) \ + $(test_numeric_SOURCES) $(test_pr_alphabetic_SOURCES) \ $(test_pr_ascii_hex_digit_SOURCES) \ $(test_pr_bidi_arabic_digit_SOURCES) \ $(test_pr_bidi_arabic_right_to_left_SOURCES) \ @@ -2969,34 +2994,35 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ $(test_combiningclass_longname_SOURCES) \ $(test_combiningclass_name_SOURCES) \ $(test_compat_decomposition_SOURCES) \ - $(test_composition_SOURCES) $(test_ctype_alnum_SOURCES) \ - $(test_ctype_alpha_SOURCES) $(test_ctype_blank_SOURCES) \ - $(test_ctype_cntrl_SOURCES) $(test_ctype_digit_SOURCES) \ - $(test_ctype_graph_SOURCES) $(test_ctype_lower_SOURCES) \ - $(test_ctype_print_SOURCES) $(test_ctype_punct_SOURCES) \ - $(test_ctype_space_SOURCES) $(test_ctype_upper_SOURCES) \ - $(test_ctype_xdigit_SOURCES) $(test_decdigit_SOURCES) \ - $(test_decomposing_form_SOURCES) $(test_decomposition_SOURCES) \ - $(test_digit_SOURCES) test-environ.c test-errno.c \ - test-fdopen.c test-fgetc.c test-float.c test-fputc.c \ - test-fread.c $(test_frexp_nolibm_SOURCES) \ - $(test_frexpl_nolibm_SOURCES) test-fseterr.c test-fwrite.c \ - test-iconv.c test-iconv-h.c $(test_ignorable_SOURCES) \ - test-intprops.c test-inttypes.c test-isnand-nolibm.c \ - test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ + $(test_composition_SOURCES) test-ctype.c \ + $(test_ctype_alnum_SOURCES) $(test_ctype_alpha_SOURCES) \ + $(test_ctype_blank_SOURCES) $(test_ctype_cntrl_SOURCES) \ + $(test_ctype_digit_SOURCES) $(test_ctype_graph_SOURCES) \ + $(test_ctype_lower_SOURCES) $(test_ctype_print_SOURCES) \ + $(test_ctype_punct_SOURCES) $(test_ctype_space_SOURCES) \ + $(test_ctype_upper_SOURCES) $(test_ctype_xdigit_SOURCES) \ + $(test_decdigit_SOURCES) $(test_decomposing_form_SOURCES) \ + $(test_decomposition_SOURCES) $(test_digit_SOURCES) \ + test-environ.c test-errno.c test-fdopen.c test-fgetc.c \ + test-float.c test-fputc.c test-fread.c \ + $(test_frexp_nolibm_SOURCES) $(test_frexpl_nolibm_SOURCES) \ + test-fseterr.c test-fwrite.c test-getprogname.c test-iconv.c \ + test-iconv-h.c $(test_ignorable_SOURCES) test-intprops.c \ + test-inttypes.c test-isnand-nolibm.c test-isnanf-nolibm.c \ + test-isnanl-nolibm.c test-iswblank.c \ $(test_joininggroup_byname_SOURCES) \ $(test_joininggroup_name_SOURCES) \ $(test_joininggroup_of_SOURCES) \ $(test_joiningtype_byname_SOURCES) \ $(test_joiningtype_longname_SOURCES) \ $(test_joiningtype_name_SOURCES) \ - $(test_joiningtype_of_SOURCES) test-langinfo.c test-locale.c \ - $(test_locale_language_SOURCES) test-localename.c test-lock.c \ - test-malloca.c test-math.c test-mbrtowc.c test-mbrtowc-w32.c \ - test-mbsinit.c test-memchr.c $(test_mirror_SOURCES) \ - $(test_nfc_SOURCES) $(test_nfd_SOURCES) $(test_nfkc_SOURCES) \ - $(test_nfkd_SOURCES) $(test_numeric_SOURCES) \ - $(test_pr_alphabetic_SOURCES) \ + $(test_joiningtype_of_SOURCES) test-langinfo.c test-limits-h.c \ + test-locale.c $(test_locale_language_SOURCES) \ + test-localename.c test-lock.c test-malloca.c test-math.c \ + test-mbrtowc.c test-mbrtowc-w32.c test-mbsinit.c test-memchr.c \ + $(test_mirror_SOURCES) $(test_nfc_SOURCES) $(test_nfd_SOURCES) \ + $(test_nfkc_SOURCES) $(test_nfkd_SOURCES) \ + $(test_numeric_SOURCES) $(test_pr_alphabetic_SOURCES) \ $(test_pr_ascii_hex_digit_SOURCES) \ $(test_pr_bidi_arabic_digit_SOURCES) \ $(test_pr_bidi_arabic_right_to_left_SOURCES) \ @@ -3510,7 +3536,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ +DEFS = @DEFS@ -DEXEEXT=\"@EXEEXT@\" DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DLL_VARIABLE = @DLL_VARIABLE@ @@ -3642,6 +3668,7 @@ GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ GNULIB_ISATTY = @GNULIB_ISATTY@ +GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ GNULIB_ISNAN = @GNULIB_ISNAN@ @@ -3862,6 +3889,7 @@ HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_BTOWC = @HAVE_BTOWC@ +HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CBRT = @HAVE_CBRT@ HAVE_CBRTF = @HAVE_CBRTF@ @@ -3985,6 +4013,7 @@ HAVE_ILOGB = @HAVE_ILOGB@ HAVE_ILOGBF = @HAVE_ILOGBF@ HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ HAVE_ISNANL = @HAVE_ISNANL@ @@ -4038,6 +4067,7 @@ HAVE_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_QSORT_R = @HAVE_QSORT_R@ HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ @@ -4171,6 +4201,7 @@ LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWBRK_H = @LIBUNISTRING_UNIWBRK_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIMITS_H = @LIMITS_H@ LIPO = @LIPO@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ @@ -4190,11 +4221,13 @@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NAMESPACING = @NAMESPACING@ +NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ +NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ @@ -4206,11 +4239,13 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ +NEXT_CTYPE_H = @NEXT_CTYPE_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ NEXT_ICONV_H = @NEXT_ICONV_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ +NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ @@ -4545,32 +4580,33 @@ check_LIBRARIES = libtests.a EXTRA_DIST = test-alloca-opt.c test-array-mergesort.c macros.h btowc.c \ test-btowc1.sh test-btowc2.sh test-btowc.c signature.h \ macros.h test-c-ctype.c macros.h test-c-strcase.sh \ - test-c-strcasecmp.c test-c-strncasecmp.c macros.h \ - test-environ.c test-errno.c error.c error.h exitfail.h \ - fdopen.c test-fdopen.c signature.h macros.h test-fgetc.c \ - signature.h macros.h test-float.c macros.h test-fputc.c \ - signature.h macros.h test-fread.c signature.h macros.h \ - test-frexp.c test-frexp.h minus-zero.h infinity.h nan.h \ - signature.h macros.h randomd.c test-frexpl.c test-frexp.h \ - minus-zero.h infinity.h nan.h signature.h macros.h randoml.c \ - test-fseterr.c test-fwrite.c signature.h macros.h \ - getpagesize.c test-iconv-h.c test-iconv.c signature.h macros.h \ - intprops.h test-intprops.c macros.h inttypes.in.h \ - test-inttypes.c test-isnand-nolibm.c test-isnand.h \ - minus-zero.h infinity.h nan.h macros.h test-isnanf-nolibm.c \ - test-isnanf.h minus-zero.h infinity.h nan.h macros.h \ - test-isnanl-nolibm.c test-isnanl.h minus-zero.h infinity.h \ - nan.h macros.h test-iswblank.c macros.h test-langinfo.c \ - locale.in.h test-locale.c test-localename.c macros.h \ - test-lock.c test-malloca.c test-math.c macros.h \ - test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \ - test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh \ - test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \ - test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c \ - signature.h macros.h test-mbsinit.sh test-mbsinit.c \ - signature.h macros.h mbtowc-impl.h mbtowc.c test-memchr.c \ - zerosize-ptr.h signature.h macros.h msvc-inval.c msvc-inval.h \ - msvc-nothrow.c msvc-nothrow.h test-printf-frexp.c macros.h \ + test-c-strcasecmp.c test-c-strncasecmp.c macros.h ctype.in.h \ + test-ctype.c dirname.h dosname.h test-environ.c test-errno.c \ + error.c error.h exitfail.h fdopen.c test-fdopen.c signature.h \ + macros.h test-fgetc.c signature.h macros.h test-float.c \ + macros.h test-fputc.c signature.h macros.h test-fread.c \ + signature.h macros.h test-frexp.c test-frexp.h minus-zero.h \ + infinity.h nan.h signature.h macros.h randomd.c test-frexpl.c \ + test-frexp.h minus-zero.h infinity.h nan.h signature.h \ + macros.h randoml.c test-fseterr.c test-fwrite.c signature.h \ + macros.h getpagesize.c test-getprogname.c test-iconv-h.c \ + test-iconv.c signature.h macros.h intprops.h test-intprops.c \ + macros.h inttypes.in.h test-inttypes.c test-isnand-nolibm.c \ + test-isnand.h minus-zero.h infinity.h nan.h macros.h \ + test-isnanf-nolibm.c test-isnanf.h minus-zero.h infinity.h \ + nan.h macros.h test-isnanl-nolibm.c test-isnanl.h minus-zero.h \ + infinity.h nan.h macros.h test-iswblank.c macros.h \ + test-langinfo.c test-limits-h.c locale.in.h test-locale.c \ + test-localename.c macros.h test-lock.c test-malloca.c \ + test-math.c macros.h test-mbrtowc1.sh test-mbrtowc2.sh \ + test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh \ + test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ + test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \ + test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \ + test-mbsinit.sh test-mbsinit.c signature.h macros.h \ + mbtowc-impl.h mbtowc.c test-memchr.c zerosize-ptr.h \ + signature.h macros.h msvc-inval.c msvc-inval.h msvc-nothrow.c \ + msvc-nothrow.h test-printf-frexp.c macros.h \ test-printf-frexpl.c macros.h putenv.c setenv.c test-setenv.c \ signature.h macros.h setlocale.c test-setlocale1.sh \ test-setlocale1.c test-setlocale2.sh test-setlocale2.c \ @@ -5259,13 +5295,18 @@ EXTRA_DIST = test-alloca-opt.c test-array-mergesort.c macros.h btowc.c \ # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. -BUILT_SOURCES = inttypes.h locale.h arg-nonnull.h c++defs.h \ +BUILT_SOURCES = ctype.h inttypes.h locale.h arg-nonnull.h c++defs.h \ unused-parameter.h warn-on-use.h $(STDALIGN_H) stdio.h SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump inttypes.h inttypes.h-t locale.h \ - locale.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ - unused-parameter.h unused-parameter.h-t warn-on-use.h \ - warn-on-use.h-t stdalign.h stdalign.h-t stdio.h stdio.h-t + +# This test expects compilation of test-verify.c to fail, and +# each time it fails, the makefile rule does not perform the usual +# "mv -f $name.Tpo $name.po, so tell make clean to remove that file. +MOSTLYCLEANFILES = core *.stackdump ctype.h ctype.h-t inttypes.h \ + inttypes.h-t locale.h locale.h-t arg-nonnull.h arg-nonnull.h-t \ + c++defs.h c++defs.h-t unused-parameter.h unused-parameter.h-t \ + warn-on-use.h warn-on-use.h-t stdalign.h stdalign.h-t stdio.h \ + stdio.h-t .deps/test-verify.Tpo MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = @@ -5277,7 +5318,8 @@ AM_CPPFLAGS = \ -I../lib -I$(srcdir)/../lib LDADD = libtests.a ../lib/libunistring.la libtests.a $(LIBTESTS_LIBDEPS) -libtests_a_SOURCES = exitfail.c gettext.h progname.h progname.c \ +libtests_a_SOURCES = dirname-lgpl.c basename-lgpl.c stripslash.c \ + exitfail.c getprogname.h getprogname.c gettext.h \ glthread/thread.h glthread/thread.c xmalloc.c xalloc-die.c \ glthread/yield.h libtests_a_LIBADD = $(gltests_LIBOBJS) @@ -5289,6 +5331,7 @@ EXTRA_libtests_a_SOURCES = btowc.c error.c fdopen.c getpagesize.c \ AM_LIBTOOLFLAGS = --preserve-dup-deps test_frexp_nolibm_SOURCES = test-frexp.c randomd.c test_frexpl_nolibm_SOURCES = test-frexpl.c randoml.c +test_getprogname_LDADD = $(LDADD) test_iconv_LDADD = $(LDADD) @LIBICONV@ test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ @@ -6670,6 +6713,10 @@ uninorm/test-composition.$(OBJEXT): uninorm/$(am__dirstamp) \ test-composition$(EXEEXT): $(test_composition_OBJECTS) $(test_composition_DEPENDENCIES) $(EXTRA_test_composition_DEPENDENCIES) @rm -f test-composition$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_composition_OBJECTS) $(test_composition_LDADD) $(LIBS) + +test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) $(EXTRA_test_ctype_DEPENDENCIES) + @rm -f test-ctype$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_ctype_OBJECTS) $(test_ctype_LDADD) $(LIBS) unictype/test-ctype_alnum.$(OBJEXT): unictype/$(am__dirstamp) \ unictype/$(DEPDIR)/$(am__dirstamp) @@ -6811,6 +6858,10 @@ test-fwrite$(EXEEXT): $(test_fwrite_OBJECTS) $(test_fwrite_DEPENDENCIES) $(EXTRA @rm -f test-fwrite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_fwrite_OBJECTS) $(test_fwrite_LDADD) $(LIBS) +test-getprogname$(EXEEXT): $(test_getprogname_OBJECTS) $(test_getprogname_DEPENDENCIES) $(EXTRA_test_getprogname_DEPENDENCIES) + @rm -f test-getprogname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_getprogname_OBJECTS) $(test_getprogname_LDADD) $(LIBS) + test-iconv$(EXEEXT): $(test_iconv_OBJECTS) $(test_iconv_DEPENDENCIES) $(EXTRA_test_iconv_DEPENDENCIES) @rm -f test-iconv$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_iconv_OBJECTS) $(test_iconv_LDADD) $(LIBS) @@ -6895,6 +6946,10 @@ test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $ @rm -f test-langinfo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS) +test-limits-h$(EXEEXT): $(test_limits_h_OBJECTS) $(test_limits_h_DEPENDENCIES) $(EXTRA_test_limits_h_DEPENDENCIES) + @rm -f test-limits-h$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_limits_h_OBJECTS) $(test_limits_h_LDADD) $(LIBS) + test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) $(EXTRA_test_locale_DEPENDENCIES) @rm -f test-locale$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS) @@ -9111,15 +9166,17 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randomd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randoml.Po@am__quote@ @@ -9127,12 +9184,14 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-array-mergesort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopen.Po@am__quote@ @@ -9144,6 +9203,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseterr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fwrite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getprogname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv-h.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@ @@ -9153,6 +9213,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanl-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswblank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lock.Po@am__quote@ @@ -9940,6 +10001,13 @@ test-c-strcase.sh.log: test-c-strcase.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-ctype.log: test-ctype$(EXEEXT) + @p='test-ctype$(EXEEXT)'; \ + b='test-ctype'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-environ.log: test-environ$(EXEEXT) @p='test-environ$(EXEEXT)'; \ b='test-environ'; \ @@ -10017,6 +10085,13 @@ test-fwrite.log: test-fwrite$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-getprogname.log: test-getprogname$(EXEEXT) + @p='test-getprogname$(EXEEXT)'; \ + b='test-getprogname'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-iconv-h.log: test-iconv-h$(EXEEXT) @p='test-iconv-h$(EXEEXT)'; \ b='test-iconv-h'; \ @@ -10080,6 +10155,13 @@ test-langinfo.log: test-langinfo$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-limits-h.log: test-limits-h$(EXEEXT) + @p='test-limits-h$(EXEEXT)'; \ + b='test-limits-h'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-locale.log: test-locale$(EXEEXT) @p='test-locale$(EXEEXT)'; \ b='test-locale'; \ @@ -10143,6 +10225,13 @@ test-mbrtowc4.sh.log: test-mbrtowc4.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-mbrtowc5.sh.log: test-mbrtowc5.sh + @p='test-mbrtowc5.sh'; \ + b='test-mbrtowc5.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-1.sh.log: test-mbrtowc-w32-1.sh @p='test-mbrtowc-w32-1.sh'; \ b='test-mbrtowc-w32-1.sh'; \ @@ -13598,6 +13687,24 @@ uninstall-am: .PRECIOUS: Makefile +# We need the following in order to create <ctype.h> when the system +# doesn't have one that works with the given compiler. +ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ + -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ + -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/ctype.in.h; \ + } > $@-t && \ + mv $@-t $@ + # We need the following in order to create <inttypes.h> when the system # doesn't have one that works with the given compiler. inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) diff --git a/tests/basename-lgpl.c b/tests/basename-lgpl.c new file mode 100644 index 0000000..1182109 --- /dev/null +++ b/tests/basename-lgpl.c @@ -0,0 +1,75 @@ +/* basename.c -- return the last element in a file name + + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +#include "dirname.h" + +#include <string.h> + +/* Return the address of the last file name component of NAME. If + NAME has no relative file name components because it is a file + system root, return the empty string. */ + +char * +last_component (char const *name) +{ + char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); + char const *p; + bool saw_slash = false; + + while (ISSLASH (*base)) + base++; + + for (p = base; *p; p++) + { + if (ISSLASH (*p)) + saw_slash = true; + else if (saw_slash) + { + base = p; + saw_slash = false; + } + } + + return (char *) base; +} + +/* Return the length of the basename NAME. Typically NAME is the + value returned by base_name or last_component. Act like strlen + (NAME), except omit all trailing slashes. */ + +size_t +base_len (char const *name) +{ + size_t len; + size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); + + for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) + continue; + + if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 + && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) + return 2; + + if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len + && len == prefix_len && ISSLASH (name[prefix_len])) + return prefix_len + 1; + + return len; +} diff --git a/tests/btowc.c b/tests/btowc.c index 2e32dee..e7badf9 100644 --- a/tests/btowc.c +++ b/tests/btowc.c @@ -1,5 +1,5 @@ /* Convert unibyte character to wide character. - Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. This program is free software: you can redistribute it and/or modify diff --git a/tests/ctype.in.h b/tests/ctype.in.h new file mode 100644 index 0000000..217812d --- /dev/null +++ b/tests/ctype.in.h @@ -0,0 +1,57 @@ +/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete. + + Copyright (C) 2009-2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible. */ + +/* + * ISO C 99 <ctype.h> for platforms on which it is incomplete. + * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html> + */ + +#ifndef _@GUARD_PREFIX@_CTYPE_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Include the original <ctype.h>. */ +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_CTYPE_H@ + +#ifndef _@GUARD_PREFIX@_CTYPE_H +#define _@GUARD_PREFIX@_CTYPE_H + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Return non-zero if c is a blank, i.e. a space or tab character. */ +#if @GNULIB_ISBLANK@ +# if !@HAVE_ISBLANK@ +_GL_EXTERN_C int isblank (int c); +# endif +#elif defined GNULIB_POSIXCHECK +# undef isblank +# if HAVE_RAW_DECL_ISBLANK +_GL_WARN_ON_USE (isblank, "isblank is unportable - " + "use gnulib module isblank for portability"); +# endif +#endif + +#endif /* _@GUARD_PREFIX@_CTYPE_H */ +#endif /* _@GUARD_PREFIX@_CTYPE_H */ diff --git a/tests/dirname-lgpl.c b/tests/dirname-lgpl.c new file mode 100644 index 0000000..a7aabf9 --- /dev/null +++ b/tests/dirname-lgpl.c @@ -0,0 +1,86 @@ +/* dirname.c -- return all but the last element in a file name + + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +#include "dirname.h" + +#include <stdlib.h> +#include <string.h> + +/* Return the length of the prefix of FILE that will be used by + dir_name. If FILE is in the working directory, this returns zero + even though 'dir_name (FILE)' will return ".". Works properly even + if there are trailing slashes (by effectively ignoring them). */ + +size_t +dir_len (char const *file) +{ + size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); + size_t length; + + /* Advance prefix_length beyond important leading slashes. */ + prefix_length += (prefix_length != 0 + ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE + && ISSLASH (file[prefix_length])) + : (ISSLASH (file[0]) + ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT + && ISSLASH (file[1]) && ! ISSLASH (file[2]) + ? 2 : 1)) + : 0)); + + /* Strip the basename and any redundant slashes before it. */ + for (length = last_component (file) - file; + prefix_length < length; length--) + if (! ISSLASH (file[length - 1])) + break; + return length; +} + + +/* In general, we can't use the builtin 'dirname' function if available, + since it has different meanings in different environments. + In some environments the builtin 'dirname' modifies its argument. + + Return the leading directories part of FILE, allocated with malloc. + Works properly even if there are trailing slashes (by effectively + ignoring them). Return NULL on failure. + + If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); + lstat (base_name (FILE)); } will access the same file. Likewise, + if the sequence { chdir (dir_name (FILE)); + rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE + to "foo" in the same directory FILE was in. */ + +char * +mdir_name (char const *file) +{ + size_t length = dir_len (file); + bool append_dot = (length == 0 + || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE + && length == FILE_SYSTEM_PREFIX_LEN (file) + && file[2] != '\0' && ! ISSLASH (file[2]))); + char *dir = malloc (length + append_dot + 1); + if (!dir) + return NULL; + memcpy (dir, file, length); + if (append_dot) + dir[length++] = '.'; + dir[length] = '\0'; + return dir; +} diff --git a/tests/dirname.h b/tests/dirname.h new file mode 100644 index 0000000..875b31b --- /dev/null +++ b/tests/dirname.h @@ -0,0 +1,54 @@ +/* Take file names apart into directory and base names. + + Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef DIRNAME_H_ +# define DIRNAME_H_ 1 + +# include <stdbool.h> +# include <stddef.h> +# include "dosname.h" + +# ifndef DIRECTORY_SEPARATOR +# define DIRECTORY_SEPARATOR '/' +# endif + +# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT +# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 +# endif + +#ifdef __cplusplus +extern "C" { +#endif + +# if GNULIB_DIRNAME +char *base_name (char const *file); +char *dir_name (char const *file); +# endif + +char *mdir_name (char const *file); +size_t base_len (char const *file) _GL_ATTRIBUTE_PURE; +size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; +char *last_component (char const *file) _GL_ATTRIBUTE_PURE; + +bool strip_trailing_slashes (char *file); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* not DIRNAME_H_ */ diff --git a/tests/dosname.h b/tests/dosname.h new file mode 100644 index 0000000..83a953f --- /dev/null +++ b/tests/dosname.h @@ -0,0 +1,53 @@ +/* File names on MS-DOS/Windows systems. + + Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + From Paul Eggert and Jim Meyering. */ + +#ifndef _DOSNAME_H +#define _DOSNAME_H + +#if (defined _WIN32 || defined __WIN32__ || \ + defined __MSDOS__ || defined __CYGWIN__ || \ + defined __EMX__ || defined __DJGPP__) + /* This internal macro assumes ASCII, but all hosts that support drive + letters use ASCII. */ +# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ + <= 'z' - 'a') +# define FILE_SYSTEM_PREFIX_LEN(Filename) \ + (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) +# ifndef __CYGWIN__ +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 +# endif +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +#else +# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 +# define ISSLASH(C) ((C) == '/') +#endif + +#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 +#endif + +#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE +# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) +# else +# define IS_ABSOLUTE_FILE_NAME(F) \ + (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) +#endif +#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) + +#endif /* DOSNAME_H_ */ diff --git a/tests/error.c b/tests/error.c index 0ac7695..b3b1286 100644 --- a/tests/error.c +++ b/tests/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2007, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -42,6 +42,8 @@ # define USE_UNLOCKED_IO 0 # define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b) # define _GL_ARG_NONNULL(a) +#else +# include "getprogname.h" #endif #if USE_UNLOCKED_IO @@ -113,9 +115,7 @@ int strerror_r (); # endif # endif -/* The calling program should define program_name and set it to the - name of the executing program. */ -extern char *program_name; +#define program_name getprogname () # if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r diff --git a/tests/error.h b/tests/error.h index eb4fb70..6a69db0 100644 --- a/tests/error.h +++ b/tests/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995-1997, 2003, 2006, 2008-2015 Free Software Foundation, + Copyright (C) 1995-1997, 2003, 2006, 2008-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/tests/exitfail.c b/tests/exitfail.c index 8035b89..8033c22 100644 --- a/tests/exitfail.c +++ b/tests/exitfail.c @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/exitfail.h b/tests/exitfail.h index 62d0ac5..62311bd 100644 --- a/tests/exitfail.h +++ b/tests/exitfail.h @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/fdopen.c b/tests/fdopen.c index b72c0e8..61fbfdf 100644 --- a/tests/fdopen.c +++ b/tests/fdopen.c @@ -1,5 +1,5 @@ /* Open a stream with a given file descriptor. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/getpagesize.c b/tests/getpagesize.c index 10e9c18..dc4a200 100644 --- a/tests/getpagesize.c +++ b/tests/getpagesize.c @@ -1,6 +1,6 @@ /* getpagesize emulation for systems where it cannot be done in a C macro. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/getprogname.c b/tests/getprogname.c new file mode 100644 index 0000000..a7246e9 --- /dev/null +++ b/tests/getprogname.c @@ -0,0 +1,151 @@ +/* Program name management. + Copyright (C) 2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +/* Specification. */ +#include "getprogname.h" + +#include <errno.h> /* get program_invocation_name declaration */ +#include <stdlib.h> /* get __argv declaration */ + +#ifdef _AIX +# include <unistd.h> +# include <procinfo.h> +# include <string.h> +#endif + +#ifdef __MVS__ +# ifndef _OPEN_SYS +# define _OPEN_SYS +# endif +# include <string.h> +# include <sys/ps.h> +#endif + +#ifdef __hpux +# include <unistd.h> +# include <sys/param.h> +# include <sys/pstat.h> +# include <string.h> +#endif + +#include "dirname.h" + +#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */ +char const * +getprogname (void) +{ +# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* glibc, BeOS */ + /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ + return program_invocation_short_name; +# elif HAVE_DECL_PROGRAM_INVOCATION_NAME /* glibc, BeOS */ + /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ + return last_component (program_invocation_name); +# elif HAVE_GETEXECNAME /* Solaris */ + /* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */ + const char *p = getexecname (); + if (!p) + p = "?"; + return last_component (p); +# elif HAVE_DECL___ARGV /* mingw, MSVC */ + /* https://msdn.microsoft.com/en-us/library/dn727674.aspx */ + const char *p = __argv && __argv[0] ? __argv[0] : "?"; + return last_component (p); +# elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */ + /* http://man.openbsd.org/style.9 */ + /* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */ + /* Be careful to declare this only when we absolutely need it + (OpenBSD 5.1), rather than when it's available. Otherwise, + its mere declaration makes program_invocation_short_name + malfunction (have zero length) with Fedora 25's glibc. */ + extern char *__progname; + const char *p = __progname; + return p && p[0] ? p : "?"; +# elif _AIX /* AIX */ + /* Idea by Bastien ROUCARIÈS, + http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00095.html + Reference: http:// + ibm.biz/knowctr#ssw_aix_53/com.ibm.aix.basetechref/doc/basetrf1/getprocs.htm + */ + static char *p; + static int first = 1; + if (first) + { + first = 0; + pid_t pid = getpid (); + struct procentry64 procs; + p = (0 < getprocs64 (&procs, sizeof procs, NULL, 0, &pid, 1) + ? strdup (procs.pi_comm) + : NULL); + if (!p) + p = "?"; + } + return p; +# elif defined __hpux + static char *p; + static int first = 1; + if (first) + { + first = 0; + pid_t pid = getpid (); + struct pst_status status; + p = (0 < pstat_getproc (&status, sizeof status, 0, pid) + ? strdup (status.pst_ucomm) + : NULL); + if (!p) + p = "?"; + } + return p; +# elif __MVS__ /* z/OS */ + /* https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/rtwgetp.htm */ + static char *p = "?"; + static int first = 1; + if (first) + { + pid_t pid = getpid (); + int token; + W_PSPROC buf; + first = 0; + memset (&buf, 0, sizeof(buf)); + buf.ps_cmdptr = (char *) malloc (buf.ps_cmdlen = PS_CMDBLEN_LONG); + buf.ps_conttyptr = (char *) malloc (buf.ps_conttylen = PS_CONTTYBLEN); + buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN); + if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr) + { + for (token = 0; token >= 0; + token = w_getpsent (token, &buf, sizeof(buf))) + { + if (token > 0 && buf.ps_pid == pid) + { + char *s = strdup (last_component (buf.ps_pathptr)); + if (s) + p = s; + break; + } + } + } + free (buf.ps_cmdptr); + free (buf.ps_conttyptr); + free (buf.ps_pathptr); + } + return p; +# else +# error "getprogname module not ported to this OS" +# endif +} + +#endif diff --git a/tests/getprogname.h b/tests/getprogname.h new file mode 100644 index 0000000..e8f9e97 --- /dev/null +++ b/tests/getprogname.h @@ -0,0 +1,40 @@ +/* Program name management. + Copyright (C) 2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _GL_GETPROGNAME_H +#define _GL_GETPROGNAME_H + +#include <stdlib.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +#ifndef HAVE_GETPROGNAME +extern char const *getprogname (void) +# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME + _GL_ATTRIBUTE_PURE +# endif + ; +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/tests/gettext.h b/tests/gettext.h index 599a14e..9a232cc 100644 --- a/tests/gettext.h +++ b/tests/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2015 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -225,15 +225,17 @@ dcpgettext_expr (const char *domain, if (msg_ctxt_id != NULL) #endif { + int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); + found_translation = (translation != msg_ctxt_id); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif - if (translation != msg_ctxt_id) + if (found_translation) return translation; } return msgid; @@ -271,15 +273,17 @@ dcnpgettext_expr (const char *domain, if (msg_ctxt_id != NULL) #endif { + int found_translation; memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif - if (!(translation == msg_ctxt_id || translation == msgid_plural)) + if (found_translation) return translation; } return (n == 1 ? msgid : msgid_plural); diff --git a/tests/glthread/thread.c b/tests/glthread/thread.c index d3829ce..8f2a8e2 100644 --- a/tests/glthread/thread.c +++ b/tests/glthread/thread.c @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ #include <pthread.h> -#ifdef PTW32_VERSION +#if defined PTW32_VERSION || defined __MVS__ const gl_thread_t gl_null_thread /* = { .p = NULL } */; diff --git a/tests/glthread/thread.h b/tests/glthread/thread.h index 2817437..4488a9e 100644 --- a/tests/glthread/thread.h +++ b/tests/glthread/thread.h @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -172,6 +172,15 @@ typedef pthread_t gl_thread_t; # define gl_thread_self_pointer() \ (pthread_in_use () ? pthread_self ().p : NULL) extern const gl_thread_t gl_null_thread; +# elif defined __MVS__ + /* On IBM z/OS, pthread_t is a struct with an 8-byte '__' field. + The first three bytes of this field appear to uniquely identify a + pthread_t, though not necessarily representing a pointer. */ +# define gl_thread_self() \ + (pthread_in_use () ? pthread_self () : gl_null_thread) +# define gl_thread_self_pointer() \ + (pthread_in_use () ? *((void **) pthread_self ().__) : NULL) +extern const gl_thread_t gl_null_thread; # else # define gl_thread_self() \ (pthread_in_use () ? pthread_self () : (pthread_t) NULL) diff --git a/tests/glthread/yield.h b/tests/glthread/yield.h index b18db5b..19224c6 100644 --- a/tests/glthread/yield.h +++ b/tests/glthread/yield.h @@ -1,5 +1,5 @@ /* Yielding the processor to other threads and processes. - Copyright (C) 2005-2015 Free Software Foundation, Inc. + Copyright (C) 2005-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/infinity.h b/tests/infinity.h index 45c30bd..9cf8d00 100644 --- a/tests/infinity.h +++ b/tests/infinity.h @@ -1,5 +1,5 @@ /* Macros for infinity. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,8 +17,9 @@ /* Infinityf () returns a 'float' +Infinity. */ -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -#if defined _MSC_VER +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. + The IBM XL C compiler on z/OS complains. */ +#if defined _MSC_VER || (defined __MVS__ && defined __IBMC__) static float Infinityf () { @@ -32,8 +33,9 @@ Infinityf () /* Infinityd () returns a 'double' +Infinity. */ -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -#if defined _MSC_VER +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. + The IBM XL C compiler on z/OS complains. */ +#if defined _MSC_VER || (defined __MVS__ && defined __IBMC__) static double Infinityd () { @@ -47,9 +49,10 @@ Infinityd () /* Infinityl () returns a 'long double' +Infinity. */ -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -#if defined _MSC_VER -static double +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. + The IBM XL C compiler on z/OS complains. */ +#if defined _MSC_VER || (defined __MVS__ && defined __IBMC__) +static long double Infinityl () { static long double zero = 0.0L; diff --git a/tests/init.sh b/tests/init.sh index d366206..da743c2 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2016 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -128,6 +128,13 @@ else fi # We require $(...) support unconditionally. +# We require non-surprising "local" semantics (this eliminates dash). +# This takes the admittedly draconian step of eliminating dash, because the +# assignment tab=$(printf '\t') works fine, yet preceding it with "local " +# transforms it into an assignment that sets the variable to the empty string. +# That is too counter-intuitive, and can lead to subtle run-time malfunction. +# The example below is less subtle in that with dash, it evokes the run-time +# exception "dash: 1: local: 1: bad variable name". # We require a few additional shell features only when $EXEEXT is nonempty, # in order to support automatic $EXEEXT emulation: # - hyphen-containing alias names @@ -151,6 +158,7 @@ fi gl_shell_test_script_=' test $(echo y) = y || exit 1 f_local_() { local v=1; }; f_local_ || exit 1 +f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_ score_=10 if test "$VERBOSE" = yes; then test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9 @@ -287,47 +295,27 @@ compare_dev_null_ () return 2 } -if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \ - && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then - # diff accepts the -u option and does not (like AIX 7 'diff') produce an - # extra space on column 1 of every content line. +for diff_opt_ in -u -U3 -c '' no; do + test "$diff_opt_" != no && + diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` && + break +done +if test "$diff_opt_" != no; then if test -z "$diff_out_"; then - compare_ () { diff -u "$@"; } + compare_ () { diff $diff_opt_ "$@"; } else compare_ () { - if diff -u "$@" > diff.out; then - # No differences were found, but Solaris 'diff' produces output - # "No differences encountered". Hide this output. - rm -f diff.out - true - else - cat diff.out - rm -f diff.out - false - fi + # If no differences were found, AIX and HP-UX 'diff' produce output + # like "No differences encountered". Hide this output. + diff $diff_opt_ "$@" > diff.out + diff_status_=$? + test $diff_status_ -eq 0 || cat diff.out || diff_status_=2 + rm -f diff.out || diff_status_=2 + return $diff_status_ } fi -elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then - if test -z "$diff_out_"; then - compare_ () { diff -c "$@"; } - else - compare_ () - { - if diff -c "$@" > diff.out; then - # No differences were found, but AIX and HP-UX 'diff' produce output - # "No differences encountered" or "There are no differences between the - # files.". Hide this output. - rm -f diff.out - true - else - cat diff.out - rm -f diff.out - false - fi - } - fi -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then +elif cmp -s /dev/null /dev/null 2>/dev/null; then compare_ () { cmp -s "$@"; } else compare_ () { cmp "$@"; } @@ -466,7 +454,6 @@ setup_ () fi initial_cwd_=$PWD - fail=0 pfx_=`testdir_prefix_` test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \ @@ -550,8 +537,9 @@ mktempd_ () # Disallow any trailing slash on specified destdir: # it would subvert the post-mktemp "case"-based destdir test. case $destdir_ in - /) ;; + / | //) destdir_slash_=$destdir;; */) fail_ "invalid destination dir: remove trailing slash(es)";; + *) destdir_slash_=$destdir_/;; esac case $template_ in @@ -561,20 +549,17 @@ mktempd_ () esac # First, try to use mktemp. - d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \ - || fail=1 + d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` && # The resulting name must be in the specified directory. - case $d in "$destdir_"*);; *) fail=1;; esac + case $d in "$destdir_slash_"*) :;; *) false;; esac && # It must have created the directory. - test -d "$d" || fail=1 + test -d "$d" && # It must have 0700 permissions. Handle sticky "S" bits. - perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1 - case $perms in drwx------*) ;; *) fail=1;; esac - - test $fail = 0 && { + perms=`ls -dgo "$d" 2>/dev/null` && + case $perms in drwx--[-S]---*) :;; *) false;; esac && { echo "$d" return } @@ -593,7 +578,7 @@ mktempd_ () i_=1 while :; do X_=`rand_bytes_ $nx_` - candidate_dir_="$destdir_/$base_template_$X_" + candidate_dir_="$destdir_slash_$base_template_$X_" err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \ && { echo "$candidate_dir_"; return; } test $MAX_TRIES_ -le $i_ && break; diff --git a/tests/intprops.h b/tests/intprops.h index f85ccad..8add5de 100644 --- a/tests/intprops.h +++ b/tests/intprops.h @@ -1,10 +1,10 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2005, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2001-2016 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -21,9 +21,13 @@ #define _GL_INTPROPS_H #include <limits.h> +#include <verify.h> -/* Return an integer value, converted to the same type as the integer - expression E after integer type promotion. V is the unconverted value. */ +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +/* Return a value with the common real type of E and V and the value of V. */ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see @@ -37,59 +41,72 @@ an integer. */ #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) -/* True if negative values of the signed integer type T use two's - complement, ones' complement, or signed magnitude representation, - respectively. Much GNU code assumes two's complement, but some - people like to be portable to all possible C hosts. */ -#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) -#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) -#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) - -/* True if the signed integer expression E uses two's complement. */ -#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) - -/* True if the arithmetic type T is signed. */ +/* True if the real type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) -/* Return 1 if the integer expression E, after integer promotion, has - a signed type. */ -#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) +/* Return 1 if the real expression E, after promotion, has a + signed or floating type. */ +#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) -/* Minimum and maximum values for integer types and expressions. These - macros have undefined behavior if T is signed and has padding bits. - If this is a problem for you, please let us know how to fix it for - your host. */ +/* Minimum and maximum values for integer types and expressions. */ + +/* The width in bits of the integer type or expression T. + Padding bits are not supported; this is checked at compile-time below. */ +#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) /* The maximum and minimum values for the integer type T. */ -#define TYPE_MINIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) 0 \ - : TYPE_SIGNED_MAGNITUDE (t) \ - ? ~ (t) 0 \ - : ~ TYPE_MAXIMUM (t))) +#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) #define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) /* The maximum and minimum values for the type of the expression E, after integer promotion. E should not have side effects. */ #define _GL_INT_MINIMUM(e) \ - (_GL_INT_SIGNED (e) \ - ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ + (EXPR_SIGNED (e) \ + ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_CONVERT (e, 0)) #define _GL_INT_MAXIMUM(e) \ - (_GL_INT_SIGNED (e) \ + (EXPR_SIGNED (e) \ ? _GL_SIGNED_INT_MAXIMUM (e) \ : _GL_INT_NEGATE_CONVERT (e, 1)) #define _GL_SIGNED_INT_MAXIMUM(e) \ - (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) + (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) + +/* Work around OpenVMS incompatibility with C99. */ +#if !defined LLONG_MAX && defined __INT64_MAX +# define LLONG_MAX __INT64_MAX +# define LLONG_MIN __INT64_MIN +#endif +/* This include file assumes that signed types are two's complement without + padding bits; the above macros have undefined behavior otherwise. + If this is a problem for you, please let us know how to fix it for your host. + As a sanity check, test the assumption for some signed types that + <limits.h> bounds. */ +verify (TYPE_MINIMUM (signed char) == SCHAR_MIN); +verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX); +verify (TYPE_MINIMUM (short int) == SHRT_MIN); +verify (TYPE_MAXIMUM (short int) == SHRT_MAX); +verify (TYPE_MINIMUM (int) == INT_MIN); +verify (TYPE_MAXIMUM (int) == INT_MAX); +verify (TYPE_MINIMUM (long int) == LONG_MIN); +verify (TYPE_MAXIMUM (long int) == LONG_MAX); +#ifdef LLONG_MAX +verify (TYPE_MINIMUM (long long int) == LLONG_MIN); +verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); +#endif +/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ +#ifdef UINT_WIDTH +verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); +#endif -/* Return 1 if the __typeof__ keyword works. This could be done by +/* Does the __typeof__ keyword work? This could be done by 'configure', but for now it's easier to do it by hand. */ -#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ +#if (2 <= __GNUC__ \ + || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ || (0x5110 <= __SUNPRO_C && !__STDC__)) # define _GL_HAVE___TYPEOF__ 1 #else @@ -118,8 +135,7 @@ signed, this macro may overestimate the true bound by one byte when applied to unsigned types of size 2, 4, 16, ... bytes. */ #define INT_STRLEN_BOUND(t) \ - (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ - - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + _GL_SIGNED_TYPE_OR_EXPR (t)) /* Bound on buffer size needed to represent an integer type or expression T, @@ -224,24 +240,40 @@ ? (a) < (min) >> (b) \ : (max) >> (b) < (a)) +/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ +#define _GL_HAS_BUILTIN_OVERFLOW \ + (5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)) + +/* True if __builtin_add_overflow_p (A, B, C) works. */ +#define _GL_HAS_BUILTIN_OVERFLOW_P \ + (7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)) /* The _GL*_OVERFLOW macros have the same restrictions as the *_RANGE_OVERFLOW macros, except that they do not assume that operands (e.g., A and B) have the same type as MIN and MAX. Instead, they assume that the result (e.g., A + B) has that type. */ -#define _GL_ADD_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ - : (a) < 0 ? (b) <= (a) + (b) \ - : (b) < 0 ? (a) <= (a) + (b) \ - : (a) + (b) < (b)) -#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ - : (a) < 0 ? 1 \ - : (b) < 0 ? (a) - (b) <= (a) \ - : (a) < (b)) -#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ - (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ - || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) +#if _GL_HAS_BUILTIN_OVERFLOW_P +# define _GL_ADD_OVERFLOW(a, b, min, max) \ + __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) +# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ + __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) +# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ + __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) +#else +# define _GL_ADD_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ + : (a) < 0 ? (b) <= (a) + (b) \ + : (b) < 0 ? (a) <= (a) + (b) \ + : (a) + (b) < (b)) +# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ + : (a) < 0 ? 1 \ + : (b) < 0 ? (a) - (b) <= (a) \ + : (a) < (b)) +# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ + (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ + || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) +#endif #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ : (a) < 0 ? (b) <= (a) + (b) - 1 \ @@ -263,22 +295,29 @@ : (a) % - (b)) \ == 0) - -/* Integer overflow checks. +/* Check for integer overflow, and report low order bits of answer. The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators might not yield numerically correct answers due to arithmetic overflow. - They work correctly on all known practical hosts, and do not rely + The INT_<op>_WRAPV macros also store the low-order bits of the answer. + These macros work correctly on all known practical hosts, and do not rely on undefined behavior due to signed arithmetic overflow. - Example usage: + Example usage, assuming A and B are long int: - long int i = ...; - long int j = ...; - if (INT_MULTIPLY_OVERFLOW (i, j)) - printf ("multiply would overflow"); + if (INT_MULTIPLY_OVERFLOW (a, b)) + printf ("result would overflow\n"); else - printf ("product is %ld", i * j); + printf ("result is %ld (no overflow)\n", a * b); + + Example usage with WRAPV flavor: + + long int result; + bool overflow = INT_MULTIPLY_WRAPV (a, b, &result); + printf ("result is %ld (%s)\n", result, + overflow ? "after overflow" : "no overflow"); + + Restrictions on these macros: These macros do not check for all possible numerical problems or undefined or unspecified behavior: they do not check for division @@ -287,6 +326,9 @@ These macros may evaluate their arguments zero or multiple times, so the arguments should not have side effects. + The WRAPV macros are not constant expressions. They support only + +, binary -, and *. The result type must be signed. + These macros are tuned for their last argument being a constant. Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, @@ -296,8 +338,12 @@ _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) #define INT_SUBTRACT_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) -#define INT_NEGATE_OVERFLOW(a) \ - INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) +#if _GL_HAS_BUILTIN_OVERFLOW_P +# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) +#else +# define INT_NEGATE_OVERFLOW(a) \ + INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) +#endif #define INT_MULTIPLY_OVERFLOW(a, b) \ _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) #define INT_DIVIDE_OVERFLOW(a, b) \ @@ -317,4 +363,102 @@ _GL_INT_MINIMUM (0 * (b) + (a)), \ _GL_INT_MAXIMUM (0 * (b) + (a))) +/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. + Return 1 if the result overflows. See above for restrictions. */ +#define INT_ADD_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW) +#define INT_SUBTRACT_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW) +#define INT_MULTIPLY_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) + +/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 + https://llvm.org/bugs/show_bug.cgi?id=25390 + For now, assume all versions of GCC-like compilers generate bogus + warnings for _Generic. This matters only for older compilers that + lack __builtin_add_overflow. */ +#if __GNUC__ +# define _GL__GENERIC_BOGUS 1 +#else +# define _GL__GENERIC_BOGUS 0 +#endif + +/* Store the low-order bits of A <op> B into *R, where OP specifies + the operation. BUILTIN is the builtin operation, and OVERFLOW the + overflow predicate. Return 1 if the result overflows. See above + for restrictions. */ +#if _GL_HAS_BUILTIN_OVERFLOW +# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) +#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS +# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ + (_Generic \ + (*(r), \ + signed char: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ + signed char, SCHAR_MIN, SCHAR_MAX), \ + short int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ + short int, SHRT_MIN, SHRT_MAX), \ + int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + int, INT_MIN, INT_MAX), \ + long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX), \ + long long int: \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + long long int, LLONG_MIN, LLONG_MAX))) +#else +# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ + (sizeof *(r) == sizeof (signed char) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ + signed char, SCHAR_MIN, SCHAR_MAX) \ + : sizeof *(r) == sizeof (short int) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ + short int, SHRT_MIN, SHRT_MAX) \ + : sizeof *(r) == sizeof (int) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + int, INT_MIN, INT_MAX) \ + : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) +# ifdef LLONG_MAX +# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + (sizeof *(r) == sizeof (long int) \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX) \ + : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ + long long int, LLONG_MIN, LLONG_MAX)) +# else +# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ + long int, LONG_MIN, LONG_MAX) +# endif +#endif + +/* Store the low-order bits of A <op> B into *R, where the operation + is given by OP. Use the unsigned type UT for calculation to avoid + overflow problems. *R's type is T, with extremal values TMIN and + TMAX. T must be a signed integer type. Return 1 if the result + overflows. */ +#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ + (sizeof ((a) op (b)) < sizeof (t) \ + ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ + : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax)) +#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ + ((overflow (a, b) \ + || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ + || (tmax) < ((a) op (b))) \ + ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ + : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) + +/* Return A <op> B, where the operation is given by OP. Use the + unsigned type UT for calculation to avoid overflow problems. + Convert the result to type T without overflow by subtracting TMIN + from large values before converting, and adding it afterwards. + Compilers can optimize all the operations except OP. */ +#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \ + (((ut) (a) op (ut) (b)) <= (tmax) \ + ? (t) ((ut) (a) op (ut) (b)) \ + : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin))) + #endif /* _GL_INTPROPS_H */ diff --git a/tests/inttypes.in.h b/tests/inttypes.in.h index 78846f6..ed09db6 100644 --- a/tests/inttypes.in.h +++ b/tests/inttypes.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2015 Free Software Foundation, Inc. +/* Copyright (C) 2006-2016 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. diff --git a/tests/locale.in.h b/tests/locale.in.h index 05e974d..4083507 100644 --- a/tests/locale.in.h +++ b/tests/locale.in.h @@ -1,5 +1,5 @@ /* A POSIX <locale.h>. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/macros.h b/tests/macros.h index b6fdd1c..578bfe7 100644 --- a/tests/macros.h +++ b/tests/macros.h @@ -1,5 +1,5 @@ /* Common macros used by gnulib tests. - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/mbtowc-impl.h b/tests/mbtowc-impl.h index 5c60478..4be2994 100644 --- a/tests/mbtowc-impl.h +++ b/tests/mbtowc-impl.h @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. This program is free software: you can redistribute it and/or modify diff --git a/tests/mbtowc.c b/tests/mbtowc.c index e58053d..fb2b651 100644 --- a/tests/mbtowc.c +++ b/tests/mbtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. This program is free software: you can redistribute it and/or modify diff --git a/tests/minus-zero.h b/tests/minus-zero.h index 79291ee..d10d060 100644 --- a/tests/minus-zero.h +++ b/tests/minus-zero.h @@ -1,5 +1,5 @@ /* Macros for floating-point negative zero. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/msvc-inval.c b/tests/msvc-inval.c index a1f1dc0..baaf39e 100644 --- a/tests/msvc-inval.c +++ b/tests/msvc-inval.c @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/msvc-inval.h b/tests/msvc-inval.h index 8b07269..027c949 100644 --- a/tests/msvc-inval.h +++ b/tests/msvc-inval.h @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/msvc-nothrow.c b/tests/msvc-nothrow.c index 90cf801..ba75bbf 100644 --- a/tests/msvc-nothrow.c +++ b/tests/msvc-nothrow.c @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/msvc-nothrow.h b/tests/msvc-nothrow.h index 67b151e..3493b84 100644 --- a/tests/msvc-nothrow.h +++ b/tests/msvc-nothrow.h @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/nan.h b/tests/nan.h index 9f6819c..40045f2 100644 --- a/tests/nan.h +++ b/tests/nan.h @@ -1,5 +1,5 @@ /* Macros for not-a-number. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,11 +15,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* IBM z/OS supports both hexadecimal and IEEE floating-point formats. The + former does not support NaN and its isnan() implementation returns zero + for all values. */ +#if defined __MVS__ && defined __IBMC__ && !defined __BFP__ +# error "NaN is not supported with IBM's hexadecimal floating-point format; please re-compile with -qfloat=ieee" +#endif + /* NaNf () returns a 'float' not-a-number. */ /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke - on the expression 0.0 / 0.0. */ -#if defined __DECC || defined _MSC_VER + on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. */ +#if defined __DECC || defined _MSC_VER || (defined __MVS__ && defined __IBMC__) static float NaNf () { @@ -34,8 +41,8 @@ NaNf () /* NaNd () returns a 'double' not-a-number. */ /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke - on the expression 0.0 / 0.0. */ -#if defined __DECC || defined _MSC_VER + on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. */ +#if defined __DECC || defined _MSC_VER || (defined __MVS__ && defined __IBMC__) static double NaNd () { @@ -51,14 +58,15 @@ NaNd () /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the runtime type conversion. - The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. */ + The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. + The IBM XL C compiler on z/OS complains. */ #ifdef __sgi static long double NaNl () { double zero = 0.0; return zero / zero; } -#elif defined _MSC_VER +#elif defined _MSC_VER || (defined __MVS__ && defined __IBMC__) static long double NaNl () { diff --git a/tests/progname.c b/tests/progname.c deleted file mode 100644 index fe93bca..0000000 --- a/tests/progname.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Program name management. - Copyright (C) 2001-2003, 2005-2015 Free Software Foundation, Inc. - Written by Bruno Haible <bruno@clisp.org>, 2001. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - - -#include <config.h> - -/* Specification. */ -#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ -#include "progname.h" - -#include <errno.h> /* get program_invocation_name declaration */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - - -/* String containing name the program is called with. - To be initialized by main(). */ -const char *program_name = NULL; - -/* Set program_name, based on argv[0]. - argv0 must be a string allocated with indefinite extent, and must not be - modified after this call. */ -void -set_program_name (const char *argv0) -{ - /* libtool creates a temporary executable whose name is sometimes prefixed - with "lt-" (depends on the platform). It also makes argv[0] absolute. - But the name of the temporary executable is a detail that should not be - visible to the end user and to the test suite. - Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */ - const char *slash; - const char *base; - - /* Sanity check. POSIX requires the invoking process to pass a non-NULL - argv[0]. */ - if (argv0 == NULL) - { - /* It's a bug in the invoking program. Help diagnosing it. */ - fputs ("A NULL argv[0] was passed through an exec system call.\n", - stderr); - abort (); - } - - slash = strrchr (argv0, '/'); - base = (slash != NULL ? slash + 1 : argv0); - if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0) - { - argv0 = base; - if (strncmp (base, "lt-", 3) == 0) - { - argv0 = base + 3; - /* On glibc systems, remove the "lt-" prefix from the variable - program_invocation_short_name. */ -#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME - program_invocation_short_name = (char *) argv0; -#endif - } - } - - /* But don't strip off a leading <dirname>/ in general, because when the user - runs - /some/hidden/place/bin/cp foo foo - he should get the error message - /some/hidden/place/bin/cp: `foo' and `foo' are the same file - not - cp: `foo' and `foo' are the same file - */ - - program_name = argv0; - - /* On glibc systems, the error() function comes from libc and uses the - variable program_invocation_name, not program_name. So set this variable - as well. */ -#if HAVE_DECL_PROGRAM_INVOCATION_NAME - program_invocation_name = (char *) argv0; -#endif -} diff --git a/tests/progname.h b/tests/progname.h deleted file mode 100644 index d1e034f..0000000 --- a/tests/progname.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Program name management. - Copyright (C) 2001-2004, 2006, 2009-2015 Free Software Foundation, Inc. - Written by Bruno Haible <bruno@clisp.org>, 2001. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -#ifndef _PROGNAME_H -#define _PROGNAME_H - -/* Programs using this file should do the following in main(): - set_program_name (argv[0]); - */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* String containing name the program is called with. */ -extern const char *program_name; - -/* Set program_name, based on argv[0]. - argv0 must be a string allocated with indefinite extent, and must not be - modified after this call. */ -extern void set_program_name (const char *argv0); - -#if ENABLE_RELOCATABLE - -/* Set program_name, based on argv[0], and original installation prefix and - directory, for relocatability. */ -extern void set_program_name_and_installdir (const char *argv0, - const char *orig_installprefix, - const char *orig_installdir); -#undef set_program_name -#define set_program_name(ARG0) \ - set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) - -/* Return the full pathname of the current executable, based on the earlier - call to set_program_name_and_installdir. Return NULL if unknown. */ -extern char *get_full_program_name (void); - -#endif - - -#ifdef __cplusplus -} -#endif - - -#endif /* _PROGNAME_H */ diff --git a/tests/putenv.c b/tests/putenv.c index 925bb2f..e67712d 100644 --- a/tests/putenv.c +++ b/tests/putenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2015 Free Software +/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2016 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C diff --git a/tests/randomd.c b/tests/randomd.c index 9642428..afdc7fb 100644 --- a/tests/randomd.c +++ b/tests/randomd.c @@ -1,5 +1,5 @@ /* Some random 'double' numbers used by gnulib tests. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/randoml.c b/tests/randoml.c index 219278a..323362c 100644 --- a/tests/randoml.c +++ b/tests/randoml.c @@ -1,5 +1,5 @@ /* Some random 'long double' numbers used by gnulib tests. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/setenv.c b/tests/setenv.c index 6b16fd5..85c32cb 100644 --- a/tests/setenv.c +++ b/tests/setenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2003, 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2003, 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify diff --git a/tests/setlocale.c b/tests/setlocale.c index a7a1233..7d366ed 100644 --- a/tests/setlocale.c +++ b/tests/setlocale.c @@ -1,5 +1,5 @@ -/* Set the current locale. - Copyright (C) 2009, 2011-2015 Free Software Foundation, Inc. +/* Set the current locale. -*- coding: utf-8 -*- + Copyright (C) 2009, 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -381,6 +381,7 @@ static const struct table_entry language_table[] = { "sq", "Albanian" }, { "sr", "Serbian (Latin)" }, { "sr@cyrillic", "SRB" }, /* Serbian (Cyrillic) */ + { "sv", "Swedish" }, { "sw", "Swahili" }, { "syr", "Syriac" }, { "ta", "Tamil" }, diff --git a/tests/signature.h b/tests/signature.h index 0a6cf91..2df8067 100644 --- a/tests/signature.h +++ b/tests/signature.h @@ -1,5 +1,5 @@ /* Macro for checking that a function declaration is compliant. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/stdalign.in.h b/tests/stdalign.in.h index a990050..12f8a15 100644 --- a/tests/stdalign.in.h +++ b/tests/stdalign.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C11 <stdalign.h>. - Copyright 2011-2015 Free Software Foundation, Inc. + Copyright 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -52,7 +52,10 @@ #undef _Alignas #undef _Alignof -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 + <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ +#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ + || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9))) # ifdef __cplusplus # if 201103 <= __cplusplus # define _Alignof(type) alignof (type) @@ -64,7 +67,9 @@ # define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) # endif #endif -#define alignof _Alignof +#if ! (defined __cplusplus && 201103 <= __cplusplus) +# define alignof _Alignof +#endif #define __alignof_is_defined 1 /* alignas (A), also known as _Alignas (A), aligns a variable or type @@ -98,15 +103,18 @@ # elif ((defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ - || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ - || __ICC || 0x5110 <= __SUNPRO_C) + || 061200 <= __HP_cc || 061200 <= __HP_aCC \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) # define _Alignas(a) __attribute__ ((__aligned__ (a))) # elif 1300 <= _MSC_VER # define _Alignas(a) __declspec (align (a)) # endif #endif -#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__) +#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) # define alignas _Alignas +#endif +#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus) # define __alignas_is_defined 1 #endif diff --git a/tests/stdio.in.h b/tests/stdio.in.h index ec43874..9b31365 100644 --- a/tests/stdio.in.h +++ b/tests/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like <stdio.h>. - Copyright (C) 2004, 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/strerror-override.c b/tests/strerror-override.c index 2bb4d74..9bc9b18 100644 --- a/tests/strerror-override.c +++ b/tests/strerror-override.c @@ -1,6 +1,6 @@ /* strerror-override.c --- POSIX compatible system error routine - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/strerror-override.h b/tests/strerror-override.h index 7af36df..5264fd5 100644 --- a/tests/strerror-override.h +++ b/tests/strerror-override.h @@ -1,6 +1,6 @@ /* strerror-override.h --- POSIX compatible system error routine - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/strerror.c b/tests/strerror.c index adba738..8fff3bd 100644 --- a/tests/strerror.c +++ b/tests/strerror.c @@ -1,6 +1,6 @@ /* strerror.c --- POSIX compatible system error routine - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -66,5 +66,6 @@ strerror (int n) if (sizeof buf <= len) abort (); - return memcpy (buf, msg, len + 1); + memcpy (buf, msg, len + 1); + return buf; } diff --git a/tests/stripslash.c b/tests/stripslash.c new file mode 100644 index 0000000..0453e36 --- /dev/null +++ b/tests/stripslash.c @@ -0,0 +1,45 @@ +/* stripslash.c -- remove redundant trailing slashes from a file name + + Copyright (C) 1990, 2001, 2003-2006, 2009-2016 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +#include "dirname.h" + +/* Remove trailing slashes from FILE. Return true if a trailing slash + was removed. This is useful when using file name completion from a + shell that adds a "/" after directory names (such as tcsh and + bash), because on symlinks to directories, several system calls + have different semantics according to whether a trailing slash is + present. */ + +bool +strip_trailing_slashes (char *file) +{ + char *base = last_component (file); + char *base_lim; + bool had_slash; + + /* last_component returns "" for file system roots, but we need to turn + "///" into "/". */ + if (! *base) + base = file; + base_lim = base + base_len (base); + had_slash = (*base_lim != '\0'); + *base_lim = '\0'; + return had_slash; +} diff --git a/tests/test-alloca-opt.c b/tests/test-alloca-opt.c index c189cc6..b9aaa4a 100644 --- a/tests/test-alloca-opt.c +++ b/tests/test-alloca-opt.c @@ -1,5 +1,5 @@ /* Test of optional automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-array-mergesort.c b/tests/test-array-mergesort.c index 775ae6f..89bcc02 100644 --- a/tests/test-array-mergesort.c +++ b/tests/test-array-mergesort.c @@ -1,5 +1,5 @@ /* Test of stable-sorting of an array using mergesort. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/test-btowc.c b/tests/test-btowc.c index be34739..9953ac4 100644 --- a/tests/test-btowc.c +++ b/tests/test-btowc.c @@ -1,5 +1,5 @@ /* Test of conversion of unibyte character to wide character. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-c-ctype.c b/tests/test-c-ctype.c index 81fe936..184cdec 100644 --- a/tests/test-c-ctype.c +++ b/tests/test-c-ctype.c @@ -1,5 +1,5 @@ /* Test of character handling in C locale. - Copyright (C) 2005, 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,59 +20,79 @@ #include "c-ctype.h" +#include <ctype.h> +#include <limits.h> #include <locale.h> #include "macros.h" static void -test_all (void) +test_agree_with_C_locale (void) { int c; - for (c = -0x80; c < 0x100; c++) + for (c = 0; c <= UCHAR_MAX; c++) { - ASSERT (c_isascii (c) == (c >= 0 && c < 0x80)); - - switch (c) + ASSERT (c_isascii (c) == (isascii (c) != 0)); + if (c_isascii (c)) { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - ASSERT (c_isalnum (c) == 1); - break; - default: - ASSERT (c_isalnum (c) == 0); - break; + ASSERT (c_isalnum (c) == (isalnum (c) != 0)); + ASSERT (c_isalpha (c) == (isalpha (c) != 0)); + ASSERT (c_isblank (c) == (isblank (c) != 0)); + ASSERT (c_iscntrl (c) == (iscntrl (c) != 0)); + ASSERT (c_isdigit (c) == (isdigit (c) != 0)); + ASSERT (c_islower (c) == (islower (c) != 0)); + ASSERT (c_isgraph (c) == (isgraph (c) != 0)); + ASSERT (c_isprint (c) == (isprint (c) != 0)); + ASSERT (c_ispunct (c) == (ispunct (c) != 0)); + ASSERT (c_isspace (c) == (isspace (c) != 0)); + ASSERT (c_isupper (c) == (isupper (c) != 0)); + ASSERT (c_isxdigit (c) == (isxdigit (c) != 0)); + ASSERT (c_tolower (c) == tolower (c)); + ASSERT (c_toupper (c) == toupper (c)); } + } +} - switch (c) +static void +test_all (void) +{ + int c; + int n_isascii = 0; + + for (c = CHAR_MIN; c <= UCHAR_MAX; c++) + { + if (! (0 <= c && c <= CHAR_MAX)) { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - ASSERT (c_isalpha (c) == 1); - break; - default: - ASSERT (c_isalpha (c) == 0); - break; + ASSERT (! c_isascii (c)); + ASSERT (! c_isalnum (c)); + ASSERT (! c_isalpha (c)); + ASSERT (! c_isblank (c)); + ASSERT (! c_iscntrl (c)); + ASSERT (! c_isdigit (c)); + ASSERT (! c_islower (c)); + ASSERT (! c_isgraph (c)); + ASSERT (! c_isprint (c)); + ASSERT (! c_ispunct (c)); + ASSERT (! c_isspace (c)); + ASSERT (! c_isupper (c)); + ASSERT (! c_isxdigit (c)); + ASSERT (c_tolower (c) == c); + ASSERT (c_toupper (c) == c); } + n_isascii += c_isascii (c); + +#ifdef C_CTYPE_ASCII + ASSERT (c_isascii (c) == (0 <= c && c <= 0x7f)); +#endif + + ASSERT (c_isascii (c) == (c_isprint (c) || c_iscntrl (c))); + + ASSERT (c_isalnum (c) == (c_isalpha (c) || c_isdigit (c))); + + ASSERT (c_isalpha (c) == (c_islower (c) || c_isupper (c))); + switch (c) { case '\t': case ' ': @@ -83,7 +103,19 @@ test_all (void) break; } +#ifdef C_CTYPE_ASCII ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f)); +#endif + + switch (c) + { + case '\a': case '\b': case '\f': case '\n': + case '\r': case '\t': case '\v': + ASSERT (c_iscntrl (c)); + break; + } + + ASSERT (! (c_iscntrl (c) && c_isprint (c))); switch (c) { @@ -104,17 +136,37 @@ test_all (void) case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': ASSERT (c_islower (c) == 1); + ASSERT (c_toupper (c) == c - 'a' + 'A'); break; default: ASSERT (c_islower (c) == 0); + ASSERT (c_toupper (c) == c); break; } +#ifdef C_CTYPE_ASCII ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' ')); ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f)); +#endif + + ASSERT (c_isgraph (c) == (c_isalnum (c) || c_ispunct (c))); + + ASSERT (c_isprint (c) == (c_isgraph (c) || c == ' ')); - ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c))); + switch (c) + { + case '!': case '"': case '#': case '$': case '%': case '&': case '\'': + case '(': case ')': case '*': case '+': case ',': case '-': case '.': + case '/': case ':': case ';': case '<': case '=': case '>': case '?': + case '@': case '[': case'\\': case ']': case '^': case '_': case '`': + case '{': case '|': case '}': case '~': + ASSERT (c_ispunct (c) == 1); + break; + default: + ASSERT (c_ispunct (c) == 0); + break; + } switch (c) { @@ -134,9 +186,11 @@ test_all (void) case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': ASSERT (c_isupper (c) == 1); + ASSERT (c_tolower (c) == c - 'A' + 'a'); break; default: ASSERT (c_isupper (c) == 0); + ASSERT (c_tolower (c) == c); break; } @@ -152,228 +206,16 @@ test_all (void) ASSERT (c_isxdigit (c) == 0); break; } - - switch (c) - { - case 'A': - ASSERT (c_tolower (c) == 'a'); - ASSERT (c_toupper (c) == c); - break; - case 'B': - ASSERT (c_tolower (c) == 'b'); - ASSERT (c_toupper (c) == c); - break; - case 'C': - ASSERT (c_tolower (c) == 'c'); - ASSERT (c_toupper (c) == c); - break; - case 'D': - ASSERT (c_tolower (c) == 'd'); - ASSERT (c_toupper (c) == c); - break; - case 'E': - ASSERT (c_tolower (c) == 'e'); - ASSERT (c_toupper (c) == c); - break; - case 'F': - ASSERT (c_tolower (c) == 'f'); - ASSERT (c_toupper (c) == c); - break; - case 'G': - ASSERT (c_tolower (c) == 'g'); - ASSERT (c_toupper (c) == c); - break; - case 'H': - ASSERT (c_tolower (c) == 'h'); - ASSERT (c_toupper (c) == c); - break; - case 'I': - ASSERT (c_tolower (c) == 'i'); - ASSERT (c_toupper (c) == c); - break; - case 'J': - ASSERT (c_tolower (c) == 'j'); - ASSERT (c_toupper (c) == c); - break; - case 'K': - ASSERT (c_tolower (c) == 'k'); - ASSERT (c_toupper (c) == c); - break; - case 'L': - ASSERT (c_tolower (c) == 'l'); - ASSERT (c_toupper (c) == c); - break; - case 'M': - ASSERT (c_tolower (c) == 'm'); - ASSERT (c_toupper (c) == c); - break; - case 'N': - ASSERT (c_tolower (c) == 'n'); - ASSERT (c_toupper (c) == c); - break; - case 'O': - ASSERT (c_tolower (c) == 'o'); - ASSERT (c_toupper (c) == c); - break; - case 'P': - ASSERT (c_tolower (c) == 'p'); - ASSERT (c_toupper (c) == c); - break; - case 'Q': - ASSERT (c_tolower (c) == 'q'); - ASSERT (c_toupper (c) == c); - break; - case 'R': - ASSERT (c_tolower (c) == 'r'); - ASSERT (c_toupper (c) == c); - break; - case 'S': - ASSERT (c_tolower (c) == 's'); - ASSERT (c_toupper (c) == c); - break; - case 'T': - ASSERT (c_tolower (c) == 't'); - ASSERT (c_toupper (c) == c); - break; - case 'U': - ASSERT (c_tolower (c) == 'u'); - ASSERT (c_toupper (c) == c); - break; - case 'V': - ASSERT (c_tolower (c) == 'v'); - ASSERT (c_toupper (c) == c); - break; - case 'W': - ASSERT (c_tolower (c) == 'w'); - ASSERT (c_toupper (c) == c); - break; - case 'X': - ASSERT (c_tolower (c) == 'x'); - ASSERT (c_toupper (c) == c); - break; - case 'Y': - ASSERT (c_tolower (c) == 'y'); - ASSERT (c_toupper (c) == c); - break; - case 'Z': - ASSERT (c_tolower (c) == 'z'); - ASSERT (c_toupper (c) == c); - break; - case 'a': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'A'); - break; - case 'b': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'B'); - break; - case 'c': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'C'); - break; - case 'd': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'D'); - break; - case 'e': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'E'); - break; - case 'f': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'F'); - break; - case 'g': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'G'); - break; - case 'h': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'H'); - break; - case 'i': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'I'); - break; - case 'j': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'J'); - break; - case 'k': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'K'); - break; - case 'l': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'L'); - break; - case 'm': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'M'); - break; - case 'n': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'N'); - break; - case 'o': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'O'); - break; - case 'p': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'P'); - break; - case 'q': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Q'); - break; - case 'r': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'R'); - break; - case 's': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'S'); - break; - case 't': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'T'); - break; - case 'u': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'U'); - break; - case 'v': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'V'); - break; - case 'w': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'W'); - break; - case 'x': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'X'); - break; - case 'y': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Y'); - break; - case 'z': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Z'); - break; - default: - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == c); - break; - } } + + ASSERT (n_isascii == 128); } int main () { + test_agree_with_C_locale (); + test_all (); setlocale (LC_ALL, "de_DE"); diff --git a/tests/test-c-strcasecmp.c b/tests/test-c-strcasecmp.c index f7f6b43..42e538f 100644 --- a/tests/test-c-strcasecmp.c +++ b/tests/test-c-strcasecmp.c @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include <config.h> #include "c-strcase.h" +#include "c-ctype.h" #include <locale.h> #include <string.h> @@ -57,9 +58,11 @@ main (int argc, char *argv[]) ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */ ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */ +#if C_CTYPE_ASCII /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0); ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0); +#endif return 0; } diff --git a/tests/test-c-strncasecmp.c b/tests/test-c-strncasecmp.c index 4027b5b..349f6b3 100644 --- a/tests/test-c-strncasecmp.c +++ b/tests/test-c-strncasecmp.c @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include <config.h> #include "c-strcase.h" +#include "c-ctype.h" #include <locale.h> #include <string.h> @@ -71,9 +72,11 @@ main (int argc, char *argv[]) ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */ ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */ +#if C_CTYPE_ASCII /* This test shows how strings of different size cannot compare equal. */ ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0); ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0); +#endif return 0; } diff --git a/tests/test-ctype.c b/tests/test-ctype.c new file mode 100644 index 0000000..570fbdb --- /dev/null +++ b/tests/test-ctype.c @@ -0,0 +1,27 @@ +/* Test of <ctype.h> substitute. + Copyright (C) 2009-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Eric Blake <ebb9@byu.net>, 2009. */ + +#include <config.h> + +#include <ctype.h> + +int +main (void) +{ + return 0; +} diff --git a/tests/test-environ.c b/tests/test-environ.c index e4616da..0047246 100644 --- a/tests/test-environ.c +++ b/tests/test-environ.c @@ -1,5 +1,5 @@ /* Test of environ variable. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-errno.c b/tests/test-errno.c index fab35d0..1e0bb6d 100644 --- a/tests/test-errno.c +++ b/tests/test-errno.c @@ -1,5 +1,5 @@ /* Test of <errno.h> substitute. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-fdopen.c b/tests/test-fdopen.c index c4e0355..55b49a6 100644 --- a/tests/test-fdopen.c +++ b/tests/test-fdopen.c @@ -1,5 +1,5 @@ /* Test opening a stream with a file descriptor. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-fgetc.c b/tests/test-fgetc.c index 63e1e4a..c62e70c 100644 --- a/tests/test-fgetc.c +++ b/tests/test-fgetc.c @@ -1,5 +1,5 @@ /* Test of fgetc() function. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-float.c b/tests/test-float.c index 8b62133..a5f33b6 100644 --- a/tests/test-float.c +++ b/tests/test-float.c @@ -1,5 +1,5 @@ /* Test of <float.h> substitute. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-fputc.c b/tests/test-fputc.c index 41ae096..95a1cb6 100644 --- a/tests/test-fputc.c +++ b/tests/test-fputc.c @@ -1,5 +1,5 @@ /* Test of fputc() function. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-fread.c b/tests/test-fread.c index 41cea56..b9fc72a 100644 --- a/tests/test-fread.c +++ b/tests/test-fread.c @@ -1,5 +1,5 @@ /* Test of fread() function. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-frexp.c b/tests/test-frexp.c index de626d0..376d7cd 100644 --- a/tests/test-frexp.c +++ b/tests/test-frexp.c @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-frexp.h b/tests/test-frexp.h index 5456b67..4749448 100644 --- a/tests/test-frexp.h +++ b/tests/test-frexp.h @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-frexpl.c b/tests/test-frexpl.c index fc2a4de..c0f2328 100644 --- a/tests/test-frexpl.c +++ b/tests/test-frexpl.c @@ -1,5 +1,5 @@ /* Test of splitting a 'long double' into fraction and mantissa. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-fseterr.c b/tests/test-fseterr.c index c499cb9..4d72854 100644 --- a/tests/test-fseterr.c +++ b/tests/test-fseterr.c @@ -1,5 +1,5 @@ /* Test setting the error indicator of a stream. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-fwrite.c b/tests/test-fwrite.c index df4114c..bc285f3 100644 --- a/tests/test-fwrite.c +++ b/tests/test-fwrite.c @@ -1,5 +1,5 @@ /* Test of fwrite() function. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-getprogname.c b/tests/test-getprogname.c new file mode 100644 index 0000000..7c2b872 --- /dev/null +++ b/tests/test-getprogname.c @@ -0,0 +1,58 @@ +/* Test the gnulib getprogname module. + Copyright (C) 2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +#include "getprogname.h" +#include <string.h> +#include <assert.h> + +#ifdef __hpux +# define STREQ(a, b) (strncmp (a, b, 14) == 0) +#else +# define STREQ(a, b) (strcmp (a, b) == 0) +#endif + +int +main (void) +{ + char const *p = getprogname (); + + /* libtool creates a temporary executable whose name is sometimes prefixed + with "lt-" (depends on the platform). But the name of the temporary + executable is a detail that should not be visible to the end user and to + the test suite. Remove this "lt-" prefix here. */ + if (strncmp (p, "lt-", 3) == 0) + p += 3; + + /* Note: You can make this test fail + a) by running it on a case-insensitive file system (such as on Windows, + Cygwin, or on Mac OS X with a case-insensitive HFS+ file system), + with an invocation that contains upper case characters, e.g. + test-GETPROGNAME, + b) by hardlinking or symlinking it to a different name (e.g. test-foo) + and invoking it through that name. + That's not the intended use. The Makefile always invokes it as + 'test-getprogname${EXEEXT}'. */ +#if defined __CYGWIN__ + /* The Cygwin getprogname() function strips the ".exe" suffix. */ + assert (STREQ (p, "test-getprogname")); +#else + assert (STREQ (p, "test-getprogname" EXEEXT)); +#endif + + return 0; +} diff --git a/tests/test-iconv-h.c b/tests/test-iconv-h.c index 5b688d9..fbb0548 100644 --- a/tests/test-iconv-h.c +++ b/tests/test-iconv-h.c @@ -1,5 +1,5 @@ /* Test of <iconv.h> substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-iconv.c b/tests/test-iconv.c index ed715bd..e58d460 100644 --- a/tests/test-iconv.c +++ b/tests/test-iconv.c @@ -1,5 +1,5 @@ /* Test of character set conversion. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,8 +44,14 @@ main () #if HAVE_ICONV /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1, and UTF-8. */ - iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); - iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8"); + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO8859-1"); + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + +#if defined __MVS__ && defined __IBMC__ + /* String literals below are in ASCII, not EBCDIC. */ +# pragma convert("ISO8859-1") +# define CONVERT_ENABLED +#endif ASSERT (cd_88591_to_utf8 != (iconv_t)(-1)); ASSERT (cd_utf8_to_88591 != (iconv_t)(-1)); @@ -142,7 +148,12 @@ main () iconv_close (cd_88591_to_utf8); iconv_close (cd_utf8_to_88591); + +#ifdef CONVERT_ENABLED +# pragma convert(pop) #endif +#endif /* HAVE_ICONV */ + return 0; } diff --git a/tests/test-init.sh b/tests/test-init.sh index 0875a75..a627859 100755 --- a/tests/test-init.sh +++ b/tests/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for init.sh -# Copyright (C) 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2011-2016 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -57,7 +57,8 @@ EOF # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ: # -@@ -0,0 +1 @@ # +@@ -1,0 +1,1 @@ - sed 's/ .*//;/^@@/d' out > k && mv k out + # Also, remove space after leading '+', since AIX 7.1 diff outputs a space. + sed 's/ .*//;/^@@/d;s/^+ /+/' out > k && mv k out cat <<\EOF > exp --- empty +++ in diff --git a/tests/test-intprops.c b/tests/test-intprops.c index 06df5a7..0a8ddcd 100644 --- a/tests/test-intprops.c +++ b/tests/test-intprops.c @@ -1,5 +1,5 @@ /* Test intprops.h. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,10 +16,16 @@ /* Written by Paul Eggert. */ -/* Tell gcc not to warn about the many (X < 0) expressions that - the overflow macros expand to. */ -#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +/* Tell gcc not to warn about the long expressions that the overflow + macros expand to, or about the (X < 0) expressions. */ +#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Woverlength-strings" # pragma GCC diagnostic ignored "-Wtype-limits" + +/* Work around a bug in GCC 6.1 and earlier; see: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68971 */ +# pragma GCC diagnostic ignored "-Woverflow" + #endif #include <config.h> @@ -29,6 +35,7 @@ #include <stdbool.h> #include <inttypes.h> +#include <limits.h> #include "macros.h" @@ -43,6 +50,8 @@ # define VERIFY(x) ASSERT (x) #endif +#define DONTCARE __LINE__ + int main (void) { @@ -82,12 +91,8 @@ main (void) ASSERT (TYPE_SIGNED (double)); ASSERT (TYPE_SIGNED (long double)); - /* Integer representation. */ - VERIFY (INT_MIN + INT_MAX < 0 - ? (TYPE_TWOS_COMPLEMENT (int) - && ! TYPE_ONES_COMPLEMENT (int) && ! TYPE_SIGNED_MAGNITUDE (int)) - : (! TYPE_TWOS_COMPLEMENT (int) - && (TYPE_ONES_COMPLEMENT (int) || TYPE_SIGNED_MAGNITUDE (int)))); + /* Integer representation. Check that it is two's complement. */ + VERIFY (INT_MIN + INT_MAX < 0); /* TYPE_MINIMUM, TYPE_MAXIMUM. */ VERIFY (TYPE_MINIMUM (char) == CHAR_MIN); @@ -128,148 +133,238 @@ main (void) #endif /* All the INT_<op>_RANGE_OVERFLOW tests are equally valid as - INT_<op>_OVERFLOW tests, so define a single macro to do both. */ - #define CHECK_BINOP(op, a, b, min, max, overflow) \ - (INT_##op##_RANGE_OVERFLOW (a, b, min, max) == (overflow) \ - && INT_##op##_OVERFLOW (a, b) == (overflow)) - #define CHECK_UNOP(op, a, min, max, overflow) \ - (INT_##op##_RANGE_OVERFLOW (a, min, max) == (overflow) \ - && INT_##op##_OVERFLOW (a) == (overflow)) + INT_<op>_OVERFLOW tests, so define macros to do both. OP is the + operation, OPNAME its symbolic name, A and B its operands, T the + result type, V the overflow flag, and VRES the result if V and if + two's complement. CHECK_BINOP is for most binary operatinos, + CHECK_SBINOP for binary +, -, * when the result type is signed, + and CHECK_UNOP for unary operations. */ + #define CHECK_BINOP(op, opname, a, b, t, v, vres) \ + VERIFY (INT_##opname##_RANGE_OVERFLOW (a, b, TYPE_MINIMUM (t), \ + TYPE_MAXIMUM (t)) \ + == (v)); \ + VERIFY (INT_##opname##_OVERFLOW (a, b) == (v)) + #define CHECK_SBINOP(op, opname, a, b, t, v, vres) \ + CHECK_BINOP(op, opname, a, b, t, v, vres); \ + { \ + t result; \ + ASSERT (INT_##opname##_WRAPV (a, b, &result) == (v)); \ + ASSERT (result == ((v) ? (vres) : ((a) op (b)))); \ + } + #define CHECK_UNOP(op, opname, a, t, v) \ + VERIFY (INT_##opname##_RANGE_OVERFLOW (a, TYPE_MINIMUM (t), \ + TYPE_MAXIMUM (t)) \ + == (v)); \ + VERIFY (INT_##opname##_OVERFLOW (a) == (v)) /* INT_<op>_RANGE_OVERFLOW, INT_<op>_OVERFLOW. */ VERIFY (INT_ADD_RANGE_OVERFLOW (INT_MAX, 1, INT_MIN, INT_MAX)); VERIFY (INT_ADD_OVERFLOW (INT_MAX, 1)); - VERIFY (CHECK_BINOP (ADD, INT_MAX, 1, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (ADD, INT_MAX, -1, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_BINOP (ADD, INT_MIN, 1, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_BINOP (ADD, INT_MIN, -1, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (ADD, UINT_MAX, 1u, 0u, UINT_MAX, true)); - VERIFY (CHECK_BINOP (ADD, 0u, 1u, 0u, UINT_MAX, false)); - - VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, 1, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, -1, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, 1, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, -1, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_BINOP (SUBTRACT, UINT_MAX, 1u, 0u, UINT_MAX, false)); - VERIFY (CHECK_BINOP (SUBTRACT, 0u, 1u, 0u, UINT_MAX, true)); - - VERIFY (CHECK_UNOP (NEGATE, INT_MIN, INT_MIN, INT_MAX, - TYPE_TWOS_COMPLEMENT (int))); - VERIFY (CHECK_UNOP (NEGATE, 0, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_UNOP (NEGATE, INT_MAX, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_UNOP (NEGATE, 0u, 0u, UINT_MAX, false)); - VERIFY (CHECK_UNOP (NEGATE, 1u, 0u, UINT_MAX, true)); - VERIFY (CHECK_UNOP (NEGATE, UINT_MAX, 0u, UINT_MAX, true)); - - VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MAX, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MIN, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MAX, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MIN, INT_MIN, INT_MAX, true)); - VERIFY (CHECK_BINOP (MULTIPLY, -1, INT_MIN, INT_MIN, INT_MAX, - INT_NEGATE_OVERFLOW (INT_MIN))); - VERIFY (CHECK_BINOP (MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX, - LONG_MIN, LONG_MIN, false)); - - VERIFY (CHECK_BINOP (DIVIDE, INT_MIN, -1, INT_MIN, INT_MAX, - INT_NEGATE_OVERFLOW (INT_MIN))); - VERIFY (CHECK_BINOP (DIVIDE, INT_MAX, 1, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_BINOP (DIVIDE, (unsigned int) INT_MIN, - -1u, 0u, UINT_MAX, false)); - - VERIFY (CHECK_BINOP (REMAINDER, INT_MIN, -1, INT_MIN, INT_MAX, - INT_NEGATE_OVERFLOW (INT_MIN))); - VERIFY (CHECK_BINOP (REMAINDER, INT_MAX, 1, INT_MIN, INT_MAX, false)); - VERIFY (CHECK_BINOP (REMAINDER, (unsigned int) INT_MIN, - -1u, 0u, UINT_MAX, false)); - - VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX, 1, 0u, UINT_MAX, true)); - VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2 + 1, 1, 0u, UINT_MAX, true)); - VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2, 1, 0u, UINT_MAX, false)); - - /* INT_<op>_OVERFLOW with mixed types. */ - #define CHECK_SUM(a, b, overflow) \ - VERIFY (INT_ADD_OVERFLOW (a, b) == (overflow)); \ - VERIFY (INT_ADD_OVERFLOW (b, a) == (overflow)) - CHECK_SUM (-1, LONG_MIN, true); - CHECK_SUM (-1, UINT_MAX, false); - CHECK_SUM (-1L, INT_MIN, INT_MIN == LONG_MIN); - CHECK_SUM (0u, -1, true); - CHECK_SUM (0u, 0, false); - CHECK_SUM (0u, 1, false); - CHECK_SUM (1, LONG_MAX, true); - CHECK_SUM (1, UINT_MAX, true); - CHECK_SUM (1L, INT_MAX, INT_MAX == LONG_MAX); - CHECK_SUM (1u, INT_MAX, INT_MAX == UINT_MAX); - CHECK_SUM (1u, INT_MIN, true); - - VERIFY (! INT_SUBTRACT_OVERFLOW (INT_MAX, 1u)); - VERIFY (! INT_SUBTRACT_OVERFLOW (UINT_MAX, 1)); - VERIFY (! INT_SUBTRACT_OVERFLOW (0u, -1)); - VERIFY (INT_SUBTRACT_OVERFLOW (UINT_MAX, -1)); - VERIFY (INT_SUBTRACT_OVERFLOW (INT_MIN, 1u)); - VERIFY (INT_SUBTRACT_OVERFLOW (-1, 0u)); - - #define CHECK_PRODUCT(a, b, overflow) \ - VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (overflow)); \ - VERIFY (INT_MULTIPLY_OVERFLOW (b, a) == (overflow)) - - CHECK_PRODUCT (-1, 1u, true); - CHECK_PRODUCT (-1, INT_MIN, INT_NEGATE_OVERFLOW (INT_MIN)); - CHECK_PRODUCT (-1, UINT_MAX, true); - CHECK_PRODUCT (-12345, LONG_MAX / -12345 - 1, true); - CHECK_PRODUCT (-12345, LONG_MAX / -12345, false); - CHECK_PRODUCT (0, -1, false); - CHECK_PRODUCT (0, 0, false); - CHECK_PRODUCT (0, 0u, false); - CHECK_PRODUCT (0, 1, false); - CHECK_PRODUCT (0, INT_MAX, false); - CHECK_PRODUCT (0, INT_MIN, false); - CHECK_PRODUCT (0, UINT_MAX, false); - CHECK_PRODUCT (0u, -1, false); - CHECK_PRODUCT (0u, 0, false); - CHECK_PRODUCT (0u, 0u, false); - CHECK_PRODUCT (0u, 1, false); - CHECK_PRODUCT (0u, INT_MAX, false); - CHECK_PRODUCT (0u, INT_MIN, false); - CHECK_PRODUCT (0u, UINT_MAX, false); - CHECK_PRODUCT (1, INT_MAX, false); - CHECK_PRODUCT (1, INT_MIN, false); - CHECK_PRODUCT (1, UINT_MAX, false); - CHECK_PRODUCT (1u, INT_MIN, true); - CHECK_PRODUCT (1u, INT_MAX, UINT_MAX < INT_MAX); - CHECK_PRODUCT (INT_MAX, UINT_MAX, true); - CHECK_PRODUCT (INT_MAX, ULONG_MAX, true); - CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, true); - CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN, false); - CHECK_PRODUCT (INT_MIN, UINT_MAX, true); - CHECK_PRODUCT (INT_MIN, ULONG_MAX, true); - - VERIFY (INT_DIVIDE_OVERFLOW (INT_MIN, -1L) - == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN)); - VERIFY (! INT_DIVIDE_OVERFLOW (INT_MIN, UINT_MAX)); - VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINTMAX_MAX)); - VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINT_MAX)); - VERIFY (INT_DIVIDE_OVERFLOW (-11, 10u)); - VERIFY (INT_DIVIDE_OVERFLOW (-10, 10u)); - VERIFY (! INT_DIVIDE_OVERFLOW (-9, 10u)); - VERIFY (INT_DIVIDE_OVERFLOW (11u, -10)); - VERIFY (INT_DIVIDE_OVERFLOW (10u, -10)); - VERIFY (! INT_DIVIDE_OVERFLOW (9u, -10)); - - VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, -1L) - == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN)); - VERIFY (INT_REMAINDER_OVERFLOW (-1, UINT_MAX)); - VERIFY (INT_REMAINDER_OVERFLOW ((intmax_t) -1, UINTMAX_MAX)); - VERIFY (INT_REMAINDER_OVERFLOW (INTMAX_MIN, UINT_MAX) - == (INTMAX_MAX < UINT_MAX - && - (unsigned int) INTMAX_MIN % UINT_MAX != 0)); - VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, ULONG_MAX) - == (INT_MIN % ULONG_MAX != 1)); - VERIFY (! INT_REMAINDER_OVERFLOW (1u, -1)); - VERIFY (! INT_REMAINDER_OVERFLOW (37*39u, -39)); - VERIFY (INT_REMAINDER_OVERFLOW (37*39u + 1, -39)); - VERIFY (INT_REMAINDER_OVERFLOW (37*39u - 1, -39)); - VERIFY (! INT_REMAINDER_OVERFLOW (LONG_MAX, -INT_MAX)); + + CHECK_SBINOP (+, ADD, INT_MAX, 1, int, true, INT_MIN); + CHECK_SBINOP (+, ADD, INT_MAX, -1, int, false, INT_MAX - 1); + CHECK_SBINOP (+, ADD, INT_MIN, 1, int, false, INT_MIN + 1); + CHECK_SBINOP (+, ADD, INT_MIN, -1, int, true, INT_MAX); + CHECK_BINOP (+, ADD, UINT_MAX, 1u, unsigned int, true, 0u); + CHECK_BINOP (+, ADD, 0u, 1u, unsigned int, false, 1u); + + CHECK_SBINOP (-, SUBTRACT, INT_MAX, 1, int, false, INT_MAX - 1); + CHECK_SBINOP (-, SUBTRACT, INT_MAX, -1, int, true, INT_MIN); + CHECK_SBINOP (-, SUBTRACT, INT_MIN, 1, int, true, INT_MAX); + CHECK_SBINOP (-, SUBTRACT, INT_MIN, -1, int, false, INT_MIN - -1); + CHECK_BINOP (-, SUBTRACT, UINT_MAX, 1u, unsigned int, false, UINT_MAX - 1u); + CHECK_BINOP (-, SUBTRACT, 0u, 1u, unsigned int, true, 0u - 1u); + + CHECK_UNOP (-, NEGATE, INT_MIN, int, true); + CHECK_UNOP (-, NEGATE, 0, int, false); + CHECK_UNOP (-, NEGATE, INT_MAX, int, false); + CHECK_UNOP (-, NEGATE, 0u, unsigned int, false); + CHECK_UNOP (-, NEGATE, 1u, unsigned int, true); + CHECK_UNOP (-, NEGATE, UINT_MAX, unsigned int, true); + + CHECK_SBINOP (*, MULTIPLY, INT_MAX, INT_MAX, int, true, 1); + CHECK_SBINOP (*, MULTIPLY, INT_MAX, INT_MIN, int, true, INT_MIN); + CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MAX, int, true, INT_MIN); + CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MIN, int, true, 0); + CHECK_SBINOP (*, MULTIPLY, -1, INT_MIN, int, + INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN); + CHECK_SBINOP (*, MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX, + long int, false, LONG_MIN - LONG_MIN % INT_MAX); + + CHECK_BINOP (/, DIVIDE, INT_MIN, -1, int, + INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN); + CHECK_BINOP (/, DIVIDE, INT_MAX, 1, int, false, INT_MAX); + CHECK_BINOP (/, DIVIDE, (unsigned int) INT_MIN, -1u, unsigned int, + false, INT_MIN / -1u); + + CHECK_BINOP (%, REMAINDER, INT_MIN, -1, int, INT_NEGATE_OVERFLOW (INT_MIN), 0); + CHECK_BINOP (%, REMAINDER, INT_MAX, 1, int, false, 0); + CHECK_BINOP (%, REMAINDER, (unsigned int) INT_MIN, -1u, unsigned int, + false, INT_MIN % -1u); + + CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX, 1, unsigned int, true, UINT_MAX << 1); + CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX / 2 + 1, 1, unsigned int, true, + (UINT_MAX / 2 + 1) << 1); + CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX / 2, 1, unsigned int, false, + (UINT_MAX / 2) << 1); + + /* INT_<op>_OVERFLOW and INT_<op>_WRAPV with mixed types. */ + #define CHECK_SUM(a, b, t, v, vres) \ + CHECK_SUM1(a, b, t, v, vres); \ + CHECK_SUM1(b, a, t, v, vres) + #define CHECK_SSUM(a, b, t, v, vres) \ + CHECK_SSUM1(a, b, t, v, vres); \ + CHECK_SSUM1(b, a, t, v, vres) + #define CHECK_SUM1(a, b, t, v, vres) \ + VERIFY (INT_ADD_OVERFLOW (a, b) == (v)) + #define CHECK_SSUM1(a, b, t, v, vres) \ + CHECK_SUM1(a, b, t, v, vres); \ + { \ + t result; \ + ASSERT (INT_ADD_WRAPV (a, b, &result) == (v)); \ + ASSERT (result == ((v) ? (vres) : ((a) + (b)))); \ + } + CHECK_SSUM (-1, LONG_MIN, long int, true, LONG_MAX); + CHECK_SUM (-1, UINT_MAX, unsigned int, false, DONTCARE); + CHECK_SSUM (-1L, INT_MIN, long int, INT_MIN == LONG_MIN, + INT_MIN == LONG_MIN ? INT_MAX : DONTCARE); + CHECK_SUM (0u, -1, unsigned int, true, 0u + -1); + CHECK_SUM (0u, 0, unsigned int, false, DONTCARE); + CHECK_SUM (0u, 1, unsigned int, false, DONTCARE); + CHECK_SSUM (1, LONG_MAX, long int, true, LONG_MIN); + CHECK_SUM (1, UINT_MAX, unsigned int, true, 0u); + CHECK_SSUM (1L, INT_MAX, long int, INT_MAX == LONG_MAX, + INT_MAX == LONG_MAX ? INT_MIN : DONTCARE); + CHECK_SUM (1u, INT_MAX, unsigned int, INT_MAX == UINT_MAX, 1u + INT_MAX); + CHECK_SUM (1u, INT_MIN, unsigned int, true, 1u + INT_MIN); + { + long int result; + ASSERT (INT_ADD_WRAPV (1, INT_MAX, &result) == (INT_MAX == LONG_MAX)); + ASSERT (INT_ADD_WRAPV (-1, INT_MIN, &result) == (INT_MIN == LONG_MIN)); + } + + #define CHECK_DIFFERENCE(a, b, t, v, vres) \ + VERIFY (INT_SUBTRACT_OVERFLOW (a, b) == (v)) + #define CHECK_SDIFFERENCE(a, b, t, v, vres) \ + CHECK_DIFFERENCE(a, b, t, v, vres); \ + { \ + t result; \ + ASSERT (INT_SUBTRACT_WRAPV (a, b, &result) == (v)); \ + ASSERT (result == ((v) ? (vres) : ((a) - (b)))); \ + } + CHECK_DIFFERENCE (INT_MAX, 1u, unsigned int, UINT_MAX < INT_MAX - 1, + INT_MAX - 1u); + CHECK_DIFFERENCE (UINT_MAX, 1, unsigned int, false, UINT_MAX - 1); + CHECK_DIFFERENCE (0u, -1, unsigned int, false, 0u - -1); + CHECK_DIFFERENCE (UINT_MAX, -1, unsigned int, true, UINT_MAX - -1); + CHECK_DIFFERENCE (INT_MIN, 1u, unsigned int, true, INT_MIN - 1u); + CHECK_DIFFERENCE (-1, 0u, unsigned int, true, -1 - 0u); + CHECK_SDIFFERENCE (-1, INT_MIN, int, false, -1 - INT_MIN); + CHECK_SDIFFERENCE (-1, INT_MAX, int, false, -1 - INT_MAX); + CHECK_SDIFFERENCE (0, INT_MIN, int, INT_MIN < -INT_MAX, INT_MIN); + CHECK_SDIFFERENCE (0, INT_MAX, int, false, 0 - INT_MAX); + { + long int result; + ASSERT (INT_SUBTRACT_WRAPV (INT_MAX, -1, &result) == (INT_MAX == LONG_MAX)); + ASSERT (INT_SUBTRACT_WRAPV (INT_MIN, 1, &result) == (INT_MAX == LONG_MAX)); + } + + #define CHECK_PRODUCT(a, b, t, v, vres) \ + CHECK_PRODUCT1(a, b, t, v, vres); \ + CHECK_PRODUCT1(b, a, t, v, vres) + #define CHECK_SPRODUCT(a, b, t, v, vres) \ + CHECK_SPRODUCT1(a, b, t, v, vres); \ + CHECK_SPRODUCT1(b, a, t, v, vres) + #define CHECK_PRODUCT1(a, b, t, v, vres) \ + VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (v)) + #define CHECK_SPRODUCT1(a, b, t, v, vres) \ + CHECK_PRODUCT1(a, b, t, v, vres); \ + { \ + t result; \ + ASSERT (INT_MULTIPLY_WRAPV (a, b, &result) == (v)); \ + ASSERT (result == ((v) ? (vres) : ((a) * (b)))); \ + } + CHECK_PRODUCT (-1, 1u, unsigned int, true, -1 * 1u); + CHECK_SPRODUCT (-1, INT_MIN, int, INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN); + CHECK_PRODUCT (-1, UINT_MAX, unsigned int, true, -1 * UINT_MAX); + CHECK_SPRODUCT (-32768, LONG_MAX / -32768 - 1, long int, true, LONG_MIN); + CHECK_SPRODUCT (-12345, LONG_MAX / -12345, long int, false, DONTCARE); + CHECK_SPRODUCT (0, -1, int, false, DONTCARE); + CHECK_SPRODUCT (0, 0, int, false, DONTCARE); + CHECK_PRODUCT (0, 0u, unsigned int, false, DONTCARE); + CHECK_SPRODUCT (0, 1, int, false, DONTCARE); + CHECK_SPRODUCT (0, INT_MAX, int, false, DONTCARE); + CHECK_SPRODUCT (0, INT_MIN, int, false, DONTCARE); + CHECK_PRODUCT (0, UINT_MAX, unsigned int, false, DONTCARE); + CHECK_PRODUCT (0u, -1, unsigned int, false, DONTCARE); + CHECK_PRODUCT (0u, 0, unsigned int, false, DONTCARE); + CHECK_PRODUCT (0u, 0u, unsigned int, false, DONTCARE); + CHECK_PRODUCT (0u, 1, unsigned int, false, DONTCARE); + CHECK_PRODUCT (0u, INT_MAX, unsigned int, false, DONTCARE); + CHECK_PRODUCT (0u, INT_MIN, unsigned int, false, DONTCARE); + CHECK_PRODUCT (0u, UINT_MAX, unsigned int, false, DONTCARE); + CHECK_SPRODUCT (1, INT_MAX, int, false, DONTCARE); + CHECK_SPRODUCT (1, INT_MIN, int, false, DONTCARE); + CHECK_PRODUCT (1, UINT_MAX, unsigned int, false, DONTCARE); + CHECK_PRODUCT (1u, INT_MIN, unsigned int, true, 1u * INT_MIN); + CHECK_PRODUCT (1u, INT_MAX, unsigned int, UINT_MAX < INT_MAX, 1u * INT_MAX); + CHECK_PRODUCT (INT_MAX, UINT_MAX, unsigned int, true, INT_MAX * UINT_MAX); + CHECK_PRODUCT (INT_MAX, ULONG_MAX, unsigned long int, true, + INT_MAX * ULONG_MAX); + CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, long int, true, LONG_MIN); + CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN, long int, false, DONTCARE); + CHECK_PRODUCT (INT_MIN, UINT_MAX, unsigned int, true, INT_MIN * UINT_MAX); + CHECK_PRODUCT (INT_MIN, ULONG_MAX, unsigned long int, true, + INT_MIN * ULONG_MAX); + { + long int result; + ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result) + == (LONG_MAX / INT_MAX < INT_MAX)); + ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result) + || result == INT_MAX * (long int) INT_MAX); + ASSERT (INT_MULTIPLY_WRAPV (INT_MIN, INT_MIN, &result) + || result == INT_MIN * (long int) INT_MIN); + } + +# ifdef LLONG_MAX + { + long long int result; + ASSERT (INT_MULTIPLY_WRAPV (LONG_MAX, LONG_MAX, &result) + == (LLONG_MAX / LONG_MAX < LONG_MAX)); + ASSERT (INT_MULTIPLY_WRAPV (LONG_MAX, LONG_MAX, &result) + || result == LONG_MAX * (long long int) LONG_MAX); + ASSERT (INT_MULTIPLY_WRAPV (LONG_MIN, LONG_MIN, &result) + || result == LONG_MIN * (long long int) LONG_MIN); + } +# endif + + #define CHECK_QUOTIENT(a, b, v) VERIFY (INT_DIVIDE_OVERFLOW (a, b) == (v)) + + CHECK_QUOTIENT (INT_MIN, -1L, INT_MIN == LONG_MIN); + CHECK_QUOTIENT (INT_MIN, UINT_MAX, false); + CHECK_QUOTIENT (INTMAX_MIN, UINTMAX_MAX, false); + CHECK_QUOTIENT (INTMAX_MIN, UINT_MAX, false); + CHECK_QUOTIENT (-11, 10u, true); + CHECK_QUOTIENT (-10, 10u, true); + CHECK_QUOTIENT (-9, 10u, false); + CHECK_QUOTIENT (11u, -10, true); + CHECK_QUOTIENT (10u, -10, true); + CHECK_QUOTIENT (9u, -10, false); + + #define CHECK_REMAINDER(a, b, v) VERIFY (INT_REMAINDER_OVERFLOW (a, b) == (v)) + + CHECK_REMAINDER (INT_MIN, -1L, INT_MIN == LONG_MIN); + CHECK_REMAINDER (-1, UINT_MAX, true); + CHECK_REMAINDER ((intmax_t) -1, UINTMAX_MAX, true); + CHECK_REMAINDER (INTMAX_MIN, UINT_MAX, + (INTMAX_MAX < UINT_MAX + && - (unsigned int) INTMAX_MIN % UINT_MAX != 0)); + CHECK_REMAINDER (INT_MIN, ULONG_MAX, INT_MIN % ULONG_MAX != 1); + CHECK_REMAINDER (1u, -1, false); + CHECK_REMAINDER (37*39u, -39, false); + CHECK_REMAINDER (37*39u + 1, -39, true); + CHECK_REMAINDER (37*39u - 1, -39, true); + CHECK_REMAINDER (LONG_MAX, -INT_MAX, false); return 0; } diff --git a/tests/test-inttypes.c b/tests/test-inttypes.c index 7fa18b2..9a3193c 100644 --- a/tests/test-inttypes.c +++ b/tests/test-inttypes.c @@ -1,5 +1,5 @@ /* Test of <inttypes.h> substitute. - Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-isnand-nolibm.c b/tests/test-isnand-nolibm.c index 984d184..fd3bbaf 100644 --- a/tests/test-isnand-nolibm.c +++ b/tests/test-isnand-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnand() substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-isnand.h b/tests/test-isnand.h index 06fc183..8bc4139 100644 --- a/tests/test-isnand.h +++ b/tests/test-isnand.h @@ -1,5 +1,5 @@ /* Test of isnand() substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-isnanf-nolibm.c b/tests/test-isnanf-nolibm.c index 7f70eb5..42f5b10 100644 --- a/tests/test-isnanf-nolibm.c +++ b/tests/test-isnanf-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnanf() substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-isnanf.h b/tests/test-isnanf.h index cf51f12..abb992d 100644 --- a/tests/test-isnanf.h +++ b/tests/test-isnanf.h @@ -1,5 +1,5 @@ /* Test of isnanf() substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-isnanl-nolibm.c b/tests/test-isnanl-nolibm.c index 63ea5a9..e7bad11 100644 --- a/tests/test-isnanl-nolibm.c +++ b/tests/test-isnanl-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-isnanl.h b/tests/test-isnanl.h index 2e65afa..25985e7 100644 --- a/tests/test-isnanl.h +++ b/tests/test-isnanl.h @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-iswblank.c b/tests/test-iswblank.c index f1fbe41..175718f 100644 --- a/tests/test-iswblank.c +++ b/tests/test-iswblank.c @@ -1,5 +1,5 @@ /* Test of iswblank() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-langinfo.c b/tests/test-langinfo.c index b038ca3..30b0007 100644 --- a/tests/test-langinfo.c +++ b/tests/test-langinfo.c @@ -1,5 +1,5 @@ /* Test of <langinfo.h> substitute. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-limits-h.c b/tests/test-limits-h.c new file mode 100644 index 0000000..f5576bf --- /dev/null +++ b/tests/test-limits-h.c @@ -0,0 +1,50 @@ +/* Test of <limits.h> substitute. + Copyright 2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Paul Eggert. */ + +#include <config.h> + +#include <limits.h> + +#include "verify.h" + +#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Woverlength-strings" +#endif + +/* Macros specified by ISO/IEC TS 18661-1:2014. */ + +#define verify_width(width, min, max) \ + verify ((max) >> ((width) - 1 - ((min) < 0)) == 1) + +verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX); +verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX); +verify_width (UCHAR_WIDTH, 0, UCHAR_MAX); +verify_width (SHRT_WIDTH, SHRT_MIN, SHRT_MAX); +verify_width (USHRT_WIDTH, 0, USHRT_MAX); +verify_width (INT_WIDTH, INT_MIN, INT_MAX); +verify_width (UINT_WIDTH, 0, UINT_MAX); +verify_width (LONG_WIDTH, LONG_MIN, LONG_MAX); +verify_width (ULONG_WIDTH, 0, ULONG_MAX); +verify_width (LLONG_WIDTH, LLONG_MIN, LLONG_MAX); +verify_width (ULLONG_WIDTH, 0, ULLONG_MAX); + +int +main (void) +{ + return 0; +} diff --git a/tests/test-locale.c b/tests/test-locale.c index 5383cff..c1811af 100644 --- a/tests/test-locale.c +++ b/tests/test-locale.c @@ -1,5 +1,5 @@ /* Test of <locale.h> substitute. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-localename.c b/tests/test-localename.c index b5dd742..be8fcaf 100644 --- a/tests/test-localename.c +++ b/tests/test-localename.c @@ -1,5 +1,5 @@ /* Test of gl_locale_name function and its variants. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -183,6 +183,8 @@ test_locale_name (void) ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); + uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } @@ -194,11 +196,13 @@ test_locale_name (void) for (i = 0; i < SIZEOF (categories); i++) { int category_mask = categories[i].mask; - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) + locale_t loc = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); + if (loc != NULL) { - locale = newlocale (category_mask, "de_DE.UTF-8", locale); - if (locale != NULL) + locale_t locale = newlocale (category_mask, "de_DE.UTF-8", loc); + if (locale == NULL) + freelocale (loc); + else { unsigned int j; @@ -212,6 +216,8 @@ test_locale_name (void) else ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0); } + uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } } @@ -245,6 +251,8 @@ test_locale_name_thread (void) ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); name = gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); + uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } @@ -256,11 +264,13 @@ test_locale_name_thread (void) for (i = 0; i < SIZEOF (categories); i++) { int category_mask = categories[i].mask; - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) + locale_t loc = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); + if (loc != NULL) { - locale = newlocale (category_mask, "de_DE.UTF-8", locale); - if (locale != NULL) + locale_t locale = newlocale (category_mask, "de_DE.UTF-8", loc); + if (locale == NULL) + freelocale (loc); + else { unsigned int j; @@ -275,6 +285,8 @@ test_locale_name_thread (void) else ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0); } + uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } } @@ -444,6 +456,7 @@ test_locale_name_thread (void) ASSERT (strcmp (unsaved_names[j][i], name) == 0); } uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } /* Verify the unsaved_names are still valid. */ @@ -453,7 +466,10 @@ test_locale_name_thread (void) unsigned int i; for (i = 0; i < SIZEOF (categories); i++) - ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0); + { + ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0); + free (saved_names[j][i]); + } } } #else @@ -590,6 +606,8 @@ test_locale_name_posix (void) uselocale (locale); name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); + uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } #endif @@ -702,6 +720,8 @@ test_locale_name_environ (void) uselocale (locale); name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); ASSERT (strcmp (name, "C") == 0); + uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } #endif @@ -729,6 +749,8 @@ test_locale_name_default (void) { uselocale (locale); ASSERT (strcmp (gl_locale_name_default (), name) == 0); + uselocale (LC_GLOBAL_LOCALE); + freelocale (locale); } } #endif diff --git a/tests/test-lock.c b/tests/test-lock.c index a992f64..cb734b4 100644 --- a/tests/test-lock.c +++ b/tests/test-lock.c @@ -1,5 +1,5 @@ /* Test of locking in multithreaded situations. - Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-malloca.c b/tests/test-malloca.c index 717ede0..e9ab83d 100644 --- a/tests/test-malloca.c +++ b/tests/test-malloca.c @@ -1,5 +1,5 @@ /* Test of safe automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-math.c b/tests/test-math.c index 7ac8b9a..de73b31 100644 --- a/tests/test-math.c +++ b/tests/test-math.c @@ -1,5 +1,5 @@ /* Test of <math.h> substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-mbrtowc-w32.c b/tests/test-mbrtowc-w32.c index efb1ddd..f637330 100644 --- a/tests/test-mbrtowc-w32.c +++ b/tests/test-mbrtowc-w32.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-mbrtowc.c b/tests/test-mbrtowc.c index d24b93e..f7fed6a 100644 --- a/tests/test-mbrtowc.c +++ b/tests/test-mbrtowc.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -72,6 +72,10 @@ main (int argc, char *argv[]) for (c = 0; c < 0x100; c++) switch (c) { + default: + if (! (c && 1 < argc && argv[1][0] == '5')) + break; + /* Fall through. */ case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': @@ -93,7 +97,8 @@ main (int argc, char *argv[]) case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': - /* c is in the ISO C "basic character set". */ + /* c is in the ISO C "basic character set", or argv[1] starts + with '5' so we are testing all nonnull bytes. */ buf[0] = c; wc = (wchar_t) 0xBADFACE; ret = mbrtowc (&wc, buf, 1, &state); @@ -334,6 +339,10 @@ main (int argc, char *argv[]) ASSERT (mbsinit (&state)); } return 0; + + case '5': + /* C locale; tested above. */ + return 0; } return 1; diff --git a/tests/test-mbrtowc5.sh b/tests/test-mbrtowc5.sh new file mode 100755 index 0000000..c10b228 --- /dev/null +++ b/tests/test-mbrtowc5.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Test whether the POSIX locale has encoding errors. +LC_ALL=C \ +./test-mbrtowc${EXEEXT} 5 || exit +LC_ALL=POSIX \ +./test-mbrtowc${EXEEXT} 5 diff --git a/tests/test-mbsinit.c b/tests/test-mbsinit.c index 98db1f1..8cd1c4d 100644 --- a/tests/test-mbsinit.c +++ b/tests/test-mbsinit.c @@ -1,5 +1,5 @@ /* Test of test for initial conversion state. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-memchr.c b/tests/test-memchr.c index bc1acf9..1526ed2 100644 --- a/tests/test-memchr.c +++ b/tests/test-memchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2015 Free Software Foundation, Inc. + * Copyright (C) 2008-2016 Free Software Foundation, Inc. * Written by Eric Blake and Bruno Haible * * This program is free software: you can redistribute it and/or modify diff --git a/tests/test-printf-frexp.c b/tests/test-printf-frexp.c index fc2bf56..4876974 100644 --- a/tests/test-printf-frexp.c +++ b/tests/test-printf-frexp.c @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-printf-frexpl.c b/tests/test-printf-frexpl.c index ba9540d..29bb9e5 100644 --- a/tests/test-printf-frexpl.c +++ b/tests/test-printf-frexpl.c @@ -1,5 +1,5 @@ /* Test of splitting a 'long double' into fraction and mantissa. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-setenv.c b/tests/test-setenv.c index a7ef488..519dc27 100644 --- a/tests/test-setenv.c +++ b/tests/test-setenv.c @@ -1,5 +1,5 @@ /* Tests of setenv. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-setlocale1.c b/tests/test-setlocale1.c index 6e0ef9d..143c0d8 100644 --- a/tests/test-setlocale1.c +++ b/tests/test-setlocale1.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,6 +54,8 @@ main (int argc, char *argv[]) /* Test that the two results are the same. */ ASSERT (strcmp (name1, name2) == 0); + free (name1); + free (name2); return 0; } diff --git a/tests/test-setlocale2.c b/tests/test-setlocale2.c index 1bd8a5c..52e65d8 100644 --- a/tests/test-setlocale2.c +++ b/tests/test-setlocale2.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-signbit.c b/tests/test-signbit.c index 80e9a08..878b7eb 100644 --- a/tests/test-signbit.c +++ b/tests/test-signbit.c @@ -1,5 +1,5 @@ /* Test of signbit() substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-stdalign.c b/tests/test-stdalign.c index 68b9ef1..0f240c5 100644 --- a/tests/test-stdalign.c +++ b/tests/test-stdalign.c @@ -1,5 +1,5 @@ /* Test of <stdalign.h>. - Copyright 2009-2015 Free Software Foundation, Inc. + Copyright 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-stdbool.c b/tests/test-stdbool.c index 1da25d0..45dc837 100644 --- a/tests/test-stdbool.c +++ b/tests/test-stdbool.c @@ -1,5 +1,5 @@ /* Test of <stdbool.h> substitute. - Copyright (C) 2002-2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-stddef.c b/tests/test-stddef.c index aa6ae54..bfb72a0 100644 --- a/tests/test-stddef.c +++ b/tests/test-stddef.c @@ -1,5 +1,5 @@ /* Test of <stddef.h> substitute. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-stdint.c b/tests/test-stdint.c index 8d54db2..6eb1d2e 100644 --- a/tests/test-stdint.c +++ b/tests/test-stdint.c @@ -1,5 +1,5 @@ /* Test of <stdint.h> substitute. - Copyright (C) 2006-2015 Free Software Foundation, Inc. + Copyright (C) 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -351,6 +351,73 @@ verify_same_types (INTMAX_C (17), (intmax_t)0 + 0); verify (UINTMAX_C (17) == 17); verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); +/* Use _GL_VERIFY (with a fixed-length diagnostic string) rather than verify, + because the latter would require forming each stringified expression, and + many of these would be so long as to trigger a warning/error like this: + + test-stdint.c:407:1: error: string length '6980' is greater than the \ + length '4095' ISO C99 compilers are required to support \ + [-Werror=overlength-strings] + */ +#define verify_width(width, min, max) \ + _GL_VERIFY ((max) >> ((width) - 1 - ((min) < 0)) == 1, \ + "verify_width check") + +/* Macros specified by ISO/IEC TS 18661-1:2014. */ + +#ifdef INT8_MAX +verify_width (INT8_WIDTH, INT8_MIN, INT8_MAX); +#endif +#ifdef UINT8_MAX +verify_width (UINT8_WIDTH, 0, UINT8_MAX); +#endif +#ifdef INT16_MAX +verify_width (INT16_WIDTH, INT16_MIN, INT16_MAX); +#endif +#ifdef UINT16_MAX +verify_width (UINT16_WIDTH, 0, UINT16_MAX); +#endif +#ifdef INT32_MAX +verify_width (INT32_WIDTH, INT32_MIN, INT32_MAX); +#endif +#ifdef UINT32_MAX +verify_width (UINT32_WIDTH, 0, UINT32_MAX); +#endif +#ifdef INT64_MAX +verify_width (INT64_WIDTH, INT64_MIN, INT64_MAX); +#endif +#ifdef UINT64_MAX +verify_width (UINT64_WIDTH, 0, UINT64_MAX); +#endif +verify_width (INT_LEAST8_WIDTH, INT_LEAST8_MIN, INT_LEAST8_MAX); +verify_width (UINT_LEAST8_WIDTH, 0, UINT_LEAST8_MAX); +verify_width (INT_LEAST16_WIDTH, INT_LEAST16_MIN, INT_LEAST16_MAX); +verify_width (UINT_LEAST16_WIDTH, 0, UINT_LEAST16_MAX); +verify_width (INT_LEAST32_WIDTH, INT_LEAST32_MIN, INT_LEAST32_MAX); +verify_width (UINT_LEAST32_WIDTH, 0, UINT_LEAST32_MAX); +verify_width (INT_LEAST64_WIDTH, INT_LEAST64_MIN, INT_LEAST64_MAX); +verify_width (UINT_LEAST64_WIDTH, 0, UINT_LEAST64_MAX); +verify_width (INT_FAST8_WIDTH, INT_FAST8_MIN, INT_FAST8_MAX); +verify_width (UINT_FAST8_WIDTH, 0, UINT_FAST8_MAX); +verify_width (INT_FAST16_WIDTH, INT_FAST16_MIN, INT_FAST16_MAX); +verify_width (UINT_FAST16_WIDTH, 0, UINT_FAST16_MAX); +verify_width (INT_FAST32_WIDTH, INT_FAST32_MIN, INT_FAST32_MAX); +verify_width (UINT_FAST32_WIDTH, 0, UINT_FAST32_MAX); +verify_width (INT_FAST64_WIDTH, INT_FAST64_MIN, INT_FAST64_MAX); +verify_width (UINT_FAST64_WIDTH, 0, UINT_FAST64_MAX); +verify_width (INTPTR_WIDTH, INTPTR_MIN, INTPTR_MAX); +verify_width (UINTPTR_WIDTH, 0, UINTPTR_MAX); +verify_width (INTMAX_WIDTH, INTMAX_MIN, INTMAX_MAX); +verify_width (UINTMAX_WIDTH, 0, UINTMAX_MAX); +verify_width (PTRDIFF_WIDTH, PTRDIFF_MIN, PTRDIFF_MAX); +verify_width (SIZE_WIDTH, 0, SIZE_MAX); +verify_width (WCHAR_WIDTH, WCHAR_MIN, WCHAR_MAX); +#ifdef WINT_MAX +verify_width (WINT_WIDTH, WINT_MIN, WINT_MAX); +#endif +#ifdef SIG_ATOMIC_MAX +verify_width (SIG_ATOMIC_WIDTH, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX); +#endif int main (void) diff --git a/tests/test-stdio.c b/tests/test-stdio.c index cbec2a6..6cde888 100644 --- a/tests/test-stdio.c +++ b/tests/test-stdio.c @@ -1,5 +1,5 @@ /* Test of <stdio.h> substitute. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-stdlib.c b/tests/test-stdlib.c index b2da7ec..a1fc0d8 100644 --- a/tests/test-stdlib.c +++ b/tests/test-stdlib.c @@ -1,5 +1,5 @@ /* Test of <stdlib.h> substitute. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-strerror.c b/tests/test-strerror.c index 755ffba..80ffe1c 100644 --- a/tests/test-strerror.c +++ b/tests/test-strerror.c @@ -1,5 +1,5 @@ /* Test of strerror() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-striconveh.c b/tests/test-striconveh.c index a4b48fb..de5e657 100644 --- a/tests/test-striconveh.c +++ b/tests/test-striconveh.c @@ -1,5 +1,5 @@ /* Test of character set conversion with error handling. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-striconveha.c b/tests/test-striconveha.c index 19e4318..63c950f 100644 --- a/tests/test-striconveha.c +++ b/tests/test-striconveha.c @@ -1,5 +1,5 @@ /* Test of character set conversion with error handling and autodetection. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-string.c b/tests/test-string.c index 647d3b9..f4c60f7 100644 --- a/tests/test-string.c +++ b/tests/test-string.c @@ -1,5 +1,5 @@ /* Test of <string.h> substitute. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-strncat.c b/tests/test-strncat.c index c3467ac..d4a4f8c 100644 --- a/tests/test-strncat.c +++ b/tests/test-strncat.c @@ -1,5 +1,5 @@ /* Test of strncat() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-strstr.c b/tests/test-strstr.c index 70ebf50..eaefb06 100644 --- a/tests/test-strstr.c +++ b/tests/test-strstr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007-2015 Free Software Foundation, Inc. + * Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc. * Written by Bruno Haible and Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/tests/test-sys_types.c b/tests/test-sys_types.c index 1ef3b90..7f8fb6d 100644 --- a/tests/test-sys_types.c +++ b/tests/test-sys_types.c @@ -1,5 +1,5 @@ /* Test of <sys/types.h> substitute. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-sys_wait.h b/tests/test-sys_wait.h index e4a79b5..7389be4 100644 --- a/tests/test-sys_wait.h +++ b/tests/test-sys_wait.h @@ -1,5 +1,5 @@ /* Test of macros shared between <sys/wait.h> and <stdlib.h>. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-thread_create.c b/tests/test-thread_create.c index c6dbc7b..f6b7e56 100644 --- a/tests/test-thread_create.c +++ b/tests/test-thread_create.c @@ -1,5 +1,5 @@ /* Test of gl_thread_create () macro. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-thread_self.c b/tests/test-thread_self.c index 1d2d05e..85c4185 100644 --- a/tests/test-thread_self.c +++ b/tests/test-thread_self.c @@ -1,5 +1,5 @@ /* Test of gl_thread_self () macro. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-unistd.c b/tests/test-unistd.c index 930b5e2..463ef57 100644 --- a/tests/test-unistd.c +++ b/tests/test-unistd.c @@ -1,5 +1,5 @@ /* Test of <unistd.h> substitute. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-unsetenv.c b/tests/test-unsetenv.c index 235e185..fe4548d 100644 --- a/tests/test-unsetenv.c +++ b/tests/test-unsetenv.c @@ -1,5 +1,5 @@ /* Tests of unsetenv. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-verify.c b/tests/test-verify.c index 640dc42..d7ca053 100644 --- a/tests/test-verify.c +++ b/tests/test-verify.c @@ -1,6 +1,6 @@ /* Test the "verify" module. - Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-wchar.c b/tests/test-wchar.c index e857ab5..e118048 100644 --- a/tests/test-wchar.c +++ b/tests/test-wchar.c @@ -1,5 +1,5 @@ /* Test of <wchar.h> substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-wcrtomb-w32.c b/tests/test-wcrtomb-w32.c index d8bcf75..0570c73 100644 --- a/tests/test-wcrtomb-w32.c +++ b/tests/test-wcrtomb-w32.c @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-wcrtomb.c b/tests/test-wcrtomb.c index 902a4e1..e1d2bb4 100644 --- a/tests/test-wcrtomb.c +++ b/tests/test-wcrtomb.c @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-wctype-h.c b/tests/test-wctype-h.c index 7466e59..b401091 100644 --- a/tests/test-wctype-h.c +++ b/tests/test-wctype-h.c @@ -1,5 +1,5 @@ /* Test of <wctype.h> substitute. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/test-wcwidth.c b/tests/test-wcwidth.c index 9fad785..db53abf 100644 --- a/tests/test-wcwidth.c +++ b/tests/test-wcwidth.c @@ -1,5 +1,5 @@ /* Test of wcwidth() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ SIGNATURE_CHECK (wcwidth, int, (wchar_t)); #include <locale.h> #include <string.h> +#include "c-ctype.h" #include "localcharset.h" #include "macros.h" @@ -34,9 +35,11 @@ main () { wchar_t wc; +#ifdef C_CTYPE_ASCII /* Test width of ASCII characters. */ for (wc = 0x20; wc < 0x7F; wc++) ASSERT (wcwidth (wc) == 1); +#endif /* Switch to an UTF-8 locale. */ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL diff --git a/tests/test-xalloc-die.c b/tests/test-xalloc-die.c index 16d8636..f681ca5 100644 --- a/tests/test-xalloc-die.c +++ b/tests/test-xalloc-die.c @@ -1,5 +1,5 @@ /* Test of xalloc_die() function. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,12 +19,10 @@ #include <config.h> #include "xalloc.h" -#include "progname.h" int main (int argc _GL_UNUSED, char **argv) { - set_program_name (argv[0]); xalloc_die (); return 0; } diff --git a/tests/test-xalloc-die.sh b/tests/test-xalloc-die.sh index 76cdecd..fba601f 100755 --- a/tests/test-xalloc-die.sh +++ b/tests/test-xalloc-die.sh @@ -1,6 +1,6 @@ #!/bin/sh # Test suite for xalloc_die. -# Copyright (C) 2009-2015 Free Software Foundation, Inc. +# Copyright (C) 2009-2016 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify diff --git a/tests/unicase/test-casecmp.h b/tests/unicase/test-casecmp.h index 54b82aa..d77a40a 100644 --- a/tests/unicase/test-casecmp.h +++ b/tests/unicase/test-casecmp.h @@ -1,5 +1,5 @@ /* Test of case and normalization insensitive comparison of Unicode strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-is-cased.h b/tests/unicase/test-is-cased.h index e38ce9e..d8948d2 100644 --- a/tests/unicase/test-is-cased.h +++ b/tests/unicase/test-is-cased.h @@ -1,5 +1,5 @@ /* Test of test whether case matters for a Unicode string. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-is-casefolded.h b/tests/unicase/test-is-casefolded.h index b9edd7c..76e9640 100644 --- a/tests/unicase/test-is-casefolded.h +++ b/tests/unicase/test-is-casefolded.h @@ -1,5 +1,5 @@ /* Test of test whether a Unicode string is already case-folded. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-is-lowercase.h b/tests/unicase/test-is-lowercase.h index 768e856..b0690f5 100644 --- a/tests/unicase/test-is-lowercase.h +++ b/tests/unicase/test-is-lowercase.h @@ -1,5 +1,5 @@ /* Test of test whether a Unicode string is entirely lower case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-is-titlecase.h b/tests/unicase/test-is-titlecase.h index 6449064..b8de0d3 100644 --- a/tests/unicase/test-is-titlecase.h +++ b/tests/unicase/test-is-titlecase.h @@ -1,5 +1,5 @@ /* Test of test whether a Unicode string is entirely title case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-is-uppercase.h b/tests/unicase/test-is-uppercase.h index f3194fa..fac69cb 100644 --- a/tests/unicase/test-is-uppercase.h +++ b/tests/unicase/test-is-uppercase.h @@ -1,5 +1,5 @@ /* Test of test whether a Unicode string is entirely upper case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-locale-language.c b/tests/unicase/test-locale-language.c index 8c2104d..e5fe51d 100644 --- a/tests/unicase/test-locale-language.c +++ b/tests/unicase/test-locale-language.c @@ -1,5 +1,5 @@ /* Test of language code determination. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-mapping-part1.h b/tests/unicase/test-mapping-part1.h index b09c74e..e4df0f1 100644 --- a/tests/unicase/test-mapping-part1.h +++ b/tests/unicase/test-mapping-part1.h @@ -1,5 +1,5 @@ /* Test of single character case mapping functions. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-mapping-part2.h b/tests/unicase/test-mapping-part2.h index 4cb965e..587b0d5 100644 --- a/tests/unicase/test-mapping-part2.h +++ b/tests/unicase/test-mapping-part2.h @@ -1,5 +1,5 @@ /* Test of single character case mapping functions. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-predicate-part1.h b/tests/unicase/test-predicate-part1.h index 9f22cd5..9a4612b 100644 --- a/tests/unicase/test-predicate-part1.h +++ b/tests/unicase/test-predicate-part1.h @@ -1,5 +1,5 @@ /* Test the Unicode character type functions. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-predicate-part2.h b/tests/unicase/test-predicate-part2.h index 7150137..b22e486 100644 --- a/tests/unicase/test-predicate-part2.h +++ b/tests/unicase/test-predicate-part2.h @@ -1,5 +1,5 @@ /* Test the Unicode character type functions. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-casecmp.c b/tests/unicase/test-u16-casecmp.c index 24a45e3..1c5a51e 100644 --- a/tests/unicase/test-u16-casecmp.c +++ b/tests/unicase/test-u16-casecmp.c @@ -1,5 +1,5 @@ /* Test of case and normalization insensitive comparison of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-casecoll.c b/tests/unicase/test-u16-casecoll.c index a493e62..d1a930f 100644 --- a/tests/unicase/test-u16-casecoll.c +++ b/tests/unicase/test-u16-casecoll.c @@ -1,6 +1,6 @@ /* Test of locale dependent, case and normalization insensitive comparison of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-casefold.c b/tests/unicase/test-u16-casefold.c index 81f4762..83a7e17 100644 --- a/tests/unicase/test-u16-casefold.c +++ b/tests/unicase/test-u16-casefold.c @@ -1,5 +1,5 @@ /* Test of casefolding mapping for UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-is-cased.c b/tests/unicase/test-u16-is-cased.c index 737212b..26ceb8c 100644 --- a/tests/unicase/test-u16-is-cased.c +++ b/tests/unicase/test-u16-is-cased.c @@ -1,5 +1,5 @@ /* Test of test whether case matters for an UTF-16 string. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-is-casefolded.c b/tests/unicase/test-u16-is-casefolded.c index 472b087..fa233c8 100644 --- a/tests/unicase/test-u16-is-casefolded.c +++ b/tests/unicase/test-u16-is-casefolded.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-16 string is already case-folded. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-is-lowercase.c b/tests/unicase/test-u16-is-lowercase.c index dd77fa2..3e22e50 100644 --- a/tests/unicase/test-u16-is-lowercase.c +++ b/tests/unicase/test-u16-is-lowercase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-16 string is entirely lower case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-is-titlecase.c b/tests/unicase/test-u16-is-titlecase.c index 84ee037..d88652b 100644 --- a/tests/unicase/test-u16-is-titlecase.c +++ b/tests/unicase/test-u16-is-titlecase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-16 string is entirely title case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-is-uppercase.c b/tests/unicase/test-u16-is-uppercase.c index 469bf2e..51ce6ef 100644 --- a/tests/unicase/test-u16-is-uppercase.c +++ b/tests/unicase/test-u16-is-uppercase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-16 string is entirely upper case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-tolower.c b/tests/unicase/test-u16-tolower.c index aa34a7f..25b7b7e 100644 --- a/tests/unicase/test-u16-tolower.c +++ b/tests/unicase/test-u16-tolower.c @@ -1,5 +1,5 @@ /* Test of lowercase mapping for UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-totitle.c b/tests/unicase/test-u16-totitle.c index 2e2814b..3e5eea8 100644 --- a/tests/unicase/test-u16-totitle.c +++ b/tests/unicase/test-u16-totitle.c @@ -1,5 +1,5 @@ /* Test of titlecase mapping for UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u16-toupper.c b/tests/unicase/test-u16-toupper.c index 77dcedd..753416b 100644 --- a/tests/unicase/test-u16-toupper.c +++ b/tests/unicase/test-u16-toupper.c @@ -1,5 +1,5 @@ /* Test of uppercase mapping for UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-casecmp.c b/tests/unicase/test-u32-casecmp.c index 86e0af9..5aa34d1 100644 --- a/tests/unicase/test-u32-casecmp.c +++ b/tests/unicase/test-u32-casecmp.c @@ -1,5 +1,5 @@ /* Test of case and normalization insensitive comparison of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-casecoll.c b/tests/unicase/test-u32-casecoll.c index b0b66fc..e2d5adf 100644 --- a/tests/unicase/test-u32-casecoll.c +++ b/tests/unicase/test-u32-casecoll.c @@ -1,6 +1,6 @@ /* Test of locale dependent, case and normalization insensitive comparison of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-casefold.c b/tests/unicase/test-u32-casefold.c index 908dd2d..dd9aa97 100644 --- a/tests/unicase/test-u32-casefold.c +++ b/tests/unicase/test-u32-casefold.c @@ -1,5 +1,5 @@ /* Test of casefolding mapping for UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-is-cased.c b/tests/unicase/test-u32-is-cased.c index efc7fe4..1ed11d6 100644 --- a/tests/unicase/test-u32-is-cased.c +++ b/tests/unicase/test-u32-is-cased.c @@ -1,5 +1,5 @@ /* Test of test whether case matters for an UTF-32 string. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-is-casefolded.c b/tests/unicase/test-u32-is-casefolded.c index 45ed3eb..34b90bc 100644 --- a/tests/unicase/test-u32-is-casefolded.c +++ b/tests/unicase/test-u32-is-casefolded.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-32 string is already case-folded. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-is-lowercase.c b/tests/unicase/test-u32-is-lowercase.c index efaca9d..f949ae7 100644 --- a/tests/unicase/test-u32-is-lowercase.c +++ b/tests/unicase/test-u32-is-lowercase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-32 string is entirely lower case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-is-titlecase.c b/tests/unicase/test-u32-is-titlecase.c index 34d0f0e..b142ba9 100644 --- a/tests/unicase/test-u32-is-titlecase.c +++ b/tests/unicase/test-u32-is-titlecase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-32 string is entirely title case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-is-uppercase.c b/tests/unicase/test-u32-is-uppercase.c index 8af6da6..dc58365 100644 --- a/tests/unicase/test-u32-is-uppercase.c +++ b/tests/unicase/test-u32-is-uppercase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-32 string is entirely upper case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-tolower.c b/tests/unicase/test-u32-tolower.c index 0567f75..20c793a 100644 --- a/tests/unicase/test-u32-tolower.c +++ b/tests/unicase/test-u32-tolower.c @@ -1,5 +1,5 @@ /* Test of lowercase mapping for UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-totitle.c b/tests/unicase/test-u32-totitle.c index 33c2932..537e7c2 100644 --- a/tests/unicase/test-u32-totitle.c +++ b/tests/unicase/test-u32-totitle.c @@ -1,5 +1,5 @@ /* Test of titlecase mapping for UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u32-toupper.c b/tests/unicase/test-u32-toupper.c index b3c4363..8f4d924 100644 --- a/tests/unicase/test-u32-toupper.c +++ b/tests/unicase/test-u32-toupper.c @@ -1,5 +1,5 @@ /* Test of uppercase mapping for UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-casecmp.c b/tests/unicase/test-u8-casecmp.c index b036e25..e794867 100644 --- a/tests/unicase/test-u8-casecmp.c +++ b/tests/unicase/test-u8-casecmp.c @@ -1,5 +1,5 @@ /* Test of case and normalization insensitive comparison of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-casecoll.c b/tests/unicase/test-u8-casecoll.c index 7b628f6..181486e 100644 --- a/tests/unicase/test-u8-casecoll.c +++ b/tests/unicase/test-u8-casecoll.c @@ -1,6 +1,6 @@ /* Test of locale dependent, case and normalization insensitive comparison of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-casefold.c b/tests/unicase/test-u8-casefold.c index 722d62b..c3e7490 100644 --- a/tests/unicase/test-u8-casefold.c +++ b/tests/unicase/test-u8-casefold.c @@ -1,5 +1,5 @@ /* Test of casefolding mapping for UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-is-cased.c b/tests/unicase/test-u8-is-cased.c index fc25668..310ef8c 100644 --- a/tests/unicase/test-u8-is-cased.c +++ b/tests/unicase/test-u8-is-cased.c @@ -1,5 +1,5 @@ /* Test of test whether case matters for an UTF-8 string. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-is-casefolded.c b/tests/unicase/test-u8-is-casefolded.c index 1b3c4ae..2a82e77 100644 --- a/tests/unicase/test-u8-is-casefolded.c +++ b/tests/unicase/test-u8-is-casefolded.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-8 string is already case-folded. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-is-lowercase.c b/tests/unicase/test-u8-is-lowercase.c index ac80281..f2e8eb5 100644 --- a/tests/unicase/test-u8-is-lowercase.c +++ b/tests/unicase/test-u8-is-lowercase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-8 string is entirely lower case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-is-titlecase.c b/tests/unicase/test-u8-is-titlecase.c index 4a753c3..43ed6a2 100644 --- a/tests/unicase/test-u8-is-titlecase.c +++ b/tests/unicase/test-u8-is-titlecase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-8 string is entirely title case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-is-uppercase.c b/tests/unicase/test-u8-is-uppercase.c index d273f6d..8b40c1e 100644 --- a/tests/unicase/test-u8-is-uppercase.c +++ b/tests/unicase/test-u8-is-uppercase.c @@ -1,5 +1,5 @@ /* Test of test whether an UTF-8 string is entirely upper case. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-tolower.c b/tests/unicase/test-u8-tolower.c index 507db28..befbed8 100644 --- a/tests/unicase/test-u8-tolower.c +++ b/tests/unicase/test-u8-tolower.c @@ -1,5 +1,5 @@ /* Test of lowercase mapping for UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-totitle.c b/tests/unicase/test-u8-totitle.c index dddb51b..bcc0a3c 100644 --- a/tests/unicase/test-u8-totitle.c +++ b/tests/unicase/test-u8-totitle.c @@ -1,5 +1,5 @@ /* Test of titlecase mapping for UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-u8-toupper.c b/tests/unicase/test-u8-toupper.c index 38847da..9778029 100644 --- a/tests/unicase/test-u8-toupper.c +++ b/tests/unicase/test-u8-toupper.c @@ -1,5 +1,5 @@ /* Test of uppercase mapping for UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-ulc-casecmp.c b/tests/unicase/test-ulc-casecmp.c index e23081b..f71d948 100644 --- a/tests/unicase/test-ulc-casecmp.c +++ b/tests/unicase/test-ulc-casecmp.c @@ -1,5 +1,5 @@ /* Test of case and normalization insensitive comparison of strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unicase/test-ulc-casecoll.c b/tests/unicase/test-ulc-casecoll.c index 8c0a25f..759e9e2 100644 --- a/tests/unicase/test-ulc-casecoll.c +++ b/tests/unicase/test-ulc-casecoll.c @@ -1,6 +1,6 @@ /* Test of locale dependent, case and normalization insensitive comparison of strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u16-conv-from-enc.c b/tests/uniconv/test-u16-conv-from-enc.c index 6666b7e..5942456 100644 --- a/tests/uniconv/test-u16-conv-from-enc.c +++ b/tests/uniconv/test-u16-conv-from-enc.c @@ -1,5 +1,5 @@ /* Test of conversion to UTF-16 from legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u16-conv-to-enc.c b/tests/uniconv/test-u16-conv-to-enc.c index 9a0fad7..0b1e478 100644 --- a/tests/uniconv/test-u16-conv-to-enc.c +++ b/tests/uniconv/test-u16-conv-to-enc.c @@ -1,5 +1,5 @@ /* Test of conversion from UTF-16 to legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u16-strconv-from-enc.c b/tests/uniconv/test-u16-strconv-from-enc.c index f516aa8..b49b83f 100644 --- a/tests/uniconv/test-u16-strconv-from-enc.c +++ b/tests/uniconv/test-u16-strconv-from-enc.c @@ -1,5 +1,5 @@ /* Test of conversion to UTF-16 from legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u16-strconv-to-enc.c b/tests/uniconv/test-u16-strconv-to-enc.c index 08b70d5..8534fe7 100644 --- a/tests/uniconv/test-u16-strconv-to-enc.c +++ b/tests/uniconv/test-u16-strconv-to-enc.c @@ -1,5 +1,5 @@ /* Test of conversion from UTF-16 to legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u32-conv-from-enc.c b/tests/uniconv/test-u32-conv-from-enc.c index b3d4426..251ba60 100644 --- a/tests/uniconv/test-u32-conv-from-enc.c +++ b/tests/uniconv/test-u32-conv-from-enc.c @@ -1,5 +1,5 @@ /* Test of conversion to UTF-32 from legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u32-conv-to-enc.c b/tests/uniconv/test-u32-conv-to-enc.c index cd16662..ae81a4a 100644 --- a/tests/uniconv/test-u32-conv-to-enc.c +++ b/tests/uniconv/test-u32-conv-to-enc.c @@ -1,5 +1,5 @@ /* Test of conversion from UTF-32 to legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u32-strconv-from-enc.c b/tests/uniconv/test-u32-strconv-from-enc.c index b8a9e30..62c3f14 100644 --- a/tests/uniconv/test-u32-strconv-from-enc.c +++ b/tests/uniconv/test-u32-strconv-from-enc.c @@ -1,5 +1,5 @@ /* Test of conversion to UTF-32 from legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u32-strconv-to-enc.c b/tests/uniconv/test-u32-strconv-to-enc.c index 0f67eda..dc39353 100644 --- a/tests/uniconv/test-u32-strconv-to-enc.c +++ b/tests/uniconv/test-u32-strconv-to-enc.c @@ -1,5 +1,5 @@ /* Test of conversion from UTF-32 to legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u8-conv-from-enc.c b/tests/uniconv/test-u8-conv-from-enc.c index f37be0d..8efbed8 100644 --- a/tests/uniconv/test-u8-conv-from-enc.c +++ b/tests/uniconv/test-u8-conv-from-enc.c @@ -1,5 +1,5 @@ /* Test of conversion to UTF-8 from legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u8-conv-to-enc.c b/tests/uniconv/test-u8-conv-to-enc.c index 9a4947e..d730ee6 100644 --- a/tests/uniconv/test-u8-conv-to-enc.c +++ b/tests/uniconv/test-u8-conv-to-enc.c @@ -1,5 +1,5 @@ /* Test of conversion from UTF-8 to legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u8-strconv-from-enc.c b/tests/uniconv/test-u8-strconv-from-enc.c index 0bbad55..e9bb5cf 100644 --- a/tests/uniconv/test-u8-strconv-from-enc.c +++ b/tests/uniconv/test-u8-strconv-from-enc.c @@ -1,5 +1,5 @@ /* Test of conversion to UTF-8 from legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniconv/test-u8-strconv-to-enc.c b/tests/uniconv/test-u8-strconv-to-enc.c index 41be85b..6f89ad7 100644 --- a/tests/uniconv/test-u8-strconv-to-enc.c +++ b/tests/uniconv/test-u8-strconv-to-enc.c @@ -1,5 +1,5 @@ /* Test of conversion from UTF-8 to legacy encodings. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unigbrk/test-u16-grapheme-breaks.c b/tests/unigbrk/test-u16-grapheme-breaks.c index 28b81c6..9a4783b 100644 --- a/tests/unigbrk/test-u16-grapheme-breaks.c +++ b/tests/unigbrk/test-u16-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u16-grapheme-next.c b/tests/unigbrk/test-u16-grapheme-next.c index f54aebc..6cde88f 100644 --- a/tests/unigbrk/test-u16-grapheme-next.c +++ b/tests/unigbrk/test-u16-grapheme-next.c @@ -1,5 +1,5 @@ /* Next grapheme cluster length test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u16-grapheme-prev.c b/tests/unigbrk/test-u16-grapheme-prev.c index d9057ad..d941748 100644 --- a/tests/unigbrk/test-u16-grapheme-prev.c +++ b/tests/unigbrk/test-u16-grapheme-prev.c @@ -1,5 +1,5 @@ /* Previous grapheme cluster test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u32-grapheme-breaks.c b/tests/unigbrk/test-u32-grapheme-breaks.c index dbfd040..f9cafa3 100644 --- a/tests/unigbrk/test-u32-grapheme-breaks.c +++ b/tests/unigbrk/test-u32-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u32-grapheme-next.c b/tests/unigbrk/test-u32-grapheme-next.c index 4fc6498..bb1006d 100644 --- a/tests/unigbrk/test-u32-grapheme-next.c +++ b/tests/unigbrk/test-u32-grapheme-next.c @@ -1,5 +1,5 @@ /* Next grapheme cluster length test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u32-grapheme-prev.c b/tests/unigbrk/test-u32-grapheme-prev.c index 12ff042..d0e2d92 100644 --- a/tests/unigbrk/test-u32-grapheme-prev.c +++ b/tests/unigbrk/test-u32-grapheme-prev.c @@ -1,5 +1,5 @@ /* Previous grapheme cluster test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u8-grapheme-breaks.c b/tests/unigbrk/test-u8-grapheme-breaks.c index 97033bb..3a1fbf9 100644 --- a/tests/unigbrk/test-u8-grapheme-breaks.c +++ b/tests/unigbrk/test-u8-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u8-grapheme-next.c b/tests/unigbrk/test-u8-grapheme-next.c index e437dbd..5174019 100644 --- a/tests/unigbrk/test-u8-grapheme-next.c +++ b/tests/unigbrk/test-u8-grapheme-next.c @@ -1,5 +1,5 @@ /* Next grapheme cluster length test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-u8-grapheme-prev.c b/tests/unigbrk/test-u8-grapheme-prev.c index 3f69180..a93a911 100644 --- a/tests/unigbrk/test-u8-grapheme-prev.c +++ b/tests/unigbrk/test-u8-grapheme-prev.c @@ -1,5 +1,5 @@ /* Previous grapheme cluster test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-uc-gbrk-prop.c b/tests/unigbrk/test-uc-gbrk-prop.c index 8d3a186..0ec4aec 100644 --- a/tests/unigbrk/test-uc-gbrk-prop.c +++ b/tests/unigbrk/test-uc-gbrk-prop.c @@ -1,5 +1,5 @@ /* Test the Unicode grapheme break property function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unigbrk/test-uc-is-grapheme-break.c b/tests/unigbrk/test-uc-is-grapheme-break.c index 8a9ac59..3f8535c 100644 --- a/tests/unigbrk/test-uc-is-grapheme-break.c +++ b/tests/unigbrk/test-uc-is-grapheme-break.c @@ -1,5 +1,5 @@ /* Grapheme cluster break function test. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/unigbrk/test-ulc-grapheme-breaks.c b/tests/unigbrk/test-ulc-grapheme-breaks.c index 29b8a26..5016bda 100644 --- a/tests/unigbrk/test-ulc-grapheme-breaks.c +++ b/tests/unigbrk/test-ulc-grapheme-breaks.c @@ -1,5 +1,5 @@ /* Grapheme cluster breaks test. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-u16-possible-linebreaks.c b/tests/unilbrk/test-u16-possible-linebreaks.c index 8d0f006..2e16047 100644 --- a/tests/unilbrk/test-u16-possible-linebreaks.c +++ b/tests/unilbrk/test-u16-possible-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of UTF-16 strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-u16-width-linebreaks.c b/tests/unilbrk/test-u16-width-linebreaks.c index 64aa577..2b47793 100644 --- a/tests/unilbrk/test-u16-width-linebreaks.c +++ b/tests/unilbrk/test-u16-width-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of UTF-16 strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-u32-possible-linebreaks.c b/tests/unilbrk/test-u32-possible-linebreaks.c index d4335ce..1b67617 100644 --- a/tests/unilbrk/test-u32-possible-linebreaks.c +++ b/tests/unilbrk/test-u32-possible-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of UTF-32 strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-u32-width-linebreaks.c b/tests/unilbrk/test-u32-width-linebreaks.c index d597d4e..8103b98 100644 --- a/tests/unilbrk/test-u32-width-linebreaks.c +++ b/tests/unilbrk/test-u32-width-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of UTF-32 strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-u8-possible-linebreaks.c b/tests/unilbrk/test-u8-possible-linebreaks.c index fe7397c..fa47c11 100644 --- a/tests/unilbrk/test-u8-possible-linebreaks.c +++ b/tests/unilbrk/test-u8-possible-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of UTF-8 strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-u8-width-linebreaks.c b/tests/unilbrk/test-u8-width-linebreaks.c index 157860a..867ec23 100644 --- a/tests/unilbrk/test-u8-width-linebreaks.c +++ b/tests/unilbrk/test-u8-width-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of UTF-8 strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-ulc-possible-linebreaks.c b/tests/unilbrk/test-ulc-possible-linebreaks.c index d6396b0..16e17f4 100644 --- a/tests/unilbrk/test-ulc-possible-linebreaks.c +++ b/tests/unilbrk/test-ulc-possible-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unilbrk/test-ulc-width-linebreaks.c b/tests/unilbrk/test-ulc-width-linebreaks.c index 593b85c..1e7758e 100644 --- a/tests/unilbrk/test-ulc-width-linebreaks.c +++ b/tests/unilbrk/test-ulc-width-linebreaks.c @@ -1,5 +1,5 @@ /* Test of line breaking of strings. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniname/test-uninames.c b/tests/uniname/test-uninames.c index 400b970..3b345e5 100644 --- a/tests/uniname/test-uninames.c +++ b/tests/uniname/test-uninames.c @@ -1,5 +1,5 @@ /* Test the Unicode character name functions. - Copyright (C) 2000-2003, 2005, 2007, 2009-2015 Free Software Foundation, + Copyright (C) 2000-2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -23,7 +23,6 @@ #include "xalloc.h" #include "uniname.h" -#include "progname.h" /* The names according to the UnicodeData.txt file, modified to contain the Hangul syllable names, as described in the Unicode 3.0 book. */ @@ -62,8 +61,6 @@ fill_names (const char *unicodedata_filename) while (fgets (line, sizeof line, stream)) { - int n; - int c; char *p; char *comment; unsigned int i; @@ -117,7 +114,6 @@ fill_names (const char *unicodedata_filename) static void fill_aliases (const char *namealiases_filename) { - int i; FILE *stream; char *field0; char *field1; @@ -133,8 +129,6 @@ fill_aliases (const char *namealiases_filename) while (fgets (line, sizeof line, stream)) { - int n; - int c; char *p; char *comment; unsigned int uc; @@ -354,11 +348,11 @@ test_alias_lookup () { if (result == UNINAME_INVALID) fprintf (stderr, "inverse name lookup of \"%s\" failed\n", - unicode_aliases[i]); + unicode_aliases[i].name); else fprintf (stderr, "inverse name lookup of \"%s\" returned 0x%04X\n", - unicode_aliases[i], result); + unicode_aliases[i].name, result); error = 1; } } @@ -372,8 +366,6 @@ main (int argc, char *argv[]) int error = 0; int i; - set_program_name (argv[0]); - for (i = 1; i < argc && strcmp (argv[i], "--") != 0; i++) fill_names (argv[i]); diff --git a/tests/uninorm/test-canonical-decomposition.c b/tests/uninorm/test-canonical-decomposition.c index be1c043..b34944e 100644 --- a/tests/uninorm/test-canonical-decomposition.c +++ b/tests/uninorm/test-canonical-decomposition.c @@ -1,5 +1,5 @@ /* Test of canonical decomposition of Unicode characters. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-compat-decomposition.c b/tests/uninorm/test-compat-decomposition.c index 662d3f7..ae77097 100644 --- a/tests/uninorm/test-compat-decomposition.c +++ b/tests/uninorm/test-compat-decomposition.c @@ -1,5 +1,5 @@ /* Test of compatibility decomposition of Unicode characters. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-composition.c b/tests/uninorm/test-composition.c index 11f338c..edadfca 100644 --- a/tests/uninorm/test-composition.c +++ b/tests/uninorm/test-composition.c @@ -1,5 +1,5 @@ /* Test of canonical composition of Unicode characters. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-decomposing-form.c b/tests/uninorm/test-decomposing-form.c index 3a826fb..b5637c5 100644 --- a/tests/uninorm/test-decomposing-form.c +++ b/tests/uninorm/test-decomposing-form.c @@ -1,5 +1,5 @@ /* Test of decomposing variant of a normalization form. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-decomposition.c b/tests/uninorm/test-decomposition.c index d09270a..c375748 100644 --- a/tests/uninorm/test-decomposition.c +++ b/tests/uninorm/test-decomposition.c @@ -1,5 +1,5 @@ /* Test of decomposition of Unicode characters. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-nfc.c b/tests/uninorm/test-nfc.c index ed90eae..0e58a54 100644 --- a/tests/uninorm/test-nfc.c +++ b/tests/uninorm/test-nfc.c @@ -1,5 +1,5 @@ /* Test of canonical normalization of Unicode strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-nfd.c b/tests/uninorm/test-nfd.c index 5765a51..5d501f0 100644 --- a/tests/uninorm/test-nfd.c +++ b/tests/uninorm/test-nfd.c @@ -1,5 +1,5 @@ /* Test of canonical decomposition of Unicode strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-nfkc.c b/tests/uninorm/test-nfkc.c index d8c0d09..0ae19df 100644 --- a/tests/uninorm/test-nfkc.c +++ b/tests/uninorm/test-nfkc.c @@ -1,5 +1,5 @@ /* Test of compatibility normalization of Unicode strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-nfkd.c b/tests/uninorm/test-nfkd.c index 8375990..40eb4bc 100644 --- a/tests/uninorm/test-nfkd.c +++ b/tests/uninorm/test-nfkd.c @@ -1,5 +1,5 @@ /* Test of compatibility decomposition of Unicode strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u16-nfc.c b/tests/uninorm/test-u16-nfc.c index d6e972e..6f611ac 100644 --- a/tests/uninorm/test-u16-nfc.c +++ b/tests/uninorm/test-u16-nfc.c @@ -1,5 +1,5 @@ /* Test of canonical normalization of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u16-nfd.c b/tests/uninorm/test-u16-nfd.c index c00b162..29514ab 100644 --- a/tests/uninorm/test-u16-nfd.c +++ b/tests/uninorm/test-u16-nfd.c @@ -1,5 +1,5 @@ /* Test of canonical decomposition of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u16-nfkc.c b/tests/uninorm/test-u16-nfkc.c index 2a72964..760dd03 100644 --- a/tests/uninorm/test-u16-nfkc.c +++ b/tests/uninorm/test-u16-nfkc.c @@ -1,5 +1,5 @@ /* Test of compatibility normalization of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u16-nfkd.c b/tests/uninorm/test-u16-nfkd.c index 84674b2..c7023a1 100644 --- a/tests/uninorm/test-u16-nfkd.c +++ b/tests/uninorm/test-u16-nfkd.c @@ -1,5 +1,5 @@ /* Test of compatibility decomposition of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u16-normcmp.c b/tests/uninorm/test-u16-normcmp.c index 05e7074..488b15a 100644 --- a/tests/uninorm/test-u16-normcmp.c +++ b/tests/uninorm/test-u16-normcmp.c @@ -1,5 +1,5 @@ /* Test of normalization insensitive comparison of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u16-normcmp.h b/tests/uninorm/test-u16-normcmp.h index 41489a0..8fe10a5 100644 --- a/tests/uninorm/test-u16-normcmp.h +++ b/tests/uninorm/test-u16-normcmp.h @@ -1,5 +1,5 @@ /* Test of normalization insensitive comparison of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u16-normcoll.c b/tests/uninorm/test-u16-normcoll.c index c5dec34..550e35c 100644 --- a/tests/uninorm/test-u16-normcoll.c +++ b/tests/uninorm/test-u16-normcoll.c @@ -1,6 +1,6 @@ /* Test of locale dependent, normalization insensitive comparison of UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-nfc-big.c b/tests/uninorm/test-u32-nfc-big.c index fd470c9..6502238 100644 --- a/tests/uninorm/test-u32-nfc-big.c +++ b/tests/uninorm/test-u32-nfc-big.c @@ -1,5 +1,5 @@ /* Test of Unicode compliance of canonical normalization of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,6 @@ #include <stdlib.h> #include "unistr.h" -#include "progname.h" #include "test-u32-normalize-big.h" static int @@ -102,7 +101,6 @@ main (int argc, char *argv[]) { struct normalization_test_file file; - set_program_name (argv[0]); read_normalization_test_file (argv[1], &file); test_specific (&file, check); diff --git a/tests/uninorm/test-u32-nfc.c b/tests/uninorm/test-u32-nfc.c index 1083b52..c788634 100644 --- a/tests/uninorm/test-u32-nfc.c +++ b/tests/uninorm/test-u32-nfc.c @@ -1,5 +1,5 @@ /* Test of canonical normalization of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-nfd-big.c b/tests/uninorm/test-u32-nfd-big.c index 12c012e..7d1f9c2 100644 --- a/tests/uninorm/test-u32-nfd-big.c +++ b/tests/uninorm/test-u32-nfd-big.c @@ -1,5 +1,5 @@ /* Test of Unicode compliance of canonical decomposition of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,6 @@ #include <stdlib.h> #include "unistr.h" -#include "progname.h" #include "test-u32-normalize-big.h" static int @@ -102,7 +101,6 @@ main (int argc, char *argv[]) { struct normalization_test_file file; - set_program_name (argv[0]); read_normalization_test_file (argv[1], &file); test_specific (&file, check); diff --git a/tests/uninorm/test-u32-nfd.c b/tests/uninorm/test-u32-nfd.c index c7bc520..fcb0ea1 100644 --- a/tests/uninorm/test-u32-nfd.c +++ b/tests/uninorm/test-u32-nfd.c @@ -1,5 +1,5 @@ /* Test of canonical decomposition of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-nfkc-big.c b/tests/uninorm/test-u32-nfkc-big.c index 63896f8..109f59c 100644 --- a/tests/uninorm/test-u32-nfkc-big.c +++ b/tests/uninorm/test-u32-nfkc-big.c @@ -1,5 +1,5 @@ /* Test of Unicode compliance of compatibility normalization of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,6 @@ #include <stdlib.h> #include "unistr.h" -#include "progname.h" #include "test-u32-normalize-big.h" static int @@ -99,7 +98,6 @@ main (int argc, char *argv[]) { struct normalization_test_file file; - set_program_name (argv[0]); read_normalization_test_file (argv[1], &file); test_specific (&file, check); diff --git a/tests/uninorm/test-u32-nfkc.c b/tests/uninorm/test-u32-nfkc.c index 7ea6637..c1b287a 100644 --- a/tests/uninorm/test-u32-nfkc.c +++ b/tests/uninorm/test-u32-nfkc.c @@ -1,5 +1,5 @@ /* Test of compatibility normalization of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-nfkd-big.c b/tests/uninorm/test-u32-nfkd-big.c index 5150f2f..109f449 100644 --- a/tests/uninorm/test-u32-nfkd-big.c +++ b/tests/uninorm/test-u32-nfkd-big.c @@ -1,5 +1,5 @@ /* Test of Unicode compliance of compatibility decomposition of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,6 @@ #include <stdlib.h> #include "unistr.h" -#include "progname.h" #include "test-u32-normalize-big.h" static int @@ -99,7 +98,6 @@ main (int argc, char *argv[]) { struct normalization_test_file file; - set_program_name (argv[0]); read_normalization_test_file (argv[1], &file); test_specific (&file, check); diff --git a/tests/uninorm/test-u32-nfkd.c b/tests/uninorm/test-u32-nfkd.c index 334947b..fce8132 100644 --- a/tests/uninorm/test-u32-nfkd.c +++ b/tests/uninorm/test-u32-nfkd.c @@ -1,5 +1,5 @@ /* Test of compatibility decomposition of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-normalize-big.c b/tests/uninorm/test-u32-normalize-big.c index a0d8dee..c1e4f6d 100644 --- a/tests/uninorm/test-u32-normalize-big.c +++ b/tests/uninorm/test-u32-normalize-big.c @@ -1,5 +1,5 @@ /* Test of Unicode compliance of normalization of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-normalize-big.h b/tests/uninorm/test-u32-normalize-big.h index 924d579..4a5fc4b 100644 --- a/tests/uninorm/test-u32-normalize-big.h +++ b/tests/uninorm/test-u32-normalize-big.h @@ -1,5 +1,5 @@ /* Test of Unicode compliance of normalization of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-normcmp.c b/tests/uninorm/test-u32-normcmp.c index 4e01739..015d0bc 100644 --- a/tests/uninorm/test-u32-normcmp.c +++ b/tests/uninorm/test-u32-normcmp.c @@ -1,5 +1,5 @@ /* Test of normalization insensitive comparison of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-normcmp.h b/tests/uninorm/test-u32-normcmp.h index 67a0dd8..659e6d4 100644 --- a/tests/uninorm/test-u32-normcmp.h +++ b/tests/uninorm/test-u32-normcmp.h @@ -1,5 +1,5 @@ /* Test of normalization insensitive comparison of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u32-normcoll.c b/tests/uninorm/test-u32-normcoll.c index 133840d..1e863a4 100644 --- a/tests/uninorm/test-u32-normcoll.c +++ b/tests/uninorm/test-u32-normcoll.c @@ -1,6 +1,6 @@ /* Test of locale dependent, normalization insensitive comparison of UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u8-nfc.c b/tests/uninorm/test-u8-nfc.c index f41872c..0c78660 100644 --- a/tests/uninorm/test-u8-nfc.c +++ b/tests/uninorm/test-u8-nfc.c @@ -1,5 +1,5 @@ /* Test of canonical normalization of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u8-nfd.c b/tests/uninorm/test-u8-nfd.c index 8fc136e..281796a 100644 --- a/tests/uninorm/test-u8-nfd.c +++ b/tests/uninorm/test-u8-nfd.c @@ -1,5 +1,5 @@ /* Test of canonical decomposition of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u8-nfkc.c b/tests/uninorm/test-u8-nfkc.c index 334f7f7..c8a3701 100644 --- a/tests/uninorm/test-u8-nfkc.c +++ b/tests/uninorm/test-u8-nfkc.c @@ -1,5 +1,5 @@ /* Test of compatibility normalization of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u8-nfkd.c b/tests/uninorm/test-u8-nfkd.c index 14c99e4..2f2c827 100644 --- a/tests/uninorm/test-u8-nfkd.c +++ b/tests/uninorm/test-u8-nfkd.c @@ -1,5 +1,5 @@ /* Test of compatibility decomposition of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u8-normcmp.c b/tests/uninorm/test-u8-normcmp.c index e384ac2..8de6cdb 100644 --- a/tests/uninorm/test-u8-normcmp.c +++ b/tests/uninorm/test-u8-normcmp.c @@ -1,5 +1,5 @@ /* Test of normalization insensitive comparison of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u8-normcmp.h b/tests/uninorm/test-u8-normcmp.h index 8fea42d..a5a96ea 100644 --- a/tests/uninorm/test-u8-normcmp.h +++ b/tests/uninorm/test-u8-normcmp.h @@ -1,5 +1,5 @@ /* Test of normalization insensitive comparison of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-u8-normcoll.c b/tests/uninorm/test-u8-normcoll.c index bb32b47..c4eb7bc 100644 --- a/tests/uninorm/test-u8-normcoll.c +++ b/tests/uninorm/test-u8-normcoll.c @@ -1,6 +1,6 @@ /* Test of locale dependent, normalization insensitive comparison of UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uninorm/test-uninorm-filter-nfc.c b/tests/uninorm/test-uninorm-filter-nfc.c index f61f705..b37489e 100644 --- a/tests/uninorm/test-uninorm-filter-nfc.c +++ b/tests/uninorm/test-uninorm-filter-nfc.c @@ -1,5 +1,5 @@ /* Test of canonical normalization of streams. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-asnprintf1.c b/tests/unistdio/test-u16-asnprintf1.c index e849d62..7f6e8f2 100644 --- a/tests/unistdio/test-u16-asnprintf1.c +++ b/tests/unistdio/test-u16-asnprintf1.c @@ -1,5 +1,5 @@ /* Test of u16_asnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-asnprintf1.h b/tests/unistdio/test-u16-asnprintf1.h index eb7d85a..0743319 100644 --- a/tests/unistdio/test-u16-asnprintf1.h +++ b/tests/unistdio/test-u16-asnprintf1.h @@ -1,5 +1,5 @@ /* Test of u16_[v]asnprintf() function. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-printf1.h b/tests/unistdio/test-u16-printf1.h index cb14afe..429a3a4 100644 --- a/tests/unistdio/test-u16-printf1.h +++ b/tests/unistdio/test-u16-printf1.h @@ -1,5 +1,5 @@ /* Test of u16_v[a]s[n]printf() function. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-vasnprintf1.c b/tests/unistdio/test-u16-vasnprintf1.c index 3fdefd2..08290f4 100644 --- a/tests/unistdio/test-u16-vasnprintf1.c +++ b/tests/unistdio/test-u16-vasnprintf1.c @@ -1,5 +1,5 @@ /* Test of u16_vasnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-vasnprintf2.c b/tests/unistdio/test-u16-vasnprintf2.c index bafd6ad..ab307d1 100644 --- a/tests/unistdio/test-u16-vasnprintf2.c +++ b/tests/unistdio/test-u16-vasnprintf2.c @@ -1,5 +1,5 @@ /* Test of u16_vasnprintf() function in an ISO-8859-1 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-vasnprintf3.c b/tests/unistdio/test-u16-vasnprintf3.c index 92c9565..a00d9c6 100644 --- a/tests/unistdio/test-u16-vasnprintf3.c +++ b/tests/unistdio/test-u16-vasnprintf3.c @@ -1,5 +1,5 @@ /* Test of u16_vasnprintf() function in an UTF-8 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-vasprintf1.c b/tests/unistdio/test-u16-vasprintf1.c index b3fddbd..fb0e70f 100644 --- a/tests/unistdio/test-u16-vasprintf1.c +++ b/tests/unistdio/test-u16-vasprintf1.c @@ -1,5 +1,5 @@ /* Test of u16_vasprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u16-vsnprintf1.c b/tests/unistdio/test-u16-vsnprintf1.c index 06241ec..b5d63e2 100644 --- a/tests/unistdio/test-u16-vsnprintf1.c +++ b/tests/unistdio/test-u16-vsnprintf1.c @@ -1,5 +1,5 @@ /* Test of u16_vsnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,6 @@ #include "unistr.h" #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-u16-printf1.h" @@ -63,8 +62,6 @@ test_vsnprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsnprintf (); return 0; diff --git a/tests/unistdio/test-u16-vsprintf1.c b/tests/unistdio/test-u16-vsprintf1.c index 8032a3d..52279c6 100644 --- a/tests/unistdio/test-u16-vsprintf1.c +++ b/tests/unistdio/test-u16-vsprintf1.c @@ -1,5 +1,5 @@ /* Test of u16_vsprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,6 @@ #include "unistr.h" #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-u16-printf1.h" @@ -63,8 +62,6 @@ test_vsprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsprintf (); return 0; diff --git a/tests/unistdio/test-u32-asnprintf1.c b/tests/unistdio/test-u32-asnprintf1.c index c6707e2..173ab39 100644 --- a/tests/unistdio/test-u32-asnprintf1.c +++ b/tests/unistdio/test-u32-asnprintf1.c @@ -1,5 +1,5 @@ /* Test of u32_asnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u32-asnprintf1.h b/tests/unistdio/test-u32-asnprintf1.h index b46e1dd..30d583b 100644 --- a/tests/unistdio/test-u32-asnprintf1.h +++ b/tests/unistdio/test-u32-asnprintf1.h @@ -1,5 +1,5 @@ /* Test of u32_[v]asnprintf() function. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u32-printf1.h b/tests/unistdio/test-u32-printf1.h index 1e3a104..218298e 100644 --- a/tests/unistdio/test-u32-printf1.h +++ b/tests/unistdio/test-u32-printf1.h @@ -1,5 +1,5 @@ /* Test of u32_v[a]s[n]printf() function. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u32-vasnprintf1.c b/tests/unistdio/test-u32-vasnprintf1.c index ae22c1f..1a68d62 100644 --- a/tests/unistdio/test-u32-vasnprintf1.c +++ b/tests/unistdio/test-u32-vasnprintf1.c @@ -1,5 +1,5 @@ /* Test of u32_vasnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u32-vasnprintf2.c b/tests/unistdio/test-u32-vasnprintf2.c index 208e35c..e8dc6b8 100644 --- a/tests/unistdio/test-u32-vasnprintf2.c +++ b/tests/unistdio/test-u32-vasnprintf2.c @@ -1,5 +1,5 @@ /* Test of u32_vasnprintf() function in an ISO-8859-1 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u32-vasnprintf3.c b/tests/unistdio/test-u32-vasnprintf3.c index 67500e9..1536f52 100644 --- a/tests/unistdio/test-u32-vasnprintf3.c +++ b/tests/unistdio/test-u32-vasnprintf3.c @@ -1,5 +1,5 @@ /* Test of u32_vasnprintf() function in an UTF-8 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u32-vasprintf1.c b/tests/unistdio/test-u32-vasprintf1.c index 9d1a6db..f724a83 100644 --- a/tests/unistdio/test-u32-vasprintf1.c +++ b/tests/unistdio/test-u32-vasprintf1.c @@ -1,5 +1,5 @@ /* Test of u32_vasprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u32-vsnprintf1.c b/tests/unistdio/test-u32-vsnprintf1.c index 7a4e10a..d3765ab 100644 --- a/tests/unistdio/test-u32-vsnprintf1.c +++ b/tests/unistdio/test-u32-vsnprintf1.c @@ -1,5 +1,5 @@ /* Test of u32_vsnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,6 @@ #include "unistr.h" #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-u32-printf1.h" @@ -63,8 +62,6 @@ test_vsnprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsnprintf (); return 0; diff --git a/tests/unistdio/test-u32-vsprintf1.c b/tests/unistdio/test-u32-vsprintf1.c index 90032ca..f9e7d64 100644 --- a/tests/unistdio/test-u32-vsprintf1.c +++ b/tests/unistdio/test-u32-vsprintf1.c @@ -1,5 +1,5 @@ /* Test of u32_vsprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,6 @@ #include "unistr.h" #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-u32-printf1.h" @@ -63,8 +62,6 @@ test_vsprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsprintf (); return 0; diff --git a/tests/unistdio/test-u8-asnprintf1.c b/tests/unistdio/test-u8-asnprintf1.c index f9f3316..d779a6a 100644 --- a/tests/unistdio/test-u8-asnprintf1.c +++ b/tests/unistdio/test-u8-asnprintf1.c @@ -1,5 +1,5 @@ /* Test of u8_asnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u8-asnprintf1.h b/tests/unistdio/test-u8-asnprintf1.h index 9a5d55e..38d509f 100644 --- a/tests/unistdio/test-u8-asnprintf1.h +++ b/tests/unistdio/test-u8-asnprintf1.h @@ -1,5 +1,5 @@ /* Test of u8_[v]asnprintf() function. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u8-printf1.h b/tests/unistdio/test-u8-printf1.h index 28719f0..2b638e1 100644 --- a/tests/unistdio/test-u8-printf1.h +++ b/tests/unistdio/test-u8-printf1.h @@ -1,5 +1,5 @@ /* Test of u8_v[a]s[n]printf() function. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u8-vasnprintf1.c b/tests/unistdio/test-u8-vasnprintf1.c index b535988..e3a5f8d 100644 --- a/tests/unistdio/test-u8-vasnprintf1.c +++ b/tests/unistdio/test-u8-vasnprintf1.c @@ -1,5 +1,5 @@ /* Test of u8_vasnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u8-vasnprintf2.c b/tests/unistdio/test-u8-vasnprintf2.c index 00dd8b0..6c68c3c 100644 --- a/tests/unistdio/test-u8-vasnprintf2.c +++ b/tests/unistdio/test-u8-vasnprintf2.c @@ -1,5 +1,5 @@ /* Test of u8_vasnprintf() function in an ISO-8859-1 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u8-vasnprintf3.c b/tests/unistdio/test-u8-vasnprintf3.c index 35fd915..4b78106 100644 --- a/tests/unistdio/test-u8-vasnprintf3.c +++ b/tests/unistdio/test-u8-vasnprintf3.c @@ -1,5 +1,5 @@ /* Test of u8_vasnprintf() function in an UTF-8 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u8-vasprintf1.c b/tests/unistdio/test-u8-vasprintf1.c index 90eac76..b7ba10f 100644 --- a/tests/unistdio/test-u8-vasprintf1.c +++ b/tests/unistdio/test-u8-vasprintf1.c @@ -1,5 +1,5 @@ /* Test of u8_vasprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-u8-vsnprintf1.c b/tests/unistdio/test-u8-vsnprintf1.c index 32c9850..1d61caa 100644 --- a/tests/unistdio/test-u8-vsnprintf1.c +++ b/tests/unistdio/test-u8-vsnprintf1.c @@ -1,5 +1,5 @@ /* Test of u8_vsnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,6 @@ #include "unistr.h" #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-u8-printf1.h" @@ -63,8 +62,6 @@ test_vsnprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsnprintf (); return 0; diff --git a/tests/unistdio/test-u8-vsprintf1.c b/tests/unistdio/test-u8-vsprintf1.c index 4f5c90c..4a3ac76 100644 --- a/tests/unistdio/test-u8-vsprintf1.c +++ b/tests/unistdio/test-u8-vsprintf1.c @@ -1,5 +1,5 @@ /* Test of u8_vsprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,7 +29,6 @@ #include "unistr.h" #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-u8-printf1.h" @@ -63,8 +62,6 @@ test_vsprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsprintf (); return 0; diff --git a/tests/unistdio/test-ulc-asnprintf1.c b/tests/unistdio/test-ulc-asnprintf1.c index ebc0d48..fee862b 100644 --- a/tests/unistdio/test-ulc-asnprintf1.c +++ b/tests/unistdio/test-ulc-asnprintf1.c @@ -1,5 +1,5 @@ /* Test of ulc_asnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-ulc-asnprintf1.h b/tests/unistdio/test-ulc-asnprintf1.h index ca6aa27..a52f2e2 100644 --- a/tests/unistdio/test-ulc-asnprintf1.h +++ b/tests/unistdio/test-ulc-asnprintf1.h @@ -1,5 +1,5 @@ /* Test of ulc_[v]asnprintf() functions. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-ulc-printf1.h b/tests/unistdio/test-ulc-printf1.h index 1f34412..ec16e33 100644 --- a/tests/unistdio/test-ulc-printf1.h +++ b/tests/unistdio/test-ulc-printf1.h @@ -1,5 +1,5 @@ /* Test of ulc_v[a]s[n]printf() functions. - Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-ulc-vasnprintf1.c b/tests/unistdio/test-ulc-vasnprintf1.c index 240af95..aaed11b 100644 --- a/tests/unistdio/test-ulc-vasnprintf1.c +++ b/tests/unistdio/test-ulc-vasnprintf1.c @@ -1,5 +1,5 @@ /* Test of ulc_vasnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-ulc-vasnprintf2.c b/tests/unistdio/test-ulc-vasnprintf2.c index 525cf91..fd08d8e 100644 --- a/tests/unistdio/test-ulc-vasnprintf2.c +++ b/tests/unistdio/test-ulc-vasnprintf2.c @@ -1,5 +1,5 @@ /* Test of ulc_vasnprintf() function in an ISO-8859-1 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-ulc-vasnprintf3.c b/tests/unistdio/test-ulc-vasnprintf3.c index aa0e593..298a2c1 100644 --- a/tests/unistdio/test-ulc-vasnprintf3.c +++ b/tests/unistdio/test-ulc-vasnprintf3.c @@ -1,5 +1,5 @@ /* Test of ulc_vasnprintf() function in an UTF-8 locale. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-ulc-vasprintf1.c b/tests/unistdio/test-ulc-vasprintf1.c index 615bedd..8f7f474 100644 --- a/tests/unistdio/test-ulc-vasprintf1.c +++ b/tests/unistdio/test-ulc-vasprintf1.c @@ -1,5 +1,5 @@ /* Test of ulc_vasprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistdio/test-ulc-vsnprintf1.c b/tests/unistdio/test-ulc-vsnprintf1.c index b399507..fa9d23c 100644 --- a/tests/unistdio/test-ulc-vsnprintf1.c +++ b/tests/unistdio/test-ulc-vsnprintf1.c @@ -1,5 +1,5 @@ /* Test of ulc_vsnprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,6 @@ #include <string.h> #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-ulc-printf1.h" @@ -56,8 +55,6 @@ test_vsnprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsnprintf (); return 0; diff --git a/tests/unistdio/test-ulc-vsprintf1.c b/tests/unistdio/test-ulc-vsprintf1.c index f745ee4..06a18d7 100644 --- a/tests/unistdio/test-ulc-vsprintf1.c +++ b/tests/unistdio/test-ulc-vsprintf1.c @@ -1,5 +1,5 @@ /* Test of ulc_vsprintf() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,6 @@ #include <string.h> #include "xalloc.h" -#include "progname.h" #include "macros.h" #include "test-ulc-printf1.h" @@ -56,8 +55,6 @@ test_vsprintf () int main (int argc, char *argv[]) { - set_program_name (argv[0]); - test_vsprintf (); return 0; diff --git a/tests/unistr/test-chr.h b/tests/unistr/test-chr.h index cd5a45e..aa65878 100644 --- a/tests/unistr/test-chr.h +++ b/tests/unistr/test-chr.h @@ -1,5 +1,5 @@ /* Test of uN_chr() functions. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-cmp.h b/tests/unistr/test-cmp.h index aece9b0..919401c 100644 --- a/tests/unistr/test-cmp.h +++ b/tests/unistr/test-cmp.h @@ -1,5 +1,5 @@ /* Test of uN_cmp() functions. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-cmp2.h b/tests/unistr/test-cmp2.h index c405099..550e8f4 100644 --- a/tests/unistr/test-cmp2.h +++ b/tests/unistr/test-cmp2.h @@ -1,5 +1,5 @@ /* Test of uN_cmp2() functions. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-cpy-alloc.h b/tests/unistr/test-cpy-alloc.h index 261a677..431bfe9 100644 --- a/tests/unistr/test-cpy-alloc.h +++ b/tests/unistr/test-cpy-alloc.h @@ -1,5 +1,5 @@ /* Test of uN_cpy_alloc() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-cpy.h b/tests/unistr/test-cpy.h index bc8fe53..c304f64 100644 --- a/tests/unistr/test-cpy.h +++ b/tests/unistr/test-cpy.h @@ -1,5 +1,5 @@ /* Test of uN_cpy() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-move.h b/tests/unistr/test-move.h index d2c3921..db5e90a 100644 --- a/tests/unistr/test-move.h +++ b/tests/unistr/test-move.h @@ -1,5 +1,5 @@ /* Test of uN_move() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-set.h b/tests/unistr/test-set.h index 8d36636..ed1dfb5 100644 --- a/tests/unistr/test-set.h +++ b/tests/unistr/test-set.h @@ -1,5 +1,5 @@ /* Test of uN_set() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-stpcpy.h b/tests/unistr/test-stpcpy.h index a924853..3ae2cc7 100644 --- a/tests/unistr/test-stpcpy.h +++ b/tests/unistr/test-stpcpy.h @@ -1,5 +1,5 @@ /* Test of uN_stpcpy() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-stpncpy.h b/tests/unistr/test-stpncpy.h index 3cb2958..91c0135 100644 --- a/tests/unistr/test-stpncpy.h +++ b/tests/unistr/test-stpncpy.h @@ -1,5 +1,5 @@ /* Test of uN_stpncpy() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strcat.h b/tests/unistr/test-strcat.h index e454e93..2befab7 100644 --- a/tests/unistr/test-strcat.h +++ b/tests/unistr/test-strcat.h @@ -1,5 +1,5 @@ /* Test of uN_strcat() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strchr.h b/tests/unistr/test-strchr.h index 191d74e..6534669 100644 --- a/tests/unistr/test-strchr.h +++ b/tests/unistr/test-strchr.h @@ -1,5 +1,5 @@ /* Test of uN_strchr() functions. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strcmp.h b/tests/unistr/test-strcmp.h index d5fcbe9..746ec0b 100644 --- a/tests/unistr/test-strcmp.h +++ b/tests/unistr/test-strcmp.h @@ -1,5 +1,5 @@ /* Test of uN_strcmp() and uN_strcoll() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strcpy.h b/tests/unistr/test-strcpy.h index 50d28e1..cd8447e 100644 --- a/tests/unistr/test-strcpy.h +++ b/tests/unistr/test-strcpy.h @@ -1,5 +1,5 @@ /* Test of uN_strcpy() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strdup.h b/tests/unistr/test-strdup.h index 44246e5..ca1a098 100644 --- a/tests/unistr/test-strdup.h +++ b/tests/unistr/test-strdup.h @@ -1,5 +1,5 @@ /* Test of uN_strdup() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strncat.h b/tests/unistr/test-strncat.h index fc4494e..0a9208d 100644 --- a/tests/unistr/test-strncat.h +++ b/tests/unistr/test-strncat.h @@ -1,5 +1,5 @@ /* Test of uN_strncat() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strncmp.h b/tests/unistr/test-strncmp.h index 3a28784..3293e16 100644 --- a/tests/unistr/test-strncmp.h +++ b/tests/unistr/test-strncmp.h @@ -1,5 +1,5 @@ /* Test of uN_strncmp() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strncpy.h b/tests/unistr/test-strncpy.h index 492e7b8..6e9c74f 100644 --- a/tests/unistr/test-strncpy.h +++ b/tests/unistr/test-strncpy.h @@ -1,5 +1,5 @@ /* Test of uN_strncpy() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-strnlen.h b/tests/unistr/test-strnlen.h index 0a5ce8b..191aa8d 100644 --- a/tests/unistr/test-strnlen.h +++ b/tests/unistr/test-strnlen.h @@ -1,5 +1,5 @@ /* Test of uN_strnlen() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u-strstr.h b/tests/unistr/test-u-strstr.h index 417f8b3..30f3ced 100644 --- a/tests/unistr/test-u-strstr.h +++ b/tests/unistr/test-u-strstr.h @@ -1,5 +1,5 @@ /* Test of uN_strstr() functions. - Copyright (C) 2004, 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u-strtok.h b/tests/unistr/test-u-strtok.h index 6c12484..d258077 100644 --- a/tests/unistr/test-u-strtok.h +++ b/tests/unistr/test-u-strtok.h @@ -1,5 +1,5 @@ /* Test of uN_strtok() functions. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-check.c b/tests/unistr/test-u16-check.c index 23adffe..9963d63 100644 --- a/tests/unistr/test-u16-check.c +++ b/tests/unistr/test-u16-check.c @@ -1,5 +1,5 @@ /* Test of u16_check() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-chr.c b/tests/unistr/test-u16-chr.c index 7ffeb57..2564833 100644 --- a/tests/unistr/test-u16-chr.c +++ b/tests/unistr/test-u16-chr.c @@ -1,5 +1,5 @@ /* Test of u16_chr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-cmp.c b/tests/unistr/test-u16-cmp.c index ab2025b..d7eb864 100644 --- a/tests/unistr/test-u16-cmp.c +++ b/tests/unistr/test-u16-cmp.c @@ -1,5 +1,5 @@ /* Test of u16_cmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-cmp2.c b/tests/unistr/test-u16-cmp2.c index 1a7ce04..b5802f7 100644 --- a/tests/unistr/test-u16-cmp2.c +++ b/tests/unistr/test-u16-cmp2.c @@ -1,5 +1,5 @@ /* Test of u16_cmp2() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-cpy-alloc.c b/tests/unistr/test-u16-cpy-alloc.c index a62502f..720967c 100644 --- a/tests/unistr/test-u16-cpy-alloc.c +++ b/tests/unistr/test-u16-cpy-alloc.c @@ -1,5 +1,5 @@ /* Test of u16_cpy_alloc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-cpy.c b/tests/unistr/test-u16-cpy.c index b109514..e39748b 100644 --- a/tests/unistr/test-u16-cpy.c +++ b/tests/unistr/test-u16-cpy.c @@ -1,5 +1,5 @@ /* Test of u16_cpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-mblen.c b/tests/unistr/test-u16-mblen.c index 5cec88d..eb88c98 100644 --- a/tests/unistr/test-u16-mblen.c +++ b/tests/unistr/test-u16-mblen.c @@ -1,5 +1,5 @@ /* Test of u16_mblen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-mbsnlen.c b/tests/unistr/test-u16-mbsnlen.c index 4e99b57..5684e39 100644 --- a/tests/unistr/test-u16-mbsnlen.c +++ b/tests/unistr/test-u16-mbsnlen.c @@ -1,5 +1,5 @@ /* Test of u16_mbsnlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-mbtouc-unsafe.c b/tests/unistr/test-u16-mbtouc-unsafe.c index 6811033..7dac65f 100644 --- a/tests/unistr/test-u16-mbtouc-unsafe.c +++ b/tests/unistr/test-u16-mbtouc-unsafe.c @@ -1,5 +1,5 @@ /* Test of u16_mbtouc_unsafe() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-mbtouc.c b/tests/unistr/test-u16-mbtouc.c index f673ee8..f1fa748 100644 --- a/tests/unistr/test-u16-mbtouc.c +++ b/tests/unistr/test-u16-mbtouc.c @@ -1,5 +1,5 @@ /* Test of u16_mbtouc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-mbtouc.h b/tests/unistr/test-u16-mbtouc.h index 7019b4a..c1197f4 100644 --- a/tests/unistr/test-u16-mbtouc.h +++ b/tests/unistr/test-u16-mbtouc.h @@ -1,5 +1,5 @@ /* Test of u16_mbtouc() and u16_mbtouc_unsafe() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-mbtoucr.c b/tests/unistr/test-u16-mbtoucr.c index bf93b12..f70020e 100644 --- a/tests/unistr/test-u16-mbtoucr.c +++ b/tests/unistr/test-u16-mbtoucr.c @@ -1,5 +1,5 @@ /* Test of u16_mbtoucr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-move.c b/tests/unistr/test-u16-move.c index 32588d5..ed7947c 100644 --- a/tests/unistr/test-u16-move.c +++ b/tests/unistr/test-u16-move.c @@ -1,5 +1,5 @@ /* Test of u16_move() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-next.c b/tests/unistr/test-u16-next.c index f338f76..50f54d5 100644 --- a/tests/unistr/test-u16-next.c +++ b/tests/unistr/test-u16-next.c @@ -1,5 +1,5 @@ /* Test of u16_next() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-prev.c b/tests/unistr/test-u16-prev.c index 8dcf6c1..65e9ab3 100644 --- a/tests/unistr/test-u16-prev.c +++ b/tests/unistr/test-u16-prev.c @@ -1,5 +1,5 @@ /* Test of u16_prev() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,7 +84,6 @@ check_invalid (const uint16_t *input, size_t input_length) if (uc != 0xBADFACE) return 2; -#if CONFIG_UNICODE_SAFETY /* Test recognition when preceded by a 1-unit character. */ { uint16_t buf[100]; @@ -121,7 +120,6 @@ check_invalid (const uint16_t *input, size_t input_length) if (uc != 0xBADFACE) return 6; } -#endif return 0; } diff --git a/tests/unistr/test-u16-set.c b/tests/unistr/test-u16-set.c index a545f29..5846293 100644 --- a/tests/unistr/test-u16-set.c +++ b/tests/unistr/test-u16-set.c @@ -1,5 +1,5 @@ /* Test of u16_set() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-stpcpy.c b/tests/unistr/test-u16-stpcpy.c index 9615999..ac7e6ad 100644 --- a/tests/unistr/test-u16-stpcpy.c +++ b/tests/unistr/test-u16-stpcpy.c @@ -1,5 +1,5 @@ /* Test of u16_stpcpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-stpncpy.c b/tests/unistr/test-u16-stpncpy.c index 5bebcfb..f58841e 100644 --- a/tests/unistr/test-u16-stpncpy.c +++ b/tests/unistr/test-u16-stpncpy.c @@ -1,5 +1,5 @@ /* Test of u16_stpncpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strcat.c b/tests/unistr/test-u16-strcat.c index d381d0c..fcd6f07 100644 --- a/tests/unistr/test-u16-strcat.c +++ b/tests/unistr/test-u16-strcat.c @@ -1,5 +1,5 @@ /* Test of u16_strcat() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strchr.c b/tests/unistr/test-u16-strchr.c index d33f740..eeac42d 100644 --- a/tests/unistr/test-u16-strchr.c +++ b/tests/unistr/test-u16-strchr.c @@ -1,5 +1,5 @@ /* Test of u16_strchr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strcmp.c b/tests/unistr/test-u16-strcmp.c index 9c97613..b80a729 100644 --- a/tests/unistr/test-u16-strcmp.c +++ b/tests/unistr/test-u16-strcmp.c @@ -1,5 +1,5 @@ /* Test of u16_strcmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strcmp.h b/tests/unistr/test-u16-strcmp.h index 6a3d988..9899c27 100644 --- a/tests/unistr/test-u16-strcmp.h +++ b/tests/unistr/test-u16-strcmp.h @@ -1,5 +1,5 @@ /* Test of u16_strcmp() and u16_strcoll() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strcoll.c b/tests/unistr/test-u16-strcoll.c index ac32c5b..7d7ecc5 100644 --- a/tests/unistr/test-u16-strcoll.c +++ b/tests/unistr/test-u16-strcoll.c @@ -1,5 +1,5 @@ /* Test of u16_strcoll() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strcpy.c b/tests/unistr/test-u16-strcpy.c index e274d78..b55e43b 100644 --- a/tests/unistr/test-u16-strcpy.c +++ b/tests/unistr/test-u16-strcpy.c @@ -1,5 +1,5 @@ /* Test of u16_strcpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strdup.c b/tests/unistr/test-u16-strdup.c index 33d1d0b..d13f793 100644 --- a/tests/unistr/test-u16-strdup.c +++ b/tests/unistr/test-u16-strdup.c @@ -1,5 +1,5 @@ /* Test of u16_strdup() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strlen.c b/tests/unistr/test-u16-strlen.c index 40f6af3..6e9fbea 100644 --- a/tests/unistr/test-u16-strlen.c +++ b/tests/unistr/test-u16-strlen.c @@ -1,5 +1,5 @@ /* Test of u16_strlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strmblen.c b/tests/unistr/test-u16-strmblen.c index 36103a2..6852c1d 100644 --- a/tests/unistr/test-u16-strmblen.c +++ b/tests/unistr/test-u16-strmblen.c @@ -1,5 +1,5 @@ /* Test of u16_strmblen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strmbtouc.c b/tests/unistr/test-u16-strmbtouc.c index fb6f08a..e4d95b0 100644 --- a/tests/unistr/test-u16-strmbtouc.c +++ b/tests/unistr/test-u16-strmbtouc.c @@ -1,5 +1,5 @@ /* Test of u16_strmbtouc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strncat.c b/tests/unistr/test-u16-strncat.c index 9a407f0..af78ff1 100644 --- a/tests/unistr/test-u16-strncat.c +++ b/tests/unistr/test-u16-strncat.c @@ -1,5 +1,5 @@ /* Test of u16_strncat() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strncmp.c b/tests/unistr/test-u16-strncmp.c index c6ed7c0..d89fe3d 100644 --- a/tests/unistr/test-u16-strncmp.c +++ b/tests/unistr/test-u16-strncmp.c @@ -1,5 +1,5 @@ /* Test of u16_strncmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strncpy.c b/tests/unistr/test-u16-strncpy.c index 21e302d..afb9c7e 100644 --- a/tests/unistr/test-u16-strncpy.c +++ b/tests/unistr/test-u16-strncpy.c @@ -1,5 +1,5 @@ /* Test of u16_strncpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strnlen.c b/tests/unistr/test-u16-strnlen.c index 85ff647..4d1c47f 100644 --- a/tests/unistr/test-u16-strnlen.c +++ b/tests/unistr/test-u16-strnlen.c @@ -1,5 +1,5 @@ /* Test of u16_strnlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strstr.c b/tests/unistr/test-u16-strstr.c index 8f0f4f1..3694060 100644 --- a/tests/unistr/test-u16-strstr.c +++ b/tests/unistr/test-u16-strstr.c @@ -1,5 +1,5 @@ /* Test of u16_strstr() function. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-strtok.c b/tests/unistr/test-u16-strtok.c index cbd95ef..abca091 100644 --- a/tests/unistr/test-u16-strtok.c +++ b/tests/unistr/test-u16-strtok.c @@ -1,5 +1,5 @@ /* Test of u16_strtok() function. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-to-u32.c b/tests/unistr/test-u16-to-u32.c index e095643..ffed0fe 100644 --- a/tests/unistr/test-u16-to-u32.c +++ b/tests/unistr/test-u16-to-u32.c @@ -1,5 +1,5 @@ /* Test of u16_to_u32() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-to-u8.c b/tests/unistr/test-u16-to-u8.c index f62c21e..c31b32a 100644 --- a/tests/unistr/test-u16-to-u8.c +++ b/tests/unistr/test-u16-to-u8.c @@ -1,5 +1,5 @@ /* Test of u16_to_u8() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u16-uctomb.c b/tests/unistr/test-u16-uctomb.c index cfa2104..3b3d8ef 100644 --- a/tests/unistr/test-u16-uctomb.c +++ b/tests/unistr/test-u16-uctomb.c @@ -1,5 +1,5 @@ /* Test of u16_uctomb() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-check.c b/tests/unistr/test-u32-check.c index 49099ec..67256fd 100644 --- a/tests/unistr/test-u32-check.c +++ b/tests/unistr/test-u32-check.c @@ -1,5 +1,5 @@ /* Test of u32_check() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-chr.c b/tests/unistr/test-u32-chr.c index ae274f4..76e65bb 100644 --- a/tests/unistr/test-u32-chr.c +++ b/tests/unistr/test-u32-chr.c @@ -1,5 +1,5 @@ /* Test of u32_chr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-cmp.c b/tests/unistr/test-u32-cmp.c index 20c0646..c8de9de 100644 --- a/tests/unistr/test-u32-cmp.c +++ b/tests/unistr/test-u32-cmp.c @@ -1,5 +1,5 @@ /* Test of u32_cmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-cmp2.c b/tests/unistr/test-u32-cmp2.c index 376aa73..98bbbd0 100644 --- a/tests/unistr/test-u32-cmp2.c +++ b/tests/unistr/test-u32-cmp2.c @@ -1,5 +1,5 @@ /* Test of u32_cmp2() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-cpy-alloc.c b/tests/unistr/test-u32-cpy-alloc.c index 73a4b85..8fa6332 100644 --- a/tests/unistr/test-u32-cpy-alloc.c +++ b/tests/unistr/test-u32-cpy-alloc.c @@ -1,5 +1,5 @@ /* Test of u32_cpy_alloc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-cpy.c b/tests/unistr/test-u32-cpy.c index cf11e6c..817cea4 100644 --- a/tests/unistr/test-u32-cpy.c +++ b/tests/unistr/test-u32-cpy.c @@ -1,5 +1,5 @@ /* Test of u32_cpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-mblen.c b/tests/unistr/test-u32-mblen.c index 1e038e1..e707e21 100644 --- a/tests/unistr/test-u32-mblen.c +++ b/tests/unistr/test-u32-mblen.c @@ -1,5 +1,5 @@ /* Test of u32_mblen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,14 +68,12 @@ main () ASSERT (ret == 1); } -#if CONFIG_UNICODE_SAFETY /* Test incomplete/invalid 1-unit input. */ { static const uint32_t input[] = { 0x340000 }; ret = u32_mblen (input, 1); ASSERT (ret == -1); } -#endif return 0; } diff --git a/tests/unistr/test-u32-mbsnlen.c b/tests/unistr/test-u32-mbsnlen.c index 9a87634..71925a0 100644 --- a/tests/unistr/test-u32-mbsnlen.c +++ b/tests/unistr/test-u32-mbsnlen.c @@ -1,5 +1,5 @@ /* Test of u32_mbsnlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-mbtouc-unsafe.c b/tests/unistr/test-u32-mbtouc-unsafe.c index d0ee0af..8d3851a 100644 --- a/tests/unistr/test-u32-mbtouc-unsafe.c +++ b/tests/unistr/test-u32-mbtouc-unsafe.c @@ -1,5 +1,5 @@ /* Test of u32_mbtouc_unsafe() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-mbtouc.c b/tests/unistr/test-u32-mbtouc.c index e582979..fd5cd53 100644 --- a/tests/unistr/test-u32-mbtouc.c +++ b/tests/unistr/test-u32-mbtouc.c @@ -1,5 +1,5 @@ /* Test of u32_mbtouc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,9 +22,6 @@ #include "macros.h" -/* Enable all tests that may be skipped when testing u32_mbtouc_unsafe. */ -#define FULL_SAFETY 1 - #include "test-u32-mbtouc.h" int diff --git a/tests/unistr/test-u32-mbtouc.h b/tests/unistr/test-u32-mbtouc.h index b0a7498..d332125 100644 --- a/tests/unistr/test-u32-mbtouc.h +++ b/tests/unistr/test-u32-mbtouc.h @@ -1,5 +1,5 @@ /* Test of u32_mbtouc() and u32_mbtouc_unsafe() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -64,7 +64,6 @@ test_function (int (*my_u32_mbtouc) (ucs4_t *, const uint32_t *, size_t)) ASSERT (uc == 0x1D51F); } -#if FULL_SAFETY || CONFIG_UNICODE_SAFETY /* Test incomplete/invalid 1-unit input. */ { static const uint32_t input[] = { 0x340000 }; @@ -73,5 +72,4 @@ test_function (int (*my_u32_mbtouc) (ucs4_t *, const uint32_t *, size_t)) ASSERT (ret == 1); ASSERT (uc == 0xFFFD); } -#endif } diff --git a/tests/unistr/test-u32-mbtoucr.c b/tests/unistr/test-u32-mbtoucr.c index 898baa2..0a9595b 100644 --- a/tests/unistr/test-u32-mbtoucr.c +++ b/tests/unistr/test-u32-mbtoucr.c @@ -1,5 +1,5 @@ /* Test of u32_mbtoucr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-move.c b/tests/unistr/test-u32-move.c index 0dd9e30..7a04611 100644 --- a/tests/unistr/test-u32-move.c +++ b/tests/unistr/test-u32-move.c @@ -1,5 +1,5 @@ /* Test of u32_move() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-next.c b/tests/unistr/test-u32-next.c index 339ffb9..3b87804 100644 --- a/tests/unistr/test-u32-next.c +++ b/tests/unistr/test-u32-next.c @@ -1,5 +1,5 @@ /* Test of u32_next() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -71,7 +71,6 @@ main () ASSERT (uc == 0x1D51F); } -#if CONFIG_UNICODE_SAFETY /* Test incomplete/invalid 1-unit input. */ { static const uint32_t input[] = { 0x340000, 0 }; @@ -80,7 +79,6 @@ main () ASSERT (ret == NULL); ASSERT (uc == 0xFFFD); } -#endif return 0; } diff --git a/tests/unistr/test-u32-prev.c b/tests/unistr/test-u32-prev.c index a49525d..cdcda94 100644 --- a/tests/unistr/test-u32-prev.c +++ b/tests/unistr/test-u32-prev.c @@ -1,5 +1,5 @@ /* Test of u32_prev() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -56,7 +56,6 @@ check (const uint32_t *input, size_t input_length, ucs4_t *puc) static int check_invalid (const uint32_t *input, size_t input_length) { -#if CONFIG_UNICODE_SAFETY ucs4_t uc; /* Test recognition when at the beginning of the string. */ @@ -83,7 +82,6 @@ check_invalid (const uint32_t *input, size_t input_length) if (uc != 0xBADFACE) return 4; } -#endif return 0; } diff --git a/tests/unistr/test-u32-set.c b/tests/unistr/test-u32-set.c index 0051609..15733e3 100644 --- a/tests/unistr/test-u32-set.c +++ b/tests/unistr/test-u32-set.c @@ -1,5 +1,5 @@ /* Test of u32_set() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-stpcpy.c b/tests/unistr/test-u32-stpcpy.c index 04a16a5..2700a8e 100644 --- a/tests/unistr/test-u32-stpcpy.c +++ b/tests/unistr/test-u32-stpcpy.c @@ -1,5 +1,5 @@ /* Test of u32_stpcpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-stpncpy.c b/tests/unistr/test-u32-stpncpy.c index 4b99666..3291bf3 100644 --- a/tests/unistr/test-u32-stpncpy.c +++ b/tests/unistr/test-u32-stpncpy.c @@ -1,5 +1,5 @@ /* Test of u32_stpncpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strcat.c b/tests/unistr/test-u32-strcat.c index 02f9615..1771401 100644 --- a/tests/unistr/test-u32-strcat.c +++ b/tests/unistr/test-u32-strcat.c @@ -1,5 +1,5 @@ /* Test of u32_strcat() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strchr.c b/tests/unistr/test-u32-strchr.c index 054b996..633e83f 100644 --- a/tests/unistr/test-u32-strchr.c +++ b/tests/unistr/test-u32-strchr.c @@ -1,5 +1,5 @@ /* Test of u32_strchr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strcmp.c b/tests/unistr/test-u32-strcmp.c index 8b420cf..64237cf 100644 --- a/tests/unistr/test-u32-strcmp.c +++ b/tests/unistr/test-u32-strcmp.c @@ -1,5 +1,5 @@ /* Test of u32_strcmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strcmp.h b/tests/unistr/test-u32-strcmp.h index 4b1fdd0..dcafadd 100644 --- a/tests/unistr/test-u32-strcmp.h +++ b/tests/unistr/test-u32-strcmp.h @@ -1,5 +1,5 @@ /* Test of u32_strcmp() and u32_strcoll() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strcoll.c b/tests/unistr/test-u32-strcoll.c index f718a82..4603191 100644 --- a/tests/unistr/test-u32-strcoll.c +++ b/tests/unistr/test-u32-strcoll.c @@ -1,5 +1,5 @@ /* Test of u32_strcoll() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strcpy.c b/tests/unistr/test-u32-strcpy.c index b388890..c0af640 100644 --- a/tests/unistr/test-u32-strcpy.c +++ b/tests/unistr/test-u32-strcpy.c @@ -1,5 +1,5 @@ /* Test of u32_strcpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strdup.c b/tests/unistr/test-u32-strdup.c index c200e65..1dfa14c 100644 --- a/tests/unistr/test-u32-strdup.c +++ b/tests/unistr/test-u32-strdup.c @@ -1,5 +1,5 @@ /* Test of u32_strdup() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strlen.c b/tests/unistr/test-u32-strlen.c index a797398..19353ea 100644 --- a/tests/unistr/test-u32-strlen.c +++ b/tests/unistr/test-u32-strlen.c @@ -1,5 +1,5 @@ /* Test of u32_strlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strmblen.c b/tests/unistr/test-u32-strmblen.c index 0b74531..80626b8 100644 --- a/tests/unistr/test-u32-strmblen.c +++ b/tests/unistr/test-u32-strmblen.c @@ -1,5 +1,5 @@ /* Test of u32_strmblen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,14 +62,12 @@ main () ASSERT (ret == 1); } -#if CONFIG_UNICODE_SAFETY /* Test incomplete/invalid 1-unit input. */ { static const uint32_t input[] = { 0x340000, 0 }; ret = u32_strmblen (input); ASSERT (ret == -1); } -#endif return 0; } diff --git a/tests/unistr/test-u32-strmbtouc.c b/tests/unistr/test-u32-strmbtouc.c index 39451f7..fa5311e 100644 --- a/tests/unistr/test-u32-strmbtouc.c +++ b/tests/unistr/test-u32-strmbtouc.c @@ -1,5 +1,5 @@ /* Test of u32_strmbtouc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -71,7 +71,6 @@ main () ASSERT (uc == 0x1D51F); } -#if CONFIG_UNICODE_SAFETY /* Test incomplete/invalid 1-unit input. */ { static const uint32_t input[] = { 0x340000, 0 }; @@ -80,7 +79,6 @@ main () ASSERT (ret == -1); ASSERT (uc == 0xBADFACE); } -#endif return 0; } diff --git a/tests/unistr/test-u32-strncat.c b/tests/unistr/test-u32-strncat.c index 2c78c8f..12afe06 100644 --- a/tests/unistr/test-u32-strncat.c +++ b/tests/unistr/test-u32-strncat.c @@ -1,5 +1,5 @@ /* Test of u32_strncat() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strncmp.c b/tests/unistr/test-u32-strncmp.c index f1cad81..72fd3eb 100644 --- a/tests/unistr/test-u32-strncmp.c +++ b/tests/unistr/test-u32-strncmp.c @@ -1,5 +1,5 @@ /* Test of u32_strncmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strncpy.c b/tests/unistr/test-u32-strncpy.c index ebe0add..47f4165 100644 --- a/tests/unistr/test-u32-strncpy.c +++ b/tests/unistr/test-u32-strncpy.c @@ -1,5 +1,5 @@ /* Test of u32_strncpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strnlen.c b/tests/unistr/test-u32-strnlen.c index 7941ab3..fc23aac 100644 --- a/tests/unistr/test-u32-strnlen.c +++ b/tests/unistr/test-u32-strnlen.c @@ -1,5 +1,5 @@ /* Test of u32_strnlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strstr.c b/tests/unistr/test-u32-strstr.c index c291b3c..d64e1eb 100644 --- a/tests/unistr/test-u32-strstr.c +++ b/tests/unistr/test-u32-strstr.c @@ -1,5 +1,5 @@ /* Test of u32_strstr() function. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-strtok.c b/tests/unistr/test-u32-strtok.c index 04cded7..7937830 100644 --- a/tests/unistr/test-u32-strtok.c +++ b/tests/unistr/test-u32-strtok.c @@ -1,5 +1,5 @@ /* Test of u32_strtok() function. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-to-u16.c b/tests/unistr/test-u32-to-u16.c index 65e1985..9022d50 100644 --- a/tests/unistr/test-u32-to-u16.c +++ b/tests/unistr/test-u32-to-u16.c @@ -1,5 +1,5 @@ /* Test of u32_to_u16() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-to-u8.c b/tests/unistr/test-u32-to-u8.c index deb4560..0a18127 100644 --- a/tests/unistr/test-u32-to-u8.c +++ b/tests/unistr/test-u32-to-u8.c @@ -1,5 +1,5 @@ /* Test of u32_to_u8() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u32-uctomb.c b/tests/unistr/test-u32-uctomb.c index acc4c73..c9d0326 100644 --- a/tests/unistr/test-u32-uctomb.c +++ b/tests/unistr/test-u32-uctomb.c @@ -1,5 +1,5 @@ /* Test of u32_uctomb() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-check.c b/tests/unistr/test-u8-check.c index fcf678c..f1fe900 100644 --- a/tests/unistr/test-u8-check.c +++ b/tests/unistr/test-u8-check.c @@ -1,5 +1,5 @@ /* Test of u8_check() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-chr.c b/tests/unistr/test-u8-chr.c index 2d28f9e..28de5f8 100644 --- a/tests/unistr/test-u8-chr.c +++ b/tests/unistr/test-u8-chr.c @@ -1,5 +1,5 @@ /* Test of u8_chr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-cmp.c b/tests/unistr/test-u8-cmp.c index 5606f0a..5b9f4c0 100644 --- a/tests/unistr/test-u8-cmp.c +++ b/tests/unistr/test-u8-cmp.c @@ -1,5 +1,5 @@ /* Test of u8_cmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-cmp2.c b/tests/unistr/test-u8-cmp2.c index 07b52d9..a4ab5e1 100644 --- a/tests/unistr/test-u8-cmp2.c +++ b/tests/unistr/test-u8-cmp2.c @@ -1,5 +1,5 @@ /* Test of u8_cmp2() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-cpy-alloc.c b/tests/unistr/test-u8-cpy-alloc.c index ff89813..d6c2b85 100644 --- a/tests/unistr/test-u8-cpy-alloc.c +++ b/tests/unistr/test-u8-cpy-alloc.c @@ -1,5 +1,5 @@ /* Test of u8_cpy_alloc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-cpy.c b/tests/unistr/test-u8-cpy.c index 2e2c06f..b3954a1 100644 --- a/tests/unistr/test-u8-cpy.c +++ b/tests/unistr/test-u8-cpy.c @@ -1,5 +1,5 @@ /* Test of u8_cpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-mblen.c b/tests/unistr/test-u8-mblen.c index 3e68b66..e2ea3a8 100644 --- a/tests/unistr/test-u8-mblen.c +++ b/tests/unistr/test-u8-mblen.c @@ -1,5 +1,5 @@ /* Test of u8_mblen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-mbsnlen.c b/tests/unistr/test-u8-mbsnlen.c index e57e3ea..8725cbf 100644 --- a/tests/unistr/test-u8-mbsnlen.c +++ b/tests/unistr/test-u8-mbsnlen.c @@ -1,5 +1,5 @@ /* Test of u8_mbsnlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-mbtouc-unsafe.c b/tests/unistr/test-u8-mbtouc-unsafe.c index cf9ba19..b1efab2 100644 --- a/tests/unistr/test-u8-mbtouc-unsafe.c +++ b/tests/unistr/test-u8-mbtouc-unsafe.c @@ -1,5 +1,5 @@ /* Test of u8_mbtouc_unsafe() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-mbtouc.c b/tests/unistr/test-u8-mbtouc.c index 9e3b960..8ed2176 100644 --- a/tests/unistr/test-u8-mbtouc.c +++ b/tests/unistr/test-u8-mbtouc.c @@ -1,5 +1,5 @@ /* Test of u8_mbtouc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-mbtouc.h b/tests/unistr/test-u8-mbtouc.h index 295160d..19f8a11 100644 --- a/tests/unistr/test-u8-mbtouc.h +++ b/tests/unistr/test-u8-mbtouc.h @@ -1,5 +1,5 @@ /* Test of u8_mbtouc() and u8_mbtouc_unsafe() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-mbtoucr.c b/tests/unistr/test-u8-mbtoucr.c index 7f02e8b..7a7b0b9 100644 --- a/tests/unistr/test-u8-mbtoucr.c +++ b/tests/unistr/test-u8-mbtoucr.c @@ -1,5 +1,5 @@ /* Test of u8_mbtoucr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-move.c b/tests/unistr/test-u8-move.c index eed72b4..3d06912 100644 --- a/tests/unistr/test-u8-move.c +++ b/tests/unistr/test-u8-move.c @@ -1,5 +1,5 @@ /* Test of u8_move() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-next.c b/tests/unistr/test-u8-next.c index 4c509aa..813257a 100644 --- a/tests/unistr/test-u8-next.c +++ b/tests/unistr/test-u8-next.c @@ -1,5 +1,5 @@ /* Test of u8_next() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-prev.c b/tests/unistr/test-u8-prev.c index 9e2a9ba..33342ae 100644 --- a/tests/unistr/test-u8-prev.c +++ b/tests/unistr/test-u8-prev.c @@ -1,5 +1,5 @@ /* Test of u8_prev() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-set.c b/tests/unistr/test-u8-set.c index de2f281..9ddb43e 100644 --- a/tests/unistr/test-u8-set.c +++ b/tests/unistr/test-u8-set.c @@ -1,5 +1,5 @@ /* Test of u8_set() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-stpcpy.c b/tests/unistr/test-u8-stpcpy.c index d7403e8..36d9126 100644 --- a/tests/unistr/test-u8-stpcpy.c +++ b/tests/unistr/test-u8-stpcpy.c @@ -1,5 +1,5 @@ /* Test of u8_stpcpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-stpncpy.c b/tests/unistr/test-u8-stpncpy.c index 18f11df..47bc8e3 100644 --- a/tests/unistr/test-u8-stpncpy.c +++ b/tests/unistr/test-u8-stpncpy.c @@ -1,5 +1,5 @@ /* Test of u8_stpncpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strcat.c b/tests/unistr/test-u8-strcat.c index 7f4a095..2566792 100644 --- a/tests/unistr/test-u8-strcat.c +++ b/tests/unistr/test-u8-strcat.c @@ -1,5 +1,5 @@ /* Test of u8_strcat() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strchr.c b/tests/unistr/test-u8-strchr.c index ff7abe6..95f9ea4 100644 --- a/tests/unistr/test-u8-strchr.c +++ b/tests/unistr/test-u8-strchr.c @@ -1,5 +1,5 @@ /* Test of u8_strchr() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strcmp.c b/tests/unistr/test-u8-strcmp.c index 51a90db..6457250 100644 --- a/tests/unistr/test-u8-strcmp.c +++ b/tests/unistr/test-u8-strcmp.c @@ -1,5 +1,5 @@ /* Test of u8_strcmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strcmp.h b/tests/unistr/test-u8-strcmp.h index 66dec74..fdb0846 100644 --- a/tests/unistr/test-u8-strcmp.h +++ b/tests/unistr/test-u8-strcmp.h @@ -1,5 +1,5 @@ /* Test of u8_strcmp() and u8_strcoll() functions. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strcoll.c b/tests/unistr/test-u8-strcoll.c index 73f42dd..9f8b093 100644 --- a/tests/unistr/test-u8-strcoll.c +++ b/tests/unistr/test-u8-strcoll.c @@ -1,5 +1,5 @@ /* Test of u8_strcoll() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strcpy.c b/tests/unistr/test-u8-strcpy.c index 2dd0201..a745162 100644 --- a/tests/unistr/test-u8-strcpy.c +++ b/tests/unistr/test-u8-strcpy.c @@ -1,5 +1,5 @@ /* Test of u8_strcpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strdup.c b/tests/unistr/test-u8-strdup.c index c72b3d2..dc094d6 100644 --- a/tests/unistr/test-u8-strdup.c +++ b/tests/unistr/test-u8-strdup.c @@ -1,5 +1,5 @@ /* Test of u8_strdup() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strlen.c b/tests/unistr/test-u8-strlen.c index d4b3224..b53c15a 100644 --- a/tests/unistr/test-u8-strlen.c +++ b/tests/unistr/test-u8-strlen.c @@ -1,5 +1,5 @@ /* Test of u8_strlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strmblen.c b/tests/unistr/test-u8-strmblen.c index 46bee92..6c87e45 100644 --- a/tests/unistr/test-u8-strmblen.c +++ b/tests/unistr/test-u8-strmblen.c @@ -1,5 +1,5 @@ /* Test of u8_strmblen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strmbtouc.c b/tests/unistr/test-u8-strmbtouc.c index 1239f40..d1079ed 100644 --- a/tests/unistr/test-u8-strmbtouc.c +++ b/tests/unistr/test-u8-strmbtouc.c @@ -1,5 +1,5 @@ /* Test of u8_strmbtouc() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strncat.c b/tests/unistr/test-u8-strncat.c index b7d248b..e422624 100644 --- a/tests/unistr/test-u8-strncat.c +++ b/tests/unistr/test-u8-strncat.c @@ -1,5 +1,5 @@ /* Test of u8_strncat() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strncmp.c b/tests/unistr/test-u8-strncmp.c index 5bd7b5e..48ad9ed 100644 --- a/tests/unistr/test-u8-strncmp.c +++ b/tests/unistr/test-u8-strncmp.c @@ -1,5 +1,5 @@ /* Test of u8_strncmp() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strncpy.c b/tests/unistr/test-u8-strncpy.c index 5e20beb..2144729 100644 --- a/tests/unistr/test-u8-strncpy.c +++ b/tests/unistr/test-u8-strncpy.c @@ -1,5 +1,5 @@ /* Test of u8_strncpy() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strnlen.c b/tests/unistr/test-u8-strnlen.c index c59d7b1..fd2b4ad 100644 --- a/tests/unistr/test-u8-strnlen.c +++ b/tests/unistr/test-u8-strnlen.c @@ -1,5 +1,5 @@ /* Test of u8_strnlen() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strstr.c b/tests/unistr/test-u8-strstr.c index 3d7be9c..05f238c 100644 --- a/tests/unistr/test-u8-strstr.c +++ b/tests/unistr/test-u8-strstr.c @@ -1,5 +1,5 @@ /* Test of u8_strstr() function. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-strtok.c b/tests/unistr/test-u8-strtok.c index 6745ea8..a6e54a5 100644 --- a/tests/unistr/test-u8-strtok.c +++ b/tests/unistr/test-u8-strtok.c @@ -1,5 +1,5 @@ /* Test of u8_strtok() function. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-to-u16.c b/tests/unistr/test-u8-to-u16.c index 5f3ddad..c19e6ee 100644 --- a/tests/unistr/test-u8-to-u16.c +++ b/tests/unistr/test-u8-to-u16.c @@ -1,5 +1,5 @@ /* Test of u8_to_u16() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-to-u32.c b/tests/unistr/test-u8-to-u32.c index 26ff002..0f14689 100644 --- a/tests/unistr/test-u8-to-u32.c +++ b/tests/unistr/test-u8-to-u32.c @@ -1,5 +1,5 @@ /* Test of u8_to_u32() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unistr/test-u8-uctomb.c b/tests/unistr/test-u8-uctomb.c index f586f04..bbc9418 100644 --- a/tests/unistr/test-u8-uctomb.c +++ b/tests/unistr/test-u8-uctomb.c @@ -1,5 +1,5 @@ /* Test of u8_uctomb() function. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwbrk/test-u16-wordbreaks.c b/tests/uniwbrk/test-u16-wordbreaks.c index d2d9dd2..ab1e0cb 100644 --- a/tests/uniwbrk/test-u16-wordbreaks.c +++ b/tests/uniwbrk/test-u16-wordbreaks.c @@ -1,5 +1,5 @@ /* Test of word breaks in UTF-16 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwbrk/test-u32-wordbreaks.c b/tests/uniwbrk/test-u32-wordbreaks.c index 451c30e..7155791 100644 --- a/tests/uniwbrk/test-u32-wordbreaks.c +++ b/tests/uniwbrk/test-u32-wordbreaks.c @@ -1,5 +1,5 @@ /* Test of word breaks in UTF-32 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwbrk/test-u8-wordbreaks.c b/tests/uniwbrk/test-u8-wordbreaks.c index 3d1011c..851af95 100644 --- a/tests/uniwbrk/test-u8-wordbreaks.c +++ b/tests/uniwbrk/test-u8-wordbreaks.c @@ -1,5 +1,5 @@ /* Test of word breaks in UTF-8 strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwbrk/test-uc-wordbreaks.c b/tests/uniwbrk/test-uc-wordbreaks.c index adb61a6..7bf3762 100644 --- a/tests/uniwbrk/test-uc-wordbreaks.c +++ b/tests/uniwbrk/test-uc-wordbreaks.c @@ -1,5 +1,5 @@ /* Word break function test, using test data from UCD. - Copyright (C) 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published diff --git a/tests/uniwbrk/test-ulc-wordbreaks.c b/tests/uniwbrk/test-ulc-wordbreaks.c index 40d4c58..8fb05aa 100644 --- a/tests/uniwbrk/test-ulc-wordbreaks.c +++ b/tests/uniwbrk/test-ulc-wordbreaks.c @@ -1,5 +1,5 @@ /* Test of word breaks in strings. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-u16-strwidth.c b/tests/uniwidth/test-u16-strwidth.c index b8d9a42..ba7f047 100644 --- a/tests/uniwidth/test-u16-strwidth.c +++ b/tests/uniwidth/test-u16-strwidth.c @@ -1,5 +1,5 @@ /* Test of u16_strwidth() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-u16-width.c b/tests/uniwidth/test-u16-width.c index b44794f..dc8162a 100644 --- a/tests/uniwidth/test-u16-width.c +++ b/tests/uniwidth/test-u16-width.c @@ -1,5 +1,5 @@ /* Test of u16_width() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-u32-strwidth.c b/tests/uniwidth/test-u32-strwidth.c index c792d87..83e1334 100644 --- a/tests/uniwidth/test-u32-strwidth.c +++ b/tests/uniwidth/test-u32-strwidth.c @@ -1,5 +1,5 @@ /* Test of u32_strwidth() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-u32-width.c b/tests/uniwidth/test-u32-width.c index 488bea5..0095b6d 100644 --- a/tests/uniwidth/test-u32-width.c +++ b/tests/uniwidth/test-u32-width.c @@ -1,5 +1,5 @@ /* Test of u32_width() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-u8-strwidth.c b/tests/uniwidth/test-u8-strwidth.c index 3dd30ff..9b184d6 100644 --- a/tests/uniwidth/test-u8-strwidth.c +++ b/tests/uniwidth/test-u8-strwidth.c @@ -1,5 +1,5 @@ /* Test of u8_strwidth() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-u8-width.c b/tests/uniwidth/test-u8-width.c index ec529b6..e0e37f5 100644 --- a/tests/uniwidth/test-u8-width.c +++ b/tests/uniwidth/test-u8-width.c @@ -1,5 +1,5 @@ /* Test of u8_width() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-uc_width.c b/tests/uniwidth/test-uc_width.c index 6b1e7ac..8c248fa 100644 --- a/tests/uniwidth/test-uc_width.c +++ b/tests/uniwidth/test-uc_width.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/uniwidth/test-uc_width2.c b/tests/uniwidth/test-uc_width2.c index 0ef9963..60ef755 100644 --- a/tests/uniwidth/test-uc_width2.c +++ b/tests/uniwidth/test-uc_width2.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/unsetenv.c b/tests/unsetenv.c index 87f41d5..8368744 100644 --- a/tests/unsetenv.c +++ b/tests/unsetenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2002, 2005-2015 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2002, 2005-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify diff --git a/tests/wcrtomb.c b/tests/wcrtomb.c index b38d2e0..b931ee9 100644 --- a/tests/wcrtomb.c +++ b/tests/wcrtomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. This program is free software: you can redistribute it and/or modify diff --git a/tests/wctob.c b/tests/wctob.c index 3ff6c7b..15e3ff3 100644 --- a/tests/wctob.c +++ b/tests/wctob.c @@ -1,5 +1,5 @@ /* Convert wide character to unibyte character. - Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2008. This program is free software: you can redistribute it and/or modify diff --git a/tests/wctomb-impl.h b/tests/wctomb-impl.h index 41217d5..a6ed971 100644 --- a/tests/wctomb-impl.h +++ b/tests/wctomb-impl.h @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. This program is free software: you can redistribute it and/or modify diff --git a/tests/wctomb.c b/tests/wctomb.c index 8022aa8..f1d14f5 100644 --- a/tests/wctomb.c +++ b/tests/wctomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2015 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2011. This program is free software: you can redistribute it and/or modify diff --git a/tests/xalloc-die.c b/tests/xalloc-die.c index 3cea638..4c7994b 100644 --- a/tests/xalloc-die.c +++ b/tests/xalloc-die.c @@ -1,6 +1,6 @@ /* Report a memory allocation failure and exit. - Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2015 Free Software + Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/tests/xalloc-oversized.h b/tests/xalloc-oversized.h index f0e9778..53e6556 100644 --- a/tests/xalloc-oversized.h +++ b/tests/xalloc-oversized.h @@ -1,6 +1,6 @@ /* xalloc-oversized.h -- memory allocation size checking - Copyright (C) 1990-2000, 2003-2004, 2006-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,15 +16,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef XALLOC_OVERSIZED_H_ -# define XALLOC_OVERSIZED_H_ +#define XALLOC_OVERSIZED_H_ -# include <stddef.h> +#include <stddef.h> -/* Return 1 if an array of N objects, each of size S, cannot exist due - to size arithmetic overflow. S must be positive and N must be - nonnegative. This is a macro, not a function, so that it - works correctly even when SIZE_MAX < N. +/* Default for (non-Clang) compilers that lack __has_builtin. */ +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif +/* True if N * S would overflow in a size calculation. + This expands to a constant expression if N and S are both constants. By gnulib convention, SIZE_MAX represents overflow in size calculations, so the conservative dividend to use here is SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. @@ -32,7 +34,30 @@ sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for exactly-SIZE_MAX allocations on such hosts; this avoids a test and branch when S is known to be 1. */ -# define xalloc_oversized(n, s) \ +#define __xalloc_oversized(n, s) \ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) + +/* Return 1 if an array of N objects, each of size S, cannot exist due + to size arithmetic overflow. S must be positive and N must be + nonnegative. This is a macro, not a function, so that it + works correctly even when SIZE_MAX < N. */ + +#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p) +# define xalloc_oversized(n, s) __builtin_mul_overflow_p (n, s, (size_t) 1) +#elif ((5 <= __GNUC__ \ + || (__has_builtin (__builtin_mul_overflow) \ + && __has_builtin (__builtin_constant_p))) \ + && !__STRICT_ANSI__) +# define xalloc_oversized(n, s) \ + (__builtin_constant_p (n) && __builtin_constant_p (s) \ + ? __xalloc_oversized (n, s) \ + : ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size); })) + +/* Other compilers use integer division; this may be slower but is + more portable. */ +#else +# define xalloc_oversized(n, s) __xalloc_oversized (n, s) +#endif + #endif /* !XALLOC_OVERSIZED_H_ */ diff --git a/tests/xalloc.h b/tests/xalloc.h index 81ef680..a4fddbf 100644 --- a/tests/xalloc.h +++ b/tests/xalloc.h @@ -1,6 +1,6 @@ /* xalloc.h -- malloc with out-of-memory checking - Copyright (C) 1990-2000, 2003-2004, 2006-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/xmalloc.c b/tests/xmalloc.c index e246559..429b50d 100644 --- a/tests/xmalloc.c +++ b/tests/xmalloc.c @@ -1,6 +1,6 @@ /* xmalloc.c -- malloc with out of memory checking - Copyright (C) 1990-2000, 2002-2006, 2008-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2002-2006, 2008-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h index 76418aa..e6ff672 100644 --- a/tests/zerosize-ptr.h +++ b/tests/zerosize-ptr.h @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009-2015 Free Software Foundation, Inc. + Copyright (C) 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by |