aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib.in.h
diff options
context:
space:
mode:
authorPhilipp Stephani2020-12-24 16:48:40 +0100
committerPhilipp Stephani2020-12-24 16:48:40 +0100
commit29064d02c31b08ae41d41a93fd1439718373b196 (patch)
tree6c976729d7c6f296b36965f235d2a58e8142393e /lib/stdlib.in.h
parent26b8b30ff42568ff3e3f8599a20328a1efe93d2a (diff)
downloademacs-29064d02c31b08ae41d41a93fd1439718373b196.tar.gz
emacs-29064d02c31b08ae41d41a93fd1439718373b196.zip
Update Gnulib.
All changes in this commit are autogenerated by running admin/merge-gnulib.
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r--lib/stdlib.in.h169
1 files changed, 156 insertions, 13 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 47a1309e633..1964443a22f 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -53,8 +53,8 @@
53# include <sys/loadavg.h> 53# include <sys/loadavg.h>
54#endif 54#endif
55 55
56/* Native Windows platforms declare mktemp() in <io.h>. */ 56/* Native Windows platforms declare _mktemp() in <io.h>. */
57#if 0 && (defined _WIN32 && ! defined __CYGWIN__) 57#if defined _WIN32 && !defined __CYGWIN__
58# include <io.h> 58# include <io.h>
59#endif 59#endif
60 60
@@ -149,6 +149,31 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
149#endif 149#endif
150 150
151 151
152/* Allocate memory with indefinite extent and specified alignment. */
153#if @GNULIB_ALIGNED_ALLOC@
154# if @REPLACE_ALIGNED_ALLOC@
155# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
156# undef aligned_alloc
157# define aligned_alloc rpl_aligned_alloc
158# endif
159_GL_FUNCDECL_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
160_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
161# else
162# if @HAVE_ALIGNED_ALLOC@
163_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
164# endif
165# endif
166# if @HAVE_ALIGNED_ALLOC@
167_GL_CXXALIASWARN (aligned_alloc);
168# endif
169#elif defined GNULIB_POSIXCHECK
170# undef aligned_alloc
171# if HAVE_RAW_DECL_ALIGNED_ALLOC
172_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - "
173 "use gnulib module aligned_alloc for portability");
174# endif
175#endif
176
152#if @GNULIB_ATOLL@ 177#if @GNULIB_ATOLL@
153/* Parse a signed decimal integer. 178/* Parse a signed decimal integer.
154 Returns the value of the integer. Errors are not detected. */ 179 Returns the value of the integer. Errors are not detected. */
@@ -217,19 +242,86 @@ _GL_WARN_ON_USE (canonicalize_file_name,
217# endif 242# endif
218#endif 243#endif
219 244
245/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not
246 required. In C++ with GNULIB_NAMESPACE, avoid differences between
247 platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have
248 it. */
220#if defined _WIN32 && !defined __CYGWIN__ 249#if defined _WIN32 && !defined __CYGWIN__
221# undef ecvt 250# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
222# define ecvt _ecvt 251# undef ecvt
252# define ecvt _ecvt
253# endif
254_GL_CXXALIAS_MDA (ecvt, char *,
255 (double number, int ndigits, int *decptp, int *signp));
256#else
257# if @HAVE_DECL_ECVT@
258_GL_CXXALIAS_SYS (ecvt, char *,
259 (double number, int ndigits, int *decptp, int *signp));
260# endif
261#endif
262#if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@
263_GL_CXXALIASWARN (ecvt);
223#endif 264#endif
224 265
266/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not
267 required. In C++ with GNULIB_NAMESPACE, avoid differences between
268 platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have
269 it. */
225#if defined _WIN32 && !defined __CYGWIN__ 270#if defined _WIN32 && !defined __CYGWIN__
226# undef fcvt 271# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
227# define fcvt _fcvt 272# undef fcvt
273# define fcvt _fcvt
274# endif
275_GL_CXXALIAS_MDA (fcvt, char *,
276 (double number, int ndigits, int *decptp, int *signp));
277#else
278# if @HAVE_DECL_FCVT@
279_GL_CXXALIAS_SYS (fcvt, char *,
280 (double number, int ndigits, int *decptp, int *signp));
281# endif
282#endif
283#if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@
284_GL_CXXALIASWARN (fcvt);
285#endif
286
287#if @GNULIB_FREE_POSIX@
288# if @REPLACE_FREE@
289# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
290# undef free
291# define free rpl_free
292# endif
293_GL_FUNCDECL_RPL (free, void, (void *ptr));
294_GL_CXXALIAS_RPL (free, void, (void *ptr));
295# else
296_GL_CXXALIAS_SYS (free, void, (void *ptr));
297# endif
298# if __GLIBC__ >= 2
299_GL_CXXALIASWARN (free);
300# endif
301#elif defined GNULIB_POSIXCHECK
302# undef free
303/* Assume free is always declared. */
304_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - "
305 "use gnulib module free for portability");
228#endif 306#endif
229 307
308/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not
309 required. In C++ with GNULIB_NAMESPACE, avoid differences between
310 platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have
311 it. */
230#if defined _WIN32 && !defined __CYGWIN__ 312#if defined _WIN32 && !defined __CYGWIN__
231# undef gcvt 313# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
232# define gcvt _gcvt 314# undef gcvt
315# define gcvt _gcvt
316# endif
317_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf));
318#else
319# if @HAVE_DECL_GCVT@
320_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf));
321# endif
322#endif
323#if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@
324_GL_CXXALIASWARN (gcvt);
233#endif 325#endif
234 326
235#if @GNULIB_GETLOADAVG@ 327#if @GNULIB_GETLOADAVG@
@@ -483,9 +575,47 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
483# endif 575# endif
484#endif 576#endif
485 577
578/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not
579 required. In C++ with GNULIB_NAMESPACE, avoid differences between
580 platforms by defining GNULIB_NAMESPACE::mktemp always. */
486#if defined _WIN32 && !defined __CYGWIN__ 581#if defined _WIN32 && !defined __CYGWIN__
487# undef mktemp 582# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
488# define mktemp _mktemp 583# undef mktemp
584# define mktemp _mktemp
585# endif
586_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/));
587#else
588_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/));
589#endif
590_GL_CXXALIASWARN (mktemp);
591
592/* Allocate memory with indefinite extent and specified alignment. */
593#if @GNULIB_POSIX_MEMALIGN@
594# if @REPLACE_POSIX_MEMALIGN@
595# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
596# undef posix_memalign
597# define posix_memalign rpl_posix_memalign
598# endif
599_GL_FUNCDECL_RPL (posix_memalign, int,
600 (void **memptr, size_t alignment, size_t size)
601 _GL_ARG_NONNULL ((1)));
602_GL_CXXALIAS_RPL (posix_memalign, int,
603 (void **memptr, size_t alignment, size_t size));
604# else
605# if @HAVE_POSIX_MEMALIGN@
606_GL_CXXALIAS_SYS (posix_memalign, int,
607 (void **memptr, size_t alignment, size_t size));
608# endif
609# endif
610# if @HAVE_POSIX_MEMALIGN@
611_GL_CXXALIASWARN (posix_memalign);
612# endif
613#elif defined GNULIB_POSIXCHECK
614# undef posix_memalign
615# if HAVE_RAW_DECL_POSIX_MEMALIGN
616_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
617 "use gnulib module posix_memalign for portability");
618# endif
489#endif 619#endif
490 620
491#if @GNULIB_POSIX_OPENPT@ 621#if @GNULIB_POSIX_OPENPT@
@@ -576,9 +706,22 @@ _GL_CXXALIAS_MDA (putenv, int, (char *string));
576_GL_CXXALIAS_SYS (putenv, int, (char *string)); 706_GL_CXXALIAS_SYS (putenv, int, (char *string));
577# endif 707# endif
578_GL_CXXALIASWARN (putenv); 708_GL_CXXALIASWARN (putenv);
579#elif defined _WIN32 && !defined __CYGWIN__ 709#else
580# undef putenv 710/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not
581# define putenv _putenv 711 required. In C++ with GNULIB_NAMESPACE, avoid differences between
712 platforms by defining GNULIB_NAMESPACE::putenv always. */
713# if defined _WIN32 && !defined __CYGWIN__
714# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
715# undef putenv
716# define putenv _putenv
717# endif
718/* Need to cast, because on mingw, the parameter is either
719 'const char *string' or 'char *string'. */
720_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
721# else
722_GL_CXXALIAS_SYS (putenv, int, (char *string));
723# endif
724_GL_CXXALIASWARN (putenv);
582#endif 725#endif
583 726
584#if @GNULIB_QSORT_R@ 727#if @GNULIB_QSORT_R@