doc: Remove references to POSIX 202x.
[gnulib.git] / tests / test-stdlib-c++.cc
blob0b02ca6e756d15402183e53e8fc490c9be054a87
1 /* Test of <stdlib.h> substitute in C++ mode.
2 Copyright (C) 2010-2024 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 <stdlib.h>
24 #include "signature.h"
27 #if GNULIB_TEST__EXIT
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::_Exit, void, (int));
29 #endif
31 #if GNULIB_TEST_ALIGNED_ALLOC && HAVE_ALIGNED_ALLOC
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::aligned_alloc, void *, (size_t, size_t));
33 #endif
35 //SIGNATURE_CHECK (GNULIB_NAMESPACE::atexit, int, (void (*) (void)));
37 #if GNULIB_TEST_ATOLL
38 SIGNATURE_CHECK (GNULIB_NAMESPACE::atoll, long long, (const char *));
39 #endif
41 #if GNULIB_TEST_CALLOC_POSIX
42 SIGNATURE_CHECK (GNULIB_NAMESPACE::calloc, void *, (size_t, size_t));
43 #endif
45 #if GNULIB_TEST_CANONICALIZE_FILE_NAME
46 SIGNATURE_CHECK (GNULIB_NAMESPACE::canonicalize_file_name, char *,
47 (const char *));
48 #endif
50 #if GNULIB_TEST_FREE_POSIX
51 SIGNATURE_CHECK (GNULIB_NAMESPACE::free, void, (void *));
52 #endif
54 #if GNULIB_TEST_GETLOADAVG
55 SIGNATURE_CHECK (GNULIB_NAMESPACE::getloadavg, int, (double[], int));
56 #endif
58 #if GNULIB_TEST_GETSUBOPT
59 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsubopt, int,
60 (char **, char *const *, char **));
61 #endif
63 #if GNULIB_TEST_GRANTPT
64 SIGNATURE_CHECK (GNULIB_NAMESPACE::grantpt, int, (int));
65 #endif
67 #if GNULIB_TEST_MALLOC_POSIX
68 SIGNATURE_CHECK (GNULIB_NAMESPACE::malloc, void *, (size_t));
69 #endif
71 #if GNULIB_TEST_MBTOWC
72 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbtowc, int,
73 (wchar_t *, const char *, size_t));
74 #endif
76 #if GNULIB_TEST_MBSTOWCS
77 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbstowcs, size_t,
78 (wchar_t *, const char *, size_t));
79 #endif
81 #if GNULIB_TEST_MKDTEMP
82 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkdtemp, char *, (char *));
83 #endif
85 #if GNULIB_TEST_MKOSTEMP
86 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkostemp, int, (char *, int));
87 #endif
89 #if GNULIB_TEST_MKOSTEMPS
90 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkostemps, int, (char *, int, int));
91 #endif
93 #if GNULIB_TEST_MKSTEMP
94 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemp, int, (char *));
95 #endif
97 #if GNULIB_TEST_MKSTEMPS
98 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemps, int, (char *, int));
99 #endif
101 #if GNULIB_TEST_POSIX_MEMALIGN && HAVE_POSIX_MEMALIGN
102 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_memalign, int,
103 (void **, size_t, size_t));
104 #endif
106 #if GNULIB_TEST_POSIX_OPENPT
107 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_openpt, int, (int));
108 #endif
110 #if GNULIB_TEST_PTSNAME
111 SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname, char *, (int));
112 #endif
114 #if GNULIB_TEST_PTSNAME_R
115 SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname_r, int, (int, char *, size_t));
116 #endif
118 #if GNULIB_TEST_PUTENV
119 SIGNATURE_CHECK (GNULIB_NAMESPACE::putenv, int, (char *));
120 #endif
122 #if GNULIB_TEST_QSORT_R && !defined __SUNPRO_CC
123 SIGNATURE_CHECK (GNULIB_NAMESPACE::qsort_r, void,
124 (void *, size_t, size_t,
125 int (*) (void const *, void const *, void *), void *));
126 #endif
128 #if GNULIB_TEST_RANDOM
129 SIGNATURE_CHECK (GNULIB_NAMESPACE::random, long, (void));
130 #endif
132 #if GNULIB_TEST_RANDOM
133 SIGNATURE_CHECK (GNULIB_NAMESPACE::srandom, void, (unsigned int));
134 #endif
136 #if GNULIB_TEST_RANDOM
137 SIGNATURE_CHECK (GNULIB_NAMESPACE::initstate, char *,
138 (unsigned int, char *, size_t));
139 #endif
141 #if GNULIB_TEST_RANDOM
142 SIGNATURE_CHECK (GNULIB_NAMESPACE::setstate, char *, (char *));
143 #endif
145 #if GNULIB_TEST_RANDOM_R
146 SIGNATURE_CHECK (GNULIB_NAMESPACE::random_r, int,
147 (struct random_data *, int32_t *));
148 #endif
150 #if GNULIB_TEST_RANDOM_R
151 SIGNATURE_CHECK (GNULIB_NAMESPACE::srandom_r, int,
152 (unsigned int, struct random_data *));
153 #endif
155 #if GNULIB_TEST_RANDOM_R
156 SIGNATURE_CHECK (GNULIB_NAMESPACE::initstate_r, int,
157 (unsigned int, char *, size_t, struct random_data *));
158 #endif
160 #if GNULIB_TEST_RANDOM_R
161 SIGNATURE_CHECK (GNULIB_NAMESPACE::setstate_r, int,
162 (char *, struct random_data *));
163 #endif
165 #if GNULIB_TEST_REALLOC_POSIX
166 SIGNATURE_CHECK (GNULIB_NAMESPACE::realloc, void *, (void *, size_t));
167 #endif
169 #if GNULIB_TEST_REALPATH
170 SIGNATURE_CHECK (GNULIB_NAMESPACE::realpath, char *, (const char *, char *));
171 #endif
173 #if GNULIB_TEST_RPMATCH
174 SIGNATURE_CHECK (GNULIB_NAMESPACE::rpmatch, int, (const char *));
175 #endif
177 #if GNULIB_TEST_SECURE_GETENV
178 SIGNATURE_CHECK (GNULIB_NAMESPACE::secure_getenv, char *, (char const *));
179 #endif
181 #if GNULIB_TEST_SETENV
182 SIGNATURE_CHECK (GNULIB_NAMESPACE::setenv, int,
183 (const char *, const char *, int));
184 #endif
186 #if GNULIB_TEST_STRTOD
187 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtod, double, (const char *, char **));
188 #endif
190 #if GNULIB_TEST_STRTOF
191 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtof, float, (const char *, char **));
192 #endif
194 #if GNULIB_TEST_STRTOLL
195 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoll, long long,
196 (const char *, char **, int));
197 #endif
199 #if GNULIB_TEST_STRTOULL
200 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoull, unsigned long long,
201 (const char *, char **, int));
202 #endif
204 #if GNULIB_TEST_UNLOCKPT
205 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlockpt, int, (int));
206 #endif
208 #if GNULIB_TEST_UNSETENV
209 SIGNATURE_CHECK (GNULIB_NAMESPACE::unsetenv, int, (const char *));
210 #endif
212 #if GNULIB_TEST_WCTOMB
213 SIGNATURE_CHECK (GNULIB_NAMESPACE::wctomb, int, (char *, wchar_t));
214 #endif
218 main ()