posix_memalign: New module.
[gnulib.git] / tests / test-stdlib-c++.cc
blob25b1c3d44436038ae9485f8ee9d755e2722ce7dc
1 /* Test of <stdlib.h> substitute in C++ mode.
2 Copyright (C) 2010-2020 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 //SIGNATURE_CHECK (GNULIB_NAMESPACE::atexit, int, (void (*) (void)));
33 #if GNULIB_TEST_ATOLL
34 SIGNATURE_CHECK (GNULIB_NAMESPACE::atoll, long long, (const char *));
35 #endif
37 #if GNULIB_TEST_CALLOC_POSIX
38 SIGNATURE_CHECK (GNULIB_NAMESPACE::calloc, void *, (size_t, size_t));
39 #endif
41 #if GNULIB_TEST_CANONICALIZE_FILE_NAME
42 SIGNATURE_CHECK (GNULIB_NAMESPACE::canonicalize_file_name, char *,
43 (const char *));
44 #endif
46 #if GNULIB_TEST_GETLOADAVG
47 SIGNATURE_CHECK (GNULIB_NAMESPACE::getloadavg, int, (double[], int));
48 #endif
50 #if GNULIB_TEST_GETSUBOPT
51 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsubopt, int,
52 (char **, char *const *, char **));
53 #endif
55 #if GNULIB_TEST_GRANTPT
56 SIGNATURE_CHECK (GNULIB_NAMESPACE::grantpt, int, (int));
57 #endif
59 #if GNULIB_TEST_MALLOC_POSIX
60 SIGNATURE_CHECK (GNULIB_NAMESPACE::malloc, void *, (size_t));
61 #endif
63 #if GNULIB_TEST_MBTOWC
64 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbtowc, int,
65 (wchar_t *, const char *, size_t));
66 #endif
68 #if GNULIB_TEST_MKDTEMP
69 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkdtemp, char *, (char *));
70 #endif
72 #if GNULIB_TEST_MKOSTEMP
73 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkostemp, int, (char *, int));
74 #endif
76 #if GNULIB_TEST_MKOSTEMPS
77 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkostemps, int, (char *, int, int));
78 #endif
80 #if GNULIB_TEST_MKSTEMP
81 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemp, int, (char *));
82 #endif
84 #if GNULIB_TEST_MKSTEMPS
85 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemps, int, (char *, int));
86 #endif
88 #if GNULIB_TEST_POSIX_MEMALIGN && HAVE_POSIX_MEMALIGN
89 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_memalign, int,
90 (void **, size_t, size_t));
91 #endif
93 #if GNULIB_TEST_POSIX_OPENPT
94 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_openpt, int, (int));
95 #endif
97 #if GNULIB_TEST_PTSNAME
98 SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname, char *, (int));
99 #endif
101 #if GNULIB_TEST_PTSNAME_R
102 SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname_r, int, (int, char *, size_t));
103 #endif
105 #if GNULIB_TEST_PUTENV
106 SIGNATURE_CHECK (GNULIB_NAMESPACE::putenv, int, (char *));
107 #endif
109 #if GNULIB_TEST_QSORT_R
110 SIGNATURE_CHECK (GNULIB_NAMESPACE::qsort_r, void,
111 (void *, size_t, size_t,
112 int (*) (void const *, void const *, void *), void *));
113 #endif
115 #if GNULIB_TEST_RANDOM
116 SIGNATURE_CHECK (GNULIB_NAMESPACE::random, long, (void));
117 #endif
119 #if GNULIB_TEST_RANDOM
120 SIGNATURE_CHECK (GNULIB_NAMESPACE::srandom, void, (unsigned int));
121 #endif
123 #if GNULIB_TEST_RANDOM
124 SIGNATURE_CHECK (GNULIB_NAMESPACE::initstate, char *,
125 (unsigned int, char *, size_t));
126 #endif
128 #if GNULIB_TEST_RANDOM
129 SIGNATURE_CHECK (GNULIB_NAMESPACE::setstate, char *, (char *));
130 #endif
132 #if GNULIB_TEST_RANDOM_R
133 SIGNATURE_CHECK (GNULIB_NAMESPACE::random_r, int,
134 (struct random_data *, int32_t *));
135 #endif
137 #if GNULIB_TEST_RANDOM_R
138 SIGNATURE_CHECK (GNULIB_NAMESPACE::srandom_r, int,
139 (unsigned int, struct random_data *));
140 #endif
142 #if GNULIB_TEST_RANDOM_R
143 SIGNATURE_CHECK (GNULIB_NAMESPACE::initstate_r, int,
144 (unsigned int, char *, size_t, struct random_data *));
145 #endif
147 #if GNULIB_TEST_RANDOM_R
148 SIGNATURE_CHECK (GNULIB_NAMESPACE::setstate_r, int,
149 (char *, struct random_data *));
150 #endif
152 #if GNULIB_TEST_REALLOC_POSIX
153 SIGNATURE_CHECK (GNULIB_NAMESPACE::realloc, void *, (void *, size_t));
154 #endif
156 #if GNULIB_TEST_REALPATH
157 SIGNATURE_CHECK (GNULIB_NAMESPACE::realpath, char *, (const char *, char *));
158 #endif
160 #if GNULIB_TEST_RPMATCH
161 SIGNATURE_CHECK (GNULIB_NAMESPACE::rpmatch, int, (const char *));
162 #endif
164 #if GNULIB_TEST_SECURE_GETENV
165 SIGNATURE_CHECK (GNULIB_NAMESPACE::secure_getenv, char *, (char const *));
166 #endif
168 #if GNULIB_TEST_SETENV
169 SIGNATURE_CHECK (GNULIB_NAMESPACE::setenv, int,
170 (const char *, const char *, int));
171 #endif
173 #if GNULIB_TEST_STRTOD
174 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtod, double, (const char *, char **));
175 #endif
177 #if GNULIB_TEST_STRTOLL
178 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoll, long long,
179 (const char *, char **, int));
180 #endif
182 #if GNULIB_TEST_STRTOULL
183 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoull, unsigned long long,
184 (const char *, char **, int));
185 #endif
187 #if GNULIB_TEST_UNLOCKPT
188 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlockpt, int, (int));
189 #endif
191 #if GNULIB_TEST_UNSETENV
192 SIGNATURE_CHECK (GNULIB_NAMESPACE::unsetenv, int, (const char *));
193 #endif
195 #if GNULIB_TEST_WCTOMB
196 SIGNATURE_CHECK (GNULIB_NAMESPACE::wctomb, int, (char *, wchar_t));
197 #endif
201 main ()