expl: Work around inaccurate implementation on NetBSD.
[gnulib.git] / tests / test-string-c++.cc
blob6f311e4720db7f90e6e6b6bf8eea1cea6d66767f
1 /* Test of <string.h> substitute in C++ mode.
2 Copyright (C) 2010-2019 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
19 #define GNULIB_NAMESPACE gnulib
20 #include <config.h>
22 #include <string.h>
24 #include "signature.h"
27 #if GNULIB_TEST_FFSL
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::ffsl, int, (long int));
29 #endif
31 #if GNULIB_TEST_FFSLL
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::ffsll, int, (long long int));
33 #endif
35 #if GNULIB_TEST_MEMCHR
36 SIGNATURE_CHECK (GNULIB_NAMESPACE::memchr, void *,
37 (void const *, int, size_t));
38 #endif
40 //SIGNATURE_CHECK (GNULIB_NAMESPACE::memcmp, int,
41 // (void const *, void const *, size_t));
43 #if GNULIB_TEST_MEMMEM
44 SIGNATURE_CHECK (GNULIB_NAMESPACE::memmem, void *,
45 (void const *, size_t, void const *, size_t));
46 #endif
48 #if GNULIB_TEST_MEMPCPY
49 SIGNATURE_CHECK (GNULIB_NAMESPACE::mempcpy, void *,
50 (void *, void const *, size_t));
51 #endif
53 #if GNULIB_TEST_MEMRCHR
54 SIGNATURE_CHECK (GNULIB_NAMESPACE::memrchr, void *,
55 (void const *, int, size_t));
56 #endif
58 #if GNULIB_TEST_RAWMEMCHR
59 SIGNATURE_CHECK (GNULIB_NAMESPACE::rawmemchr, void *, (void const *, int));
60 #endif
62 #if GNULIB_TEST_STPCPY
63 SIGNATURE_CHECK (GNULIB_NAMESPACE::stpcpy, char *, (char *, char const *));
64 #endif
66 #if GNULIB_TEST_STPNCPY
67 SIGNATURE_CHECK (GNULIB_NAMESPACE::stpncpy, char *,
68 (char *, char const *, size_t));
69 #endif
71 #if GNULIB_TEST_STRCHRNUL
72 SIGNATURE_CHECK (GNULIB_NAMESPACE::strchrnul, char *, (char const *, int));
73 #endif
75 #if GNULIB_TEST_STRDUP
76 SIGNATURE_CHECK (GNULIB_NAMESPACE::strdup, char *, (char const *));
77 #endif
79 #if GNULIB_TEST_STRNCAT
80 SIGNATURE_CHECK (GNULIB_NAMESPACE::strncat, char *,
81 (char *, const char *, size_t));
82 #endif
84 #if GNULIB_TEST_STRNDUP
85 SIGNATURE_CHECK (GNULIB_NAMESPACE::strndup, char *, (char const *, size_t));
86 #endif
88 #if GNULIB_TEST_STRNLEN
89 SIGNATURE_CHECK (GNULIB_NAMESPACE::strnlen, size_t, (char const *, size_t));
90 #endif
92 #if GNULIB_TEST_STRPBRK
93 SIGNATURE_CHECK (GNULIB_NAMESPACE::strpbrk, char *,
94 (char const *, char const *));
95 #endif
97 #if GNULIB_TEST_STRSEP
98 SIGNATURE_CHECK (GNULIB_NAMESPACE::strsep, char *, (char **, char const *));
99 #endif
101 #if GNULIB_TEST_STRSTR
102 SIGNATURE_CHECK (GNULIB_NAMESPACE::strstr, char *,
103 (const char *, const char *));
104 #endif
106 #if GNULIB_TEST_STRCASESTR
107 SIGNATURE_CHECK (GNULIB_NAMESPACE::strcasestr, char *,
108 (const char *, const char *));
109 #endif
111 #if GNULIB_TEST_STRTOK_R
112 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtok_r, char *,
113 (char *, char const *, char **));
114 #endif
116 #if GNULIB_TEST_MBSLEN
117 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbslen, size_t, (const char *));
118 #endif
120 #if GNULIB_TEST_MBSCHR
121 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbschr, char *, (const char *, int));
122 #endif
124 #if GNULIB_TEST_MBSRCHR
125 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbsrchr, char *, (const char *, int));
126 #endif
128 #if GNULIB_TEST_MBSPBRK
129 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbspbrk, char *,
130 (const char *, const char *));
131 #endif
133 #if GNULIB_TEST_STRERROR
134 SIGNATURE_CHECK (GNULIB_NAMESPACE::strerror, char *, (int));
135 #endif
137 #if GNULIB_TEST_STRERROR_R
138 SIGNATURE_CHECK (GNULIB_NAMESPACE::strerror_r, int, (int, char *, size_t));
139 #endif
141 #if GNULIB_TEST_STRSIGNAL
142 SIGNATURE_CHECK (GNULIB_NAMESPACE::strsignal, char *, (int));
143 #endif
145 #if GNULIB_TEST_STRVERSCMP
146 SIGNATURE_CHECK (GNULIB_NAMESPACE::strverscmp, int,
147 (const char *, const char *));
148 #endif
152 main ()