diff options
Diffstat (limited to 'gnulib-tests')
359 files changed, 2570 insertions, 753 deletions
diff --git a/gnulib-tests/Makefile.in b/gnulib-tests/Makefile.in index 1047bc75..0d4979f6 100644 --- a/gnulib-tests/Makefile.in +++ b/gnulib-tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 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 @@ -39,7 +39,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -101,20 +111,16 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(srcdir)/gnulib.mk $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/build-aux/depcomp \ - $(noinst_HEADERS) $(top_srcdir)/build-aux/test-driver -TESTS = test-accept$(EXEEXT) test-file-has-acl.sh \ - test-file-has-acl-1.sh test-file-has-acl-2.sh \ - test-set-mode-acl.sh test-set-mode-acl-1.sh \ - test-set-mode-acl-2.sh test-copy-acl.sh test-copy-acl-1.sh \ - test-copy-acl-2.sh test-alignof$(EXEEXT) \ +TESTS = test-accept$(EXEEXT) test-set-mode-acl.sh \ + test-set-mode-acl-1.sh test-set-mode-acl-2.sh test-copy-acl.sh \ + test-copy-acl-1.sh test-copy-acl-2.sh test-alignof$(EXEEXT) \ test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \ test-areadlink-with-size$(EXEEXT) test-areadlinkat$(EXEEXT) \ test-argmatch$(EXEEXT) test-argv-iter$(EXEEXT) \ - test-arpa_inet$(EXEEXT) test-base64$(EXEEXT) test-binary-io.sh \ - test-bind$(EXEEXT) test-bitrotate$(EXEEXT) test-btowc1.sh \ - test-btowc2.sh test-c-ctype$(EXEEXT) test-c-strcase.sh \ + test-arpa_inet$(EXEEXT) test-array_list$(EXEEXT) \ + test-base64$(EXEEXT) test-binary-io.sh test-bind$(EXEEXT) \ + test-bitrotate$(EXEEXT) test-btowc1.sh test-btowc2.sh \ + test-c-ctype$(EXEEXT) test-c-strcase.sh \ test-calloc-gnu$(EXEEXT) test-canonicalize$(EXEEXT) \ test-chdir$(EXEEXT) test-chown$(EXEEXT) test-cloexec$(EXEEXT) \ test-close$(EXEEXT) test-closein.sh test-connect$(EXEEXT) \ @@ -132,37 +138,40 @@ TESTS = test-accept$(EXEEXT) test-file-has-acl.sh \ test-fdatasync$(EXEEXT) test-fdopen$(EXEEXT) \ test-fdopendir$(EXEEXT) test-fdutimensat$(EXEEXT) \ test-fflush$(EXEEXT) test-fflush2.sh test-fgetc$(EXEEXT) \ - test-filenamecat$(EXEEXT) test-filevercmp$(EXEEXT) \ - test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ - test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) test-fpending.sh \ - test-fpurge$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ - test-freadahead.sh test-freading$(EXEEXT) test-freadptr.sh \ - test-freadptr2.sh test-freadseek.sh \ - test-freopen-safer$(EXEEXT) test-freopen$(EXEEXT) \ - test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \ - test-fseek.sh test-fseek2.sh test-fseeko.sh test-fseeko2.sh \ - test-fseeko3.sh test-fseeko4.sh test-fseterr$(EXEEXT) \ - test-fstat$(EXEEXT) test-fstatat$(EXEEXT) test-fsync$(EXEEXT) \ - test-ftell.sh test-ftell2.sh test-ftell3$(EXEEXT) \ - test-ftello.sh test-ftello2.sh test-ftello3$(EXEEXT) \ - test-ftello4.sh test-ftruncate.sh test-futimens$(EXEEXT) \ - test-fwrite$(EXEEXT) test-getaddrinfo$(EXEEXT) \ - test-getcwd-lgpl$(EXEEXT) test-getcwd.sh \ - test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \ - test-getgroups$(EXEEXT) test-gethostname$(EXEEXT) \ - test-getline$(EXEEXT) test-getloadavg$(EXEEXT) \ - test-getlogin$(EXEEXT) test-getndelim2$(EXEEXT) \ - test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \ - test-hash$(EXEEXT) test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) \ - test-iconv$(EXEEXT) test-ignore-value$(EXEEXT) \ - test-inet_ntop$(EXEEXT) test-inet_pton$(EXEEXT) \ - test-ino-map$(EXEEXT) test-intprops$(EXEEXT) \ - test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \ - test-ioctl$(EXEEXT) test-isatty$(EXEEXT) test-isblank$(EXEEXT) \ + test-file-has-acl.sh test-file-has-acl-1.sh \ + test-file-has-acl-2.sh test-filenamecat$(EXEEXT) \ + test-filevercmp$(EXEEXT) test-float$(EXEEXT) \ + test-fnmatch$(EXEEXT) test-fopen-safer$(EXEEXT) \ + test-fopen$(EXEEXT) test-fpending.sh test-fpurge$(EXEEXT) \ + test-fputc$(EXEEXT) test-fread$(EXEEXT) test-freadahead.sh \ + test-freading$(EXEEXT) test-freadptr.sh test-freadptr2.sh \ + test-freadseek.sh test-freopen-safer$(EXEEXT) \ + test-freopen$(EXEEXT) test-frexp-nolibm$(EXEEXT) \ + test-frexpl-nolibm$(EXEEXT) test-fseek.sh test-fseek2.sh \ + test-fseeko.sh test-fseeko2.sh test-fseeko3.sh test-fseeko4.sh \ + test-fseterr$(EXEEXT) test-fstat$(EXEEXT) \ + test-fstatat$(EXEEXT) test-fsync$(EXEEXT) test-ftell.sh \ + test-ftell2.sh test-ftell3$(EXEEXT) test-ftello.sh \ + test-ftello2.sh test-ftello3$(EXEEXT) test-ftello4.sh \ + test-ftruncate.sh test-futimens$(EXEEXT) test-fwrite$(EXEEXT) \ + test-getaddrinfo$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ + test-getcwd.sh test-getdelim$(EXEEXT) \ + test-getdtablesize$(EXEEXT) test-getgroups$(EXEEXT) \ + test-gethostname$(EXEEXT) test-getline$(EXEEXT) \ + test-getloadavg$(EXEEXT) test-getlogin$(EXEEXT) \ + test-getndelim2$(EXEEXT) test-getopt$(EXEEXT) \ + test-gettimeofday$(EXEEXT) test-hash$(EXEEXT) \ + test-i-ring$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \ + test-ignore-value$(EXEEXT) test-inet_ntop$(EXEEXT) \ + test-inet_pton$(EXEEXT) test-ino-map$(EXEEXT) \ + test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \ + test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \ + test-isatty$(EXEEXT) test-isblank$(EXEEXT) \ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ test-isnanl-nolibm$(EXEEXT) test-iswblank$(EXEEXT) \ test-langinfo$(EXEEXT) test-lchown$(EXEEXT) test-link$(EXEEXT) \ - test-linkat$(EXEEXT) test-listen$(EXEEXT) test-locale$(EXEEXT) \ + test-linkat$(EXEEXT) test-linked_list$(EXEEXT) \ + test-listen$(EXEEXT) test-locale$(EXEEXT) \ test-localeconv$(EXEEXT) test-localename$(EXEEXT) \ test-lock$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \ test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ @@ -236,13 +245,13 @@ TESTS = test-accept$(EXEEXT) test-file-has-acl.sh \ test-xvasprintf$(EXEEXT) test-yesno.sh XFAIL_TESTS = noinst_PROGRAMS = -check_PROGRAMS = test-accept$(EXEEXT) test-file-has-acl$(EXEEXT) \ - test-set-mode-acl$(EXEEXT) test-copy-acl$(EXEEXT) \ - test-sameacls$(EXEEXT) test-alignof$(EXEEXT) \ - test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \ - test-areadlink-with-size$(EXEEXT) test-areadlinkat$(EXEEXT) \ - test-argmatch$(EXEEXT) test-argv-iter$(EXEEXT) \ - test-arpa_inet$(EXEEXT) test-base64$(EXEEXT) \ +check_PROGRAMS = test-accept$(EXEEXT) test-set-mode-acl$(EXEEXT) \ + test-copy-acl$(EXEEXT) test-sameacls$(EXEEXT) \ + test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \ + test-areadlink$(EXEEXT) test-areadlink-with-size$(EXEEXT) \ + test-areadlinkat$(EXEEXT) test-argmatch$(EXEEXT) \ + test-argv-iter$(EXEEXT) test-arpa_inet$(EXEEXT) \ + test-array_list$(EXEEXT) test-base64$(EXEEXT) \ test-binary-io$(EXEEXT) test-bind$(EXEEXT) \ test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \ test-c-ctype$(EXEEXT) test-c-strcasecmp$(EXEEXT) \ @@ -262,11 +271,11 @@ check_PROGRAMS = test-accept$(EXEEXT) test-file-has-acl$(EXEEXT) \ test-fdatasync$(EXEEXT) test-fdopen$(EXEEXT) \ test-fdopendir$(EXEEXT) test-fdutimensat$(EXEEXT) \ test-fflush$(EXEEXT) test-fflush2$(EXEEXT) test-fgetc$(EXEEXT) \ - test-filenamecat$(EXEEXT) test-filevercmp$(EXEEXT) \ - test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ - test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) \ - test-fpending$(EXEEXT) test-fpurge$(EXEEXT) \ - test-fputc$(EXEEXT) test-fread$(EXEEXT) \ + test-file-has-acl$(EXEEXT) test-filenamecat$(EXEEXT) \ + test-filevercmp$(EXEEXT) test-float$(EXEEXT) \ + test-fnmatch$(EXEEXT) test-fopen-safer$(EXEEXT) \ + test-fopen$(EXEEXT) test-fpending$(EXEEXT) \ + test-fpurge$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ test-freadahead$(EXEEXT) test-freading$(EXEEXT) \ test-freadptr$(EXEEXT) test-freadptr2$(EXEEXT) \ test-freadseek$(EXEEXT) test-freopen-safer$(EXEEXT) \ @@ -294,7 +303,8 @@ check_PROGRAMS = test-accept$(EXEEXT) test-file-has-acl$(EXEEXT) \ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ test-isnanl-nolibm$(EXEEXT) test-iswblank$(EXEEXT) \ test-langinfo$(EXEEXT) test-lchown$(EXEEXT) test-link$(EXEEXT) \ - test-linkat$(EXEEXT) test-listen$(EXEEXT) test-locale$(EXEEXT) \ + test-linkat$(EXEEXT) test-linked_list$(EXEEXT) \ + test-listen$(EXEEXT) test-locale$(EXEEXT) \ test-localeconv$(EXEEXT) test-localename$(EXEEXT) \ test-lock$(EXEEXT) test-lseek$(EXEEXT) test-lstat$(EXEEXT) \ test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ @@ -485,15 +495,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/nocrash.m4 \ $(top_srcdir)/m4/non-recursive-gnulib-prefix-hack.m4 \ - $(top_srcdir)/m4/nproc.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ - $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/parse-datetime.m4 \ - $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \ - $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/physmem.m4 \ - $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/posix-shell.m4 $(top_srcdir)/m4/posixtm.m4 \ - $(top_srcdir)/m4/posixver.m4 $(top_srcdir)/m4/prereq.m4 \ - $(top_srcdir)/m4/printf-frexp.m4 \ + $(top_srcdir)/m4/nproc.m4 $(top_srcdir)/m4/obstack.m4 \ + $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \ + $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ + $(top_srcdir)/m4/parse-datetime.m4 $(top_srcdir)/m4/pathmax.m4 \ + $(top_srcdir)/m4/perl.m4 $(top_srcdir)/m4/perror.m4 \ + $(top_srcdir)/m4/physmem.m4 $(top_srcdir)/m4/pipe.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/posix-shell.m4 \ + $(top_srcdir)/m4/posixtm.m4 $(top_srcdir)/m4/posixver.m4 \ + $(top_srcdir)/m4/prereq.m4 $(top_srcdir)/m4/printf-frexp.m4 \ $(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \ $(top_srcdir)/m4/priv-set.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/putenv.m4 \ @@ -578,6 +588,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/cu-progs.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/config.h CONFIG_CLEAN_FILES = @@ -590,8 +602,9 @@ am__v_AR_1 = libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp -am_libtests_a_OBJECTS = binary-io.$(OBJEXT) localename.$(OBJEXT) \ - glthread/thread.$(OBJEXT) unlinkdir.$(OBJEXT) +am_libtests_a_OBJECTS = gl_array_list.$(OBJEXT) binary-io.$(OBJEXT) \ + localename.$(OBJEXT) glthread/thread.$(OBJEXT) \ + unlinkdir.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(man1dir)" @@ -637,6 +650,11 @@ test_arpa_inet_OBJECTS = test-arpa_inet.$(OBJEXT) test_arpa_inet_LDADD = $(LDADD) test_arpa_inet_DEPENDENCIES = libtests.a ../lib/libcoreutils.a \ libtests.a $(am__DEPENDENCIES_1) +test_array_list_SOURCES = test-array_list.c +test_array_list_OBJECTS = test-array_list.$(OBJEXT) +test_array_list_LDADD = $(LDADD) +test_array_list_DEPENDENCIES = libtests.a ../lib/libcoreutils.a \ + libtests.a $(am__DEPENDENCIES_1) test_base64_SOURCES = test-base64.c test_base64_OBJECTS = test-base64.$(OBJEXT) test_base64_LDADD = $(LDADD) @@ -1160,6 +1178,11 @@ test_link_DEPENDENCIES = $(am__DEPENDENCIES_2) test_linkat_SOURCES = test-linkat.c test_linkat_OBJECTS = test-linkat.$(OBJEXT) test_linkat_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_linked_list_SOURCES = test-linked_list.c +test_linked_list_OBJECTS = test-linked_list.$(OBJEXT) +test_linked_list_LDADD = $(LDADD) +test_linked_list_DEPENDENCIES = libtests.a ../lib/libcoreutils.a \ + libtests.a $(am__DEPENDENCIES_1) test_listen_SOURCES = test-listen.c test_listen_OBJECTS = test-listen.$(OBJEXT) test_listen_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -1859,16 +1882,16 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-accept.c test-alignof.c test-alloca-opt.c \ test-areadlink.c test-areadlink-with-size.c test-areadlinkat.c \ test-argmatch.c test-argv-iter.c test-arpa_inet.c \ - test-base64.c test-binary-io.c test-bind.c test-bitrotate.c \ - test-btowc.c test-c-ctype.c test-c-strcasecmp.c \ - test-c-strncasecmp.c test-calloc-gnu.c test-canonicalize.c \ - test-chdir.c test-chown.c test-cloexec.c test-close.c \ - test-closein.c test-connect.c test-copy-acl.c test-ctype.c \ - test-di-set.c test-dirent.c test-dirent-safer.c test-dirname.c \ - test-dup.c test-dup-safer.c test-dup2.c test-environ.c \ - test-errno.c test-exclude.c test-faccessat.c test-fadvise.c \ - test-fchdir.c test-fchmodat.c test-fchownat.c test-fclose.c \ - test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ + test-array_list.c test-base64.c test-binary-io.c test-bind.c \ + test-bitrotate.c test-btowc.c test-c-ctype.c \ + test-c-strcasecmp.c test-c-strncasecmp.c test-calloc-gnu.c \ + test-canonicalize.c test-chdir.c test-chown.c test-cloexec.c \ + test-close.c test-closein.c test-connect.c test-copy-acl.c \ + test-ctype.c test-di-set.c test-dirent.c test-dirent-safer.c \ + test-dirname.c test-dup.c test-dup-safer.c test-dup2.c \ + test-environ.c test-errno.c test-exclude.c test-faccessat.c \ + test-fadvise.c test-fchdir.c test-fchmodat.c test-fchownat.c \ + test-fclose.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ test-fdatasync.c test-fdopen.c test-fdopendir.c \ test-fdutimensat.c test-fflush.c test-fflush2.c test-fgetc.c \ test-file-has-acl.c test-filenamecat.c test-filevercmp.c \ @@ -1892,15 +1915,16 @@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-isatty.c test-isblank.c test-isnand-nolibm.c \ test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ test-langinfo.c test-lchown.c test-link.c test-linkat.c \ - test-listen.c test-locale.c test-localeconv.c \ - test-localename.c test-lock.c test-lseek.c test-lstat.c \ - test-malloc-gnu.c test-malloca.c test-math.c test-mbrtowc.c \ - test-mbrtowc-w32.c test-mbsalign.c test-mbscasecmp.c \ - test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \ - test-mbsstr3.c test-md5.c test-memcasecmp.c test-memchr.c \ - test-memchr2.c test-memcoll.c test-memrchr.c test-mkdir.c \ - test-mkfifo.c test-mknod.c test-nanosleep.c test-netdb.c \ - test-netinet_in.c test-nl_langinfo.c test-open.c test-openat.c \ + test-linked_list.c test-listen.c test-locale.c \ + test-localeconv.c test-localename.c test-lock.c test-lseek.c \ + test-lstat.c test-malloc-gnu.c test-malloca.c test-math.c \ + test-mbrtowc.c test-mbrtowc-w32.c test-mbsalign.c \ + test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \ + test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-md5.c \ + test-memcasecmp.c test-memchr.c test-memchr2.c test-memcoll.c \ + test-memrchr.c test-mkdir.c test-mkfifo.c test-mknod.c \ + test-nanosleep.c test-netdb.c test-netinet_in.c \ + test-nl_langinfo.c test-open.c test-openat.c \ test-openat-safer.c test-parse-datetime.c test-pathmax.c \ test-perror.c test-perror2.c test-pipe.c test-posixtm.c \ test-printf-frexp.c test-printf-frexpl.c test-priv-set.c \ @@ -1940,16 +1964,16 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-accept.c test-alignof.c test-alloca-opt.c \ test-areadlink.c test-areadlink-with-size.c test-areadlinkat.c \ test-argmatch.c test-argv-iter.c test-arpa_inet.c \ - test-base64.c test-binary-io.c test-bind.c test-bitrotate.c \ - test-btowc.c test-c-ctype.c test-c-strcasecmp.c \ - test-c-strncasecmp.c test-calloc-gnu.c test-canonicalize.c \ - test-chdir.c test-chown.c test-cloexec.c test-close.c \ - test-closein.c test-connect.c test-copy-acl.c test-ctype.c \ - test-di-set.c test-dirent.c test-dirent-safer.c test-dirname.c \ - test-dup.c test-dup-safer.c test-dup2.c test-environ.c \ - test-errno.c test-exclude.c test-faccessat.c test-fadvise.c \ - test-fchdir.c test-fchmodat.c test-fchownat.c test-fclose.c \ - test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ + test-array_list.c test-base64.c test-binary-io.c test-bind.c \ + test-bitrotate.c test-btowc.c test-c-ctype.c \ + test-c-strcasecmp.c test-c-strncasecmp.c test-calloc-gnu.c \ + test-canonicalize.c test-chdir.c test-chown.c test-cloexec.c \ + test-close.c test-closein.c test-connect.c test-copy-acl.c \ + test-ctype.c test-di-set.c test-dirent.c test-dirent-safer.c \ + test-dirname.c test-dup.c test-dup-safer.c test-dup2.c \ + test-environ.c test-errno.c test-exclude.c test-faccessat.c \ + test-fadvise.c test-fchdir.c test-fchmodat.c test-fchownat.c \ + test-fclose.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ test-fdatasync.c test-fdopen.c test-fdopendir.c \ test-fdutimensat.c test-fflush.c test-fflush2.c test-fgetc.c \ test-file-has-acl.c test-filenamecat.c test-filevercmp.c \ @@ -1973,15 +1997,16 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-isatty.c test-isblank.c test-isnand-nolibm.c \ test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ test-langinfo.c test-lchown.c test-link.c test-linkat.c \ - test-listen.c test-locale.c test-localeconv.c \ - test-localename.c test-lock.c test-lseek.c test-lstat.c \ - test-malloc-gnu.c test-malloca.c test-math.c test-mbrtowc.c \ - test-mbrtowc-w32.c test-mbsalign.c test-mbscasecmp.c \ - test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \ - test-mbsstr3.c test-md5.c test-memcasecmp.c test-memchr.c \ - test-memchr2.c test-memcoll.c test-memrchr.c test-mkdir.c \ - test-mkfifo.c test-mknod.c test-nanosleep.c test-netdb.c \ - test-netinet_in.c test-nl_langinfo.c test-open.c test-openat.c \ + test-linked_list.c test-listen.c test-locale.c \ + test-localeconv.c test-localename.c test-lock.c test-lseek.c \ + test-lstat.c test-malloc-gnu.c test-malloca.c test-math.c \ + test-mbrtowc.c test-mbrtowc-w32.c test-mbsalign.c \ + test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \ + test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-md5.c \ + test-memcasecmp.c test-memchr.c test-memchr2.c test-memcoll.c \ + test-memrchr.c test-mkdir.c test-mkfifo.c test-mknod.c \ + test-nanosleep.c test-netdb.c test-netinet_in.c \ + test-nl_langinfo.c test-open.c test-openat.c \ test-openat-safer.c test-parse-datetime.c test-pathmax.c \ test-perror.c test-perror2.c test-pipe.c test-posixtm.c \ test-printf-frexp.c test-printf-frexpl.c test-priv-set.c \ @@ -2265,6 +2290,9 @@ TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gnulib.mk \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -2573,6 +2601,7 @@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ @@ -2906,6 +2935,7 @@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -3119,6 +3149,7 @@ LIB_EACCESS = @LIB_EACCESS@ LIB_FDATASYNC = @LIB_FDATASYNC@ LIB_GETHRXTIME = @LIB_GETHRXTIME@ LIB_GMP = @LIB_GMP@ +LIB_HAS_ACL = @LIB_HAS_ACL@ LIB_NANOSLEEP = @LIB_NANOSLEEP@ LIB_NVPAIR = @LIB_NVPAIR@ LIB_PTHREAD = @LIB_PTHREAD@ @@ -3387,10 +3418,12 @@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMAINDER = @REPLACE_REMAINDER@ @@ -3433,6 +3466,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ @@ -3481,6 +3515,7 @@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ +UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_ACL = @USE_ACL@ @@ -3566,9 +3601,9 @@ SUBDIRS = . TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ USE_ACL=$(USE_ACL) LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ - LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ - LOCALE_ZH_CN='@LOCALE_ZH_CN@' \ + LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' USE_ACL=$(USE_ACL) \ + LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ + LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' \ LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ @@ -3596,51 +3631,52 @@ check_LIBRARIES = libtests.a # your project does not use "gettext --intl", and some compilers # complain about -I options applied to nonexistent directories. EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \ - test-file-has-acl.sh test-file-has-acl-1.sh \ - test-file-has-acl-2.sh test-set-mode-acl.sh \ - test-set-mode-acl-1.sh test-set-mode-acl-2.sh test-copy-acl.sh \ - test-copy-acl-1.sh test-copy-acl-2.sh test-file-has-acl.c \ - test-set-mode-acl.c test-copy-acl.c test-sameacls.c macros.h \ - test-alignof.c test-alloca-opt.c test-areadlink.h \ - test-areadlink.c macros.h test-areadlink.h \ + test-set-mode-acl.sh test-set-mode-acl-1.sh \ + test-set-mode-acl-2.sh test-copy-acl.sh test-copy-acl-1.sh \ + test-copy-acl-2.sh test-set-mode-acl.c test-copy-acl.c \ + test-sameacls.c macros.h test-alignof.c test-alloca-opt.c \ + test-areadlink.h test-areadlink.c macros.h test-areadlink.h \ test-areadlink-with-size.c macros.h test-areadlink.h \ test-areadlinkat.c macros.h test-argmatch.c macros.h \ - test-argv-iter.c macros.h test-arpa_inet.c test-base64.c \ - macros.h test-binary-io.sh test-binary-io.c macros.h bind.c \ - w32sock.h test-bind.c signature.h macros.h test-bitrotate.c \ - macros.h 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-calloc-gnu.c test-canonicalize.c macros.h test-chdir.c \ - signature.h macros.h nap.h test-chown.h test-chown.c \ - signature.h macros.h test-cloexec.c macros.h test-close.c \ - signature.h macros.h test-closein.sh test-closein.c connect.c \ - w32sock.h test-connect.c signature.h macros.h test-md5.c \ - test-sha1.c test-ctype.c test-di-set.c macros.h \ - test-dirent-safer.c macros.h test-dirent.c test-dirname.c \ - test-dup.c signature.h macros.h test-dup2.c signature.h \ - macros.h test-environ.c test-errno.c test-exclude.c \ - test-exclude1.sh test-exclude2.sh test-exclude3.sh \ - test-exclude4.sh test-exclude5.sh test-exclude6.sh \ - test-exclude7.sh test-exclude8.sh test-faccessat.c signature.h \ - macros.h test-fadvise.c test-fchdir.c signature.h macros.h \ - test-fchmodat.c signature.h macros.h nap.h test-chown.h \ - test-lchown.h test-fchownat.c signature.h macros.h \ - test-fclose.c test-fcntl-h.c test-open.h test-fcntl-safer.c \ - macros.h test-fcntl.c signature.h macros.h test-fdatasync.c \ - signature.h macros.h test-fdopen.c signature.h macros.h \ - test-fdopendir.c signature.h macros.h nap.h test-futimens.h \ - test-lutimens.h test-utimens.h test-utimens-common.h \ - test-fdutimensat.c macros.h test-fflush.c test-fflush2.sh \ - test-fflush2.c signature.h macros.h test-fgetc.c signature.h \ - macros.h test-filenamecat.c test-filevercmp.c macros.h \ - test-float.c macros.h test-fnmatch.c signature.h macros.h \ - test-fopen.h test-fopen-safer.c macros.h test-fopen.h \ - test-fopen.c signature.h macros.h test-fpending.c \ - test-fpending.sh macros.h test-fpurge.c macros.h test-fputc.c \ - signature.h macros.h test-fread.c signature.h macros.h \ - test-freadahead.c test-freadahead.sh macros.h test-freading.c \ - macros.h test-freadptr.c test-freadptr.sh test-freadptr2.c \ + test-argv-iter.c macros.h test-arpa_inet.c test-array_list.c \ + macros.h test-base64.c macros.h test-binary-io.sh \ + test-binary-io.c macros.h bind.c w32sock.h test-bind.c \ + signature.h macros.h test-bitrotate.c macros.h 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-calloc-gnu.c \ + test-canonicalize.c macros.h test-chdir.c signature.h macros.h \ + nap.h test-chown.h test-chown.c signature.h macros.h \ + test-cloexec.c macros.h test-close.c signature.h macros.h \ + test-closein.sh test-closein.c connect.c w32sock.h \ + test-connect.c signature.h macros.h test-md5.c test-sha1.c \ + test-ctype.c test-di-set.c macros.h test-dirent-safer.c \ + macros.h test-dirent.c test-dirname.c test-dup.c signature.h \ + macros.h test-dup2.c signature.h macros.h test-environ.c \ + test-errno.c test-exclude.c test-exclude1.sh test-exclude2.sh \ + test-exclude3.sh test-exclude4.sh test-exclude5.sh \ + test-exclude6.sh test-exclude7.sh test-exclude8.sh \ + test-faccessat.c signature.h macros.h test-fadvise.c \ + test-fchdir.c signature.h macros.h test-fchmodat.c signature.h \ + macros.h nap.h test-chown.h test-lchown.h test-fchownat.c \ + signature.h macros.h test-fclose.c test-fcntl-h.c test-open.h \ + test-fcntl-safer.c macros.h test-fcntl.c signature.h macros.h \ + test-fdatasync.c signature.h macros.h test-fdopen.c \ + signature.h macros.h test-fdopendir.c signature.h macros.h \ + nap.h test-futimens.h test-lutimens.h test-utimens.h \ + test-utimens-common.h test-fdutimensat.c macros.h \ + test-fflush.c test-fflush2.sh test-fflush2.c signature.h \ + macros.h test-fgetc.c signature.h macros.h \ + test-file-has-acl.sh test-file-has-acl-1.sh \ + test-file-has-acl-2.sh test-file-has-acl.c macros.h \ + test-filenamecat.c test-filevercmp.c macros.h test-float.c \ + macros.h test-fnmatch.c signature.h macros.h test-fopen.h \ + test-fopen-safer.c macros.h test-fopen.h test-fopen.c \ + signature.h macros.h test-fpending.c test-fpending.sh macros.h \ + test-fpurge.c macros.h test-fputc.c signature.h macros.h \ + test-fread.c signature.h macros.h test-freadahead.c \ + test-freadahead.sh macros.h test-freading.c macros.h \ + test-freadptr.c test-freadptr.sh test-freadptr2.c \ test-freadptr2.sh macros.h test-freadseek.c test-freadseek.sh \ macros.h test-freopen-safer.c macros.h test-freopen.c \ signature.h macros.h test-frexp.c test-frexp.h minus-zero.h \ @@ -3682,24 +3718,25 @@ EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \ infinity.h nan.h macros.h test-iswblank.c macros.h \ test-langinfo.c nap.h test-lchown.h test-lchown.c signature.h \ macros.h test-link.h test-link.c signature.h macros.h \ - test-link.h test-linkat.c signature.h macros.h listen.c \ - w32sock.h test-listen.c signature.h macros.h test-locale.c \ - test-localeconv.c signature.h macros.h localename.h \ - test-localename.c macros.h test-lock.c test-lseek.c \ - test-lseek.sh signature.h macros.h test-lstat.h test-lstat.c \ - signature.h macros.h test-malloc-gnu.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-mbsalign.c macros.h test-mbscasecmp.sh test-mbscasecmp.c \ - macros.h test-mbsinit.sh test-mbsinit.c signature.h macros.h \ - test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \ - test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h \ - test-mbsstr1.c test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh \ - test-mbsstr3.c macros.h test-memcasecmp.c zerosize-ptr.h \ - macros.h test-memchr.c zerosize-ptr.h signature.h macros.h \ + test-link.h test-linkat.c signature.h macros.h \ + test-linked_list.c macros.h listen.c w32sock.h test-listen.c \ + signature.h macros.h test-locale.c test-localeconv.c \ + signature.h macros.h localename.h test-localename.c macros.h \ + test-lock.c test-lseek.c test-lseek.sh signature.h macros.h \ + test-lstat.h test-lstat.c signature.h macros.h \ + test-malloc-gnu.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-mbsalign.c macros.h \ + test-mbscasecmp.sh test-mbscasecmp.c macros.h test-mbsinit.sh \ + test-mbsinit.c signature.h macros.h test-mbsrtowcs1.sh \ + test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \ + test-mbsrtowcs.c signature.h macros.h test-mbsstr1.c \ + test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c \ + macros.h test-memcasecmp.c zerosize-ptr.h macros.h \ + test-memchr.c zerosize-ptr.h signature.h macros.h \ test-memchr2.c zerosize-ptr.h macros.h test-memcoll.c macros.h \ test-memrchr.c zerosize-ptr.h signature.h macros.h \ test-mkdir.h test-mkdir.c signature.h macros.h test-mkfifo.h \ @@ -3828,9 +3865,9 @@ AM_CPPFLAGS = \ -I../lib -I$(srcdir)/../lib LDADD = libtests.a ../lib/libcoreutils.a libtests.a $(LIBTESTS_LIBDEPS) -libtests_a_SOURCES = binary-io.h binary-io.c localename.c \ - glthread/thread.h glthread/thread.c unlinkdir.c \ - glthread/yield.h +libtests_a_SOURCES = gl_array_list.h gl_array_list.c binary-io.h \ + binary-io.c localename.c glthread/thread.h glthread/thread.c \ + unlinkdir.c glthread/yield.h libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) EXTRA_libtests_a_SOURCES = accept.c bind.c connect.c inet_pton.c \ @@ -3838,7 +3875,6 @@ EXTRA_libtests_a_SOURCES = accept.c bind.c connect.c inet_pton.c \ socket.c strerror_r.c at-func.c symlinkat.c wctob.c wctomb.c AM_LIBTOOLFLAGS = --preserve-dup-deps test_accept_LDADD = $(LDADD) @LIBSOCKET@ -test_file_has_acl_LDADD = $(LDADD) $(LIB_ACL) test_set_mode_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ test_copy_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ test_sameacls_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ @@ -3865,6 +3901,7 @@ test_fdopendir_LDADD = $(LDADD) @LIBINTL@ test_fdutimensat_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) \ $(LIB_NANOSLEEP) @LIBINTL@ +test_file_has_acl_LDADD = $(LDADD) $(LIB_HAS_ACL) test_filenamecat_LDADD = $(LDADD) @LIBINTL@ test_frexp_nolibm_SOURCES = test-frexp.c randomd.c test_frexpl_nolibm_SOURCES = test-frexpl.c randoml.c @@ -3978,7 +4015,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configur echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gnulib-tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign gnulib-tests/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -3987,7 +4023,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; -$(srcdir)/gnulib.mk: +$(srcdir)/gnulib.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -4143,6 +4179,10 @@ test-arpa_inet$(EXEEXT): $(test_arpa_inet_OBJECTS) $(test_arpa_inet_DEPENDENCIES @rm -f test-arpa_inet$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_arpa_inet_OBJECTS) $(test_arpa_inet_LDADD) $(LIBS) +test-array_list$(EXEEXT): $(test_array_list_OBJECTS) $(test_array_list_DEPENDENCIES) $(EXTRA_test_array_list_DEPENDENCIES) + @rm -f test-array_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_array_list_OBJECTS) $(test_array_list_LDADD) $(LIBS) + test-base64$(EXEEXT): $(test_base64_OBJECTS) $(test_base64_DEPENDENCIES) $(EXTRA_test_base64_DEPENDENCIES) @rm -f test-base64$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_base64_OBJECTS) $(test_base64_LDADD) $(LIBS) @@ -4603,6 +4643,10 @@ test-linkat$(EXEEXT): $(test_linkat_OBJECTS) $(test_linkat_DEPENDENCIES) $(EXTRA @rm -f test-linkat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_linkat_OBJECTS) $(test_linkat_LDADD) $(LIBS) +test-linked_list$(EXEEXT): $(test_linked_list_OBJECTS) $(test_linked_list_DEPENDENCIES) $(EXTRA_test_linked_list_DEPENDENCIES) + @rm -f test-linked_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_linked_list_OBJECTS) $(test_linked_list_LDADD) $(LIBS) + test-listen$(EXEEXT): $(test_listen_OBJECTS) $(test_listen_DEPENDENCIES) $(EXTRA_test_listen_DEPENDENCIES) @rm -f test-listen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_listen_OBJECTS) $(test_listen_LDADD) $(LIBS) @@ -5233,6 +5277,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_array_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@ @@ -5255,6 +5300,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argv-iter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-arpa_inet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-array_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-base64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bind.Po@am__quote@ @@ -5370,6 +5416,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lchown.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-link.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-linkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-linked_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-listen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localeconv.Po@am__quote@ @@ -5752,7 +5799,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ - else \ + elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ @@ -5870,27 +5917,6 @@ test-accept.log: test-accept$(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-file-has-acl.sh.log: test-file-has-acl.sh - @p='test-file-has-acl.sh'; \ - b='test-file-has-acl.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-file-has-acl-1.sh.log: test-file-has-acl-1.sh - @p='test-file-has-acl-1.sh'; \ - b='test-file-has-acl-1.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-file-has-acl-2.sh.log: test-file-has-acl-2.sh - @p='test-file-has-acl-2.sh'; \ - b='test-file-has-acl-2.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-set-mode-acl.sh.log: test-set-mode-acl.sh @p='test-set-mode-acl.sh'; \ b='test-set-mode-acl.sh'; \ @@ -5989,6 +6015,13 @@ test-arpa_inet.log: test-arpa_inet$(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-array_list.log: test-array_list$(EXEEXT) + @p='test-array_list$(EXEEXT)'; \ + b='test-array_list'; \ + $(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-base64.log: test-base64$(EXEEXT) @p='test-base64$(EXEEXT)'; \ b='test-base64'; \ @@ -6346,6 +6379,27 @@ test-fgetc.log: test-fgetc$(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-file-has-acl.sh.log: test-file-has-acl.sh + @p='test-file-has-acl.sh'; \ + b='test-file-has-acl.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-file-has-acl-1.sh.log: test-file-has-acl-1.sh + @p='test-file-has-acl-1.sh'; \ + b='test-file-has-acl-1.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-file-has-acl-2.sh.log: test-file-has-acl-2.sh + @p='test-file-has-acl-2.sh'; \ + b='test-file-has-acl-2.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-filenamecat.log: test-filenamecat$(EXEEXT) @p='test-filenamecat$(EXEEXT)'; \ b='test-filenamecat'; \ @@ -6864,6 +6918,13 @@ test-linkat.log: test-linkat$(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-linked_list.log: test-linked_list$(EXEEXT) + @p='test-linked_list$(EXEEXT)'; \ + b='test-linked_list'; \ + $(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-listen.log: test-listen$(EXEEXT) @p='test-listen$(EXEEXT)'; \ b='test-listen'; \ @@ -8228,6 +8289,8 @@ uninstall-man: uninstall-man1 uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \ uninstall-man1 uninstall-pkglibexecPROGRAMS +.PRECIOUS: Makefile + # The arg-nonnull.h that gets inserted into generated .h files is the same as # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut # off. diff --git a/gnulib-tests/accept.c b/gnulib-tests/accept.c index 38ef59dc..5e2a62e2 100644 --- a/gnulib-tests/accept.c +++ b/gnulib-tests/accept.c @@ -1,6 +1,6 @@ /* accept.c --- wrappers for Windows accept function - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/at-func.c b/gnulib-tests/at-func.c index c8ee073d..bbbe458d 100644 --- a/gnulib-tests/at-func.c +++ b/gnulib-tests/at-func.c @@ -1,5 +1,5 @@ /* Define at-style functions like fstatat, unlinkat, fchownat, etc. - Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/binary-io.h b/gnulib-tests/binary-io.h index 7928f8c1..f5b66c79 100644 --- a/gnulib-tests/binary-io.h +++ b/gnulib-tests/binary-io.h @@ -1,5 +1,5 @@ /* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/bind.c b/gnulib-tests/bind.c index aa5d344a..0c024f7f 100644 --- a/gnulib-tests/bind.c +++ b/gnulib-tests/bind.c @@ -1,6 +1,6 @@ /* bind.c --- wrappers for Windows bind function - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/connect.c b/gnulib-tests/connect.c index 86712783..465a731d 100644 --- a/gnulib-tests/connect.c +++ b/gnulib-tests/connect.c @@ -1,6 +1,6 @@ /* connect.c --- wrappers for Windows connect function - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/gl_array_list.c b/gnulib-tests/gl_array_list.c new file mode 100644 index 00000000..6224f400 --- /dev/null +++ b/gnulib-tests/gl_array_list.c @@ -0,0 +1,680 @@ +/* Sequential list data type implemented by an array. + Copyright (C) 2006-2015 Free Software Foundation, Inc. + Written by Bruno Haible <bruno@clisp.org>, 2006. + + This 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 "gl_array_list.h" + +#include <stdlib.h> +/* Get memcpy. */ +#include <string.h> + +/* Checked size_t computations. */ +#include "xsize.h" + +#ifndef uintptr_t +# define uintptr_t unsigned long +#endif + +/* -------------------------- gl_list_t Data Type -------------------------- */ + +/* Concrete gl_list_impl type, valid for this file only. */ +struct gl_list_impl +{ + struct gl_list_impl_base base; + /* An array of ALLOCATED elements, of which the first COUNT are used. + 0 <= COUNT <= ALLOCATED. */ + const void **elements; + size_t count; + size_t allocated; +}; + +/* struct gl_list_node_impl doesn't exist here. The pointers are actually + indices + 1. */ +#define INDEX_TO_NODE(index) (gl_list_node_t)(uintptr_t)(size_t)((index) + 1) +#define NODE_TO_INDEX(node) ((uintptr_t)(node) - 1) + +static gl_list_t +gl_array_nx_create_empty (gl_list_implementation_t implementation, + gl_listelement_equals_fn equals_fn, + gl_listelement_hashcode_fn hashcode_fn, + gl_listelement_dispose_fn dispose_fn, + bool allow_duplicates) +{ + struct gl_list_impl *list = + (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl)); + + if (list == NULL) + return NULL; + + list->base.vtable = implementation; + list->base.equals_fn = equals_fn; + list->base.hashcode_fn = hashcode_fn; + list->base.dispose_fn = dispose_fn; + list->base.allow_duplicates = allow_duplicates; + list->elements = NULL; + list->count = 0; + list->allocated = 0; + + return list; +} + +static gl_list_t +gl_array_nx_create (gl_list_implementation_t implementation, + gl_listelement_equals_fn equals_fn, + gl_listelement_hashcode_fn hashcode_fn, + gl_listelement_dispose_fn dispose_fn, + bool allow_duplicates, + size_t count, const void **contents) +{ + struct gl_list_impl *list = + (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl)); + + if (list == NULL) + return NULL; + + list->base.vtable = implementation; + list->base.equals_fn = equals_fn; + list->base.hashcode_fn = hashcode_fn; + list->base.dispose_fn = dispose_fn; + list->base.allow_duplicates = allow_duplicates; + if (count > 0) + { + if (size_overflow_p (xtimes (count, sizeof (const void *)))) + goto fail; + list->elements = (const void **) malloc (count * sizeof (const void *)); + if (list->elements == NULL) + goto fail; + memcpy (list->elements, contents, count * sizeof (const void *)); + } + else + list->elements = NULL; + list->count = count; + list->allocated = count; + + return list; + + fail: + free (list); + return NULL; +} + +static size_t +gl_array_size (gl_list_t list) +{ + return list->count; +} + +static const void * _GL_ATTRIBUTE_PURE +gl_array_node_value (gl_list_t list, gl_list_node_t node) +{ + uintptr_t index = NODE_TO_INDEX (node); + if (!(index < list->count)) + /* Invalid argument. */ + abort (); + return list->elements[index]; +} + +static int +gl_array_node_nx_set_value (gl_list_t list, gl_list_node_t node, + const void *elt) +{ + uintptr_t index = NODE_TO_INDEX (node); + if (!(index < list->count)) + /* Invalid argument. */ + abort (); + list->elements[index] = elt; + return 0; +} + +static gl_list_node_t _GL_ATTRIBUTE_PURE +gl_array_next_node (gl_list_t list, gl_list_node_t node) +{ + uintptr_t index = NODE_TO_INDEX (node); + if (!(index < list->count)) + /* Invalid argument. */ + abort (); + index++; + if (index < list->count) + return INDEX_TO_NODE (index); + else + return NULL; +} + +static gl_list_node_t _GL_ATTRIBUTE_PURE +gl_array_previous_node (gl_list_t list, gl_list_node_t node) +{ + uintptr_t index = NODE_TO_INDEX (node); + if (!(index < list->count)) + /* Invalid argument. */ + abort (); + if (index > 0) + return INDEX_TO_NODE (index - 1); + else + return NULL; +} + +static const void * _GL_ATTRIBUTE_PURE +gl_array_get_at (gl_list_t list, size_t position) +{ + size_t count = list->count; + + if (!(position < count)) + /* Invalid argument. */ + abort (); + return list->elements[position]; +} + +static gl_list_node_t +gl_array_nx_set_at (gl_list_t list, size_t position, const void *elt) +{ + size_t count = list->count; + + if (!(position < count)) + /* Invalid argument. */ + abort (); + list->elements[position] = elt; + return INDEX_TO_NODE (position); +} + +static size_t +gl_array_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, + const void *elt) +{ + size_t count = list->count; + + if (!(start_index <= end_index && end_index <= count)) + /* Invalid arguments. */ + abort (); + + if (start_index < end_index) + { + gl_listelement_equals_fn equals = list->base.equals_fn; + if (equals != NULL) + { + size_t i; + + for (i = start_index;;) + { + if (equals (elt, list->elements[i])) + return i; + i++; + if (i == end_index) + break; + } + } + else + { + size_t i; + + for (i = start_index;;) + { + if (elt == list->elements[i]) + return i; + i++; + if (i == end_index) + break; + } + } + } + return (size_t)(-1); +} + +static gl_list_node_t +gl_array_search_from_to (gl_list_t list, size_t start_index, size_t end_index, + const void *elt) +{ + size_t index = gl_array_indexof_from_to (list, start_index, end_index, elt); + return INDEX_TO_NODE (index); +} + +/* Ensure that list->allocated > list->count. + Return 0 upon success, -1 upon out-of-memory. */ +static int +grow (gl_list_t list) +{ + size_t new_allocated; + size_t memory_size; + const void **memory; + + new_allocated = xtimes (list->allocated, 2); + new_allocated = xsum (new_allocated, 1); + memory_size = xtimes (new_allocated, sizeof (const void *)); + if (size_overflow_p (memory_size)) + /* Overflow, would lead to out of memory. */ + return -1; + memory = (const void **) realloc (list->elements, memory_size); + if (memory == NULL) + /* Out of memory. */ + return -1; + list->elements = memory; + list->allocated = new_allocated; + return 0; +} + +static gl_list_node_t +gl_array_nx_add_first (gl_list_t list, const void *elt) +{ + size_t count = list->count; + const void **elements; + size_t i; + + if (count == list->allocated) + if (grow (list) < 0) + return NULL; + elements = list->elements; + for (i = count; i > 0; i--) + elements[i] = elements[i - 1]; + elements[0] = elt; + list->count = count + 1; + return INDEX_TO_NODE (0); +} + +static gl_list_node_t +gl_array_nx_add_last (gl_list_t list, const void *elt) +{ + size_t count = list->count; + + if (count == list->allocated) + if (grow (list) < 0) + return NULL; + list->elements[count] = elt; + list->count = count + 1; + return INDEX_TO_NODE (count); +} + +static gl_list_node_t +gl_array_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt) +{ + size_t count = list->count; + uintptr_t index = NODE_TO_INDEX (node); + size_t position; + const void **elements; + size_t i; + + if (!(index < count)) + /* Invalid argument. */ + abort (); + position = index; + if (count == list->allocated) + if (grow (list) < 0) + return NULL; + elements = list->elements; + for (i = count; i > position; i--) + elements[i] = elements[i - 1]; + elements[position] = elt; + list->count = count + 1; + return INDEX_TO_NODE (position); +} + +static gl_list_node_t +gl_array_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt) +{ + size_t count = list->count; + uintptr_t index = NODE_TO_INDEX (node); + size_t position; + const void **elements; + size_t i; + + if (!(index < count)) + /* Invalid argument. */ + abort (); + position = index + 1; + if (count == list->allocated) + if (grow (list) < 0) + return NULL; + elements = list->elements; + for (i = count; i > position; i--) + elements[i] = elements[i - 1]; + elements[position] = elt; + list->count = count + 1; + return INDEX_TO_NODE (position); +} + +static gl_list_node_t +gl_array_nx_add_at (gl_list_t list, size_t position, const void *elt) +{ + size_t count = list->count; + const void **elements; + size_t i; + + if (!(position <= count)) + /* Invalid argument. */ + abort (); + if (count == list->allocated) + if (grow (list) < 0) + return NULL; + elements = list->elements; + for (i = count; i > position; i--) + elements[i] = elements[i - 1]; + elements[position] = elt; + list->count = count + 1; + return INDEX_TO_NODE (position); +} + +static bool +gl_array_remove_node (gl_list_t list, gl_list_node_t node) +{ + size_t count = list->count; + uintptr_t index = NODE_TO_INDEX (node); + size_t position; + const void **elements; + size_t i; + + if (!(index < count)) + /* Invalid argument. */ + abort (); + position = index; + elements = list->elements; + if (list->base.dispose_fn != NULL) + list->base.dispose_fn (elements[position]); + for (i = position + 1; i < count; i++) + elements[i - 1] = elements[i]; + list->count = count - 1; + return true; +} + +static bool +gl_array_remove_at (gl_list_t list, size_t position) +{ + size_t count = list->count; + const void **elements; + size_t i; + + if (!(position < count)) + /* Invalid argument. */ + abort (); + elements = list->elements; + if (list->base.dispose_fn != NULL) + list->base.dispose_fn (elements[position]); + for (i = position + 1; i < count; i++) + elements[i - 1] = elements[i]; + list->count = count - 1; + return true; +} + +static bool +gl_array_remove (gl_list_t list, const void *elt) +{ + size_t position = gl_array_indexof_from_to (list, 0, list->count, elt); + if (position == (size_t)(-1)) + return false; + else + return gl_array_remove_at (list, position); +} + +static void +gl_array_list_free (gl_list_t list) +{ + if (list->elements != NULL) + { + if (list->base.dispose_fn != NULL) + { + size_t count = list->count; + + if (count > 0) + { + gl_listelement_dispose_fn dispose = list->base.dispose_fn; + const void **elements = list->elements; + + do + dispose (*elements++); + while (--count > 0); + } + } + free (list->elements); + } + free (list); +} + +/* --------------------- gl_list_iterator_t Data Type --------------------- */ + +static gl_list_iterator_t +gl_array_iterator (gl_list_t list) +{ + gl_list_iterator_t result; + + result.vtable = list->base.vtable; + result.list = list; + result.count = list->count; + result.p = list->elements + 0; + result.q = list->elements + list->count; +#ifdef lint + result.i = 0; + result.j = 0; +#endif + + return result; +} + +static gl_list_iterator_t +gl_array_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index) +{ + gl_list_iterator_t result; + + if (!(start_index <= end_index && end_index <= list->count)) + /* Invalid arguments. */ + abort (); + result.vtable = list->base.vtable; + result.list = list; + result.count = list->count; + result.p = list->elements + start_index; + result.q = list->elements + end_index; +#ifdef lint + result.i = 0; + result.j = 0; +#endif + + return result; +} + +static bool +gl_array_iterator_next (gl_list_iterator_t *iterator, + const void **eltp, gl_list_node_t *nodep) +{ + gl_list_t list = iterator->list; + if (iterator->count != list->count) + { + if (iterator->count != list->count + 1) + /* Concurrent modifications were done on the list. */ + abort (); + /* The last returned element was removed. */ + iterator->count--; + iterator->p = (const void **) iterator->p - 1; + iterator->q = (const void **) iterator->q - 1; + } + if (iterator->p < iterator->q) + { + const void **p = (const void **) iterator->p; + *eltp = *p; + if (nodep != NULL) + *nodep = INDEX_TO_NODE (p - list->elements); + iterator->p = p + 1; + return true; + } + else + return false; +} + +static void +gl_array_iterator_free (gl_list_iterator_t *iterator) +{ +} + +/* ---------------------- Sorted gl_list_t Data Type ---------------------- */ + +static size_t +gl_array_sortedlist_indexof_from_to (gl_list_t list, + gl_listelement_compar_fn compar, + size_t low, size_t high, + const void *elt) +{ + if (!(low <= high && high <= list->count)) + /* Invalid arguments. */ + abort (); + if (low < high) + { + /* At each loop iteration, low < high; for indices < low the values + are smaller than ELT; for indices >= high the values are greater + than ELT. So, if the element occurs in the list, it is at + low <= position < high. */ + do + { + size_t mid = low + (high - low) / 2; /* low <= mid < high */ + int cmp = compar (list->elements[mid], elt); + + if (cmp < 0) + low = mid + 1; + else if (cmp > 0) + high = mid; + else /* cmp == 0 */ + { + /* We have an element equal to ELT at index MID. But we need + the minimal such index. */ + high = mid; + /* At each loop iteration, low <= high and + compar (list->elements[high], elt) == 0, + and we know that the first occurrence of the element is at + low <= position <= high. */ + while (low < high) + { + size_t mid2 = low + (high - low) / 2; /* low <= mid2 < high */ + int cmp2 = compar (list->elements[mid2], elt); + + if (cmp2 < 0) + low = mid2 + 1; + else if (cmp2 > 0) + /* The list was not sorted. */ + abort (); + else /* cmp2 == 0 */ + { + if (mid2 == low) + break; + high = mid2 - 1; + } + } + return low; + } + } + while (low < high); + /* Here low == high. */ + } + return (size_t)(-1); +} + +static size_t +gl_array_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, + const void *elt) +{ + return gl_array_sortedlist_indexof_from_to (list, compar, 0, list->count, + elt); +} + +static gl_list_node_t +gl_array_sortedlist_search_from_to (gl_list_t list, + gl_listelement_compar_fn compar, + size_t low, size_t high, + const void *elt) +{ + size_t index = + gl_array_sortedlist_indexof_from_to (list, compar, low, high, elt); + return INDEX_TO_NODE (index); +} + +static gl_list_node_t +gl_array_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, + const void *elt) +{ + size_t index = + gl_array_sortedlist_indexof_from_to (list, compar, 0, list->count, elt); + return INDEX_TO_NODE (index); +} + +static gl_list_node_t +gl_array_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, + const void *elt) +{ + size_t count = list->count; + size_t low = 0; + size_t high = count; + + /* At each loop iteration, low <= high; for indices < low the values are + smaller than ELT; for indices >= high the values are greater than ELT. */ + while (low < high) + { + size_t mid = low + (high - low) / 2; /* low <= mid < high */ + int cmp = compar (list->elements[mid], elt); + + if (cmp < 0) + low = mid + 1; + else if (cmp > 0) + high = mid; + else /* cmp == 0 */ + { + low = mid; + break; + } + } + return gl_array_nx_add_at (list, low, elt); +} + +static bool +gl_array_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, + const void *elt) +{ + size_t index = gl_array_sortedlist_indexof (list, compar, elt); + if (index == (size_t)(-1)) + return false; + else + return gl_array_remove_at (list, index); +} + + +const struct gl_list_implementation gl_array_list_implementation = + { + gl_array_nx_create_empty, + gl_array_nx_create, + gl_array_size, + gl_array_node_value, + gl_array_node_nx_set_value, + gl_array_next_node, + gl_array_previous_node, + gl_array_get_at, + gl_array_nx_set_at, + gl_array_search_from_to, + gl_array_indexof_from_to, + gl_array_nx_add_first, + gl_array_nx_add_last, + gl_array_nx_add_before, + gl_array_nx_add_after, + gl_array_nx_add_at, + gl_array_remove_node, + gl_array_remove_at, + gl_array_remove, + gl_array_list_free, + gl_array_iterator, + gl_array_iterator_from_to, + gl_array_iterator_next, + gl_array_iterator_free, + gl_array_sortedlist_search, + gl_array_sortedlist_search_from_to, + gl_array_sortedlist_indexof, + gl_array_sortedlist_indexof_from_to, + gl_array_sortedlist_nx_add, + gl_array_sortedlist_remove + }; diff --git a/gnulib-tests/gl_array_list.h b/gnulib-tests/gl_array_list.h new file mode 100644 index 00000000..b07abce2 --- /dev/null +++ b/gnulib-tests/gl_array_list.h @@ -0,0 +1,34 @@ +/* Sequential list data type implemented by an array. + Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. + Written by Bruno Haible <bruno@clisp.org>, 2006. + + This 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_ARRAY_LIST_H +#define _GL_ARRAY_LIST_H + +#include "gl_list.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern const struct gl_list_implementation gl_array_list_implementation; +#define GL_ARRAY_LIST &gl_array_list_implementation + +#ifdef __cplusplus +} +#endif + +#endif /* _GL_ARRAY_LIST_H */ diff --git a/gnulib-tests/glthread/thread.c b/gnulib-tests/glthread/thread.c index cec0b7c8..d3829ce9 100644 --- a/gnulib-tests/glthread/thread.c +++ b/gnulib-tests/glthread/thread.c @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/glthread/thread.h b/gnulib-tests/glthread/thread.h index 509db6b3..28174377 100644 --- a/gnulib-tests/glthread/thread.h +++ b/gnulib-tests/glthread/thread.h @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/glthread/yield.h b/gnulib-tests/glthread/yield.h index b9292247..b18db5bc 100644 --- a/gnulib-tests/glthread/yield.h +++ b/gnulib-tests/glthread/yield.h @@ -1,5 +1,5 @@ /* Yielding the processor to other threads and processes. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/gnulib.mk b/gnulib-tests/gnulib.mk index 7f8ac240..3b51533c 100644 --- a/gnulib-tests/gnulib.mk +++ b/gnulib-tests/gnulib.mk @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 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 @@ -79,16 +79,14 @@ EXTRA_DIST += test-accept.c signature.h macros.h ## begin gnulib module acl-tests TESTS += \ - test-file-has-acl.sh test-file-has-acl-1.sh test-file-has-acl-2.sh \ test-set-mode-acl.sh test-set-mode-acl-1.sh test-set-mode-acl-2.sh \ test-copy-acl.sh test-copy-acl-1.sh test-copy-acl-2.sh TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL) -check_PROGRAMS += test-file-has-acl test-set-mode-acl test-copy-acl test-sameacls -test_file_has_acl_LDADD = $(LDADD) $(LIB_ACL) +check_PROGRAMS += test-set-mode-acl test-copy-acl test-sameacls test_set_mode_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ test_copy_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ test_sameacls_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ -EXTRA_DIST += test-file-has-acl.sh test-file-has-acl-1.sh test-file-has-acl-2.sh test-set-mode-acl.sh test-set-mode-acl-1.sh test-set-mode-acl-2.sh test-copy-acl.sh test-copy-acl-1.sh test-copy-acl-2.sh test-file-has-acl.c test-set-mode-acl.c test-copy-acl.c test-sameacls.c macros.h +EXTRA_DIST += test-set-mode-acl.sh test-set-mode-acl-1.sh test-set-mode-acl-2.sh test-copy-acl.sh test-copy-acl-1.sh test-copy-acl-2.sh test-set-mode-acl.c test-copy-acl.c test-sameacls.c macros.h ## end gnulib module acl-tests @@ -161,6 +159,21 @@ EXTRA_DIST += test-arpa_inet.c ## end gnulib module arpa_inet-tests +## begin gnulib module array-list + +libtests_a_SOURCES += gl_array_list.h gl_array_list.c + +## end gnulib module array-list + +## begin gnulib module array-list-tests + +TESTS += test-array_list +check_PROGRAMS += test-array_list + +EXTRA_DIST += test-array_list.c macros.h + +## end gnulib module array-list-tests + ## begin gnulib module base64-tests TESTS += test-base64 @@ -558,6 +571,17 @@ EXTRA_DIST += test-fgetc.c signature.h macros.h ## end gnulib module fgetc-tests +## begin gnulib module file-has-acl-tests + +TESTS += \ + test-file-has-acl.sh test-file-has-acl-1.sh test-file-has-acl-2.sh +TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL) +check_PROGRAMS += test-file-has-acl +test_file_has_acl_LDADD = $(LDADD) $(LIB_HAS_ACL) +EXTRA_DIST += test-file-has-acl.sh test-file-has-acl-1.sh test-file-has-acl-2.sh test-file-has-acl.c macros.h + +## end gnulib module file-has-acl-tests + ## begin gnulib module filenamecat-tests TESTS += test-filenamecat @@ -1138,6 +1162,14 @@ EXTRA_DIST += test-link.h test-linkat.c signature.h macros.h ## end gnulib module linkat-tests +## begin gnulib module linked-list-tests + +TESTS += test-linked_list +check_PROGRAMS += test-linked_list +EXTRA_DIST += test-linked_list.c macros.h + +## end gnulib module linked-list-tests + ## begin gnulib module listen diff --git a/gnulib-tests/inet_pton.c b/gnulib-tests/inet_pton.c index e9703a79..40ddc181 100644 --- a/gnulib-tests/inet_pton.c +++ b/gnulib-tests/inet_pton.c @@ -1,6 +1,6 @@ /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form - Copyright (C) 2006, 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/infinity.h b/gnulib-tests/infinity.h index ec9dba45..45c30bde 100644 --- a/gnulib-tests/infinity.h +++ b/gnulib-tests/infinity.h @@ -1,5 +1,5 @@ /* Macros for infinity. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/init.sh b/gnulib-tests/init.sh index fbd293d6..d3662061 100644 --- a/gnulib-tests/init.sh +++ b/gnulib-tests/init.sh @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -93,6 +93,27 @@ skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; } fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; } framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; } +# This is used to simplify checking of the return value +# which is useful when ensuring a command fails as desired. +# I.e., just doing `command ... &&fail=1` will not catch +# a segfault in command for example. With this helper you +# instead check an explicit exit code like +# returns_ 1 command ... || fail +returns_ () { + # Disable tracing so it doesn't interfere with stderr of the wrapped command + { set +x; } 2>/dev/null + + local exp_exit="$1" + shift + "$@" + test $? -eq $exp_exit && ret_=0 || ret_=1 + + if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then + set -x + fi + { return $ret_; } 2>/dev/null +} + # Sanitize this shell to POSIX mode, if possible. DUALCASE=1; export DUALCASE if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -129,6 +150,7 @@ fi # ? - not ok gl_shell_test_script_=' test $(echo y) = y || exit 1 +f_local_() { local v=1; }; f_local_ || exit 1 score_=10 if test "$VERBOSE" = yes; then test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9 diff --git a/gnulib-tests/ioctl.c b/gnulib-tests/ioctl.c index 89afb4ea..fbff5171 100644 --- a/gnulib-tests/ioctl.c +++ b/gnulib-tests/ioctl.c @@ -1,6 +1,6 @@ /* ioctl.c --- wrappers for Windows ioctl function - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/listen.c b/gnulib-tests/listen.c index 40b6b50c..c4ae950b 100644 --- a/gnulib-tests/listen.c +++ b/gnulib-tests/listen.c @@ -1,6 +1,6 @@ /* listen.c --- wrappers for Windows listen function - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/localename.c b/gnulib-tests/localename.c index 52d545a0..35b6de40 100644 --- a/gnulib-tests/localename.c +++ b/gnulib-tests/localename.c @@ -1,5 +1,5 @@ /* Determine name of the currently selected locale. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -42,6 +42,10 @@ # if !defined IN_LIBINTL # include "glthread/lock.h" # endif +# if defined __sun +/* Solaris >= 12. */ +extern char * getlocalename_l(int, locale_t); +# endif #endif #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE @@ -55,11 +59,15 @@ #if defined _WIN32 || defined __WIN32__ # define WINDOWS_NATIVE +# if !defined IN_LIBINTL +# include "glthread/lock.h" +# endif #endif #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ # define WIN32_LEAN_AND_MEAN # include <windows.h> +# include <winnls.h> /* List of language codes, sorted by value: 0x01 LANG_ARABIC 0x02 LANG_BULGARIAN @@ -1124,6 +1132,9 @@ # ifndef LOCALE_SNAME # define LOCALE_SNAME 0x5c # endif +# ifndef LOCALE_NAME_MAX_LENGTH +# define LOCALE_NAME_MAX_LENGTH 85 +# endif #endif @@ -2502,10 +2513,82 @@ gl_locale_name_from_win32_LCID (LCID lcid) return gl_locale_name_from_win32_LANGID (langid); } +# ifdef WINDOWS_NATIVE + +/* Two variables to interface between get_lcid and the EnumLocales + callback function below. */ +static LCID found_lcid; +static char lname[LC_MAX * (LOCALE_NAME_MAX_LENGTH + 1) + 1]; + +/* Callback function for EnumLocales. */ +static BOOL CALLBACK +enum_locales_fn (LPTSTR locale_num_str) +{ + char *endp; + char locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1]; + LCID try_lcid = strtoul (locale_num_str, &endp, 16); + + if (GetLocaleInfo (try_lcid, LOCALE_SENGLANGUAGE, + locval, LOCALE_NAME_MAX_LENGTH)) + { + strcat (locval, "_"); + if (GetLocaleInfo (try_lcid, LOCALE_SENGCOUNTRY, + locval + strlen (locval), LOCALE_NAME_MAX_LENGTH)) + { + size_t locval_len = strlen (locval); + + if (strncmp (locval, lname, locval_len) == 0 + && (lname[locval_len] == '.' + || lname[locval_len] == '\0')) + { + found_lcid = try_lcid; + return FALSE; + } + } + } + return TRUE; +} + +/* This lock protects the get_lcid against multiple simultaneous calls. */ +gl_lock_define_initialized(static, get_lcid_lock) + +/* Return the Locale ID (LCID) number given the locale's name, a + string, in LOCALE_NAME. This works by enumerating all the locales + supported by the system, until we find one whose name matches + LOCALE_NAME. */ +static LCID +get_lcid (const char *locale_name) +{ + /* A simple cache. */ + static LCID last_lcid; + static char last_locale[1000]; + + /* Lock while looking for an LCID, to protect access to static + variables: last_lcid, last_locale, found_lcid, and lname. */ + gl_lock_lock (get_lcid_lock); + if (last_lcid > 0 && strcmp (locale_name, last_locale) == 0) + { + gl_lock_unlock (get_lcid_lock); + return last_lcid; + } + strncpy (lname, locale_name, sizeof (lname) - 1); + lname[sizeof (lname) - 1] = '\0'; + found_lcid = 0; + EnumSystemLocales (enum_locales_fn, LCID_SUPPORTED); + if (found_lcid > 0) + { + last_lcid = found_lcid; + strcpy (last_locale, locale_name); + } + gl_lock_unlock (get_lcid_lock); + return found_lcid; +} + +# endif #endif -#if HAVE_USELOCALE /* glibc or Mac OS X */ +#if HAVE_USELOCALE /* glibc, Solaris >= 12 or Mac OS X */ /* Simple hash set of strings. We don't want to drag in lots of hash table code here. */ @@ -2644,6 +2727,11 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname) return ""; } return querylocale (mask, thread_locale); +# elif defined __sun + /* Solaris >= 12. */ + return getlocalename_l (category, thread_locale); +# elif defined __ANDROID__ + return MB_CUR_MAX == 4 ? "C.UTF-8" : "C"; # endif } } @@ -2660,6 +2748,27 @@ gl_locale_name_thread (int category, const char *categoryname) const char *name = gl_locale_name_thread_unsafe (category, categoryname); if (name != NULL) return struniq (name); +#elif defined WINDOWS_NATIVE + if (LC_MIN <= category && category <= LC_MAX) + { + char *locname = setlocale (category, NULL); + LCID lcid = 0; + + /* If CATEGORY is LC_ALL, the result might be a semi-colon + separated list of locales. We need only one, so we take the + one corresponding to LC_CTYPE, as the most important for + character translations. */ + if (strchr (locname, ';')) + locname = setlocale (LC_CTYPE, NULL); + + /* Convert locale name to LCID. We don't want to use + LocaleNameToLCID because (a) it is only available since Vista, + and (b) it doesn't accept locale names returned by 'setlocale'. */ + lcid = get_lcid (locname); + + if (lcid > 0) + return gl_locale_name_from_win32_LCID (lcid); + } #endif return NULL; } diff --git a/gnulib-tests/localename.h b/gnulib-tests/localename.h index 861e6e9e..13c126d5 100644 --- a/gnulib-tests/localename.h +++ b/gnulib-tests/localename.h @@ -1,5 +1,5 @@ /* Determine name of the currently selected locale. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/macros.h b/gnulib-tests/macros.h index 0d7e3780..b6fdd1ca 100644 --- a/gnulib-tests/macros.h +++ b/gnulib-tests/macros.h @@ -1,5 +1,5 @@ /* Common macros used by gnulib tests. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/minus-zero.h b/gnulib-tests/minus-zero.h index be65edc8..79291ee3 100644 --- a/gnulib-tests/minus-zero.h +++ b/gnulib-tests/minus-zero.h @@ -1,5 +1,5 @@ /* Macros for floating-point negative zero. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/nan.h b/gnulib-tests/nan.h index 9da3684e..9f6819c3 100644 --- a/gnulib-tests/nan.h +++ b/gnulib-tests/nan.h @@ -1,5 +1,5 @@ /* Macros for not-a-number. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/nap.h b/gnulib-tests/nap.h index cc596d0d..940cbf27 100644 --- a/gnulib-tests/nap.h +++ b/gnulib-tests/nap.h @@ -1,5 +1,5 @@ /* Assist in file system timestamp tests. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/perror.c b/gnulib-tests/perror.c index c0548c93..70340fbe 100644 --- a/gnulib-tests/perror.c +++ b/gnulib-tests/perror.c @@ -1,5 +1,5 @@ /* Print a message describing error code. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. Written by Bruno Haible and Simon Josefsson. This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/randomd.c b/gnulib-tests/randomd.c index 85cd981a..96424286 100644 --- a/gnulib-tests/randomd.c +++ b/gnulib-tests/randomd.c @@ -1,5 +1,5 @@ /* Some random 'double' numbers used by gnulib tests. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/randoml.c b/gnulib-tests/randoml.c index 42f51e26..219278ac 100644 --- a/gnulib-tests/randoml.c +++ b/gnulib-tests/randoml.c @@ -1,5 +1,5 @@ /* Some random 'long double' numbers used by gnulib tests. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/setlocale.c b/gnulib-tests/setlocale.c index 3009d2cb..a7a1233c 100644 --- a/gnulib-tests/setlocale.c +++ b/gnulib-tests/setlocale.c @@ -1,5 +1,5 @@ /* Set the current locale. - Copyright (C) 2009, 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2009, 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/setsockopt.c b/gnulib-tests/setsockopt.c index 08afdae2..1f15bb4e 100644 --- a/gnulib-tests/setsockopt.c +++ b/gnulib-tests/setsockopt.c @@ -1,6 +1,6 @@ /* setsockopt.c --- wrappers for Windows setsockopt function - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/signature.h b/gnulib-tests/signature.h index 0ae64e7e..0a6cf915 100644 --- a/gnulib-tests/signature.h +++ b/gnulib-tests/signature.h @@ -1,5 +1,5 @@ /* Macro for checking that a function declaration is compliant. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/sleep.c b/gnulib-tests/sleep.c index 2d86b7e0..b86ec6ff 100644 --- a/gnulib-tests/sleep.c +++ b/gnulib-tests/sleep.c @@ -1,5 +1,5 @@ /* Pausing execution of the current thread. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2007. This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/socket.c b/gnulib-tests/socket.c index 5707e7f8..7a43521e 100644 --- a/gnulib-tests/socket.c +++ b/gnulib-tests/socket.c @@ -1,6 +1,6 @@ /* socket.c --- wrappers for Windows socket function - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/strerror_r.c b/gnulib-tests/strerror_r.c index 4aa96cbb..0f109475 100644 --- a/gnulib-tests/strerror_r.c +++ b/gnulib-tests/strerror_r.c @@ -1,6 +1,6 @@ /* strerror_r.c --- POSIX compatible system error routine - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,7 +34,11 @@ #if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */ # define USE_XPG_STRERROR_R 1 -extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen); +extern +#ifdef __cplusplus +"C" +#endif +int __xpg_strerror_r (int errnum, char *buf, size_t buflen); #elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) @@ -63,6 +67,10 @@ extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen); # include <nl_types.h> # endif +#ifdef __cplusplus +extern "C" { +#endif + /* Get sys_nerr, sys_errlist on HP-UX (otherwise only declared in C++ mode). Get sys_nerr, sys_errlist on IRIX (otherwise only declared with _SGIAPI). */ # if defined __hpux || defined __sgi @@ -75,6 +83,10 @@ extern char *sys_errlist[]; extern int sys_nerr; # endif +#ifdef __cplusplus +} +#endif + # else # include "glthread/lock.h" diff --git a/gnulib-tests/symlinkat.c b/gnulib-tests/symlinkat.c index 26a88f9d..84d55847 100644 --- a/gnulib-tests/symlinkat.c +++ b/gnulib-tests/symlinkat.c @@ -1,5 +1,5 @@ /* Create a symlink relative to an open directory. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This 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,13 +19,33 @@ #include <config.h> #include <unistd.h> +#include <errno.h> -#if !HAVE_SYMLINK +#if HAVE_SYMLINKAT +# undef symlinkat + +#include <sys/stat.h> +#include <string.h> + +/* Create a symlink, but reject trailing slash. */ +int +rpl_symlinkat (char const *contents, int fd, char const *name) +{ + size_t len = strlen (name); + if (len && name[len - 1] == '/') + { + struct stat st; + if (fstatat (fd, name, &st, 0) == 0) + errno = EEXIST; + return -1; + } + return symlinkat (contents, fd, name); +} + +#elif !HAVE_SYMLINK /* Mingw lacks symlink, and it is more efficient to provide a trivial wrapper than to go through at-func.c to call rpl_symlink. */ -# include <errno.h> - int symlinkat (char const *path1 _GL_UNUSED, int fd _GL_UNUSED, char const *path2 _GL_UNUSED) diff --git a/gnulib-tests/test-accept.c b/gnulib-tests/test-accept.c index 58d796a9..2fc921bc 100644 --- a/gnulib-tests/test-accept.c +++ b/gnulib-tests/test-accept.c @@ -1,5 +1,5 @@ /* Test accepting a connection to a server socket. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-alignof.c b/gnulib-tests/test-alignof.c index c2d2a8df..a04d69b4 100644 --- a/gnulib-tests/test-alignof.c +++ b/gnulib-tests/test-alignof.c @@ -1,5 +1,5 @@ /* Test of <alignof.h>. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-alloca-opt.c b/gnulib-tests/test-alloca-opt.c index 3d8acc45..c189cc66 100644 --- a/gnulib-tests/test-alloca-opt.c +++ b/gnulib-tests/test-alloca-opt.c @@ -1,5 +1,5 @@ /* Test of optional automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-areadlink-with-size.c b/gnulib-tests/test-areadlink-with-size.c index 6aaff67a..d0e93c3a 100644 --- a/gnulib-tests/test-areadlink-with-size.c +++ b/gnulib-tests/test-areadlink-with-size.c @@ -1,5 +1,5 @@ /* Tests of areadlink_with_size. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-areadlink.c b/gnulib-tests/test-areadlink.c index b487d447..682c03b8 100644 --- a/gnulib-tests/test-areadlink.c +++ b/gnulib-tests/test-areadlink.c @@ -1,5 +1,5 @@ /* Tests of areadlink. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-areadlink.h b/gnulib-tests/test-areadlink.h index 61bce294..a93c9eb5 100644 --- a/gnulib-tests/test-areadlink.h +++ b/gnulib-tests/test-areadlink.h @@ -1,5 +1,5 @@ /* Tests of areadlink and friends. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-areadlinkat.c b/gnulib-tests/test-areadlinkat.c index b1c8b263..1d95a476 100644 --- a/gnulib-tests/test-areadlinkat.c +++ b/gnulib-tests/test-areadlinkat.c @@ -1,5 +1,5 @@ /* Tests of areadlinkat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-argmatch.c b/gnulib-tests/test-argmatch.c index 735cb767..e6802b78 100644 --- a/gnulib-tests/test-argmatch.c +++ b/gnulib-tests/test-argmatch.c @@ -1,5 +1,5 @@ /* Test of exact or abbreviated match search. - Copyright (C) 1990, 1998-1999, 2001-2014 Free Software Foundation, Inc. + Copyright (C) 1990, 1998-1999, 2001-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-argv-iter.c b/gnulib-tests/test-argv-iter.c index 203fb1ae..4f95a6fb 100644 --- a/gnulib-tests/test-argv-iter.c +++ b/gnulib-tests/test-argv-iter.c @@ -1,5 +1,5 @@ /* Test argv iterator - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-arpa_inet.c b/gnulib-tests/test-arpa_inet.c index df67608b..48cf88f6 100644 --- a/gnulib-tests/test-arpa_inet.c +++ b/gnulib-tests/test-arpa_inet.c @@ -1,5 +1,5 @@ /* Test of <arpa/inet.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-array_list.c b/gnulib-tests/test-array_list.c new file mode 100644 index 00000000..a2aca725 --- /dev/null +++ b/gnulib-tests/test-array_list.c @@ -0,0 +1,329 @@ +/* Test of sequential list data type implementation. + Copyright (C) 2006-2015 Free Software Foundation, Inc. + Written by Bruno Haible <bruno@clisp.org>, 2007. + + This 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 "gl_array_list.h" + +#include <stdlib.h> + +#include "progname.h" +#include "macros.h" + +static const char *objects[15] = + { + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o" + }; + +#define RANDOM(n) (rand () % (n)) +#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))] + +static void +check_equals (gl_list_t list1, gl_list_t list2) +{ + size_t n, i; + + n = gl_list_size (list1); + ASSERT (n == gl_list_size (list2)); + for (i = 0; i < n; i++) + { + ASSERT (gl_list_get_at (list1, i) == gl_list_get_at (list2, i)); + } +} + +int +main (int argc, char *argv[]) +{ + gl_list_t list1, list2; + + set_program_name (argv[0]); + + /* Allow the user to provide a non-default random seed on the command line. */ + if (argc > 1) + srand (atoi (argv[1])); + + { + size_t initial_size = RANDOM (50); + const void **contents = + (const void **) malloc (initial_size * sizeof (const void *)); + size_t i; + unsigned int repeat; + + for (i = 0; i < initial_size; i++) + contents[i] = RANDOM_OBJECT (); + + /* Create list1. */ + list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true, + initial_size, contents); + ASSERT (list1 != NULL); + /* Create list2. */ + list2 = gl_list_nx_create_empty (GL_ARRAY_LIST, NULL, NULL, NULL, true); + ASSERT (list2 != NULL); + for (i = 0; i < initial_size; i++) + ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL); + + check_equals (list1, list2); + + for (repeat = 0; repeat < 10000; repeat++) + { + unsigned int operation = RANDOM (16); + switch (operation) + { + case 0: + if (gl_list_size (list1) > 0) + { + size_t index = RANDOM (gl_list_size (list1)); + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2; + + node1 = gl_list_nx_set_at (list1, index, obj); + ASSERT (node1 != NULL); + ASSERT (gl_list_get_at (list1, index) == obj); + ASSERT (gl_list_node_value (list1, node1) == obj); + + node2 = gl_list_nx_set_at (list2, index, obj); + ASSERT (node2 != NULL); + ASSERT (gl_list_get_at (list2, index) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + + if (index > 0) + { + ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1)) + == gl_list_get_at (list1, index - 1)); + } + if (index + 1 < gl_list_size (list1)) + { + ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1)) + == gl_list_get_at (list1, index + 1)); + } + } + break; + case 1: + { + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2; + node1 = gl_list_search (list1, obj); + node2 = gl_list_search (list2, obj); + if (node1 == NULL) + { + ASSERT (node2 == NULL); + } + else + { + ASSERT (node2 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + } + } + break; + case 2: + { + const char *obj = RANDOM_OBJECT (); + size_t index1, index2; + index1 = gl_list_indexof (list1, obj); + index2 = gl_list_indexof (list2, obj); + if (index1 == (size_t)(-1)) + { + ASSERT (index2 == (size_t)(-1)); + } + else + { + ASSERT (index2 != (size_t)(-1)); + ASSERT (gl_list_get_at (list1, index1) == obj); + ASSERT (gl_list_get_at (list2, index2) == obj); + ASSERT (index2 == index1); + } + } + break; + case 3: /* add 1 element */ + { + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2; + node1 = gl_list_nx_add_first (list1, obj); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_first (list2, obj); + ASSERT (node2 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + ASSERT (gl_list_get_at (list1, 0) == obj); + ASSERT (gl_list_get_at (list2, 0) == obj); + } + break; + case 4: /* add 1 element */ + { + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2; + node1 = gl_list_nx_add_last (list1, obj); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_last (list2, obj); + ASSERT (node2 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + ASSERT (gl_list_get_at (list1, gl_list_size (list1) - 1) == obj); + ASSERT (gl_list_get_at (list2, gl_list_size (list2) - 1) == obj); + } + break; + case 5: /* add 3 elements */ + { + const char *obj0 = RANDOM_OBJECT (); + const char *obj1 = RANDOM_OBJECT (); + const char *obj2 = RANDOM_OBJECT (); + gl_list_node_t node1, node2; + node1 = gl_list_nx_add_first (list1, obj2); + ASSERT (node1 != NULL); + node1 = gl_list_nx_add_before (list1, node1, obj0); + ASSERT (node1 != NULL); + node1 = gl_list_nx_add_after (list1, node1, obj1); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_first (list2, obj2); + ASSERT (node2 != NULL); + node2 = gl_list_nx_add_before (list2, node2, obj0); + ASSERT (node2 != NULL); + node2 = gl_list_nx_add_after (list2, node2, obj1); + ASSERT (node2 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj1); + ASSERT (gl_list_node_value (list2, node2) == obj1); + ASSERT (gl_list_get_at (list1, 0) == obj0); + ASSERT (gl_list_get_at (list1, 1) == obj1); + ASSERT (gl_list_get_at (list1, 2) == obj2); + ASSERT (gl_list_get_at (list2, 0) == obj0); + ASSERT (gl_list_get_at (list2, 1) == obj1); + ASSERT (gl_list_get_at (list2, 2) == obj2); + } + break; + case 6: /* add 1 element */ + { + size_t index = RANDOM (gl_list_size (list1) + 1); + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2; + node1 = gl_list_nx_add_at (list1, index, obj); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_at (list2, index, obj); + ASSERT (node2 != NULL); + ASSERT (gl_list_get_at (list1, index) == obj); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_get_at (list2, index) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + if (index > 0) + { + ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1)) + == gl_list_get_at (list1, index - 1)); + } + if (index + 1 < gl_list_size (list1)) + { + ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1)) + == gl_list_get_at (list1, index + 1)); + } + } + break; + case 7: case 8: /* remove 1 element */ + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + const char *obj = gl_list_get_at (list1, RANDOM (n)); + gl_list_node_t node1, node2; + node1 = gl_list_search (list1, obj); + node2 = gl_list_search (list2, obj); + ASSERT (node1 != NULL); + ASSERT (node2 != NULL); + ASSERT (gl_list_remove_node (list1, node1)); + ASSERT (gl_list_remove_node (list2, node2)); + ASSERT (gl_list_size (list1) == n - 1); + } + break; + case 9: case 10: /* remove 1 element */ + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + size_t index = RANDOM (n); + ASSERT (gl_list_remove_at (list1, index)); + ASSERT (gl_list_remove_at (list2, index)); + ASSERT (gl_list_size (list1) == n - 1); + } + break; + case 11: case 12: /* remove 1 element */ + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + const char *obj = gl_list_get_at (list1, RANDOM (n)); + ASSERT (gl_list_remove (list1, obj)); + ASSERT (gl_list_remove (list2, obj)); + ASSERT (gl_list_size (list1) == n - 1); + } + break; + case 13: + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + const char *obj = "xyzzy"; + ASSERT (!gl_list_remove (list1, obj)); + ASSERT (!gl_list_remove (list2, obj)); + ASSERT (gl_list_size (list1) == n); + } + break; + case 14: + { + size_t n = gl_list_size (list1); + gl_list_iterator_t iter1, iter2; + const void *elt; + iter1 = gl_list_iterator (list1); + iter2 = gl_list_iterator (list2); + for (i = 0; i < n; i++) + { + ASSERT (gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (gl_list_get_at (list1, i) == elt); + ASSERT (gl_list_iterator_next (&iter2, &elt, NULL)); + ASSERT (gl_list_get_at (list2, i) == elt); + } + ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL)); + gl_list_iterator_free (&iter1); + gl_list_iterator_free (&iter2); + } + break; + case 15: + { + size_t end = RANDOM (gl_list_size (list1) + 1); + size_t start = RANDOM (end + 1); + gl_list_iterator_t iter1, iter2; + const void *elt; + iter1 = gl_list_iterator_from_to (list1, start, end); + iter2 = gl_list_iterator_from_to (list2, start, end); + for (i = start; i < end; i++) + { + ASSERT (gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (gl_list_get_at (list1, i) == elt); + ASSERT (gl_list_iterator_next (&iter2, &elt, NULL)); + ASSERT (gl_list_get_at (list2, i) == elt); + } + ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL)); + gl_list_iterator_free (&iter1); + gl_list_iterator_free (&iter2); + } + break; + } + check_equals (list1, list2); + } + + gl_list_free (list1); + gl_list_free (list2); + free (contents); + } + + return 0; +} diff --git a/gnulib-tests/test-base64.c b/gnulib-tests/test-base64.c index 1f730133..a02dd7a0 100644 --- a/gnulib-tests/test-base64.c +++ b/gnulib-tests/test-base64.c @@ -1,5 +1,5 @@ /* Self tests for base64. - Copyright (C) 2004, 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2004, 2008-2015 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-binary-io.c b/gnulib-tests/test-binary-io.c index 1b29fbd5..9c3f8f21 100644 --- a/gnulib-tests/test-binary-io.c +++ b/gnulib-tests/test-binary-io.c @@ -1,5 +1,5 @@ /* Test of binary mode I/O. - Copyright (C) 2005, 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-bind.c b/gnulib-tests/test-bind.c index 4eeb59e2..d62fb394 100644 --- a/gnulib-tests/test-bind.c +++ b/gnulib-tests/test-bind.c @@ -1,5 +1,5 @@ /* Test binding a server socket to a port. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-bitrotate.c b/gnulib-tests/test-bitrotate.c index c8545a21..f3828fa6 100644 --- a/gnulib-tests/test-bitrotate.c +++ b/gnulib-tests/test-bitrotate.c @@ -1,5 +1,5 @@ /* Test of <bitrotate.h> substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-btowc.c b/gnulib-tests/test-btowc.c index b9df2f0c..be34739b 100644 --- a/gnulib-tests/test-btowc.c +++ b/gnulib-tests/test-btowc.c @@ -1,5 +1,5 @@ /* Test of conversion of unibyte character to wide character. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-c-ctype.c b/gnulib-tests/test-c-ctype.c index 80bf7033..81fe936e 100644 --- a/gnulib-tests/test-c-ctype.c +++ b/gnulib-tests/test-c-ctype.c @@ -1,5 +1,5 @@ /* Test of character handling in C locale. - Copyright (C) 2005, 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-c-strcasecmp.c b/gnulib-tests/test-c-strcasecmp.c index 03088ffd..f7f6b43a 100644 --- a/gnulib-tests/test-c-strcasecmp.c +++ b/gnulib-tests/test-c-strcasecmp.c @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-c-strncasecmp.c b/gnulib-tests/test-c-strncasecmp.c index 0fba0e5c..4027b5b9 100644 --- a/gnulib-tests/test-c-strncasecmp.c +++ b/gnulib-tests/test-c-strncasecmp.c @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-calloc-gnu.c b/gnulib-tests/test-calloc-gnu.c index c8dc9312..8454c8fd 100644 --- a/gnulib-tests/test-calloc-gnu.c +++ b/gnulib-tests/test-calloc-gnu.c @@ -1,5 +1,5 @@ /* Test of calloc function. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-canonicalize.c b/gnulib-tests/test-canonicalize.c index 6da94e62..a1d2fce1 100644 --- a/gnulib-tests/test-canonicalize.c +++ b/gnulib-tests/test-canonicalize.c @@ -1,5 +1,5 @@ /* Test of execution of file name canonicalization. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-chdir.c b/gnulib-tests/test-chdir.c index e17b6606..48c2334e 100644 --- a/gnulib-tests/test-chdir.c +++ b/gnulib-tests/test-chdir.c @@ -1,5 +1,5 @@ /* Test changing to a directory. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-chown.c b/gnulib-tests/test-chown.c index 00891e0d..007026c4 100644 --- a/gnulib-tests/test-chown.c +++ b/gnulib-tests/test-chown.c @@ -1,5 +1,5 @@ /* Tests of chown. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-chown.h b/gnulib-tests/test-chown.h index 7f703ebb..f6b88cc3 100644 --- a/gnulib-tests/test-chown.h +++ b/gnulib-tests/test-chown.h @@ -1,5 +1,5 @@ /* Tests of chown. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-cloexec.c b/gnulib-tests/test-cloexec.c index 116953dc..c4feebac 100644 --- a/gnulib-tests/test-cloexec.c +++ b/gnulib-tests/test-cloexec.c @@ -1,5 +1,5 @@ /* Test duplicating non-inheritable file descriptors. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-close.c b/gnulib-tests/test-close.c index 44bce54a..457a7bc6 100644 --- a/gnulib-tests/test-close.c +++ b/gnulib-tests/test-close.c @@ -1,5 +1,5 @@ /* Test closing a file or socket. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-closein.c b/gnulib-tests/test-closein.c index b177cf00..946a5b1c 100644 --- a/gnulib-tests/test-closein.c +++ b/gnulib-tests/test-closein.c @@ -1,5 +1,5 @@ /* Test of closein module. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-connect.c b/gnulib-tests/test-connect.c index 6142429a..a0830086 100644 --- a/gnulib-tests/test-connect.c +++ b/gnulib-tests/test-connect.c @@ -1,5 +1,5 @@ /* Test connecting a client socket. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-copy-acl.c b/gnulib-tests/test-copy-acl.c index 82b5abf9..1c5227fd 100644 --- a/gnulib-tests/test-copy-acl.c +++ b/gnulib-tests/test-copy-acl.c @@ -1,5 +1,5 @@ /* Test of copying of files. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ctype.c b/gnulib-tests/test-ctype.c index 8c79cd26..58750e15 100644 --- a/gnulib-tests/test-ctype.c +++ b/gnulib-tests/test-ctype.c @@ -1,5 +1,5 @@ /* Test of <ctype.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-di-set.c b/gnulib-tests/test-di-set.c index f2e7a00b..5f0c1694 100644 --- a/gnulib-tests/test-di-set.c +++ b/gnulib-tests/test-di-set.c @@ -1,5 +1,5 @@ /* Test the di-set module. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-dirent-safer.c b/gnulib-tests/test-dirent-safer.c index 859194c5..e0e2b029 100644 --- a/gnulib-tests/test-dirent-safer.c +++ b/gnulib-tests/test-dirent-safer.c @@ -1,5 +1,5 @@ /* Test that directory streams leave standard fds alone. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-dirent.c b/gnulib-tests/test-dirent.c index 7905a2ab..243b92bc 100644 --- a/gnulib-tests/test-dirent.c +++ b/gnulib-tests/test-dirent.c @@ -1,5 +1,5 @@ /* Test of <dirent.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-dirname.c b/gnulib-tests/test-dirname.c index 1c6ee574..49a94ea9 100644 --- a/gnulib-tests/test-dirname.c +++ b/gnulib-tests/test-dirname.c @@ -1,5 +1,5 @@ /* Test the gnulib dirname module. - Copyright (C) 2005-2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -150,7 +150,7 @@ main (void) { ok = false; printf ("dir_name '%s': got '%s' len %d," - " expected '%s' len %ld\n", + " expected '%s' len %lu\n", t->name, dir, dirlen, t->dir, (unsigned long) strlen (t->dir)); } @@ -167,7 +167,7 @@ main (void) { ok = false; printf ("base_name '%s': got '%s' len %d," - " expected '%s' len %ld\n", + " expected '%s' len %lu\n", t->name, base, baselen, t->base, (unsigned long) strlen (t->base)); } diff --git a/gnulib-tests/test-dup-safer.c b/gnulib-tests/test-dup-safer.c index d11891e7..7f6427cd 100644 --- a/gnulib-tests/test-dup-safer.c +++ b/gnulib-tests/test-dup-safer.c @@ -1,5 +1,5 @@ /* Test that dup_safer leaves standard fds alone. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-dup.c b/gnulib-tests/test-dup.c index 905275c8..b7b768e2 100644 --- a/gnulib-tests/test-dup.c +++ b/gnulib-tests/test-dup.c @@ -1,5 +1,5 @@ /* Test duplicating a file descriptor. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-dup2.c b/gnulib-tests/test-dup2.c index c7cb9656..be475eaa 100644 --- a/gnulib-tests/test-dup2.c +++ b/gnulib-tests/test-dup2.c @@ -1,5 +1,5 @@ /* Test duplicating file descriptors. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-environ.c b/gnulib-tests/test-environ.c index 46a2eab1..e4616dac 100644 --- a/gnulib-tests/test-environ.c +++ b/gnulib-tests/test-environ.c @@ -1,5 +1,5 @@ /* Test of environ variable. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-errno.c b/gnulib-tests/test-errno.c index 495242ba..fab35d0d 100644 --- a/gnulib-tests/test-errno.c +++ b/gnulib-tests/test-errno.c @@ -1,5 +1,5 @@ /* Test of <errno.h> substitute. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-exclude.c b/gnulib-tests/test-exclude.c index 277f05db..c2195703 100644 --- a/gnulib-tests/test-exclude.c +++ b/gnulib-tests/test-exclude.c @@ -1,5 +1,5 @@ /* Test suite for exclude. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 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/gnulib-tests/test-exclude1.sh b/gnulib-tests/test-exclude1.sh index 41fa46e2..e1e54c49 100755 --- a/gnulib-tests/test-exclude1.sh +++ b/gnulib-tests/test-exclude1.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-exclude2.sh b/gnulib-tests/test-exclude2.sh index 349a7051..1c9ffe13 100755 --- a/gnulib-tests/test-exclude2.sh +++ b/gnulib-tests/test-exclude2.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-exclude3.sh b/gnulib-tests/test-exclude3.sh index 35f0ded3..2cbd87cd 100755 --- a/gnulib-tests/test-exclude3.sh +++ b/gnulib-tests/test-exclude3.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-exclude4.sh b/gnulib-tests/test-exclude4.sh index 22f4d324..6f23d265 100755 --- a/gnulib-tests/test-exclude4.sh +++ b/gnulib-tests/test-exclude4.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-exclude5.sh b/gnulib-tests/test-exclude5.sh index 5bcf28d2..1dded6a5 100755 --- a/gnulib-tests/test-exclude5.sh +++ b/gnulib-tests/test-exclude5.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-exclude6.sh b/gnulib-tests/test-exclude6.sh index 0c0db9f6..8a4afed9 100755 --- a/gnulib-tests/test-exclude6.sh +++ b/gnulib-tests/test-exclude6.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-exclude7.sh b/gnulib-tests/test-exclude7.sh index 67efb8ac..cea207c2 100755 --- a/gnulib-tests/test-exclude7.sh +++ b/gnulib-tests/test-exclude7.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-exclude8.sh b/gnulib-tests/test-exclude8.sh index c88f6ad7..142ced17 100755 --- a/gnulib-tests/test-exclude8.sh +++ b/gnulib-tests/test-exclude8.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for exclude. -# Copyright (C) 2010-2014 Free Software Foundation, Inc. +# Copyright (C) 2010-2015 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/gnulib-tests/test-faccessat.c b/gnulib-tests/test-faccessat.c index 400d4481..375ff969 100644 --- a/gnulib-tests/test-faccessat.c +++ b/gnulib-tests/test-faccessat.c @@ -1,5 +1,5 @@ /* Test checking user's permissions for a file. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fadvise.c b/gnulib-tests/test-fadvise.c index 0ccacefc..68a79d2a 100644 --- a/gnulib-tests/test-fadvise.c +++ b/gnulib-tests/test-fadvise.c @@ -1,5 +1,5 @@ /* Test that fadvise works as advertised. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fchdir.c b/gnulib-tests/test-fchdir.c index b771223e..dec7612e 100644 --- a/gnulib-tests/test-fchdir.c +++ b/gnulib-tests/test-fchdir.c @@ -1,5 +1,5 @@ /* Test changing to a directory named by a file descriptor. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fchmodat.c b/gnulib-tests/test-fchmodat.c index a63b7644..68c3b831 100644 --- a/gnulib-tests/test-fchmodat.c +++ b/gnulib-tests/test-fchmodat.c @@ -1,5 +1,5 @@ /* Test changing the protections of a file relative to an open directory. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fchownat.c b/gnulib-tests/test-fchownat.c index f64180d1..d83016e6 100644 --- a/gnulib-tests/test-fchownat.c +++ b/gnulib-tests/test-fchownat.c @@ -1,5 +1,5 @@ /* Tests of fchownat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fclose.c b/gnulib-tests/test-fclose.c index cebfcebb..794bd78b 100644 --- a/gnulib-tests/test-fclose.c +++ b/gnulib-tests/test-fclose.c @@ -1,5 +1,5 @@ /* Test of fclose module. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fcntl-h.c b/gnulib-tests/test-fcntl-h.c index a86214ee..e177b3e6 100644 --- a/gnulib-tests/test-fcntl-h.c +++ b/gnulib-tests/test-fcntl-h.c @@ -1,5 +1,5 @@ /* Test of <fcntl.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -111,7 +111,7 @@ main (void) #if O_RSYNC && O_RSYNC != O_DSYNC case O_RSYNC: #endif -#if O_SYNC && O_SYNC != O_RSYNC +#if O_SYNC && O_SYNC != O_DSYNC && O_SYNC != O_RSYNC case O_SYNC: #endif #if O_TTY_INIT diff --git a/gnulib-tests/test-fcntl-safer.c b/gnulib-tests/test-fcntl-safer.c index f58f5b8d..e0712da2 100644 --- a/gnulib-tests/test-fcntl-safer.c +++ b/gnulib-tests/test-fcntl-safer.c @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fcntl.c b/gnulib-tests/test-fcntl.c index 23d74d84..fed914be 100644 --- a/gnulib-tests/test-fcntl.c +++ b/gnulib-tests/test-fcntl.c @@ -1,5 +1,5 @@ /* Test of fcntl(2). - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fdatasync.c b/gnulib-tests/test-fdatasync.c index 5d5a6b9a..8dac8e6b 100644 --- a/gnulib-tests/test-fdatasync.c +++ b/gnulib-tests/test-fdatasync.c @@ -1,5 +1,5 @@ /* Test of fdatasync() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fdopen.c b/gnulib-tests/test-fdopen.c index 743511ec..c4e03552 100644 --- a/gnulib-tests/test-fdopen.c +++ b/gnulib-tests/test-fdopen.c @@ -1,5 +1,5 @@ /* Test opening a stream with a file descriptor. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fdopendir.c b/gnulib-tests/test-fdopendir.c index d780b621..8fd43824 100644 --- a/gnulib-tests/test-fdopendir.c +++ b/gnulib-tests/test-fdopendir.c @@ -1,5 +1,5 @@ /* Test opening a directory stream from a file descriptor. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This 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,11 +64,15 @@ main (int argc _GL_UNUSED, char *argv[]) fd = open (".", O_RDONLY); ASSERT (0 <= fd); d = fdopendir (fd); - /* We know that fd is now out of our reach, but it is not specified - whether it is closed now or at the closedir. We also can't - guarantee whether dirfd returns fd, some other descriptor, or - -1. */ ASSERT (d); + /* fdopendir should not close fd. */ + ASSERT (dup2 (fd, fd) == fd); + + /* Don't test dirfd here. dirfd (d) must return fd on current POSIX + platforms, but on pre-2008 platforms or on non-POSIX platforms + dirfd (fd) might return some other descriptor, or -1, and gnulib + does not work around this porting problem. */ + ASSERT (closedir (d) == 0); /* Now we can guarantee that fd must be closed. */ errno = 0; diff --git a/gnulib-tests/test-fdutimensat.c b/gnulib-tests/test-fdutimensat.c index 81ce3f5d..b74ff48b 100644 --- a/gnulib-tests/test-fdutimensat.c +++ b/gnulib-tests/test-fdutimensat.c @@ -1,5 +1,5 @@ /* Tests of fdutimensat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fflush.c b/gnulib-tests/test-fflush.c index 6af23635..c357cb4e 100644 --- a/gnulib-tests/test-fflush.c +++ b/gnulib-tests/test-fflush.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible fflush() function. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fflush2.c b/gnulib-tests/test-fflush2.c index d73309d4..2233a5d2 100644 --- a/gnulib-tests/test-fflush2.c +++ b/gnulib-tests/test-fflush2.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible fflush() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fgetc.c b/gnulib-tests/test-fgetc.c index 2534d4bf..63e1e4a2 100644 --- a/gnulib-tests/test-fgetc.c +++ b/gnulib-tests/test-fgetc.c @@ -1,5 +1,5 @@ /* Test of fgetc() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-file-has-acl.c b/gnulib-tests/test-file-has-acl.c index f0de2ceb..0f33e0c6 100644 --- a/gnulib-tests/test-file-has-acl.c +++ b/gnulib-tests/test-file-has-acl.c @@ -1,5 +1,5 @@ /* Test for presence of ACL. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-filenamecat.c b/gnulib-tests/test-filenamecat.c index 1485c0b2..1ccf2994 100644 --- a/gnulib-tests/test-filenamecat.c +++ b/gnulib-tests/test-filenamecat.c @@ -1,6 +1,6 @@ /* Test of concatenation of two arbitrary file names. - Copyright (C) 1996-2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-filevercmp.c b/gnulib-tests/test-filevercmp.c index c207cdc2..337a3e12 100644 --- a/gnulib-tests/test-filevercmp.c +++ b/gnulib-tests/test-filevercmp.c @@ -1,5 +1,5 @@ /* Test of filevercmp() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-float.c b/gnulib-tests/test-float.c index 28a67bb8..8b621336 100644 --- a/gnulib-tests/test-float.c +++ b/gnulib-tests/test-float.c @@ -1,5 +1,5 @@ /* Test of <float.h> substitute. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fnmatch.c b/gnulib-tests/test-fnmatch.c index de94559c..970b2846 100644 --- a/gnulib-tests/test-fnmatch.c +++ b/gnulib-tests/test-fnmatch.c @@ -1,5 +1,5 @@ /* Test of fnmatch string matching function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fopen-safer.c b/gnulib-tests/test-fopen-safer.c index 36f865a6..0bcbd9b0 100644 --- a/gnulib-tests/test-fopen-safer.c +++ b/gnulib-tests/test-fopen-safer.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fopen.c b/gnulib-tests/test-fopen.c index e1cb1231..7b5d70cc 100644 --- a/gnulib-tests/test-fopen.c +++ b/gnulib-tests/test-fopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fopen.h b/gnulib-tests/test-fopen.h index f87bb2ea..4747dc6f 100644 --- a/gnulib-tests/test-fopen.h +++ b/gnulib-tests/test-fopen.h @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fpending.c b/gnulib-tests/test-fpending.c index fc16be47..69b31f66 100644 --- a/gnulib-tests/test-fpending.c +++ b/gnulib-tests/test-fpending.c @@ -1,6 +1,6 @@ /* Ensure that __fpending works. - Copyright (C) 2004, 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fprintf-posix.h b/gnulib-tests/test-fprintf-posix.h index d5d0e724..38c29419 100644 --- a/gnulib-tests/test-fprintf-posix.h +++ b/gnulib-tests/test-fprintf-posix.h @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsprintf() and sprintf() functions. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fpurge.c b/gnulib-tests/test-fpurge.c index 3f5d15b9..7793ba4c 100644 --- a/gnulib-tests/test-fpurge.c +++ b/gnulib-tests/test-fpurge.c @@ -1,5 +1,5 @@ /* Test of fpurge() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fputc.c b/gnulib-tests/test-fputc.c index befb5825..41ae0965 100644 --- a/gnulib-tests/test-fputc.c +++ b/gnulib-tests/test-fputc.c @@ -1,5 +1,5 @@ /* Test of fputc() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fread.c b/gnulib-tests/test-fread.c index 72b93a9b..41cea56c 100644 --- a/gnulib-tests/test-fread.c +++ b/gnulib-tests/test-fread.c @@ -1,5 +1,5 @@ /* Test of fread() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-freadahead.c b/gnulib-tests/test-freadahead.c index f50c54e4..fd3bab97 100644 --- a/gnulib-tests/test-freadahead.c +++ b/gnulib-tests/test-freadahead.c @@ -1,5 +1,5 @@ /* Test of freadahead() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-freading.c b/gnulib-tests/test-freading.c index 7ca26ed6..62989a4d 100644 --- a/gnulib-tests/test-freading.c +++ b/gnulib-tests/test-freading.c @@ -1,5 +1,5 @@ /* Test of freading() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-freadptr.c b/gnulib-tests/test-freadptr.c index e639d289..f7921329 100644 --- a/gnulib-tests/test-freadptr.c +++ b/gnulib-tests/test-freadptr.c @@ -1,5 +1,5 @@ /* Test of freadptr() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-freadptr2.c b/gnulib-tests/test-freadptr2.c index 2868248b..200ff5f4 100644 --- a/gnulib-tests/test-freadptr2.c +++ b/gnulib-tests/test-freadptr2.c @@ -1,5 +1,5 @@ /* Test of freadptr() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-freadseek.c b/gnulib-tests/test-freadseek.c index 3903f577..d97b2e2e 100644 --- a/gnulib-tests/test-freadseek.c +++ b/gnulib-tests/test-freadseek.c @@ -1,5 +1,5 @@ /* Test of freadseek() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-freopen-safer.c b/gnulib-tests/test-freopen-safer.c index 941dd559..6a119a3e 100644 --- a/gnulib-tests/test-freopen-safer.c +++ b/gnulib-tests/test-freopen-safer.c @@ -1,5 +1,5 @@ /* Test of reopening a stream. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-freopen.c b/gnulib-tests/test-freopen.c index a98530c9..5c43c1f3 100644 --- a/gnulib-tests/test-freopen.c +++ b/gnulib-tests/test-freopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-frexp.c b/gnulib-tests/test-frexp.c index f7a10f5b..de626d0e 100644 --- a/gnulib-tests/test-frexp.c +++ b/gnulib-tests/test-frexp.c @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-frexp.h b/gnulib-tests/test-frexp.h index 1cdc6de2..5456b673 100644 --- a/gnulib-tests/test-frexp.h +++ b/gnulib-tests/test-frexp.h @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-frexpl.c b/gnulib-tests/test-frexpl.c index b897e669..fc2a4de0 100644 --- a/gnulib-tests/test-frexpl.c +++ b/gnulib-tests/test-frexpl.c @@ -1,5 +1,5 @@ /* Test of splitting a 'long double' into fraction and mantissa. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fseek.c b/gnulib-tests/test-fseek.c index 81ebb1cc..9aa5bc76 100644 --- a/gnulib-tests/test-fseek.c +++ b/gnulib-tests/test-fseek.c @@ -1,5 +1,5 @@ /* Test of fseek() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fseeko.c b/gnulib-tests/test-fseeko.c index ae9ccef5..01e19626 100644 --- a/gnulib-tests/test-fseeko.c +++ b/gnulib-tests/test-fseeko.c @@ -1,5 +1,5 @@ /* Test of fseeko() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fseeko3.c b/gnulib-tests/test-fseeko3.c index e92c9a12..b50a623c 100644 --- a/gnulib-tests/test-fseeko3.c +++ b/gnulib-tests/test-fseeko3.c @@ -1,5 +1,5 @@ /* Test of fseeko() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fseeko4.c b/gnulib-tests/test-fseeko4.c index 6559ad96..49da854e 100644 --- a/gnulib-tests/test-fseeko4.c +++ b/gnulib-tests/test-fseeko4.c @@ -1,5 +1,5 @@ /* Test of fseeko() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fseterr.c b/gnulib-tests/test-fseterr.c index 7ea9fcb9..c499cb9d 100644 --- a/gnulib-tests/test-fseterr.c +++ b/gnulib-tests/test-fseterr.c @@ -1,5 +1,5 @@ /* Test setting the error indicator of a stream. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fstat.c b/gnulib-tests/test-fstat.c index 9b793c96..7f393638 100644 --- a/gnulib-tests/test-fstat.c +++ b/gnulib-tests/test-fstat.c @@ -1,5 +1,5 @@ /* Tests of fstat() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fstatat.c b/gnulib-tests/test-fstatat.c index 2b1acb7d..385e831d 100644 --- a/gnulib-tests/test-fstatat.c +++ b/gnulib-tests/test-fstatat.c @@ -1,5 +1,5 @@ /* Tests of fstatat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fsync.c b/gnulib-tests/test-fsync.c index 44f92bbe..eb78e558 100644 --- a/gnulib-tests/test-fsync.c +++ b/gnulib-tests/test-fsync.c @@ -1,5 +1,5 @@ /* Test of fsync() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ftell.c b/gnulib-tests/test-ftell.c index 2b7120d8..28532268 100644 --- a/gnulib-tests/test-ftell.c +++ b/gnulib-tests/test-ftell.c @@ -1,5 +1,5 @@ /* Test of ftell() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ftell3.c b/gnulib-tests/test-ftell3.c index 918c9e44..8a95e1c3 100644 --- a/gnulib-tests/test-ftell3.c +++ b/gnulib-tests/test-ftell3.c @@ -1,5 +1,5 @@ /* Test of ftell() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ftello.c b/gnulib-tests/test-ftello.c index 6f3597bf..b9b5c969 100644 --- a/gnulib-tests/test-ftello.c +++ b/gnulib-tests/test-ftello.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ftello3.c b/gnulib-tests/test-ftello3.c index 6918432b..67b46711 100644 --- a/gnulib-tests/test-ftello3.c +++ b/gnulib-tests/test-ftello3.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ftello4.c b/gnulib-tests/test-ftello4.c index ef9e74b2..68e64593 100644 --- a/gnulib-tests/test-ftello4.c +++ b/gnulib-tests/test-ftello4.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ftruncate.c b/gnulib-tests/test-ftruncate.c index ae15411f..4dd7390d 100644 --- a/gnulib-tests/test-ftruncate.c +++ b/gnulib-tests/test-ftruncate.c @@ -1,5 +1,5 @@ /* Test truncating a file. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-futimens.c b/gnulib-tests/test-futimens.c index 0ae781a7..f63e2e5a 100644 --- a/gnulib-tests/test-futimens.c +++ b/gnulib-tests/test-futimens.c @@ -1,5 +1,5 @@ /* Tests of futimens. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-futimens.h b/gnulib-tests/test-futimens.h index ffb0e552..fa362d23 100644 --- a/gnulib-tests/test-futimens.h +++ b/gnulib-tests/test-futimens.h @@ -1,5 +1,5 @@ /* Test of file timestamp modification functions. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-fwrite.c b/gnulib-tests/test-fwrite.c index e51b2ab0..df4114ce 100644 --- a/gnulib-tests/test-fwrite.c +++ b/gnulib-tests/test-fwrite.c @@ -1,5 +1,5 @@ /* Test of fwrite() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getaddrinfo.c b/gnulib-tests/test-getaddrinfo.c index acf9cd66..0cfb1f1a 100644 --- a/gnulib-tests/test-getaddrinfo.c +++ b/gnulib-tests/test-getaddrinfo.c @@ -1,6 +1,6 @@ /* Test the getaddrinfo module. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -116,11 +116,11 @@ simple (char const *host, char const *service) { void *ai_addr = ai->ai_addr; struct sockaddr_in *sock_addr = ai_addr; - dbgprintf ("\tflags %x\n", ai->ai_flags); - dbgprintf ("\tfamily %x\n", ai->ai_family); - dbgprintf ("\tsocktype %x\n", ai->ai_socktype); - dbgprintf ("\tprotocol %x\n", ai->ai_protocol); - dbgprintf ("\taddrlen %ld: ", (unsigned long) ai->ai_addrlen); + dbgprintf ("\tflags %x\n", ai->ai_flags + 0u); + dbgprintf ("\tfamily %x\n", ai->ai_family + 0u); + dbgprintf ("\tsocktype %x\n", ai->ai_socktype + 0u); + dbgprintf ("\tprotocol %x\n", ai->ai_protocol + 0u); + dbgprintf ("\taddrlen %lu: ", (unsigned long) ai->ai_addrlen); dbgprintf ("\tFound %s\n", inet_ntop (ai->ai_family, &sock_addr->sin_addr, diff --git a/gnulib-tests/test-getcwd-lgpl.c b/gnulib-tests/test-getcwd-lgpl.c index 371c8df6..de1728b6 100644 --- a/gnulib-tests/test-getcwd-lgpl.c +++ b/gnulib-tests/test-getcwd-lgpl.c @@ -1,5 +1,5 @@ /* Test of getcwd() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getcwd.c b/gnulib-tests/test-getcwd.c index 2ddcd206..756f932f 100644 --- a/gnulib-tests/test-getcwd.c +++ b/gnulib-tests/test-getcwd.c @@ -1,5 +1,5 @@ /* Test of getcwd() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -153,7 +153,13 @@ test_long_name (void) while (1) { +# ifdef HAVE_GETCWD_SHORTER + /* On OS/X <= 10.9 for example, we're restricted to shorter paths + as lstat() doesn't support more than PATH_MAX. */ + size_t dotdot_max = PATH_MAX * 2; +# else size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); +# endif char *c = NULL; cwd_len += DIR_NAME_SIZE; @@ -202,7 +208,7 @@ test_long_name (void) fail = 6; break; } - if (AT_FDCWD || errno == ERANGE || errno == ENOENT) + if (HAVE_OPENAT_SUPPORT || errno == ERANGE || errno == ENOENT) { fail = 7; break; diff --git a/gnulib-tests/test-getdelim.c b/gnulib-tests/test-getdelim.c index 76aba827..bbcc3cde 100644 --- a/gnulib-tests/test-getdelim.c +++ b/gnulib-tests/test-getdelim.c @@ -1,5 +1,5 @@ /* Test of getdelim() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getdtablesize.c b/gnulib-tests/test-getdtablesize.c index 86a0b4f0..a0325af0 100644 --- a/gnulib-tests/test-getdtablesize.c +++ b/gnulib-tests/test-getdtablesize.c @@ -1,5 +1,5 @@ /* Test of getdtablesize() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getgroups.c b/gnulib-tests/test-getgroups.c index 0608b608..f86c12cf 100644 --- a/gnulib-tests/test-getgroups.c +++ b/gnulib-tests/test-getgroups.c @@ -1,5 +1,5 @@ /* Tests of getgroups. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-gethostname.c b/gnulib-tests/test-gethostname.c index a6f3fdad..35c1aff0 100644 --- a/gnulib-tests/test-gethostname.c +++ b/gnulib-tests/test-gethostname.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 Free Software Foundation, Inc. * Written by Simon Josefsson. * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-getline.c b/gnulib-tests/test-getline.c index 4dbc485e..238742cf 100644 --- a/gnulib-tests/test-getline.c +++ b/gnulib-tests/test-getline.c @@ -1,5 +1,5 @@ /* Test of getline() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getloadavg.c b/gnulib-tests/test-getloadavg.c index 37661c26..e17c3942 100644 --- a/gnulib-tests/test-getloadavg.c +++ b/gnulib-tests/test-getloadavg.c @@ -1,5 +1,5 @@ /* Test of getting load average. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getlogin.c b/gnulib-tests/test-getlogin.c index e18469e8..3f1aeb08 100644 --- a/gnulib-tests/test-getlogin.c +++ b/gnulib-tests/test-getlogin.c @@ -1,5 +1,5 @@ /* Test of getting user name. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This 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,9 +84,9 @@ main (void) pwd = getpwuid (stat_buf.st_uid); if (! pwd) { - fprintf (stderr, "Skipping test: no name found for uid %d\n", - stat_buf.st_uid); - return 77; + long int uid = stat_buf.st_uid; + fprintf (stderr, "Skipping test: no name found for uid %ld\n", uid); + return 77; } ASSERT (strcmp (pwd->pw_name, buf) == 0); diff --git a/gnulib-tests/test-getndelim2.c b/gnulib-tests/test-getndelim2.c index 4b46efc9..3ffbff9b 100644 --- a/gnulib-tests/test-getndelim2.c +++ b/gnulib-tests/test-getndelim2.c @@ -1,5 +1,5 @@ /* Test of getndelim2() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -103,7 +103,7 @@ main (void) { int i; for (i = 0; i < 16; i++) - fprintf (f, "%500x%c", i, i % 2 ? '\n' : '\r'); + fprintf (f, "%500x%c", i + 0u, i % 2 ? '\n' : '\r'); } rewind (f); { diff --git a/gnulib-tests/test-getopt.c b/gnulib-tests/test-getopt.c index 152efeab..a0ae340c 100644 --- a/gnulib-tests/test-getopt.c +++ b/gnulib-tests/test-getopt.c @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getopt.h b/gnulib-tests/test-getopt.h index c982d570..caaaa31f 100644 --- a/gnulib-tests/test-getopt.h +++ b/gnulib-tests/test-getopt.h @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-getopt_long.h b/gnulib-tests/test-getopt_long.h index 07ea4a28..1094f3c1 100644 --- a/gnulib-tests/test-getopt_long.h +++ b/gnulib-tests/test-getopt_long.h @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-gettimeofday.c b/gnulib-tests/test-gettimeofday.c index 5abb872a..3b15f129 100644 --- a/gnulib-tests/test-gettimeofday.c +++ b/gnulib-tests/test-gettimeofday.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. + * Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. * Written by Jim Meyering. * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-hash.c b/gnulib-tests/test-hash.c index dc80924d..161f3cf6 100644 --- a/gnulib-tests/test-hash.c +++ b/gnulib-tests/test-hash.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2014 Free Software Foundation, Inc. + * Copyright (C) 2009-2015 Free Software Foundation, Inc. * Written by Jim Meyering * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-i-ring.c b/gnulib-tests/test-i-ring.c index fe64991a..ee2ac1ae 100644 --- a/gnulib-tests/test-i-ring.c +++ b/gnulib-tests/test-i-ring.c @@ -1,5 +1,5 @@ /* Test the simple ring buffer. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-iconv-h.c b/gnulib-tests/test-iconv-h.c index e72e3739..5b688d9b 100644 --- a/gnulib-tests/test-iconv-h.c +++ b/gnulib-tests/test-iconv-h.c @@ -1,5 +1,5 @@ /* Test of <iconv.h> substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-iconv.c b/gnulib-tests/test-iconv.c index 3c1b1933..ed715bda 100644 --- a/gnulib-tests/test-iconv.c +++ b/gnulib-tests/test-iconv.c @@ -1,5 +1,5 @@ /* Test of character set conversion. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ignore-value.c b/gnulib-tests/test-ignore-value.c index 3533d7ca..fc98860a 100644 --- a/gnulib-tests/test-ignore-value.c +++ b/gnulib-tests/test-ignore-value.c @@ -1,6 +1,6 @@ /* Test the "ignore-value" module. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-inet_ntop.c b/gnulib-tests/test-inet_ntop.c index eca86e72..78ff63c5 100644 --- a/gnulib-tests/test-inet_ntop.c +++ b/gnulib-tests/test-inet_ntop.c @@ -1,5 +1,5 @@ /* Test of inet_ntop function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-inet_pton.c b/gnulib-tests/test-inet_pton.c index e85da225..0e360211 100644 --- a/gnulib-tests/test-inet_pton.c +++ b/gnulib-tests/test-inet_pton.c @@ -1,5 +1,5 @@ /* Test of inet_pton function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-init.sh b/gnulib-tests/test-init.sh index be447b33..0875a75b 100755 --- a/gnulib-tests/test-init.sh +++ b/gnulib-tests/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for init.sh -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2015 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/gnulib-tests/test-ino-map.c b/gnulib-tests/test-ino-map.c index 83020cb7..4bc66841 100644 --- a/gnulib-tests/test-ino-map.c +++ b/gnulib-tests/test-ino-map.c @@ -1,5 +1,5 @@ /* Test the ino-map module. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-intprops.c b/gnulib-tests/test-intprops.c index 97553e76..06df5a7c 100644 --- a/gnulib-tests/test-intprops.c +++ b/gnulib-tests/test-intprops.c @@ -1,5 +1,5 @@ /* Test intprops.h. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-inttostr.c b/gnulib-tests/test-inttostr.c index ea5b2956..cb71b2b8 100644 --- a/gnulib-tests/test-inttostr.c +++ b/gnulib-tests/test-inttostr.c @@ -1,5 +1,5 @@ /* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,10 +28,6 @@ #include "macros.h" #define STREQ(a, b) (strcmp (a, b) == 0) -#define FMT(T) (TYPE_SIGNED (T) ? "%jd" : "%ju") -#define CAST_VAL(T,V) (TYPE_SIGNED (T) ? (intmax_t) (V) : (uintmax_t) (V)) -#define V_min(T) (CAST_VAL (T, TYPE_MINIMUM (T))) -#define V_max(T) (CAST_VAL (T, TYPE_MAXIMUM (T))) #define IS_TIGHT(T) (_GL_SIGNED_TYPE_OR_EXPR (T) == TYPE_SIGNED (T)) #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) @@ -49,11 +45,19 @@ char const *p; \ ASSERT (buf); \ *buf = '\0'; \ - ASSERT (snprintf (ref, sizeof ref, FMT (T), V_min (T)) < sizeof ref); \ + ASSERT \ + ((TYPE_SIGNED (T) \ + ? snprintf (ref, sizeof ref, "%jd", (intmax_t) TYPE_MINIMUM (T)) \ + : snprintf (ref, sizeof ref, "%ju", (uintmax_t) TYPE_MINIMUM (T))) \ + < sizeof ref); \ ASSERT (STREQ ((p = Fn (TYPE_MINIMUM (T), buf)), ref)); \ /* Ensure that INT_BUFSIZE_BOUND is tight for signed types. */ \ ASSERT (! TYPE_SIGNED (T) || (p == buf && *p == '-')); \ - ASSERT (snprintf (ref, sizeof ref, FMT (T), V_max (T)) < sizeof ref); \ + ASSERT \ + ((TYPE_SIGNED (T) \ + ? snprintf (ref, sizeof ref, "%jd", (intmax_t) TYPE_MAXIMUM (T)) \ + : snprintf (ref, sizeof ref, "%ju", (uintmax_t) TYPE_MAXIMUM (T))) \ + < sizeof ref); \ ASSERT (STREQ ((p = Fn (TYPE_MAXIMUM (T), buf)), ref)); \ /* For unsigned types, the bound is not always tight. */ \ ASSERT (! IS_TIGHT (T) || TYPE_SIGNED (T) \ diff --git a/gnulib-tests/test-inttypes.c b/gnulib-tests/test-inttypes.c index 35deeab5..7fa18b23 100644 --- a/gnulib-tests/test-inttypes.c +++ b/gnulib-tests/test-inttypes.c @@ -1,5 +1,5 @@ /* Test of <inttypes.h> substitute. - Copyright (C) 2006-2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-ioctl.c b/gnulib-tests/test-ioctl.c index 8f31b68c..f34f856b 100644 --- a/gnulib-tests/test-ioctl.c +++ b/gnulib-tests/test-ioctl.c @@ -1,5 +1,5 @@ /* Test of ioctl() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isatty.c b/gnulib-tests/test-isatty.c index de7be60b..ae1e8daa 100644 --- a/gnulib-tests/test-isatty.c +++ b/gnulib-tests/test-isatty.c @@ -1,5 +1,5 @@ /* Test isatty() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isblank.c b/gnulib-tests/test-isblank.c index 3f4a0413..51d8d13e 100644 --- a/gnulib-tests/test-isblank.c +++ b/gnulib-tests/test-isblank.c @@ -1,5 +1,5 @@ /* Test of isblank() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isnand-nolibm.c b/gnulib-tests/test-isnand-nolibm.c index d7b6405b..984d1848 100644 --- a/gnulib-tests/test-isnand-nolibm.c +++ b/gnulib-tests/test-isnand-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnand() substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isnand.h b/gnulib-tests/test-isnand.h index c6d216ef..06fc1837 100644 --- a/gnulib-tests/test-isnand.h +++ b/gnulib-tests/test-isnand.h @@ -1,5 +1,5 @@ /* Test of isnand() substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isnanf-nolibm.c b/gnulib-tests/test-isnanf-nolibm.c index 222bde75..7f70eb52 100644 --- a/gnulib-tests/test-isnanf-nolibm.c +++ b/gnulib-tests/test-isnanf-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnanf() substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isnanf.h b/gnulib-tests/test-isnanf.h index 463ac7e4..cf51f12c 100644 --- a/gnulib-tests/test-isnanf.h +++ b/gnulib-tests/test-isnanf.h @@ -1,5 +1,5 @@ /* Test of isnanf() substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isnanl-nolibm.c b/gnulib-tests/test-isnanl-nolibm.c index 15a32c58..63ea5a9a 100644 --- a/gnulib-tests/test-isnanl-nolibm.c +++ b/gnulib-tests/test-isnanl-nolibm.c @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-isnanl.h b/gnulib-tests/test-isnanl.h index 015b0864..2e65afae 100644 --- a/gnulib-tests/test-isnanl.h +++ b/gnulib-tests/test-isnanl.h @@ -1,5 +1,5 @@ /* Test of isnanl() substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -80,7 +80,7 @@ main () # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else @@ -98,37 +98,31 @@ main () { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; ASSERT (isnanl (x.value)); } - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: - Application Architecture. - Table 5-2 "Floating-Point Register Encodings" - Figure 5-6 "Memory to Floating-Point Register Data Translation" - */ + /* isnanl should return something for noncanonical values. */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; - ASSERT (isnanl (x.value)); + ASSERT (isnanl (x.value) || !isnanl (x.value)); } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; - ASSERT (isnanl (x.value)); + ASSERT (isnanl (x.value) || !isnanl (x.value)); } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; - ASSERT (isnanl (x.value)); + ASSERT (isnanl (x.value) || !isnanl (x.value)); } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; - ASSERT (isnanl (x.value)); + ASSERT (isnanl (x.value) || !isnanl (x.value)); } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; - ASSERT (isnanl (x.value)); + ASSERT (isnanl (x.value) || !isnanl (x.value)); } #endif diff --git a/gnulib-tests/test-iswblank.c b/gnulib-tests/test-iswblank.c index 68ede5c7..f1fbe414 100644 --- a/gnulib-tests/test-iswblank.c +++ b/gnulib-tests/test-iswblank.c @@ -1,5 +1,5 @@ /* Test of iswblank() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-langinfo.c b/gnulib-tests/test-langinfo.c index f4aa5b8c..b038ca3f 100644 --- a/gnulib-tests/test-langinfo.c +++ b/gnulib-tests/test-langinfo.c @@ -1,5 +1,5 @@ /* Test of <langinfo.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-lchown.c b/gnulib-tests/test-lchown.c index 13c2f4da..35c8a52f 100644 --- a/gnulib-tests/test-lchown.c +++ b/gnulib-tests/test-lchown.c @@ -1,5 +1,5 @@ /* Tests of lchown. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-lchown.h b/gnulib-tests/test-lchown.h index 329b6dee..fa0a8e3d 100644 --- a/gnulib-tests/test-lchown.h +++ b/gnulib-tests/test-lchown.h @@ -1,5 +1,5 @@ /* Tests of lchown. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-link.c b/gnulib-tests/test-link.c index 42749eb7..f89f9107 100644 --- a/gnulib-tests/test-link.c +++ b/gnulib-tests/test-link.c @@ -1,5 +1,5 @@ /* Test of link() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-link.h b/gnulib-tests/test-link.h index 7540e619..fdb3533a 100644 --- a/gnulib-tests/test-link.h +++ b/gnulib-tests/test-link.h @@ -1,5 +1,5 @@ /* Test of link() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-linkat.c b/gnulib-tests/test-linkat.c index e17434e4..b5383374 100644 --- a/gnulib-tests/test-linkat.c +++ b/gnulib-tests/test-linkat.c @@ -1,5 +1,5 @@ /* Tests of linkat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-linked_list.c b/gnulib-tests/test-linked_list.c new file mode 100644 index 00000000..12d5a6f1 --- /dev/null +++ b/gnulib-tests/test-linked_list.c @@ -0,0 +1,411 @@ +/* Test of sequential list data type implementation. + Copyright (C) 2006-2015 Free Software Foundation, Inc. + Written by Bruno Haible <bruno@clisp.org>, 2006. + + This 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 "gl_linked_list.h" + +#include <stdlib.h> + +#include "gl_array_list.h" +#include "progname.h" +#include "macros.h" + +static const char *objects[15] = + { + "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o" + }; + +#define RANDOM(n) (rand () % (n)) +#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))] + +static void +check_equals (gl_list_t list1, gl_list_t list2) +{ + size_t n, i; + + n = gl_list_size (list1); + ASSERT (n == gl_list_size (list2)); + for (i = 0; i < n; i++) + { + ASSERT (gl_list_get_at (list1, i) == gl_list_get_at (list2, i)); + } +} + +static void +check_all (gl_list_t list1, gl_list_t list2, gl_list_t list3) +{ + check_equals (list1, list2); + check_equals (list1, list3); +} + +int +main (int argc, char *argv[]) +{ + gl_list_t list1, list2, list3; + + set_program_name (argv[0]); + + /* Allow the user to provide a non-default random seed on the command line. */ + if (argc > 1) + srand (atoi (argv[1])); + + { + size_t initial_size = RANDOM (50); + const void **contents = + (const void **) malloc (initial_size * sizeof (const void *)); + size_t i; + unsigned int repeat; + + for (i = 0; i < initial_size; i++) + contents[i] = RANDOM_OBJECT (); + + /* Create list1. */ + list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true, + initial_size, contents); + ASSERT (list1 != NULL); + /* Create list2. */ + list2 = gl_list_nx_create_empty (GL_LINKED_LIST, NULL, NULL, NULL, true); + ASSERT (list2 != NULL); + for (i = 0; i < initial_size; i++) + ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL); + + /* Create list3. */ + list3 = gl_list_nx_create (GL_LINKED_LIST, NULL, NULL, NULL, true, + initial_size, contents); + ASSERT (list3 != NULL); + + check_all (list1, list2, list3); + + for (repeat = 0; repeat < 10000; repeat++) + { + unsigned int operation = RANDOM (16); + switch (operation) + { + case 0: + if (gl_list_size (list1) > 0) + { + size_t index = RANDOM (gl_list_size (list1)); + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2, node3; + + node1 = gl_list_nx_set_at (list1, index, obj); + ASSERT (node1 != NULL); + ASSERT (gl_list_get_at (list1, index) == obj); + ASSERT (gl_list_node_value (list1, node1) == obj); + + node2 = gl_list_nx_set_at (list2, index, obj); + ASSERT (node2 != NULL); + ASSERT (gl_list_get_at (list2, index) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + + node3 = gl_list_nx_set_at (list3, index, obj); + ASSERT (node3 != NULL); + ASSERT (gl_list_get_at (list3, index) == obj); + ASSERT (gl_list_node_value (list3, node3) == obj); + + if (index > 0) + { + ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1)) + == gl_list_get_at (list1, index - 1)); + ASSERT (gl_list_node_value (list2, gl_list_previous_node (list3, node3)) + == gl_list_get_at (list2, index - 1)); + ASSERT (gl_list_node_value (list3, gl_list_previous_node (list3, node3)) + == gl_list_get_at (list2, index - 1)); + } + if (index + 1 < gl_list_size (list1)) + { + ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1)) + == gl_list_get_at (list1, index + 1)); + ASSERT (gl_list_node_value (list2, gl_list_next_node (list3, node3)) + == gl_list_get_at (list2, index + 1)); + ASSERT (gl_list_node_value (list3, gl_list_next_node (list3, node3)) + == gl_list_get_at (list2, index + 1)); + } + } + break; + case 1: + { + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2, node3; + node1 = gl_list_search (list1, obj); + node2 = gl_list_search (list2, obj); + node3 = gl_list_search (list3, obj); + if (node1 == NULL) + { + ASSERT (node2 == NULL); + ASSERT (node3 == NULL); + } + else + { + ASSERT (node2 != NULL); + ASSERT (node3 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + ASSERT (gl_list_node_value (list3, node3) == obj); + } + } + break; + case 2: + { + const char *obj = RANDOM_OBJECT (); + size_t index1, index2, index3; + index1 = gl_list_indexof (list1, obj); + index2 = gl_list_indexof (list2, obj); + index3 = gl_list_indexof (list3, obj); + if (index1 == (size_t)(-1)) + { + ASSERT (index2 == (size_t)(-1)); + ASSERT (index3 == (size_t)(-1)); + } + else + { + ASSERT (index2 != (size_t)(-1)); + ASSERT (index3 != (size_t)(-1)); + ASSERT (gl_list_get_at (list1, index1) == obj); + ASSERT (gl_list_get_at (list2, index2) == obj); + ASSERT (gl_list_get_at (list3, index3) == obj); + ASSERT (index2 == index1); + ASSERT (index3 == index1); + } + } + break; + case 3: /* add 1 element */ + { + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2, node3; + node1 = gl_list_nx_add_first (list1, obj); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_first (list2, obj); + ASSERT (node2 != NULL); + node3 = gl_list_nx_add_first (list3, obj); + ASSERT (node3 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + ASSERT (gl_list_node_value (list3, node3) == obj); + ASSERT (gl_list_get_at (list1, 0) == obj); + ASSERT (gl_list_get_at (list2, 0) == obj); + ASSERT (gl_list_get_at (list3, 0) == obj); + } + break; + case 4: /* add 1 element */ + { + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2, node3; + node1 = gl_list_nx_add_last (list1, obj); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_last (list2, obj); + ASSERT (node2 != NULL); + node3 = gl_list_nx_add_last (list3, obj); + ASSERT (node3 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + ASSERT (gl_list_node_value (list3, node3) == obj); + ASSERT (gl_list_get_at (list1, gl_list_size (list1) - 1) == obj); + ASSERT (gl_list_get_at (list2, gl_list_size (list2) - 1) == obj); + ASSERT (gl_list_get_at (list3, gl_list_size (list3) - 1) == obj); + } + break; + case 5: /* add 3 elements */ + { + const char *obj0 = RANDOM_OBJECT (); + const char *obj1 = RANDOM_OBJECT (); + const char *obj2 = RANDOM_OBJECT (); + gl_list_node_t node1, node2, node3; + node1 = gl_list_nx_add_first (list1, obj2); + ASSERT (node1 != NULL); + node1 = gl_list_nx_add_before (list1, node1, obj0); + ASSERT (node1 != NULL); + node1 = gl_list_nx_add_after (list1, node1, obj1); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_first (list2, obj2); + ASSERT (node2 != NULL); + node2 = gl_list_nx_add_before (list2, node2, obj0); + ASSERT (node2 != NULL); + node2 = gl_list_nx_add_after (list2, node2, obj1); + ASSERT (node2 != NULL); + node3 = gl_list_nx_add_first (list3, obj2); + ASSERT (node3 != NULL); + node3 = gl_list_nx_add_before (list3, node3, obj0); + ASSERT (node3 != NULL); + node3 = gl_list_nx_add_after (list3, node3, obj1); + ASSERT (node3 != NULL); + ASSERT (gl_list_node_value (list1, node1) == obj1); + ASSERT (gl_list_node_value (list2, node2) == obj1); + ASSERT (gl_list_node_value (list3, node3) == obj1); + ASSERT (gl_list_get_at (list1, 0) == obj0); + ASSERT (gl_list_get_at (list1, 1) == obj1); + ASSERT (gl_list_get_at (list1, 2) == obj2); + ASSERT (gl_list_get_at (list2, 0) == obj0); + ASSERT (gl_list_get_at (list2, 1) == obj1); + ASSERT (gl_list_get_at (list2, 2) == obj2); + ASSERT (gl_list_get_at (list3, 0) == obj0); + ASSERT (gl_list_get_at (list3, 1) == obj1); + ASSERT (gl_list_get_at (list3, 2) == obj2); + } + break; + case 6: /* add 1 element */ + { + size_t index = RANDOM (gl_list_size (list1) + 1); + const char *obj = RANDOM_OBJECT (); + gl_list_node_t node1, node2, node3; + node1 = gl_list_nx_add_at (list1, index, obj); + ASSERT (node1 != NULL); + node2 = gl_list_nx_add_at (list2, index, obj); + ASSERT (node2 != NULL); + node3 = gl_list_nx_add_at (list3, index, obj); + ASSERT (node3 != NULL); + ASSERT (gl_list_get_at (list1, index) == obj); + ASSERT (gl_list_node_value (list1, node1) == obj); + ASSERT (gl_list_get_at (list2, index) == obj); + ASSERT (gl_list_node_value (list2, node2) == obj); + ASSERT (gl_list_get_at (list3, index) == obj); + ASSERT (gl_list_node_value (list3, node3) == obj); + if (index > 0) + { + ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1)) + == gl_list_get_at (list1, index - 1)); + ASSERT (gl_list_node_value (list2, gl_list_previous_node (list3, node3)) + == gl_list_get_at (list2, index - 1)); + ASSERT (gl_list_node_value (list3, gl_list_previous_node (list3, node3)) + == gl_list_get_at (list2, index - 1)); + } + if (index + 1 < gl_list_size (list1)) + { + ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1)) + == gl_list_get_at (list1, index + 1)); + ASSERT (gl_list_node_value (list2, gl_list_next_node (list3, node3)) + == gl_list_get_at (list2, index + 1)); + ASSERT (gl_list_node_value (list3, gl_list_next_node (list3, node3)) + == gl_list_get_at (list2, index + 1)); + } + } + break; + case 7: case 8: /* remove 1 element */ + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + const char *obj = gl_list_get_at (list1, RANDOM (n)); + gl_list_node_t node1, node2, node3; + node1 = gl_list_search (list1, obj); + node2 = gl_list_search (list2, obj); + node3 = gl_list_search (list3, obj); + ASSERT (node1 != NULL); + ASSERT (node2 != NULL); + ASSERT (node3 != NULL); + ASSERT (gl_list_remove_node (list1, node1)); + ASSERT (gl_list_remove_node (list2, node2)); + ASSERT (gl_list_remove_node (list3, node3)); + ASSERT (gl_list_size (list1) == n - 1); + } + break; + case 9: case 10: /* remove 1 element */ + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + size_t index = RANDOM (n); + ASSERT (gl_list_remove_at (list1, index)); + ASSERT (gl_list_remove_at (list2, index)); + ASSERT (gl_list_remove_at (list3, index)); + ASSERT (gl_list_size (list1) == n - 1); + } + break; + case 11: case 12: /* remove 1 element */ + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + const char *obj = gl_list_get_at (list1, RANDOM (n)); + ASSERT (gl_list_remove (list1, obj)); + ASSERT (gl_list_remove (list2, obj)); + ASSERT (gl_list_remove (list3, obj)); + ASSERT (gl_list_size (list1) == n - 1); + } + break; + case 13: + if (gl_list_size (list1) > 0) + { + size_t n = gl_list_size (list1); + const char *obj = "xyzzy"; + ASSERT (!gl_list_remove (list1, obj)); + ASSERT (!gl_list_remove (list2, obj)); + ASSERT (!gl_list_remove (list3, obj)); + ASSERT (gl_list_size (list1) == n); + } + break; + case 14: + { + size_t n = gl_list_size (list1); + gl_list_iterator_t iter1, iter2, iter3; + const void *elt; + iter1 = gl_list_iterator (list1); + iter2 = gl_list_iterator (list2); + iter3 = gl_list_iterator (list3); + for (i = 0; i < n; i++) + { + ASSERT (gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (gl_list_get_at (list1, i) == elt); + ASSERT (gl_list_iterator_next (&iter2, &elt, NULL)); + ASSERT (gl_list_get_at (list2, i) == elt); + ASSERT (gl_list_iterator_next (&iter3, &elt, NULL)); + ASSERT (gl_list_get_at (list3, i) == elt); + } + ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL)); + ASSERT (!gl_list_iterator_next (&iter3, &elt, NULL)); + gl_list_iterator_free (&iter1); + gl_list_iterator_free (&iter2); + gl_list_iterator_free (&iter3); + } + break; + case 15: + { + size_t end = RANDOM (gl_list_size (list1) + 1); + size_t start = RANDOM (end + 1); + gl_list_iterator_t iter1, iter2, iter3; + const void *elt; + iter1 = gl_list_iterator_from_to (list1, start, end); + iter2 = gl_list_iterator_from_to (list2, start, end); + iter3 = gl_list_iterator_from_to (list3, start, end); + for (i = start; i < end; i++) + { + ASSERT (gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (gl_list_get_at (list1, i) == elt); + ASSERT (gl_list_iterator_next (&iter2, &elt, NULL)); + ASSERT (gl_list_get_at (list2, i) == elt); + ASSERT (gl_list_iterator_next (&iter3, &elt, NULL)); + ASSERT (gl_list_get_at (list3, i) == elt); + } + ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL)); + ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL)); + ASSERT (!gl_list_iterator_next (&iter3, &elt, NULL)); + gl_list_iterator_free (&iter1); + gl_list_iterator_free (&iter2); + gl_list_iterator_free (&iter3); + } + break; + } + check_all (list1, list2, list3); + } + + gl_list_free (list1); + gl_list_free (list2); + gl_list_free (list3); + free (contents); + } + + return 0; +} diff --git a/gnulib-tests/test-listen.c b/gnulib-tests/test-listen.c index f2e6c06a..c0c70822 100644 --- a/gnulib-tests/test-listen.c +++ b/gnulib-tests/test-listen.c @@ -1,5 +1,5 @@ /* Test listen() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-locale.c b/gnulib-tests/test-locale.c index cf4e6e81..5383cff4 100644 --- a/gnulib-tests/test-locale.c +++ b/gnulib-tests/test-locale.c @@ -1,5 +1,5 @@ /* Test of <locale.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This 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,11 +33,6 @@ int a[] = LC_TIME }; -#if HAVE_NEWLOCALE -/* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */ -locale_t b = LC_GLOBAL_LOCALE; -#endif - /* Check that the 'struct lconv' type is defined. */ struct lconv l; int ls; @@ -49,6 +44,12 @@ verify (sizeof NULL == sizeof (void *)); int main () { +#if HAVE_NEWLOCALE + /* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */ + locale_t b = LC_GLOBAL_LOCALE; + (void) b; +#endif + /* Check that 'struct lconv' has the ISO C and POSIX specified members. */ ls += sizeof (*l.decimal_point); ls += sizeof (*l.thousands_sep); diff --git a/gnulib-tests/test-localeconv.c b/gnulib-tests/test-localeconv.c index 9cd22af8..35260732 100644 --- a/gnulib-tests/test-localeconv.c +++ b/gnulib-tests/test-localeconv.c @@ -1,5 +1,5 @@ /* Test of localeconv() function. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-localename.c b/gnulib-tests/test-localename.c index df6c1d66..b5dd742f 100644 --- a/gnulib-tests/test-localename.c +++ b/gnulib-tests/test-localename.c @@ -1,5 +1,5 @@ /* Test of gl_locale_name function and its variants. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-lock.c b/gnulib-tests/test-lock.c index fd2ed266..a992f646 100644 --- a/gnulib-tests/test-lock.c +++ b/gnulib-tests/test-lock.c @@ -1,5 +1,5 @@ /* Test of locking in multithreaded situations. - Copyright (C) 2005, 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-lseek.c b/gnulib-tests/test-lseek.c index fc37ec2d..c5e91882 100644 --- a/gnulib-tests/test-lseek.c +++ b/gnulib-tests/test-lseek.c @@ -1,5 +1,5 @@ /* Test of lseek() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-lstat.c b/gnulib-tests/test-lstat.c index eab2ad4d..0e7597e8 100644 --- a/gnulib-tests/test-lstat.c +++ b/gnulib-tests/test-lstat.c @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-lstat.h b/gnulib-tests/test-lstat.h index 45ca3bfa..d5ba7a8f 100644 --- a/gnulib-tests/test-lstat.h +++ b/gnulib-tests/test-lstat.h @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-lutimens.h b/gnulib-tests/test-lutimens.h index 89734975..be5e4b78 100644 --- a/gnulib-tests/test-lutimens.h +++ b/gnulib-tests/test-lutimens.h @@ -1,5 +1,5 @@ /* Test of file timestamp modification functions. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-malloc-gnu.c b/gnulib-tests/test-malloc-gnu.c index 773dee51..e85909e0 100644 --- a/gnulib-tests/test-malloc-gnu.c +++ b/gnulib-tests/test-malloc-gnu.c @@ -1,5 +1,5 @@ /* Test of malloc function. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-malloca.c b/gnulib-tests/test-malloca.c index 6f94d0d0..717ede0a 100644 --- a/gnulib-tests/test-malloca.c +++ b/gnulib-tests/test-malloca.c @@ -1,5 +1,5 @@ /* Test of safe automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-math.c b/gnulib-tests/test-math.c index f3975eed..7ac8b9a6 100644 --- a/gnulib-tests/test-math.c +++ b/gnulib-tests/test-math.c @@ -1,5 +1,5 @@ /* Test of <math.h> substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbrtowc-w32.c b/gnulib-tests/test-mbrtowc-w32.c index 06f07aa2..efb1dddb 100644 --- a/gnulib-tests/test-mbrtowc-w32.c +++ b/gnulib-tests/test-mbrtowc-w32.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbrtowc.c b/gnulib-tests/test-mbrtowc.c index e8cdea07..d24b93e7 100644 --- a/gnulib-tests/test-mbrtowc.c +++ b/gnulib-tests/test-mbrtowc.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbsalign.c b/gnulib-tests/test-mbsalign.c index 80d34596..4a4cef2f 100644 --- a/gnulib-tests/test-mbsalign.c +++ b/gnulib-tests/test-mbsalign.c @@ -1,5 +1,5 @@ /* Test that mbsalign works as advertised. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbscasecmp.c b/gnulib-tests/test-mbscasecmp.c index 278265be..ade3267f 100644 --- a/gnulib-tests/test-mbscasecmp.c +++ b/gnulib-tests/test-mbscasecmp.c @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbsinit.c b/gnulib-tests/test-mbsinit.c index 56548db5..98db1f19 100644 --- a/gnulib-tests/test-mbsinit.c +++ b/gnulib-tests/test-mbsinit.c @@ -1,5 +1,5 @@ /* Test of test for initial conversion state. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbsrtowcs.c b/gnulib-tests/test-mbsrtowcs.c index 079fa4c1..cb394f51 100644 --- a/gnulib-tests/test-mbsrtowcs.c +++ b/gnulib-tests/test-mbsrtowcs.c @@ -1,5 +1,5 @@ /* Test of conversion of string to wide string. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbsstr1.c b/gnulib-tests/test-mbsstr1.c index 1e6f7e01..b00d5334 100644 --- a/gnulib-tests/test-mbsstr1.c +++ b/gnulib-tests/test-mbsstr1.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbsstr2.c b/gnulib-tests/test-mbsstr2.c index 2565128c..6a80ebb5 100644 --- a/gnulib-tests/test-mbsstr2.c +++ b/gnulib-tests/test-mbsstr2.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mbsstr3.c b/gnulib-tests/test-mbsstr3.c index e4d9a6d0..4f56bf30 100644 --- a/gnulib-tests/test-mbsstr3.c +++ b/gnulib-tests/test-mbsstr3.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-md5.c b/gnulib-tests/test-md5.c index b86cca85..68278b1b 100644 --- a/gnulib-tests/test-md5.c +++ b/gnulib-tests/test-md5.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + * Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. * Written by Simon Josefsson * * This program is free software: you can redistribute it and/or modify @@ -42,10 +42,10 @@ main (void) size_t i; printf ("expected:\n"); for (i = 0; i < MD5_DIGEST_SIZE; i++) - printf ("%02x ", out1[i] & 0xFF); + printf ("%02x ", out1[i] & 0xFFu); printf ("\ncomputed:\n"); for (i = 0; i < MD5_DIGEST_SIZE; i++) - printf ("%02x ", buf[i] & 0xFF); + printf ("%02x ", buf[i] & 0xFFu); printf ("\n"); return 1; } @@ -55,10 +55,10 @@ main (void) size_t i; printf ("expected:\n"); for (i = 0; i < MD5_DIGEST_SIZE; i++) - printf ("%02x ", out2[i] & 0xFF); + printf ("%02x ", out2[i] & 0xFFu); printf ("\ncomputed:\n"); for (i = 0; i < MD5_DIGEST_SIZE; i++) - printf ("%02x ", buf[i] & 0xFF); + printf ("%02x ", buf[i] & 0xFFu); printf ("\n"); return 1; } diff --git a/gnulib-tests/test-memcasecmp.c b/gnulib-tests/test-memcasecmp.c index 0aa204cc..1ce52ff2 100644 --- a/gnulib-tests/test-memcasecmp.c +++ b/gnulib-tests/test-memcasecmp.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 Free Software Foundation, Inc. * Written by Simon Josefsson and Bruno Haible * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-memchr.c b/gnulib-tests/test-memchr.c index 223c8e77..bc1acf9f 100644 --- a/gnulib-tests/test-memchr.c +++ b/gnulib-tests/test-memchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 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/gnulib-tests/test-memchr2.c b/gnulib-tests/test-memchr2.c index dc131c30..7aa3b74f 100644 --- a/gnulib-tests/test-memchr2.c +++ b/gnulib-tests/test-memchr2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-memcoll.c b/gnulib-tests/test-memcoll.c index 31f3e1cc..9a8320c8 100644 --- a/gnulib-tests/test-memcoll.c +++ b/gnulib-tests/test-memcoll.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 Free Software Foundation, Inc. * Written by Simon Josefsson and Bruno Haible * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-memrchr.c b/gnulib-tests/test-memrchr.c index 16f0f805..8c887c7e 100644 --- a/gnulib-tests/test-memrchr.c +++ b/gnulib-tests/test-memrchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 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/gnulib-tests/test-mkdir.c b/gnulib-tests/test-mkdir.c index c7ffef19..84dacb07 100644 --- a/gnulib-tests/test-mkdir.c +++ b/gnulib-tests/test-mkdir.c @@ -1,5 +1,5 @@ /* Tests of mkdir. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mkdir.h b/gnulib-tests/test-mkdir.h index e6660b0f..5a6451d1 100644 --- a/gnulib-tests/test-mkdir.h +++ b/gnulib-tests/test-mkdir.h @@ -1,5 +1,5 @@ /* Test of mkdir() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mkfifo.c b/gnulib-tests/test-mkfifo.c index ee5565b4..c6eef27c 100644 --- a/gnulib-tests/test-mkfifo.c +++ b/gnulib-tests/test-mkfifo.c @@ -1,5 +1,5 @@ /* Tests of mkfifo. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mkfifo.h b/gnulib-tests/test-mkfifo.h index 792160f0..b834d008 100644 --- a/gnulib-tests/test-mkfifo.h +++ b/gnulib-tests/test-mkfifo.h @@ -1,5 +1,5 @@ /* Tests of mkfifo and friends. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-mknod.c b/gnulib-tests/test-mknod.c index 187a17c4..9e28be87 100644 --- a/gnulib-tests/test-mknod.c +++ b/gnulib-tests/test-mknod.c @@ -1,5 +1,5 @@ /* Tests of mknod. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-nanosleep.c b/gnulib-tests/test-nanosleep.c index b775b85d..230e11d0 100644 --- a/gnulib-tests/test-nanosleep.c +++ b/gnulib-tests/test-nanosleep.c @@ -1,5 +1,5 @@ /* Test of nanosleep() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-netdb.c b/gnulib-tests/test-netdb.c index 574abbe6..97abfd27 100644 --- a/gnulib-tests/test-netdb.c +++ b/gnulib-tests/test-netdb.c @@ -1,5 +1,5 @@ /* Test of <netdb.h> substitute. - Copyright (C) 2007-2008, 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2008, 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-netinet_in.c b/gnulib-tests/test-netinet_in.c index 5a9754a3..ae1634f6 100644 --- a/gnulib-tests/test-netinet_in.c +++ b/gnulib-tests/test-netinet_in.c @@ -1,5 +1,5 @@ /* Test of <netinet/in.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-nl_langinfo.c b/gnulib-tests/test-nl_langinfo.c index 06a4c9d0..45da9d06 100644 --- a/gnulib-tests/test-nl_langinfo.c +++ b/gnulib-tests/test-nl_langinfo.c @@ -1,5 +1,5 @@ /* Test of nl_langinfo replacement. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-open.c b/gnulib-tests/test-open.c index 985d9015..d169e22d 100644 --- a/gnulib-tests/test-open.c +++ b/gnulib-tests/test-open.c @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-open.h b/gnulib-tests/test-open.h index d7bd5afc..2fbcd17a 100644 --- a/gnulib-tests/test-open.h +++ b/gnulib-tests/test-open.h @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,8 +21,10 @@ around a glibc bug whereby 'open' cannot be used as a function pointer when _FORTIFY_SOURCE is positive. */ -#ifndef __always_inline -#define __always_inline +#if __GLIBC__ && defined __always_inline +# define ALWAYS_INLINE __always_inline +#else +# define ALWAYS_INLINE #endif /* This file is designed to test both open(n,buf[,mode]) and @@ -31,7 +33,7 @@ appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ -static __always_inline int +static ALWAYS_INLINE int test_open (int (*func) (char const *, int, ...), bool print) { int fd; diff --git a/gnulib-tests/test-openat-safer.c b/gnulib-tests/test-openat-safer.c index 9544b8b1..4c277598 100644 --- a/gnulib-tests/test-openat-safer.c +++ b/gnulib-tests/test-openat-safer.c @@ -1,5 +1,5 @@ /* Test that openat_safer leave standard fds alone. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-openat.c b/gnulib-tests/test-openat.c index ed505079..233f822d 100644 --- a/gnulib-tests/test-openat.c +++ b/gnulib-tests/test-openat.c @@ -1,5 +1,5 @@ /* Test that openat works. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-parse-datetime.c b/gnulib-tests/test-parse-datetime.c index 25385ca7..5449e788 100644 --- a/gnulib-tests/test-parse-datetime.c +++ b/gnulib-tests/test-parse-datetime.c @@ -1,5 +1,5 @@ /* Test of parse_datetime() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-pathmax.c b/gnulib-tests/test-pathmax.c index 8bc7dbcc..14eb1eeb 100644 --- a/gnulib-tests/test-pathmax.c +++ b/gnulib-tests/test-pathmax.c @@ -1,5 +1,5 @@ /* Test of "pathmax.h". - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-perror.c b/gnulib-tests/test-perror.c index c003faad..08fc3066 100644 --- a/gnulib-tests/test-perror.c +++ b/gnulib-tests/test-perror.c @@ -1,5 +1,5 @@ /* Test of perror() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-perror2.c b/gnulib-tests/test-perror2.c index 7e981264..94cedfee 100644 --- a/gnulib-tests/test-perror2.c +++ b/gnulib-tests/test-perror2.c @@ -1,5 +1,5 @@ /* Test of perror() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-pipe.c b/gnulib-tests/test-pipe.c index c951d1d0..6524a3ed 100644 --- a/gnulib-tests/test-pipe.c +++ b/gnulib-tests/test-pipe.c @@ -1,5 +1,5 @@ /* Test of pipe. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-posixtm.c b/gnulib-tests/test-posixtm.c index 0f9c8bc6..3f688e06 100644 --- a/gnulib-tests/test-posixtm.c +++ b/gnulib-tests/test-posixtm.c @@ -1,5 +1,5 @@ /* Test that posixtime works as required. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-printf-frexp.c b/gnulib-tests/test-printf-frexp.c index 57d57b73..fc2bf566 100644 --- a/gnulib-tests/test-printf-frexp.c +++ b/gnulib-tests/test-printf-frexp.c @@ -1,5 +1,5 @@ /* Test of splitting a double into fraction and mantissa. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-printf-frexpl.c b/gnulib-tests/test-printf-frexpl.c index 95801dae..ba9540d7 100644 --- a/gnulib-tests/test-printf-frexpl.c +++ b/gnulib-tests/test-printf-frexpl.c @@ -1,5 +1,5 @@ /* Test of splitting a 'long double' into fraction and mantissa. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-printf-posix.h b/gnulib-tests/test-printf-posix.h index b6446368..069b76cd 100644 --- a/gnulib-tests/test-printf-posix.h +++ b/gnulib-tests/test-printf-posix.h @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsprintf() and sprintf() functions. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-priv-set.c b/gnulib-tests/test-priv-set.c index bcbc84ab..578614a9 100644 --- a/gnulib-tests/test-priv-set.c +++ b/gnulib-tests/test-priv-set.c @@ -1,5 +1,5 @@ /* Test the priv-set module. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-quotearg-simple.c b/gnulib-tests/test-quotearg-simple.c index 08aadc1f..b579af73 100644 --- a/gnulib-tests/test-quotearg-simple.c +++ b/gnulib-tests/test-quotearg-simple.c @@ -1,5 +1,5 @@ /* Test of quotearg family of functions. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-quotearg.h b/gnulib-tests/test-quotearg.h index 5fa7233c..e1bb659e 100644 --- a/gnulib-tests/test-quotearg.h +++ b/gnulib-tests/test-quotearg.h @@ -1,5 +1,5 @@ /* Test of quotearg family of functions. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-raise.c b/gnulib-tests/test-raise.c index bfe4352e..7456a90a 100644 --- a/gnulib-tests/test-raise.c +++ b/gnulib-tests/test-raise.c @@ -1,5 +1,5 @@ /* Test raising a signal. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-rand-isaac.c b/gnulib-tests/test-rand-isaac.c index beead718..7cc530e5 100644 --- a/gnulib-tests/test-rand-isaac.c +++ b/gnulib-tests/test-rand-isaac.c @@ -1,6 +1,6 @@ /* Test the ISAAC or ISAAC64 pseudorandom number generator. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-read-file.c b/gnulib-tests/test-read-file.c index fff96ecd..f8b160f5 100644 --- a/gnulib-tests/test-read-file.c +++ b/gnulib-tests/test-read-file.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2007, 2010-2014 Free Software Foundation, Inc. + * Copyright (C) 2006-2007, 2010-2015 Free Software Foundation, Inc. * Written by Simon Josefsson * * This program is free software: you can redistribute it and/or modify @@ -57,7 +57,8 @@ main (void) /* FILE1 is a regular file or a symlink to a regular file. */ if (len != statbuf.st_size) { - fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len, FILE1); + fprintf (stderr, "Read %lu from %s...\n", + (unsigned long) len, FILE1); err = 1; } } @@ -98,7 +99,8 @@ main (void) is not a regular file. */ if (len != 0) { - fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len, FILE2); + fprintf (stderr, "Read %lu from %s...\n", + (unsigned long) len, FILE2); err = 1; } free (out); diff --git a/gnulib-tests/test-read.c b/gnulib-tests/test-read.c index 541e4b9d..892a6175 100644 --- a/gnulib-tests/test-read.c +++ b/gnulib-tests/test-read.c @@ -1,5 +1,5 @@ /* Test the read() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-readlink.c b/gnulib-tests/test-readlink.c index e6adbe5d..42401088 100644 --- a/gnulib-tests/test-readlink.c +++ b/gnulib-tests/test-readlink.c @@ -1,5 +1,5 @@ /* Tests of readlink. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-readlink.h b/gnulib-tests/test-readlink.h index 33039de4..ad34c558 100644 --- a/gnulib-tests/test-readlink.h +++ b/gnulib-tests/test-readlink.h @@ -1,5 +1,5 @@ /* Tests of readlink. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-readlinkat.c b/gnulib-tests/test-readlinkat.c index c1d3753a..10e75ba9 100644 --- a/gnulib-tests/test-readlinkat.c +++ b/gnulib-tests/test-readlinkat.c @@ -1,5 +1,5 @@ /* Tests of readlinkat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-readtokens.c b/gnulib-tests/test-readtokens.c index e7068f75..110b9795 100644 --- a/gnulib-tests/test-readtokens.c +++ b/gnulib-tests/test-readtokens.c @@ -1,5 +1,5 @@ /* Test the readtokens module. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-realloc-gnu.c b/gnulib-tests/test-realloc-gnu.c index 1969ce25..d87dfe52 100644 --- a/gnulib-tests/test-realloc-gnu.c +++ b/gnulib-tests/test-realloc-gnu.c @@ -1,5 +1,5 @@ /* Test of realloc function. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-regex.c b/gnulib-tests/test-regex.c index cac028b8..46027973 100644 --- a/gnulib-tests/test-regex.c +++ b/gnulib-tests/test-regex.c @@ -1,5 +1,5 @@ /* Test regular expressions - Copyright 1996-2001, 2003-2014 Free Software Foundation, Inc. + Copyright 1996-2001, 2003-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-remove.c b/gnulib-tests/test-remove.c index 53c9be08..ca877f03 100644 --- a/gnulib-tests/test-remove.c +++ b/gnulib-tests/test-remove.c @@ -1,5 +1,5 @@ /* Tests of remove. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-rename.c b/gnulib-tests/test-rename.c index b2608299..6020d65a 100644 --- a/gnulib-tests/test-rename.c +++ b/gnulib-tests/test-rename.c @@ -1,5 +1,5 @@ /* Test of rename() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-rename.h b/gnulib-tests/test-rename.h index 2bc610fc..5e60fc98 100644 --- a/gnulib-tests/test-rename.h +++ b/gnulib-tests/test-rename.h @@ -1,5 +1,5 @@ /* Test of rename() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-rmdir.c b/gnulib-tests/test-rmdir.c index 4903a57d..52cfa428 100644 --- a/gnulib-tests/test-rmdir.c +++ b/gnulib-tests/test-rmdir.c @@ -1,5 +1,5 @@ /* Tests of rmdir. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-rmdir.h b/gnulib-tests/test-rmdir.h index daaa4150..9c83a107 100644 --- a/gnulib-tests/test-rmdir.h +++ b/gnulib-tests/test-rmdir.h @@ -1,5 +1,5 @@ /* Tests of rmdir. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sameacls.c b/gnulib-tests/test-sameacls.c index 70e15c2d..bea6d3ee 100644 --- a/gnulib-tests/test-sameacls.c +++ b/gnulib-tests/test-sameacls.c @@ -1,5 +1,5 @@ /* Test whether two files have the same ACLs. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sched.c b/gnulib-tests/test-sched.c index f4429096..d6f57529 100644 --- a/gnulib-tests/test-sched.c +++ b/gnulib-tests/test-sched.c @@ -1,5 +1,5 @@ /* Test of <sched.h> substitute. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-select-fd.c b/gnulib-tests/test-select-fd.c index ae9e83cc..19621136 100644 --- a/gnulib-tests/test-select-fd.c +++ b/gnulib-tests/test-select-fd.c @@ -1,5 +1,5 @@ /* Test of select() substitute, reading or writing from a given file descriptor. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-select-stdin.c b/gnulib-tests/test-select-stdin.c index 8b242a21..043c4f67 100644 --- a/gnulib-tests/test-select-stdin.c +++ b/gnulib-tests/test-select-stdin.c @@ -1,5 +1,5 @@ /* Test of select() substitute, reading from stdin. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-select.c b/gnulib-tests/test-select.c index ef7389a8..d578c1b7 100644 --- a/gnulib-tests/test-select.c +++ b/gnulib-tests/test-select.c @@ -1,5 +1,5 @@ /* Test of select() substitute. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-select.h b/gnulib-tests/test-select.h index adf1dd4e..ef0c87a2 100644 --- a/gnulib-tests/test-select.h +++ b/gnulib-tests/test-select.h @@ -1,5 +1,5 @@ /* Test of select() substitute. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-set-mode-acl.c b/gnulib-tests/test-set-mode-acl.c index 61f1975e..a282e259 100644 --- a/gnulib-tests/test-set-mode-acl.c +++ b/gnulib-tests/test-set-mode-acl.c @@ -1,5 +1,5 @@ /* Test of setting an ACL equivalent to a mode. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-setenv.c b/gnulib-tests/test-setenv.c index 548e4fba..a7ef4886 100644 --- a/gnulib-tests/test-setenv.c +++ b/gnulib-tests/test-setenv.c @@ -1,5 +1,5 @@ /* Tests of setenv. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-setlocale1.c b/gnulib-tests/test-setlocale1.c index 0434d7bb..6e0ef9d0 100644 --- a/gnulib-tests/test-setlocale1.c +++ b/gnulib-tests/test-setlocale1.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-setlocale2.c b/gnulib-tests/test-setlocale2.c index 2f52fe0b..1bd8a5c9 100644 --- a/gnulib-tests/test-setlocale2.c +++ b/gnulib-tests/test-setlocale2.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-setsockopt.c b/gnulib-tests/test-setsockopt.c index ebf50a50..6e1da720 100644 --- a/gnulib-tests/test-setsockopt.c +++ b/gnulib-tests/test-setsockopt.c @@ -1,5 +1,5 @@ /* Test setsockopt() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sha1.c b/gnulib-tests/test-sha1.c index 9a3e3cbe..6f2b608e 100644 --- a/gnulib-tests/test-sha1.c +++ b/gnulib-tests/test-sha1.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. * Written by Simon Josefsson * * This program is free software: you can redistribute it and/or modify @@ -36,10 +36,10 @@ main (void) size_t i; printf ("expected:\n"); for (i = 0; i < SHA1_DIGEST_SIZE; i++) - printf ("%02x ", out1[i] & 0xFF); + printf ("%02x ", out1[i] & 0xFFu); printf ("\ncomputed:\n"); for (i = 0; i < SHA1_DIGEST_SIZE; i++) - printf ("%02x ", buf[i] & 0xFF); + printf ("%02x ", buf[i] & 0xFFu); printf ("\n"); return 1; } diff --git a/gnulib-tests/test-sigaction.c b/gnulib-tests/test-sigaction.c index 0fa1c262..ec0f0516 100644 --- a/gnulib-tests/test-sigaction.c +++ b/gnulib-tests/test-sigaction.c @@ -1,5 +1,5 @@ /* Test of sigaction() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-signal-h.c b/gnulib-tests/test-signal-h.c index 3bc94821..836e1c81 100644 --- a/gnulib-tests/test-signal-h.c +++ b/gnulib-tests/test-signal-h.c @@ -1,5 +1,5 @@ /* Test of <signal.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-signbit.c b/gnulib-tests/test-signbit.c index 584bf4f9..80e9a08b 100644 --- a/gnulib-tests/test-signbit.c +++ b/gnulib-tests/test-signbit.c @@ -1,5 +1,5 @@ /* Test of signbit() substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sigprocmask.c b/gnulib-tests/test-sigprocmask.c index c6c771ea..c88e180a 100644 --- a/gnulib-tests/test-sigprocmask.c +++ b/gnulib-tests/test-sigprocmask.c @@ -1,5 +1,5 @@ /* Test of sigprocmask. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sleep.c b/gnulib-tests/test-sleep.c index 9b93fef3..fba2f462 100644 --- a/gnulib-tests/test-sleep.c +++ b/gnulib-tests/test-sleep.c @@ -1,5 +1,5 @@ /* Test of sleep() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-snprintf.c b/gnulib-tests/test-snprintf.c index 38d9935c..c14a2c1b 100644 --- a/gnulib-tests/test-snprintf.c +++ b/gnulib-tests/test-snprintf.c @@ -1,5 +1,5 @@ /* Test of snprintf() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sockets.c b/gnulib-tests/test-sockets.c index 35f1bf28..551f061d 100644 --- a/gnulib-tests/test-sockets.c +++ b/gnulib-tests/test-sockets.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 Free Software Foundation, Inc. * Written by Simon Josefsson. * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-stat-time.c b/gnulib-tests/test-stat-time.c index c39aa00e..8bb136d3 100644 --- a/gnulib-tests/test-stat-time.c +++ b/gnulib-tests/test-stat-time.c @@ -1,5 +1,5 @@ /* Test of <stat-time.h>. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-stat.c b/gnulib-tests/test-stat.c index 9ed462a3..c6af3762 100644 --- a/gnulib-tests/test-stat.c +++ b/gnulib-tests/test-stat.c @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-stat.h b/gnulib-tests/test-stat.h index 6cfc958d..c37fe6d2 100644 --- a/gnulib-tests/test-stat.h +++ b/gnulib-tests/test-stat.h @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-statat.c b/gnulib-tests/test-statat.c index e7b04be7..2a8d9532 100644 --- a/gnulib-tests/test-statat.c +++ b/gnulib-tests/test-statat.c @@ -1,5 +1,5 @@ /* Tests of statat and lstatat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-stdalign.c b/gnulib-tests/test-stdalign.c index 81efd540..68b9ef15 100644 --- a/gnulib-tests/test-stdalign.c +++ b/gnulib-tests/test-stdalign.c @@ -1,5 +1,5 @@ /* Test of <stdalign.h>. - Copyright 2009-2014 Free Software Foundation, Inc. + Copyright 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-stdbool.c b/gnulib-tests/test-stdbool.c index efa83246..1da25d07 100644 --- a/gnulib-tests/test-stdbool.c +++ b/gnulib-tests/test-stdbool.c @@ -1,5 +1,5 @@ /* Test of <stdbool.h> substitute. - Copyright (C) 2002-2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-stddef.c b/gnulib-tests/test-stddef.c index d5d887eb..aa6ae549 100644 --- a/gnulib-tests/test-stddef.c +++ b/gnulib-tests/test-stddef.c @@ -1,5 +1,5 @@ /* Test of <stddef.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This 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,13 +19,14 @@ #include <config.h> #include <stddef.h> - +#include <stdalign.h> #include "verify.h" /* Check that appropriate types are defined. */ wchar_t a = 'c'; ptrdiff_t b = 1; size_t c = 2; +max_align_t x; /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ @@ -45,6 +46,26 @@ verify (sizeof (offsetof (struct d, e)) == sizeof (size_t)); verify (offsetof (struct d, e) < -1); /* Must be unsigned. */ verify (offsetof (struct d, f) == 1); +/* Check max_align_t's alignment. */ +verify (alignof (double) <= alignof (max_align_t)); +verify (alignof (int) <= alignof (max_align_t)); +verify (alignof (long double) <= alignof (max_align_t)); +verify (alignof (long int) <= alignof (max_align_t)); +verify (alignof (ptrdiff_t) <= alignof (max_align_t)); +verify (alignof (size_t) <= alignof (max_align_t)); +verify (alignof (wchar_t) <= alignof (max_align_t)); +verify (alignof (struct d) <= alignof (max_align_t)); +#if defined __GNUC__ || defined __IBM__ALIGNOF__ +verify (__alignof__ (double) <= __alignof__ (max_align_t)); +verify (__alignof__ (int) <= __alignof__ (max_align_t)); +verify (__alignof__ (long double) <= __alignof__ (max_align_t)); +verify (__alignof__ (long int) <= __alignof__ (max_align_t)); +verify (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t)); +verify (__alignof__ (size_t) <= __alignof__ (max_align_t)); +verify (__alignof__ (wchar_t) <= __alignof__ (max_align_t)); +verify (__alignof__ (struct d) <= __alignof__ (max_align_t)); +#endif + int main (void) { diff --git a/gnulib-tests/test-stdint.c b/gnulib-tests/test-stdint.c index 008b517d..8d54db2e 100644 --- a/gnulib-tests/test-stdint.c +++ b/gnulib-tests/test-stdint.c @@ -1,5 +1,5 @@ /* Test of <stdint.h> substitute. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-stdio.c b/gnulib-tests/test-stdio.c index d3f0e6b1..cbec2a6f 100644 --- a/gnulib-tests/test-stdio.c +++ b/gnulib-tests/test-stdio.c @@ -1,5 +1,5 @@ /* Test of <stdio.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-stdlib.c b/gnulib-tests/test-stdlib.c index a2743e46..b2da7ecc 100644 --- a/gnulib-tests/test-stdlib.c +++ b/gnulib-tests/test-stdlib.c @@ -1,5 +1,5 @@ /* Test of <stdlib.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strerror.c b/gnulib-tests/test-strerror.c index 8e2ed7c2..755ffba6 100644 --- a/gnulib-tests/test-strerror.c +++ b/gnulib-tests/test-strerror.c @@ -1,5 +1,5 @@ /* Test of strerror() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strerror_r.c b/gnulib-tests/test-strerror_r.c index 9e1f0bef..11f4830b 100644 --- a/gnulib-tests/test-strerror_r.c +++ b/gnulib-tests/test-strerror_r.c @@ -1,5 +1,5 @@ /* Test of strerror_r() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strftime.c b/gnulib-tests/test-strftime.c index 9a558d8f..c98ad641 100644 --- a/gnulib-tests/test-strftime.c +++ b/gnulib-tests/test-strftime.c @@ -1,5 +1,5 @@ /* Test that posixtime works as required. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-striconv.c b/gnulib-tests/test-striconv.c index fd29a091..fc9b2005 100644 --- a/gnulib-tests/test-striconv.c +++ b/gnulib-tests/test-striconv.c @@ -1,5 +1,5 @@ /* Test of character set conversion. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-string.c b/gnulib-tests/test-string.c index d890c8b5..647d3b9b 100644 --- a/gnulib-tests/test-string.c +++ b/gnulib-tests/test-string.c @@ -1,5 +1,5 @@ /* Test of <string.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strncat.c b/gnulib-tests/test-strncat.c index 1262b989..c3467ac9 100644 --- a/gnulib-tests/test-strncat.c +++ b/gnulib-tests/test-strncat.c @@ -1,5 +1,5 @@ /* Test of strncat() function. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strnlen.c b/gnulib-tests/test-strnlen.c index 8a2089ec..19e41cff 100644 --- a/gnulib-tests/test-strnlen.c +++ b/gnulib-tests/test-strnlen.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 Free Software Foundation, Inc. + * Copyright (C) 2010-2015 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-strsignal.c b/gnulib-tests/test-strsignal.c index 4194c3db..53304418 100644 --- a/gnulib-tests/test-strsignal.c +++ b/gnulib-tests/test-strsignal.c @@ -1,5 +1,5 @@ /* Test of strsignal() function. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strtod.c b/gnulib-tests/test-strtod.c index 07794b4d..d2e09515 100644 --- a/gnulib-tests/test-strtod.c +++ b/gnulib-tests/test-strtod.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Copyright (C) 2008-2015 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib-tests/test-strtoimax.c b/gnulib-tests/test-strtoimax.c index 1ff5711d..cf733ffa 100644 --- a/gnulib-tests/test-strtoimax.c +++ b/gnulib-tests/test-strtoimax.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * Copyright (C) 2011-2015 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strtoll.c b/gnulib-tests/test-strtoll.c index a4043ce8..794ef885 100644 --- a/gnulib-tests/test-strtoll.c +++ b/gnulib-tests/test-strtoll.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * Copyright (C) 2011-2015 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strtoull.c b/gnulib-tests/test-strtoull.c index 53729b13..6d176284 100644 --- a/gnulib-tests/test-strtoull.c +++ b/gnulib-tests/test-strtoull.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * Copyright (C) 2011-2015 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-strtoumax.c b/gnulib-tests/test-strtoumax.c index 77f490fd..c472a9bd 100644 --- a/gnulib-tests/test-strtoumax.c +++ b/gnulib-tests/test-strtoumax.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * Copyright (C) 2011-2015 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-symlink.c b/gnulib-tests/test-symlink.c index 78d46c23..7a633918 100644 --- a/gnulib-tests/test-symlink.c +++ b/gnulib-tests/test-symlink.c @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-symlink.h b/gnulib-tests/test-symlink.h index eb11cf69..4dc741a0 100644 --- a/gnulib-tests/test-symlink.h +++ b/gnulib-tests/test-symlink.h @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-symlinkat.c b/gnulib-tests/test-symlinkat.c index 75181ce9..0ec13f85 100644 --- a/gnulib-tests/test-symlinkat.c +++ b/gnulib-tests/test-symlinkat.c @@ -1,5 +1,5 @@ /* Tests of symlinkat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_ioctl.c b/gnulib-tests/test-sys_ioctl.c index bd2a5af3..a0779c81 100644 --- a/gnulib-tests/test-sys_ioctl.c +++ b/gnulib-tests/test-sys_ioctl.c @@ -1,5 +1,5 @@ /* Test of <sys/ioctl.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_resource.c b/gnulib-tests/test-sys_resource.c index 531ff803..e5083f56 100644 --- a/gnulib-tests/test-sys_resource.c +++ b/gnulib-tests/test-sys_resource.c @@ -1,5 +1,5 @@ /* Test of <sys/resource.h> substitute. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_select.c b/gnulib-tests/test-sys_select.c index 2e4f7c10..e9b4b7cf 100644 --- a/gnulib-tests/test-sys_select.c +++ b/gnulib-tests/test-sys_select.c @@ -1,5 +1,5 @@ /* Test of <sys/select.h> substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_socket.c b/gnulib-tests/test-sys_socket.c index 8316f9ae..8d8528b1 100644 --- a/gnulib-tests/test-sys_socket.c +++ b/gnulib-tests/test-sys_socket.c @@ -1,5 +1,5 @@ /* Test of <sys/socket.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_stat.c b/gnulib-tests/test-sys_stat.c index c6a67f7f..e4194a13 100644 --- a/gnulib-tests/test-sys_stat.c +++ b/gnulib-tests/test-sys_stat.c @@ -1,5 +1,5 @@ /* Test of <sys/stat.h> substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_time.c b/gnulib-tests/test-sys_time.c index ea12c63d..653ff467 100644 --- a/gnulib-tests/test-sys_time.c +++ b/gnulib-tests/test-sys_time.c @@ -1,5 +1,5 @@ /* Test of <sys/time.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_types.c b/gnulib-tests/test-sys_types.c index ddcb6d29..1ef3b903 100644 --- a/gnulib-tests/test-sys_types.c +++ b/gnulib-tests/test-sys_types.c @@ -1,5 +1,5 @@ /* Test of <sys/types.h> substitute. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_uio.c b/gnulib-tests/test-sys_uio.c index 4f53cae9..3878c96a 100644 --- a/gnulib-tests/test-sys_uio.c +++ b/gnulib-tests/test-sys_uio.c @@ -1,5 +1,5 @@ /* Test of <sys/uio.h> substitute. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_utsname.c b/gnulib-tests/test-sys_utsname.c index 10221bc4..3a7da7f7 100644 --- a/gnulib-tests/test-sys_utsname.c +++ b/gnulib-tests/test-sys_utsname.c @@ -1,5 +1,5 @@ /* Test of <sys/utsname.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_wait.c b/gnulib-tests/test-sys_wait.c index daf6f282..3382fdf5 100644 --- a/gnulib-tests/test-sys_wait.c +++ b/gnulib-tests/test-sys_wait.c @@ -1,5 +1,5 @@ /* Test of <sys/wait.h> substitute. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-sys_wait.h b/gnulib-tests/test-sys_wait.h index ed20219f..e4a79b54 100644 --- a/gnulib-tests/test-sys_wait.h +++ b/gnulib-tests/test-sys_wait.h @@ -1,5 +1,5 @@ /* Test of macros shared between <sys/wait.h> and <stdlib.h>. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-termios.c b/gnulib-tests/test-termios.c index a6b38120..f782d38f 100644 --- a/gnulib-tests/test-termios.c +++ b/gnulib-tests/test-termios.c @@ -1,5 +1,5 @@ /* Test of <termios.h> substitute. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-thread_create.c b/gnulib-tests/test-thread_create.c index 12ba79d9..c6dbc7b3 100644 --- a/gnulib-tests/test-thread_create.c +++ b/gnulib-tests/test-thread_create.c @@ -1,5 +1,5 @@ /* Test of gl_thread_create () macro. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-thread_self.c b/gnulib-tests/test-thread_self.c index 3629a82c..1d2d05e0 100644 --- a/gnulib-tests/test-thread_self.c +++ b/gnulib-tests/test-thread_self.c @@ -1,5 +1,5 @@ /* Test of gl_thread_self () macro. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-time.c b/gnulib-tests/test-time.c index cb39c3bb..25bdcf0a 100644 --- a/gnulib-tests/test-time.c +++ b/gnulib-tests/test-time.c @@ -1,5 +1,5 @@ /* Test of <time.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-tls.c b/gnulib-tests/test-tls.c index 9eb0b139..bee567ed 100644 --- a/gnulib-tests/test-tls.c +++ b/gnulib-tests/test-tls.c @@ -1,5 +1,5 @@ /* Test of thread-local storage in multithreaded situations. - Copyright (C) 2005, 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-u64.c b/gnulib-tests/test-u64.c index b70bef67..4b77a7fd 100644 --- a/gnulib-tests/test-u64.c +++ b/gnulib-tests/test-u64.c @@ -1,5 +1,5 @@ /* Test of <u64.h> - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-uname.c b/gnulib-tests/test-uname.c index c474754d..8a01a820 100644 --- a/gnulib-tests/test-uname.c +++ b/gnulib-tests/test-uname.c @@ -1,5 +1,5 @@ /* Test of system information. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-unistd.c b/gnulib-tests/test-unistd.c index 6d3fa00f..930b5e21 100644 --- a/gnulib-tests/test-unistd.c +++ b/gnulib-tests/test-unistd.c @@ -1,5 +1,5 @@ /* Test of <unistd.h> substitute. - Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-unlink.c b/gnulib-tests/test-unlink.c index 05c93ca4..bfb53124 100644 --- a/gnulib-tests/test-unlink.c +++ b/gnulib-tests/test-unlink.c @@ -1,5 +1,5 @@ /* Tests of unlink. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-unlink.h b/gnulib-tests/test-unlink.h index 3b5adff0..f843f4d9 100644 --- a/gnulib-tests/test-unlink.h +++ b/gnulib-tests/test-unlink.h @@ -1,5 +1,5 @@ /* Tests of unlink. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-unlinkat.c b/gnulib-tests/test-unlinkat.c index 1cfa0340..e21427ac 100644 --- a/gnulib-tests/test-unlinkat.c +++ b/gnulib-tests/test-unlinkat.c @@ -1,5 +1,5 @@ /* Tests of unlinkat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-unsetenv.c b/gnulib-tests/test-unsetenv.c index 50600a90..235e1858 100644 --- a/gnulib-tests/test-unsetenv.c +++ b/gnulib-tests/test-unsetenv.c @@ -1,5 +1,5 @@ /* Tests of unsetenv. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh index 759a9372..c9398e3b 100755 --- a/gnulib-tests/test-update-copyright.sh +++ b/gnulib-tests/test-update-copyright.sh @@ -1,6 +1,6 @@ #!/bin/sh # Test suite for update-copyright. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-userspec.c b/gnulib-tests/test-userspec.c index 437049c4..638aa92e 100644 --- a/gnulib-tests/test-userspec.c +++ b/gnulib-tests/test-userspec.c @@ -1,5 +1,5 @@ /* Test userspec.c - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,30 +45,30 @@ struct test static struct test T[] = { - { "", -1, -1, "", "", NULL}, - { ":", -1, -1, "", "", NULL}, - { "0:0", 0, 0, "", "", NULL}, - { ":1", -1, 1, "", "", NULL}, - { "1", 1, -1, "", "", NULL}, - { ":+0", -1, 0, "", "", NULL}, - { "22:42", 22, 42, "", "", NULL}, + { "", -1, -1, "", "", NULL}, + { ":", -1, -1, "", "", NULL}, + { "+0:+0", 0, 0, "", "", NULL}, + { ":+1", -1, 1, "", "", NULL}, + { "+1", 1, -1, "", "", NULL}, + { ":+0", -1, 0, "", "", NULL}, + { "+22:+42", 22, 42, "", "", NULL}, /* (uint32_t)-1 should be invalid everywhere */ - { "4294967295:4294967295", 0, 0, NULL, NULL, "invalid user"}, + { "+4294967295:+4294967295", 0, 0, NULL, NULL, "invalid user"}, /* likewise, but with only the group being invalid */ - { "0:4294967295", 0, 0, NULL, NULL, "invalid group"}, - { ":4294967295", 0, 0, NULL, NULL, "invalid group"}, + { "+0:+4294967295", 0, 0, NULL, NULL, "invalid group"}, + { ":+4294967295", 0, 0, NULL, NULL, "invalid group"}, /* and only the user being invalid */ - { "4294967295:0", 0, 0, NULL, NULL, "invalid user"}, + { "+4294967295:+0", 0, 0, NULL, NULL, "invalid user"}, /* and using 2^32 */ - { "4294967296:4294967296", 0, 0, NULL, NULL, "invalid user"}, - { "0:4294967296", 0, 0, NULL, NULL, "invalid group"}, - { ":4294967296", 0, 0, NULL, NULL, "invalid group"}, - { "4294967296:0", 0, 0, NULL, NULL, "invalid user"}, + { "+4294967296:+4294967296", 0, 0, NULL, NULL, "invalid user"}, + { "+0:+4294967296", 0, 0, NULL, NULL, "invalid group"}, + { ":+4294967296", 0, 0, NULL, NULL, "invalid group"}, + { "+4294967296:+0", 0, 0, NULL, NULL, "invalid user"}, /* numeric user and no group is invalid */ - { "4294967295:", 0, 0, NULL, NULL, "invalid spec"}, - { "4294967296:", 0, 0, NULL, NULL, "invalid spec"}, - { "1:", 0, 0, NULL, NULL, "invalid spec"}, - { "+0:", 0, 0, NULL, NULL, "invalid spec"}, + { "+4294967295:", 0, 0, NULL, NULL, "invalid spec"}, + { "+4294967296:", 0, 0, NULL, NULL, "invalid spec"}, + { "+1:", 0, 0, NULL, NULL, "invalid spec"}, + { "+0:", 0, 0, NULL, NULL, "invalid spec"}, /* "username:" must expand to UID:GID where GID is username's login group */ /* Add an entry like the following to the table, if possible. diff --git a/gnulib-tests/test-utimens-common.h b/gnulib-tests/test-utimens-common.h index ff1b92b7..c04d8dd9 100644 --- a/gnulib-tests/test-utimens-common.h +++ b/gnulib-tests/test-utimens-common.h @@ -1,5 +1,5 @@ /* Test of file timestamp modification functions. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-utimens.c b/gnulib-tests/test-utimens.c index 04ffe72c..7b72ef3f 100644 --- a/gnulib-tests/test-utimens.c +++ b/gnulib-tests/test-utimens.c @@ -1,5 +1,5 @@ /* Tests of utimens. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-utimens.h b/gnulib-tests/test-utimens.h index fd696a0d..82009fa5 100644 --- a/gnulib-tests/test-utimens.h +++ b/gnulib-tests/test-utimens.h @@ -1,5 +1,5 @@ /* Test of file timestamp modification functions. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-utimensat.c b/gnulib-tests/test-utimensat.c index cdc18b95..174cc58e 100644 --- a/gnulib-tests/test-utimensat.c +++ b/gnulib-tests/test-utimensat.c @@ -1,5 +1,5 @@ /* Tests of utimensat. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-vasnprintf.c b/gnulib-tests/test-vasnprintf.c index 2cbad5dc..8ff59006 100644 --- a/gnulib-tests/test-vasnprintf.c +++ b/gnulib-tests/test-vasnprintf.c @@ -1,5 +1,5 @@ /* Test of vasnprintf() and asnprintf() functions. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-vasprintf-posix.c b/gnulib-tests/test-vasprintf-posix.c index 6a28cffb..585d3a3f 100644 --- a/gnulib-tests/test-vasprintf-posix.c +++ b/gnulib-tests/test-vasprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vasprintf() and asprintf() functions. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +46,7 @@ have_minus_zero () #ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } #else @@ -570,13 +570,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) ASSERT (retval == strlen (result)); free (result); } - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: - Application Architecture. - Table 5-2 "Floating-Point Register Encodings" - Figure 5-6 "Memory to Floating-Point Register Data Translation" - */ + /* asprintf should print something for noncanonical values. */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; @@ -584,10 +578,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%La %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Infinity. */ @@ -597,10 +589,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%La %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Zero. */ @@ -610,10 +600,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%La %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Unnormalized number. */ @@ -623,10 +611,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%La %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Denormal. */ @@ -636,10 +622,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%La %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } #endif @@ -1384,13 +1368,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) ASSERT (retval == strlen (result)); free (result); } - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: - Application Architecture. - Table 5-2 "Floating-Point Register Encodings" - Figure 5-6 "Memory to Floating-Point Register Data Translation" - */ + /* asprintf should print something for noncanonical values. */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; @@ -1398,10 +1376,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Infinity. */ @@ -1411,10 +1387,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Zero. */ @@ -1424,10 +1398,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Unnormalized number. */ @@ -1437,10 +1409,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Denormal. */ @@ -1450,10 +1420,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } #endif @@ -2406,13 +2374,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) ASSERT (retval == strlen (result)); free (result); } - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: - Application Architecture. - Table 5-2 "Floating-Point Register Encodings" - Figure 5-6 "Memory to Floating-Point Register Data Translation" - */ + /* asprintf should print something for noncanonical values. */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; @@ -2420,10 +2382,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Infinity. */ @@ -2433,10 +2393,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Zero. */ @@ -2446,10 +2404,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Unnormalized number. */ @@ -2459,10 +2415,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Denormal. */ @@ -2472,10 +2426,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } #endif @@ -3160,13 +3112,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) ASSERT (retval == strlen (result)); free (result); } - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: - Application Architecture. - Table 5-2 "Floating-Point Register Encodings" - Figure 5-6 "Memory to Floating-Point Register Data Translation" - */ + /* asprintf should print something for noncanonical values. */ { /* Pseudo-NaN. */ static union { unsigned int word[4]; long double value; } x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; @@ -3174,10 +3120,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Infinity. */ @@ -3187,10 +3131,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Zero. */ @@ -3200,10 +3142,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Unnormalized number. */ @@ -3213,10 +3153,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } { /* Pseudo-Denormal. */ @@ -3226,10 +3164,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) int retval = my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strlen (result) >= 3 + 3 - && strisnan (result, 0, strlen (result) - 3, 0) - && strcmp (result + strlen (result) - 3, " 33") == 0); ASSERT (retval == strlen (result)); + ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); free (result); } #endif diff --git a/gnulib-tests/test-vasprintf.c b/gnulib-tests/test-vasprintf.c index 9bfffbdc..b3042759 100644 --- a/gnulib-tests/test-vasprintf.c +++ b/gnulib-tests/test-vasprintf.c @@ -1,5 +1,5 @@ /* Test of vasprintf() and asprintf() functions. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-vc-list-files-cvs.sh b/gnulib-tests/test-vc-list-files-cvs.sh index 51d35604..a2a237f0 100755 --- a/gnulib-tests/test-vc-list-files-cvs.sh +++ b/gnulib-tests/test-vc-list-files-cvs.sh @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for vc-list-files -# Copyright (C) 2008-2014 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 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/gnulib-tests/test-vc-list-files-git.sh b/gnulib-tests/test-vc-list-files-git.sh index b31f99a5..2882d328 100755 --- a/gnulib-tests/test-vc-list-files-git.sh +++ b/gnulib-tests/test-vc-list-files-git.sh @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for vc-list-files -# Copyright (C) 2008-2014 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 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/gnulib-tests/test-verify.c b/gnulib-tests/test-verify.c index 2a41eb11..640dc426 100644 --- a/gnulib-tests/test-verify.c +++ b/gnulib-tests/test-verify.c @@ -1,6 +1,6 @@ /* Test the "verify" module. - Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-version-etc.c b/gnulib-tests/test-version-etc.c index d94f63f8..1f202e83 100644 --- a/gnulib-tests/test-version-etc.c +++ b/gnulib-tests/test-version-etc.c @@ -1,5 +1,5 @@ /* Test suite for version-etc. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 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/gnulib-tests/test-version-etc.sh b/gnulib-tests/test-version-etc.sh index c41f7ac5..0ad212b7 100755 --- a/gnulib-tests/test-version-etc.sh +++ b/gnulib-tests/test-version-etc.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for version-etc. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-vfprintf-posix.c b/gnulib-tests/test-vfprintf-posix.c index c55c6eda..ab970916 100644 --- a/gnulib-tests/test-vfprintf-posix.c +++ b/gnulib-tests/test-vfprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-vprintf-posix.c b/gnulib-tests/test-vprintf-posix.c index 78f3cf7c..66c717d3 100644 --- a/gnulib-tests/test-vprintf-posix.c +++ b/gnulib-tests/test-vprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-wchar.c b/gnulib-tests/test-wchar.c index d9807ec7..e857ab5d 100644 --- a/gnulib-tests/test-wchar.c +++ b/gnulib-tests/test-wchar.c @@ -1,5 +1,5 @@ /* Test of <wchar.h> substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-wcrtomb-w32.c b/gnulib-tests/test-wcrtomb-w32.c index 793bbce9..d8bcf750 100644 --- a/gnulib-tests/test-wcrtomb-w32.c +++ b/gnulib-tests/test-wcrtomb-w32.c @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-wcrtomb.c b/gnulib-tests/test-wcrtomb.c index 5b14050c..902a4e19 100644 --- a/gnulib-tests/test-wcrtomb.c +++ b/gnulib-tests/test-wcrtomb.c @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-wctype-h.c b/gnulib-tests/test-wctype-h.c index 904a1851..7466e595 100644 --- a/gnulib-tests/test-wctype-h.c +++ b/gnulib-tests/test-wctype-h.c @@ -1,5 +1,5 @@ /* Test of <wctype.h> substitute. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-wcwidth.c b/gnulib-tests/test-wcwidth.c index d571a791..9fad7852 100644 --- a/gnulib-tests/test-wcwidth.c +++ b/gnulib-tests/test-wcwidth.c @@ -1,5 +1,5 @@ /* Test of wcwidth() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-write.c b/gnulib-tests/test-write.c index a722429d..6c1ea0c0 100644 --- a/gnulib-tests/test-write.c +++ b/gnulib-tests/test-write.c @@ -1,5 +1,5 @@ /* Test the write() function. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-xalloc-die.c b/gnulib-tests/test-xalloc-die.c index baf79242..16d8636a 100644 --- a/gnulib-tests/test-xalloc-die.c +++ b/gnulib-tests/test-xalloc-die.c @@ -1,5 +1,5 @@ /* Test of xalloc_die() function. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-xalloc-die.sh b/gnulib-tests/test-xalloc-die.sh index cf2ad40a..76cdecde 100755 --- a/gnulib-tests/test-xalloc-die.sh +++ b/gnulib-tests/test-xalloc-die.sh @@ -1,6 +1,6 @@ #!/bin/sh # Test suite for xalloc_die. -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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/gnulib-tests/test-xfprintf-posix.c b/gnulib-tests/test-xfprintf-posix.c index e9e56972..6501e427 100644 --- a/gnulib-tests/test-xfprintf-posix.c +++ b/gnulib-tests/test-xfprintf-posix.c @@ -1,5 +1,5 @@ /* Test of error-checking xfprintf() function with POSIX compatible formatting. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-xprintf-posix.c b/gnulib-tests/test-xprintf-posix.c index 87dfbf64..bc8a700a 100644 --- a/gnulib-tests/test-xprintf-posix.c +++ b/gnulib-tests/test-xprintf-posix.c @@ -1,5 +1,5 @@ /* Test of error-checking xprintf() function with POSIX compatible formatting. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-xstrtol.c b/gnulib-tests/test-xstrtol.c index c3670cc7..990e1dbe 100644 --- a/gnulib-tests/test-xstrtol.c +++ b/gnulib-tests/test-xstrtol.c @@ -1,5 +1,5 @@ /* Test of xstrtol module. - Copyright (C) 1995-1996, 1998-2001, 2003-2014 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 1998-2001, 2003-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-xvasprintf.c b/gnulib-tests/test-xvasprintf.c index 45da3e48..9e33844b 100644 --- a/gnulib-tests/test-xvasprintf.c +++ b/gnulib-tests/test-xvasprintf.c @@ -1,5 +1,5 @@ /* Test of xvasprintf() and xasprintf() functions. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-yesno.c b/gnulib-tests/test-yesno.c index 22c45f2f..038065b5 100644 --- a/gnulib-tests/test-yesno.c +++ b/gnulib-tests/test-yesno.c @@ -1,5 +1,5 @@ /* Test of yesno module. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/test-yesno.sh b/gnulib-tests/test-yesno.sh index 9d195413..8bc50a88 100755 --- a/gnulib-tests/test-yesno.sh +++ b/gnulib-tests/test-yesno.sh @@ -49,6 +49,14 @@ echo yes | test-yesno 2 > out1.tmp || fail=1 LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1 cmp xout.tmp out.tmp || fail=1 +# Test for behavior with no EOL at EOF +cat <<EOF > xout.tmp +Y +EOF +printf y | test-yesno 1 > out1.tmp || fail=1 +LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1 +cmp xout.tmp out.tmp || fail=1 + # Test for behavior on EOF cat <<EOF > xout.tmp N diff --git a/gnulib-tests/unistr/test-strncat.h b/gnulib-tests/unistr/test-strncat.h index 30935b3f..fc4494e2 100644 --- a/gnulib-tests/unistr/test-strncat.h +++ b/gnulib-tests/unistr/test-strncat.h @@ -1,5 +1,5 @@ /* Test of uN_strncat() functions. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/unistr/test-u8-mbtoucr.c b/gnulib-tests/unistr/test-u8-mbtoucr.c index a5511301..7f02e8b8 100644 --- a/gnulib-tests/unistr/test-u8-mbtoucr.c +++ b/gnulib-tests/unistr/test-u8-mbtoucr.c @@ -1,5 +1,5 @@ /* Test of u8_mbtoucr() function. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/unistr/test-u8-uctomb.c b/gnulib-tests/unistr/test-u8-uctomb.c index cec9216e..f586f04d 100644 --- a/gnulib-tests/unistr/test-u8-uctomb.c +++ b/gnulib-tests/unistr/test-u8-uctomb.c @@ -1,5 +1,5 @@ /* Test of u8_uctomb() function. - Copyright (C) 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/uniwidth/test-uc_width.c b/gnulib-tests/uniwidth/test-uc_width.c index 21e0db67..6b1e7acb 100644 --- a/gnulib-tests/uniwidth/test-uc_width.c +++ b/gnulib-tests/uniwidth/test-uc_width.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/uniwidth/test-uc_width2.c b/gnulib-tests/uniwidth/test-uc_width2.c index 9e9cea22..0ef99637 100644 --- a/gnulib-tests/uniwidth/test-uc_width2.c +++ b/gnulib-tests/uniwidth/test-uc_width2.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/uniwidth/test-uc_width2.sh b/gnulib-tests/uniwidth/test-uc_width2.sh index 9307f33b..1463d345 100755 --- a/gnulib-tests/uniwidth/test-uc_width2.sh +++ b/gnulib-tests/uniwidth/test-uc_width2.sh @@ -28,10 +28,12 @@ cat > uc_width.ok <<\EOF 05C6 A 05C7 0 05C8..05FF A -0600..0603 0 -0604..060F A +0600..0605 0 +0606..060F A 0610..061A 0 -061B..064A A +061B A +061C 0 +061D..064A A 064B..065F 0 0660..066F A 0670 0 @@ -63,8 +65,8 @@ cat > uc_width.ok <<\EOF 0829..082D 0 082E..0858 A 0859..085B 0 -085C..08FF A -0900..0902 0 +085C..08E2 A +08E3..0902 0 0903..0939 A 093A 0 093B A @@ -135,7 +137,9 @@ cat > uc_width.ok <<\EOF 0BC0 0 0BC1..0BCC A 0BCD 0 -0BCE..0C3D A +0BCE..0BFF A +0C00 0 +0C01..0C3D A 0C3E..0C40 0 0C41..0C45 A 0C46..0C48 0 @@ -145,13 +149,17 @@ cat > uc_width.ok <<\EOF 0C55..0C56 0 0C57..0C61 A 0C62..0C63 0 -0C64..0CBB A +0C64..0C80 A +0C81 0 +0C82..0CBB A 0CBC 0 0CBD..0CCB A 0CCC..0CCD 0 0CCE..0CE1 A 0CE2..0CE3 0 -0CE4..0D40 A +0CE4..0D00 A +0D01 0 +0D02..0D40 A 0D41..0D44 0 0D45..0D4C A 0D4D 0 @@ -242,8 +250,8 @@ cat > uc_width.ok <<\EOF 17D4..17DC A 17DD 0 17DE..180A A -180B..180D 0 -180E..18A8 A +180B..180E 0 +180F..18A8 A 18A9 0 18AA..191F A 1920..1922 0 @@ -255,7 +263,9 @@ cat > uc_width.ok <<\EOF 1939..193B 0 193C..1A16 A 1A17..1A18 0 -1A19..1A55 A +1A19..1A1A A +1A1B 0 +1A1C..1A55 A 1A56 0 1A57 A 1A58..1A5E 0 @@ -269,7 +279,9 @@ cat > uc_width.ok <<\EOF 1A73..1A7C 0 1A7D..1A7E A 1A7F 0 -1A80..1AFF A +1A80..1AAF A +1AB0..1ABE 0 +1ABF..1AFF A 1B00..1B03 0 1B04..1B33 A 1B34 0 @@ -287,7 +299,9 @@ cat > uc_width.ok <<\EOF 1BA2..1BA5 0 1BA6..1BA7 A 1BA8..1BA9 0 -1BAA..1BE5 A +1BAA A +1BAB..1BAD 0 +1BAE..1BE5 A 1BE6 0 1BE7 A 1BE8..1BE9 0 @@ -307,9 +321,13 @@ cat > uc_width.ok <<\EOF 1CE2..1CE8 0 1CE9..1CEC A 1CED 0 -1CEE..1DBF A -1DC0..1DE6 0 -1DE7..1DFB A +1CEE..1CF3 A +1CF4 0 +1CF5..1CF7 A +1CF8..1CF9 0 +1CFA..1DBF A +1DC0..1DF5 0 +1DF6..1DFB A 1DFC..1DFF 0 1E00..200A A 200B..200F 0 @@ -317,8 +335,8 @@ cat > uc_width.ok <<\EOF 202A..202E 0 202F..205F A 2060..2064 0 -2065..2069 A -206A..206F 0 +2065 A +2066..206F 0 2070..20A8 A 20A9 1 20AA..20CF A @@ -333,8 +351,8 @@ cat > uc_width.ok <<\EOF 2DE0..2DFF 0 2E00..2E7F A 2E80..3029 2 -302A..302F 0 -3030..303E 2 +302A..302D 0 +302E..303E 2 303F A 3040..3098 2 3099..309A 0 @@ -343,9 +361,11 @@ cat > uc_width.ok <<\EOF 4E00..A4CF 2 A4D0..A66E A A66F..A672 0 -A673..A67B A -A67C..A67D 0 -A67E..A6EF A +A673 A +A674..A67D 0 +A67E..A69D A +A69E..A69F 0 +A6A0..A6EF A A6F0..A6F1 0 A6F2..A801 A A802 0 @@ -371,7 +391,9 @@ A9B4..A9B5 A A9B6..A9B9 0 A9BA..A9BB A A9BC 0 -A9BD..AA28 A +A9BD..A9E4 A +A9E5 0 +A9E6..AA28 A AA29..AA2E 0 AA2F..AA30 A AA31..AA32 0 @@ -381,7 +403,9 @@ AA37..AA42 A AA43 0 AA44..AA4B A AA4C 0 -AA4D..AAAF A +AA4D..AA7B A +AA7C 0 +AA7D..AAAF A AAB0 0 AAB1 A AAB2..AAB4 0 @@ -391,7 +415,11 @@ AAB9..AABD A AABE..AABF 0 AAC0 A AAC1 0 -AAC2..ABE4 A +AAC2..AAEB A +AAEC..AAED 0 +AAEE..AAF5 A +AAF6 0 +AAF7..ABE4 A ABE5 0 ABE6..ABE7 A ABE8 0 @@ -406,8 +434,7 @@ FB1E 0 FB1F..FDFF A FE00..FE0F 0 FE10..FE1F 2 -FE20..FE26 0 -FE27..FE2F A +FE20..FE2F 0 FE30..FE6F 2 FE70..FEFE A FEFF 0 @@ -418,7 +445,11 @@ FFE7..FFF8 1 FFF9..FFFB 0 FFFC..101FC 1 101FD 0 -101FE..10A00 1 +101FE..102DF 1 +102E0 0 +102E1..10375 1 +10376..1037A 0 +1037B..10A00 1 10A01..10A03 0 10A04 1 10A05..10A06 0 @@ -428,19 +459,101 @@ FFFC..101FC 1 10A38..10A3A 0 10A3B..10A3E 1 10A3F 0 -10A40..11000 1 +10A40..10AE4 1 +10AE5..10AE6 0 +10AE7..11000 1 11001 0 11002..11037 1 11038..11046 0 -11047..1107F 1 -11080..11081 0 +11047..1107E 1 +1107F..11081 0 11082..110B2 1 110B3..110B6 0 110B7..110B8 1 110B9..110BA 0 110BB..110BC 1 110BD 0 -110BE..1D166 1 +110BE..110FF 1 +11100..11102 0 +11103..11126 1 +11127..1112B 0 +1112C 1 +1112D..11134 0 +11135..11172 1 +11173 0 +11174..1117F 1 +11180..11181 0 +11182..111B5 1 +111B6..111BE 0 +111BF..111C9 1 +111CA..111CC 0 +111CD..1122E 1 +1122F..11231 0 +11232..11233 1 +11234 0 +11235 1 +11236..11237 0 +11238..112DE 1 +112DF 0 +112E0..112E2 1 +112E3..112EA 0 +112EB..112FF 1 +11300..11301 0 +11302..1133B 1 +1133C 0 +1133D..1133F 1 +11340 0 +11341..11365 1 +11366..1136C 0 +1136D..1136F 1 +11370..11374 0 +11375..114B2 1 +114B3..114B8 0 +114B9 1 +114BA 0 +114BB..114BE 1 +114BF..114C0 0 +114C1 1 +114C2..114C3 0 +114C4..115B1 1 +115B2..115B5 0 +115B6..115BB 1 +115BC..115BD 0 +115BE 1 +115BF..115C0 0 +115C1..115DB 1 +115DC..115DD 0 +115DE..11632 1 +11633..1163A 0 +1163B..1163C 1 +1163D 0 +1163E 1 +1163F..11640 0 +11641..116AA 1 +116AB 0 +116AC 1 +116AD 0 +116AE..116AF 1 +116B0..116B5 0 +116B6 1 +116B7 0 +116B8..1171C 1 +1171D..1171F 0 +11720..11721 1 +11722..11725 0 +11726 1 +11727..1172B 0 +1172C..16AEF 1 +16AF0..16AF4 0 +16AF5..16B2F 1 +16B30..16B36 0 +16B37..16F8E 1 +16F8F..16F92 0 +16F93..1BC9C 1 +1BC9D..1BC9E 0 +1BC9F 1 +1BCA0..1BCA3 0 +1BCA4..1D166 1 1D167..1D169 0 1D16A..1D172 1 1D173..1D182 0 @@ -450,7 +563,21 @@ FFFC..101FC 1 1D1AA..1D1AD 0 1D1AE..1D241 1 1D242..1D244 0 -1D245..1FFFF 1 +1D245..1D9FF 1 +1DA00..1DA36 0 +1DA37..1DA3A 1 +1DA3B..1DA6C 0 +1DA6D..1DA74 1 +1DA75 0 +1DA76..1DA83 1 +1DA84 0 +1DA85..1DA9A 1 +1DA9B..1DA9F 0 +1DAA0 1 +1DAA1..1DAAF 0 +1DAB0..1E8CF 1 +1E8D0..1E8D6 0 +1E8D7..1FFFF 1 20000..3FFFF 2 40000..E0000 1 E0001 0 diff --git a/gnulib-tests/unlinkdir.c b/gnulib-tests/unlinkdir.c index 157b3c4a..976b9123 100644 --- a/gnulib-tests/unlinkdir.c +++ b/gnulib-tests/unlinkdir.c @@ -1,6 +1,6 @@ /* unlinkdir.c - determine whether we can unlink directories - Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/unlinkdir.h b/gnulib-tests/unlinkdir.h index 5563131b..9a9f5fb3 100644 --- a/gnulib-tests/unlinkdir.h +++ b/gnulib-tests/unlinkdir.h @@ -1,6 +1,6 @@ /* unlinkdir.h - determine (and maybe change) whether we can unlink directories - Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/w32sock.h b/gnulib-tests/w32sock.h index b921b1bc..dace9cf7 100644 --- a/gnulib-tests/w32sock.h +++ b/gnulib-tests/w32sock.h @@ -1,6 +1,6 @@ /* w32sock.h --- internal auxiliary functions for Windows socket functions - Copyright (C) 2008-2014 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gnulib-tests/wctob.c b/gnulib-tests/wctob.c index d87d1804..3ff6c7b7 100644 --- a/gnulib-tests/wctob.c +++ b/gnulib-tests/wctob.c @@ -1,5 +1,5 @@ /* Convert wide character to unibyte character. - Copyright (C) 2008, 2010-2014 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2015 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/gnulib-tests/wctomb-impl.h b/gnulib-tests/wctomb-impl.h index 0fa170eb..41217d52 100644 --- a/gnulib-tests/wctomb-impl.h +++ b/gnulib-tests/wctomb-impl.h @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 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/gnulib-tests/wctomb.c b/gnulib-tests/wctomb.c index b3595a4d..8022aa84 100644 --- a/gnulib-tests/wctomb.c +++ b/gnulib-tests/wctomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 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/gnulib-tests/zerosize-ptr.h b/gnulib-tests/zerosize-ptr.h index db30f4b1..76418aa5 100644 --- a/gnulib-tests/zerosize-ptr.h +++ b/gnulib-tests/zerosize-ptr.h @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009-2014 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by |