>From 9873e7b560392a33250c9ee7cbb7d3d235fc1c5b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 3 Sep 2022 20:21:37 +0200 Subject: [PATCH 01/14] net_if: Add C++ tests. * tests/test-net_if-c++.cc: New file. * modules/net_if-c++-tests: New file. * modules/net_if-tests (Depends-on): Add net_if-c++-tests. * doc/posix-headers/net_if.texi: Fix documentation. --- ChangeLog | 8 ++++++++ doc/posix-headers/net_if.texi | 6 +++--- modules/net_if-c++-tests | 19 +++++++++++++++++++ modules/net_if-tests | 1 + tests/test-net_if-c++.cc | 28 ++++++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 modules/net_if-c++-tests create mode 100644 tests/test-net_if-c++.cc diff --git a/ChangeLog b/ChangeLog index b81480470a..f01394ba19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2022-09-03 Bruno Haible + + net_if: Add C++ tests. + * tests/test-net_if-c++.cc: New file. + * modules/net_if-c++-tests: New file. + * modules/net_if-tests (Depends-on): Add net_if-c++-tests. + * doc/posix-headers/net_if.texi: Fix documentation. + 2022-09-03 Bruno Haible termcap: Fix link error on AIX 7. diff --git a/doc/posix-headers/net_if.texi b/doc/posix-headers/net_if.texi index 48ffa502ae..7d967a815c 100644 --- a/doc/posix-headers/net_if.texi +++ b/doc/posix-headers/net_if.texi @@ -8,6 +8,9 @@ Gnulib module: net_if Portability problems fixed by Gnulib: @itemize @item +This header file is missing on some platforms: +mingw, MSVC 14. +@item This header file is not self-contained on some platforms (needing to be included first): Mac OS X 10.5, FreeBSD 8.2, OpenBSD 5.2. @@ -15,7 +18,4 @@ Mac OS X 10.5, FreeBSD 8.2, OpenBSD 5.2. Portability problems not fixed by Gnulib: @itemize -@item -This header file is missing on some platforms: -mingw, MSVC 14. @end itemize diff --git a/modules/net_if-c++-tests b/modules/net_if-c++-tests new file mode 100644 index 0000000000..211169674b --- /dev/null +++ b/modules/net_if-c++-tests @@ -0,0 +1,19 @@ +Files: +tests/test-net_if-c++.cc + +Status: +c++-test + +Depends-on: +ansi-c++-opt +net_if-tests + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-net_if-c++ +check_PROGRAMS += test-net_if-c++ +test_net_if_c___SOURCES = test-net_if-c++.cc +test_net_if_c___LDADD = $(LDADD) @NET_IF_LIB@ +endif diff --git a/modules/net_if-tests b/modules/net_if-tests index 131880383e..116bf62ea6 100644 --- a/modules/net_if-tests +++ b/modules/net_if-tests @@ -3,6 +3,7 @@ tests/test-net_if.c tests/signature.h Depends-on: +net_if-c++-tests configure.ac: NET_IF_LIB= diff --git a/tests/test-net_if-c++.cc b/tests/test-net_if-c++.cc new file mode 100644 index 0000000000..b78d00be95 --- /dev/null +++ b/tests/test-net_if-c++.cc @@ -0,0 +1,28 @@ +/* Test of substitute in C++ mode. + Copyright (C) 2022 Free Software Foundation, Inc. + + This 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 . */ + +/* Written by Bruno Haible , 2022. */ + +#define GNULIB_NAMESPACE gnulib +#include + +#include + + +int +main () +{ +} -- 2.34.1