Many of the C++ signature tests have not been updated regularly since a long time. I'm adding the missing declarations and also 4 new modules: inttypes-c++-tests strings-c++-tests sys_resource-c++-tests utime-h-c++-tests
Bruno
>From 89b335be47327cbfb9e6da6b0cc0c2c07bdf7e4c Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 21:38:07 +0200 Subject: [PATCH 01/16] dirent-c++-tests: Update. * tests/test-dirent-c++.cc (readdir): Declare, missing since 2011-09-13. (rewinddir): Declare, missing since 2011-09-13. (dirfd): Declare, missing since 2010-03-08. --- ChangeLog | 7 +++++++ tests/test-dirent-c++.cc | 20 ++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4605c8e..4ef1fca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-05-05 Bruno Haible <br...@clisp.org> + + dirent-c++-tests: Update. + * tests/test-dirent-c++.cc (readdir): Declare, missing since 2011-09-13. + (rewinddir): Declare, missing since 2011-09-13. + (dirfd): Declare, missing since 2010-03-08. + 2017-05-04 Bruno Haible <br...@clisp.org> argp: Fix mistake in 2017-04-23 commit. diff --git a/tests/test-dirent-c++.cc b/tests/test-dirent-c++.cc index 6292102..83ad3e8 100644 --- a/tests/test-dirent-c++.cc +++ b/tests/test-dirent-c++.cc @@ -24,14 +24,30 @@ #include "signature.h" +#if GNULIB_TEST_OPENDIR +SIGNATURE_CHECK (GNULIB_NAMESPACE::opendir, DIR *, (const char *)); +#endif + +#if GNULIB_TEST_READDIR +SIGNATURE_CHECK (GNULIB_NAMESPACE::readdir, struct dirent *, (DIR *)); +#endif + +#if GNULIB_TEST_REWINDDIR +SIGNATURE_CHECK (GNULIB_NAMESPACE::rewinddir, void, (DIR *)); +#endif + +#if GNULIB_TEST_CLOSEDIR SIGNATURE_CHECK (GNULIB_NAMESPACE::closedir, int, (DIR *)); +#endif + +#if GNULIB_TEST_DIRFD +SIGNATURE_CHECK (GNULIB_NAMESPACE::dirfd, int, (DIR *)); +#endif #if GNULIB_TEST_FDOPENDIR SIGNATURE_CHECK (GNULIB_NAMESPACE::fdopendir, DIR *, (int)); #endif -SIGNATURE_CHECK (GNULIB_NAMESPACE::opendir, DIR *, (const char *)); - #if GNULIB_TEST_SCANDIR SIGNATURE_CHECK (GNULIB_NAMESPACE::scandir, int, (const char *, struct dirent ***, -- 2.7.4
>From f33c48694d86ebd787e68aa89b65d2f24140b760 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 21:50:57 +0200 Subject: [PATCH 02/16] inttypes-c++-tests: New module. * tests/test-inttypes-c++.cc: New file. (strtoimax): Declare, missing since 2012-01-05. (strtoumax): Declare, missing since 2012-01-05. * modules/inttypes-c++-tests: New file. --- ChangeLog | 8 ++++++++ modules/inttypes-c++-tests | 18 ++++++++++++++++++ tests/test-inttypes-c++.cc | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 modules/inttypes-c++-tests create mode 100644 tests/test-inttypes-c++.cc diff --git a/ChangeLog b/ChangeLog index 4ef1fca..8f86738 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + inttypes-c++-tests: New module. + * tests/test-inttypes-c++.cc: New file. + (strtoimax): Declare, missing since 2012-01-05. + (strtoumax): Declare, missing since 2012-01-05. + * modules/inttypes-c++-tests: New file. + +2017-05-05 Bruno Haible <br...@clisp.org> + dirent-c++-tests: Update. * tests/test-dirent-c++.cc (readdir): Declare, missing since 2011-09-13. (rewinddir): Declare, missing since 2011-09-13. diff --git a/modules/inttypes-c++-tests b/modules/inttypes-c++-tests new file mode 100644 index 0000000..7f7e918 --- /dev/null +++ b/modules/inttypes-c++-tests @@ -0,0 +1,18 @@ +Files: +tests/test-inttypes-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-inttypes-c++ +check_PROGRAMS += test-inttypes-c++ +test_inttypes_c___SOURCES = test-inttypes-c++.cc +endif diff --git a/tests/test-inttypes-c++.cc b/tests/test-inttypes-c++.cc new file mode 100644 index 0000000..d0ce8c2 --- /dev/null +++ b/tests/test-inttypes-c++.cc @@ -0,0 +1,39 @@ +/* Test of <inttypes.h> substitute in C++ mode. + Copyright (C) 2010-2017 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible <br...@clisp.org>, 2017. */ + +#define GNULIB_NAMESPACE gnulib +#include <config.h> + +#include <inttypes.h> + +#include "signature.h" + + +#if GNULIB_TEST_STRTOIMAX +SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoimax, intmax_t, (const char *, char **, int)); +#endif + +#if GNULIB_TEST_STRTOUMAX +SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoumax, uintmax_t, (const char *, char **, int)); +#endif + + +int +main () +{ +} -- 2.7.4
>From b2ed664da2fad9f25f7cb960965dbb085c54dc6b Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 21:57:14 +0200 Subject: [PATCH 03/16] locale-c++-tests: Update. * tests/test-locale-c++.cc (localeconv): Declare, missing since 2012-03-25. --- ChangeLog | 6 ++++++ tests/test-locale-c++.cc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8f86738..7e95842 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + locale-c++-tests: Update. + * tests/test-locale-c++.cc (localeconv): Declare, missing since + 2012-03-25. + +2017-05-05 Bruno Haible <br...@clisp.org> + inttypes-c++-tests: New module. * tests/test-inttypes-c++.cc: New file. (strtoimax): Declare, missing since 2012-01-05. diff --git a/tests/test-locale-c++.cc b/tests/test-locale-c++.cc index 68a9b07..c876b31 100644 --- a/tests/test-locale-c++.cc +++ b/tests/test-locale-c++.cc @@ -24,6 +24,10 @@ #include "signature.h" +#if GNULIB_TEST_LOCALECONV +SIGNATURE_CHECK (GNULIB_NAMESPACE::localeconv, struct lconv *, (void)); +#endif + #if GNULIB_TEST_SETLOCALE SIGNATURE_CHECK (GNULIB_NAMESPACE::setlocale, char *, (int, const char *)); #endif -- 2.7.4
>From b42edb720e438583c0d4a8ba6863fe1717dd7b75 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 22:03:49 +0200 Subject: [PATCH 04/16] math-c++-tests: Update. * tests/test-math-c++.cc (fmaf): Declare, missing since 2011-10-17. (fma): Declare, missing since 2011-10-17. (fmal): Declare, missing since 2011-10-17. --- ChangeLog | 7 +++++++ tests/test-math-c++.cc | 38 ++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e95842..c16d843 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + math-c++-tests: Update. + * tests/test-math-c++.cc (fmaf): Declare, missing since 2011-10-17. + (fma): Declare, missing since 2011-10-17. + (fmal): Declare, missing since 2011-10-17. + +2017-05-05 Bruno Haible <br...@clisp.org> + locale-c++-tests: Update. * tests/test-locale-c++.cc (localeconv): Declare, missing since 2012-03-25. diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc index 69a5e1b..092e310 100644 --- a/tests/test-math-c++.cc +++ b/tests/test-math-c++.cc @@ -163,6 +163,17 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::floor, double, (double)); SIGNATURE_CHECK (GNULIB_NAMESPACE::floorl, long double, (long double)); #endif +#if GNULIB_TEST_FMAF +SIGNATURE_CHECK (GNULIB_NAMESPACE::fmaf, float, (float, float, float)); +#endif +#if GNULIB_TEST_FMA +SIGNATURE_CHECK (GNULIB_NAMESPACE::fma, double, (double, double, double)); +#endif +#if GNULIB_TEST_FMAL +SIGNATURE_CHECK (GNULIB_NAMESPACE::fmal, long double, + (long double, long double, long double)); +#endif + #if GNULIB_TEST_FMODF SIGNATURE_CHECK (GNULIB_NAMESPACE::fmodf, float, (float, float)); #endif @@ -221,6 +232,19 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::ldexpl, long double, (long double, int)); //SIGNATURE_CHECK (GNULIB_NAMESPACE::lgamma, double, (double)); +#if GNULIB_TEST_LOGF +SIGNATURE_CHECK (GNULIB_NAMESPACE::logf, float, (float)); +#endif +#if GNULIB_TEST_LOG +SIGNATURE_CHECK (GNULIB_NAMESPACE::log, double, (double)); +#endif +#if GNULIB_TEST_LOGL +SIGNATURE_CHECK (GNULIB_NAMESPACE::logl, long double, (long double)); +#endif + +#if GNULIB_TEST_LOG10F +SIGNATURE_CHECK (GNULIB_NAMESPACE::log10f, float, (float)); +#endif #if GNULIB_TEST_LOG10 SIGNATURE_CHECK (GNULIB_NAMESPACE::log10, double, (double)); #endif @@ -238,20 +262,6 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::log1p, double, (double)); SIGNATURE_CHECK (GNULIB_NAMESPACE::log1pl, long double, (long double)); #endif -#if GNULIB_TEST_LOGF -SIGNATURE_CHECK (GNULIB_NAMESPACE::logf, float, (float)); -#endif -#if GNULIB_TEST_LOG -SIGNATURE_CHECK (GNULIB_NAMESPACE::log, double, (double)); -#endif -#if GNULIB_TEST_LOGL -SIGNATURE_CHECK (GNULIB_NAMESPACE::logl, long double, (long double)); -#endif - -#if GNULIB_TEST_LOG10F -SIGNATURE_CHECK (GNULIB_NAMESPACE::log10f, float, (float)); -#endif - #if GNULIB_TEST_LOG2F SIGNATURE_CHECK (GNULIB_NAMESPACE::log2f, float, (float)); #endif -- 2.7.4
>From 532cc565b13b465f810458db0ed29457a4543339 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 22:08:05 +0200 Subject: [PATCH 05/16] signal-h-c++-tests: Update. * tests/test-signal-h-c++.cc (raise): Remove redundant declaration. --- ChangeLog | 5 +++++ tests/test-signal-h-c++.cc | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c16d843..b3ea749 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + signal-h-c++-tests: Update. + * tests/test-signal-h-c++.cc (raise): Remove redundant declaration. + +2017-05-05 Bruno Haible <br...@clisp.org> + math-c++-tests: Update. * tests/test-math-c++.cc (fmaf): Declare, missing since 2011-10-17. (fma): Declare, missing since 2011-10-17. diff --git a/tests/test-signal-h-c++.cc b/tests/test-signal-h-c++.cc index dfe8af8..1e8942d 100644 --- a/tests/test-signal-h-c++.cc +++ b/tests/test-signal-h-c++.cc @@ -45,7 +45,6 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::sigprocmask, int, SIGNATURE_CHECK (GNULIB_NAMESPACE::signal, _gl_function_taking_int_returning_void_t, (int, _gl_function_taking_int_returning_void_t)); -SIGNATURE_CHECK (GNULIB_NAMESPACE::raise, int, (int)); #endif #if GNULIB_TEST_SIGACTION -- 2.7.4
>From dc3abe2b784e63dd4a15986371092e49e977baa9 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 22:13:37 +0200 Subject: [PATCH 06/16] stdio-c++-tests: Update. * tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18. --- ChangeLog | 5 +++++ tests/test-stdio-c++.cc | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index b3ea749..4fa26a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + stdio-c++-tests: Update. + * tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18. + +2017-05-05 Bruno Haible <br...@clisp.org> + signal-h-c++-tests: Update. * tests/test-signal-h-c++.cc (raise): Remove redundant declaration. diff --git a/tests/test-stdio-c++.cc b/tests/test-stdio-c++.cc index f436593..fbd4fb9 100644 --- a/tests/test-stdio-c++.cc +++ b/tests/test-stdio-c++.cc @@ -131,6 +131,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::obstack_vprintf, int, (struct obstack *, const char *, va_list)); #endif +#if GNULIB_TEST_PCLOSE +SIGNATURE_CHECK (GNULIB_NAMESPACE::pclose, int, (FILE *)); +#endif + //SIGNATURE_CHECK (GNULIB_NAMESPACE::pclose, int, (FILE *)); #if GNULIB_TEST_PERROR -- 2.7.4
>From b8af9e178a2869c67b3a09b78268483f3d062015 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 22:29:18 +0200 Subject: [PATCH 07/16] stdlib-c++-tests: Update. * tests/test-stdlib-c++.cc (posix_openpt): Declare, missing since 2011-10-18. (ptsname_r): Declare, missing since 2011-11-07. (qsort_r): Declare, missing since 2014-08-29. (random, srandom, initstate, setstate): Declare, missing since 2012-01-14. (secure_getenv): Declare, missing since 2013-02-05. --- ChangeLog | 11 +++++++++++ tests/test-stdlib-c++.cc | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4fa26a2..1ab7e7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + stdlib-c++-tests: Update. + * tests/test-stdlib-c++.cc (posix_openpt): Declare, missing since + 2011-10-18. + (ptsname_r): Declare, missing since 2011-11-07. + (qsort_r): Declare, missing since 2014-08-29. + (random, srandom, initstate, setstate): Declare, missing since + 2012-01-14. + (secure_getenv): Declare, missing since 2013-02-05. + +2017-05-05 Bruno Haible <br...@clisp.org> + stdio-c++-tests: Update. * tests/test-stdio-c++.cc (pclose): Declare, missing since 2011-09-18. diff --git a/tests/test-stdlib-c++.cc b/tests/test-stdlib-c++.cc index 45a78f7..a416b85 100644 --- a/tests/test-stdlib-c++.cc +++ b/tests/test-stdlib-c++.cc @@ -85,14 +85,45 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemp, int, (char *)); SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemps, int, (char *, int)); #endif +#if GNULIB_TEST_POSIX_OPENPT +SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_openpt, int, (int)); +#endif + #if GNULIB_TEST_PTSNAME SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname, char *, (int)); #endif +#if GNULIB_TEST_PTSNAME_R +SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname_r, int, (int, char *, size_t)); +#endif + #if GNULIB_TEST_PUTENV SIGNATURE_CHECK (GNULIB_NAMESPACE::putenv, int, (char *)); #endif +#if GNULIB_TEST_QSORT_R +SIGNATURE_CHECK (GNULIB_NAMESPACE::qsort_r, void, + (void *, size_t, size_t, + int (*) (void const *, void const *, void *), void *)); +#endif + +#if GNULIB_TEST_RANDOM +SIGNATURE_CHECK (GNULIB_NAMESPACE::random, long, (void)); +#endif + +#if GNULIB_TEST_RANDOM +SIGNATURE_CHECK (GNULIB_NAMESPACE::srandom, void, (unsigned int)); +#endif + +#if GNULIB_TEST_RANDOM +SIGNATURE_CHECK (GNULIB_NAMESPACE::initstate, char *, + (unsigned int, char *, size_t)); +#endif + +#if GNULIB_TEST_RANDOM +SIGNATURE_CHECK (GNULIB_NAMESPACE::setstate, char *, (char *)); +#endif + #if GNULIB_TEST_RANDOM_R SIGNATURE_CHECK (GNULIB_NAMESPACE::random_r, int, (struct random_data *, int32_t *)); @@ -125,6 +156,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::realpath, char *, (const char *, char *)); SIGNATURE_CHECK (GNULIB_NAMESPACE::rpmatch, int, (const char *)); #endif +#if GNULIB_TEST_SECURE_GETENV +SIGNATURE_CHECK (GNULIB_NAMESPACE::secure_getenv, char *, (char const *)); +#endif + #if GNULIB_TEST_SETENV SIGNATURE_CHECK (GNULIB_NAMESPACE::setenv, int, (const char *, const char *, int)); -- 2.7.4
>From ec17d7520f3904e92aff7d09a4e6b73c5616150a Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 22:36:48 +0200 Subject: [PATCH 08/16] string-c++-tests: Update. * tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15. (ffsll): Declare, missing since 2011-07-15. --- ChangeLog | 6 ++++++ tests/test-string-c++.cc | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1ab7e7f..4a9d1a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + string-c++-tests: Update. + * tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15. + (ffsll): Declare, missing since 2011-07-15. + +2017-05-05 Bruno Haible <br...@clisp.org> + stdlib-c++-tests: Update. * tests/test-stdlib-c++.cc (posix_openpt): Declare, missing since 2011-10-18. diff --git a/tests/test-string-c++.cc b/tests/test-string-c++.cc index 4424f5d..789a269 100644 --- a/tests/test-string-c++.cc +++ b/tests/test-string-c++.cc @@ -24,6 +24,14 @@ #include "signature.h" +#if GNULIB_TEST_FFSL +SIGNATURE_CHECK (GNULIB_NAMESPACE::ffsl, int, (long int)); +#endif + +#if GNULIB_TEST_FFSLL +SIGNATURE_CHECK (GNULIB_NAMESPACE::ffsll, int, (long long int)); +#endif + #if GNULIB_TEST_MEMCHR SIGNATURE_CHECK (GNULIB_NAMESPACE::memchr, void *, (void const *, int, size_t)); -- 2.7.4
>From e31d3f5ceaa879fa7bc9490ddd8c9519b6c65d27 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 22:40:19 +0200 Subject: [PATCH 09/16] strings-c++-tests: New module. * tests/test-strings-c++.cc: New file. (ffs): Declare, missing since 2011-07-12. * modules/strings-c++-tests: New file. --- ChangeLog | 7 +++++++ modules/strings-c++-tests | 18 ++++++++++++++++++ tests/test-strings-c++.cc | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 modules/strings-c++-tests create mode 100644 tests/test-strings-c++.cc diff --git a/ChangeLog b/ChangeLog index 4a9d1a1..cb7257a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + strings-c++-tests: New module. + * tests/test-strings-c++.cc: New file. + (ffs): Declare, missing since 2011-07-12. + * modules/strings-c++-tests: New file. + +2017-05-05 Bruno Haible <br...@clisp.org> + string-c++-tests: Update. * tests/test-string-c++.cc (ffsl): Declare, missing since 2011-07-15. (ffsll): Declare, missing since 2011-07-15. diff --git a/modules/strings-c++-tests b/modules/strings-c++-tests new file mode 100644 index 0000000..485b701 --- /dev/null +++ b/modules/strings-c++-tests @@ -0,0 +1,18 @@ +Files: +tests/test-strings-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-strings-c++ +check_PROGRAMS += test-strings-c++ +test_strings_c___SOURCES = test-strings-c++.cc +endif diff --git a/tests/test-strings-c++.cc b/tests/test-strings-c++.cc new file mode 100644 index 0000000..ba33ead --- /dev/null +++ b/tests/test-strings-c++.cc @@ -0,0 +1,35 @@ +/* Test of <strings.h> substitute in C++ mode. + Copyright (C) 2010-2017 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible <br...@clisp.org>, 2017. */ + +#define GNULIB_NAMESPACE gnulib +#include <config.h> + +#include <strings.h> + +#include "signature.h" + + +#if GNULIB_TEST_FFS +SIGNATURE_CHECK (GNULIB_NAMESPACE::ffs, int, (int)); +#endif + + +int +main () +{ +} -- 2.7.4
>From f614b66a4caa8ec48a587f87c40139cfc69707af Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 22:43:41 +0200 Subject: [PATCH 10/16] sys_resource-c++-tests: New module. * tests/test-sys_resource-c++.cc: New file. (getrusage): Declare, missing since 2012-04-13. * modules/sys_resource-c++-tests: New file. --- ChangeLog | 7 +++++++ modules/sys_resource-c++-tests | 18 ++++++++++++++++++ tests/test-sys_resource-c++.cc | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 modules/sys_resource-c++-tests create mode 100644 tests/test-sys_resource-c++.cc diff --git a/ChangeLog b/ChangeLog index cb7257a..f3513f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + sys_resource-c++-tests: New module. + * tests/test-sys_resource-c++.cc: New file. + (getrusage): Declare, missing since 2012-04-13. + * modules/sys_resource-c++-tests: New file. + +2017-05-05 Bruno Haible <br...@clisp.org> + strings-c++-tests: New module. * tests/test-strings-c++.cc: New file. (ffs): Declare, missing since 2011-07-12. diff --git a/modules/sys_resource-c++-tests b/modules/sys_resource-c++-tests new file mode 100644 index 0000000..89c9893 --- /dev/null +++ b/modules/sys_resource-c++-tests @@ -0,0 +1,18 @@ +Files: +tests/test-sys_resource-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-sys_resource-c++ +check_PROGRAMS += test-sys_resource-c++ +test_sys_resource_c___SOURCES = test-sys_resource-c++.cc +endif diff --git a/tests/test-sys_resource-c++.cc b/tests/test-sys_resource-c++.cc new file mode 100644 index 0000000..25d476c --- /dev/null +++ b/tests/test-sys_resource-c++.cc @@ -0,0 +1,35 @@ +/* Test of <sys/resource.h> substitute in C++ mode. + Copyright (C) 2010-2017 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible <br...@clisp.org>, 2017. */ + +#define GNULIB_NAMESPACE gnulib +#include <config.h> + +#include <sys/resource.h> + +#include "signature.h" + + +#if GNULIB_TEST_GETRUSAGE +SIGNATURE_CHECK (GNULIB_NAMESPACE::getrusage, int, (int, struct rusage *)); +#endif + + +int +main () +{ +} -- 2.7.4
>From 8f4aa684418e05577901b64321f91784d2d70f3e Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 23:04:27 +0200 Subject: [PATCH 11/16] time-c++-tests: Update. * tests/test-time-c++.cc (tzset): Declare, missing since 2017-05-01. (localtime, gmtime): Declare, missing since 2017-04-30. (ctime): Declare, missing since 2017-04-30. (strftime): Declare, missing since 2017-04-30. (tzalloc, tzfree, localtime_rz, mktime_z): Declare, missing since 2015-07-24. --- ChangeLog | 10 ++++++++++ tests/test-time-c++.cc | 29 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/ChangeLog b/ChangeLog index f3513f2..4ba9ee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + time-c++-tests: Update. + * tests/test-time-c++.cc (tzset): Declare, missing since 2017-05-01. + (localtime, gmtime): Declare, missing since 2017-04-30. + (ctime): Declare, missing since 2017-04-30. + (strftime): Declare, missing since 2017-04-30. + (tzalloc, tzfree, localtime_rz, mktime_z): Declare, missing since + 2015-07-24. + +2017-05-05 Bruno Haible <br...@clisp.org> + sys_resource-c++-tests: New module. * tests/test-sys_resource-c++.cc: New file. (getrusage): Declare, missing since 2012-04-13. diff --git a/tests/test-time-c++.cc b/tests/test-time-c++.cc index 0eb6982..09f375c 100644 --- a/tests/test-time-c++.cc +++ b/tests/test-time-c++.cc @@ -29,6 +29,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::nanosleep, int, (struct timespec const *, struct timespec *)); #endif +#if GNULIB_TEST_TZSET +SIGNATURE_CHECK (GNULIB_NAMESPACE::tzset, void, (void)); +#endif + #if GNULIB_TEST_MKTIME SIGNATURE_CHECK (GNULIB_NAMESPACE::mktime, time_t, (struct tm *)); #endif @@ -41,11 +45,36 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::gmtime_r, struct tm *, (time_t const *, struct tm *)); #endif +#if GNULIB_TEST_LOCALTIME +SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime, struct tm *, (time_t const *)); +#endif + +#if 0 +SIGNATURE_CHECK (GNULIB_NAMESPACE::gmtime, struct tm *, (time_t const *)); +#endif + #if GNULIB_TEST_STRPTIME SIGNATURE_CHECK (GNULIB_NAMESPACE::strptime, char *, (char const *, char const *, struct tm *)); #endif +#if GNULIB_TEST_CTIME +SIGNATURE_CHECK (GNULIB_NAMESPACE::ctime, char *, (time_t const *)); +#endif + +#if GNULIB_TEST_STRFTIME +SIGNATURE_CHECK (GNULIB_NAMESPACE::strftime, size_t, + (char *, size_t, const char *, const struct tm *)); +#endif + +#if GNULIB_TEST_TIMERZ +SIGNATURE_CHECK (GNULIB_NAMESPACE::tzalloc, timezone_t, (char const *)); +SIGNATURE_CHECK (GNULIB_NAMESPACE::tzfree, void, (timezone_t)); +SIGNATURE_CHECK (GNULIB_NAMESPACE::localtime_rz, struct tm *, + (timezone_t, time_t const *, struct tm *)); +SIGNATURE_CHECK (GNULIB_NAMESPACE::mktime_z, time_t, (timezone_t, struct tm *)); +#endif + #if GNULIB_TEST_TIMEGM SIGNATURE_CHECK (GNULIB_NAMESPACE::timegm, time_t, (struct tm *)); #endif -- 2.7.4
>From 22760ce69fa1789e80eb88556cc35c3b97fd1a67 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 23:11:12 +0200 Subject: [PATCH 12/16] unistd-c++-tests: Update. * tests/test-unistd-c++.cc (isatty): Declare, missing since 2012-01-03. (read): Declare, missing since 2011-04-15. (sethostname): Declare, missing since 2011-12-03. --- ChangeLog | 7 +++++++ tests/test-unistd-c++.cc | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4ba9ee4..41bb58f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + unistd-c++-tests: Update. + * tests/test-unistd-c++.cc (isatty): Declare, missing since 2012-01-03. + (read): Declare, missing since 2011-04-15. + (sethostname): Declare, missing since 2011-12-03. + +2017-05-05 Bruno Haible <br...@clisp.org> + time-c++-tests: Update. * tests/test-time-c++.cc (tzset): Declare, missing since 2017-05-01. (localtime, gmtime): Declare, missing since 2017-04-30. diff --git a/tests/test-unistd-c++.cc b/tests/test-unistd-c++.cc index f4d6dd3..a19acc8 100644 --- a/tests/test-unistd-c++.cc +++ b/tests/test-unistd-c++.cc @@ -126,6 +126,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::endusershell, void, (void)); SIGNATURE_CHECK (GNULIB_NAMESPACE::group_member, int, (gid_t)); #endif +#if GNULIB_TEST_ISATTY +SIGNATURE_CHECK (GNULIB_NAMESPACE::isatty, int, (int)); +#endif + #if GNULIB_TEST_LCHOWN SIGNATURE_CHECK (GNULIB_NAMESPACE::lchown, int, (char const *, uid_t, gid_t)); #endif @@ -161,6 +165,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::pwrite, ssize_t, (int, const void *, size_t, off_t)); #endif +#if GNULIB_TEST_READ +SIGNATURE_CHECK (GNULIB_NAMESPACE::read, ssize_t, (int, void *, size_t)); +#endif + #if GNULIB_TEST_READLINK SIGNATURE_CHECK (GNULIB_NAMESPACE::readlink, ssize_t, (const char *, char *, size_t)); @@ -175,6 +183,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::readlinkat, ssize_t, SIGNATURE_CHECK (GNULIB_NAMESPACE::rmdir, int, (char const *)); #endif +#if GNULIB_TEST_SETHOSTNAME +SIGNATURE_CHECK (GNULIB_NAMESPACE::sethostname, int, (const char *, size_t)); +#endif + #if GNULIB_TEST_SLEEP SIGNATURE_CHECK (GNULIB_NAMESPACE::sleep, unsigned int, (unsigned int)); #endif -- 2.7.4
>From 308880d80924c1fd9fd2e9604a041d987c8eb8c6 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 23:16:31 +0200 Subject: [PATCH 13/16] utime-h-c++-tests: New module. * tests/test-utime-h-c++.cc: New file. (utime): Declare, missing since 2017-04-30. * modules/utime-h-c++-tests: New file. --- ChangeLog | 7 +++++++ modules/utime-h-c++-tests | 18 ++++++++++++++++++ tests/test-utime-h-c++.cc | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 modules/utime-h-c++-tests create mode 100644 tests/test-utime-h-c++.cc diff --git a/ChangeLog b/ChangeLog index 41bb58f..a5a10e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + utime-h-c++-tests: New module. + * tests/test-utime-h-c++.cc: New file. + (utime): Declare, missing since 2017-04-30. + * modules/utime-h-c++-tests: New file. + +2017-05-05 Bruno Haible <br...@clisp.org> + unistd-c++-tests: Update. * tests/test-unistd-c++.cc (isatty): Declare, missing since 2012-01-03. (read): Declare, missing since 2011-04-15. diff --git a/modules/utime-h-c++-tests b/modules/utime-h-c++-tests new file mode 100644 index 0000000..0b7f9cf --- /dev/null +++ b/modules/utime-h-c++-tests @@ -0,0 +1,18 @@ +Files: +tests/test-utime-h-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-utime-h-c++ +check_PROGRAMS += test-utime-h-c++ +test_utime_h_c___SOURCES = test-utime-h-c++.cc +endif diff --git a/tests/test-utime-h-c++.cc b/tests/test-utime-h-c++.cc new file mode 100644 index 0000000..d09e2f2 --- /dev/null +++ b/tests/test-utime-h-c++.cc @@ -0,0 +1,36 @@ +/* Test of <utime.h> substitute in C++ mode. + Copyright (C) 2010-2017 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* Written by Bruno Haible <br...@clisp.org>, 2017. */ + +#define GNULIB_NAMESPACE gnulib +#include <config.h> + +#include <utime.h> + +#include "signature.h" + + +#if GNULIB_TEST_UTIME +SIGNATURE_CHECK (GNULIB_NAMESPACE::utime, int, + (const char *, const struct utimbuf *)); +#endif + + +int +main () +{ +} -- 2.7.4
>From 2c3911f5e95db6bd60c1ec6bfddb479eda6fb227 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 23:19:40 +0200 Subject: [PATCH 14/16] wchar-c++-tests: Update. * tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30. --- ChangeLog | 5 +++++ tests/test-wchar-c++.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index a5a10e0..294bb79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + wchar-c++-tests: Update. + * tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30. + +2017-05-05 Bruno Haible <br...@clisp.org> + utime-h-c++-tests: New module. * tests/test-utime-h-c++.cc: New file. (utime): Declare, missing since 2017-04-30. diff --git a/tests/test-wchar-c++.cc b/tests/test-wchar-c++.cc index f8bea0f..9dc552a 100644 --- a/tests/test-wchar-c++.cc +++ b/tests/test-wchar-c++.cc @@ -211,6 +211,11 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::wcstok, wchar_t *, SIGNATURE_CHECK (GNULIB_NAMESPACE::wcswidth, int, (const wchar_t *, size_t)); #endif +#if GNULIB_TEST_WCSFTIME +SIGNATURE_CHECK (GNULIB_NAMESPACE::wcsftime, size_t, + (wchar_t *, size_t, const wchar_t *, const struct tm *)); +#endif + int main () -- 2.7.4
>From 7a10cf55ffd364a8d464d2c4ce0897d6ca22af05 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Fri, 5 May 2017 23:21:33 +0200 Subject: [PATCH 15/16] wctype-h-c++-tests: Update. * tests/test-wctype-h-c++.cc: Reorder to match lib/wchar.in.h. --- ChangeLog | 5 +++++ tests/test-wctype-h-c++.cc | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 294bb79..bb1949a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2017-05-05 Bruno Haible <br...@clisp.org> + wctype-h-c++-tests: Update. + * tests/test-wctype-h-c++.cc: Reorder to match lib/wchar.in.h. + +2017-05-05 Bruno Haible <br...@clisp.org> + wchar-c++-tests: Update. * tests/test-wchar-c++.cc (wcsftime): Declare, missing since 2017-04-30. diff --git a/tests/test-wctype-h-c++.cc b/tests/test-wctype-h-c++.cc index d07b3e0..68c89a1 100644 --- a/tests/test-wctype-h-c++.cc +++ b/tests/test-wctype-h-c++.cc @@ -26,9 +26,6 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::iswalnum, int, (wint_t)); SIGNATURE_CHECK (GNULIB_NAMESPACE::iswalpha, int, (wint_t)); -#if GNULIB_TEST_ISWBLANK -SIGNATURE_CHECK (GNULIB_NAMESPACE::iswblank, int, (wint_t)); -#endif SIGNATURE_CHECK (GNULIB_NAMESPACE::iswcntrl, int, (wint_t)); SIGNATURE_CHECK (GNULIB_NAMESPACE::iswdigit, int, (wint_t)); SIGNATURE_CHECK (GNULIB_NAMESPACE::iswgraph, int, (wint_t)); @@ -38,6 +35,9 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::iswpunct, int, (wint_t)); SIGNATURE_CHECK (GNULIB_NAMESPACE::iswspace, int, (wint_t)); SIGNATURE_CHECK (GNULIB_NAMESPACE::iswupper, int, (wint_t)); SIGNATURE_CHECK (GNULIB_NAMESPACE::iswxdigit, int, (wint_t)); +#if GNULIB_TEST_ISWBLANK +SIGNATURE_CHECK (GNULIB_NAMESPACE::iswblank, int, (wint_t)); +#endif #if GNULIB_TEST_WCTYPE SIGNATURE_CHECK (GNULIB_NAMESPACE::wctype, wctype_t, (const char *)); -- 2.7.4