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
24 #include "signature.h"
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::_Exit
, void, (int));
31 #if GNULIB_TEST_ALIGNED_ALLOC && HAVE_ALIGNED_ALLOC
32 SIGNATURE_CHECK (GNULIB_NAMESPACE::aligned_alloc
, void *, (size_t, size_t));
35 //SIGNATURE_CHECK (GNULIB_NAMESPACE::atexit, int, (void (*) (void)));
38 SIGNATURE_CHECK (GNULIB_NAMESPACE::atoll
, long long, (const char *));
41 #if GNULIB_TEST_CALLOC_POSIX
42 SIGNATURE_CHECK (GNULIB_NAMESPACE::calloc
, void *, (size_t, size_t));
45 #if GNULIB_TEST_CANONICALIZE_FILE_NAME
46 SIGNATURE_CHECK (GNULIB_NAMESPACE::canonicalize_file_name
, char *,
50 #if GNULIB_TEST_FREE_POSIX
51 SIGNATURE_CHECK (GNULIB_NAMESPACE::free
, void, (void *));
54 #if GNULIB_TEST_GETLOADAVG
55 SIGNATURE_CHECK (GNULIB_NAMESPACE::getloadavg
, int, (double[], int));
58 #if GNULIB_TEST_GETSUBOPT
59 SIGNATURE_CHECK (GNULIB_NAMESPACE::getsubopt
, int,
60 (char **, char *const *, char **));
63 #if GNULIB_TEST_GRANTPT
64 SIGNATURE_CHECK (GNULIB_NAMESPACE::grantpt
, int, (int));
67 #if GNULIB_TEST_MALLOC_POSIX
68 SIGNATURE_CHECK (GNULIB_NAMESPACE::malloc
, void *, (size_t));
71 #if GNULIB_TEST_MBTOWC
72 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbtowc
, int,
73 (wchar_t *, const char *, size_t));
76 #if GNULIB_TEST_MBSTOWCS
77 SIGNATURE_CHECK (GNULIB_NAMESPACE::mbstowcs
, size_t,
78 (wchar_t *, const char *, size_t));
81 #if GNULIB_TEST_MKDTEMP
82 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkdtemp
, char *, (char *));
85 #if GNULIB_TEST_MKOSTEMP
86 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkostemp
, int, (char *, int));
89 #if GNULIB_TEST_MKOSTEMPS
90 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkostemps
, int, (char *, int, int));
93 #if GNULIB_TEST_MKSTEMP
94 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemp
, int, (char *));
97 #if GNULIB_TEST_MKSTEMPS
98 SIGNATURE_CHECK (GNULIB_NAMESPACE::mkstemps
, int, (char *, int));
101 #if GNULIB_TEST_POSIX_MEMALIGN && HAVE_POSIX_MEMALIGN
102 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_memalign
, int,
103 (void **, size_t, size_t));
106 #if GNULIB_TEST_POSIX_OPENPT
107 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_openpt
, int, (int));
110 #if GNULIB_TEST_PTSNAME
111 SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname
, char *, (int));
114 #if GNULIB_TEST_PTSNAME_R
115 SIGNATURE_CHECK (GNULIB_NAMESPACE::ptsname_r
, int, (int, char *, size_t));
118 #if GNULIB_TEST_PUTENV
119 SIGNATURE_CHECK (GNULIB_NAMESPACE::putenv
, int, (char *));
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 *));
128 #if GNULIB_TEST_RANDOM
129 SIGNATURE_CHECK (GNULIB_NAMESPACE::random
, long, (void));
132 #if GNULIB_TEST_RANDOM
133 SIGNATURE_CHECK (GNULIB_NAMESPACE::srandom
, void, (unsigned int));
136 #if GNULIB_TEST_RANDOM
137 SIGNATURE_CHECK (GNULIB_NAMESPACE::initstate
, char *,
138 (unsigned int, char *, size_t));
141 #if GNULIB_TEST_RANDOM
142 SIGNATURE_CHECK (GNULIB_NAMESPACE::setstate
, char *, (char *));
145 #if GNULIB_TEST_RANDOM_R
146 SIGNATURE_CHECK (GNULIB_NAMESPACE::random_r
, int,
147 (struct random_data
*, int32_t *));
150 #if GNULIB_TEST_RANDOM_R
151 SIGNATURE_CHECK (GNULIB_NAMESPACE::srandom_r
, int,
152 (unsigned int, struct random_data
*));
155 #if GNULIB_TEST_RANDOM_R
156 SIGNATURE_CHECK (GNULIB_NAMESPACE::initstate_r
, int,
157 (unsigned int, char *, size_t, struct random_data
*));
160 #if GNULIB_TEST_RANDOM_R
161 SIGNATURE_CHECK (GNULIB_NAMESPACE::setstate_r
, int,
162 (char *, struct random_data
*));
165 #if GNULIB_TEST_REALLOC_POSIX
166 SIGNATURE_CHECK (GNULIB_NAMESPACE::realloc
, void *, (void *, size_t));
169 #if GNULIB_TEST_REALPATH
170 SIGNATURE_CHECK (GNULIB_NAMESPACE::realpath
, char *, (const char *, char *));
173 #if GNULIB_TEST_RPMATCH
174 SIGNATURE_CHECK (GNULIB_NAMESPACE::rpmatch
, int, (const char *));
177 #if GNULIB_TEST_SECURE_GETENV
178 SIGNATURE_CHECK (GNULIB_NAMESPACE::secure_getenv
, char *, (char const *));
181 #if GNULIB_TEST_SETENV
182 SIGNATURE_CHECK (GNULIB_NAMESPACE::setenv
, int,
183 (const char *, const char *, int));
186 #if GNULIB_TEST_STRTOD
187 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtod
, double, (const char *, char **));
190 #if GNULIB_TEST_STRTOF
191 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtof
, float, (const char *, char **));
194 #if GNULIB_TEST_STRTOLL
195 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoll
, long long,
196 (const char *, char **, int));
199 #if GNULIB_TEST_STRTOULL
200 SIGNATURE_CHECK (GNULIB_NAMESPACE::strtoull
, unsigned long long,
201 (const char *, char **, int));
204 #if GNULIB_TEST_UNLOCKPT
205 SIGNATURE_CHECK (GNULIB_NAMESPACE::unlockpt
, int, (int));
208 #if GNULIB_TEST_UNSETENV
209 SIGNATURE_CHECK (GNULIB_NAMESPACE::unsetenv
, int, (const char *));
212 #if GNULIB_TEST_WCTOMB
213 SIGNATURE_CHECK (GNULIB_NAMESPACE::wctomb
, int, (char *, wchar_t));