diff options
author | Bruno Haible <bruno@clisp.org> | 2020-12-25 13:48:17 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-12-25 13:48:17 +0100 |
commit | 52c7413a808f2db9658e86183a122f3028ed88b8 (patch) | |
tree | ba351f8d5d54d99df96bb8e4e0cfc249a07a140d /lib/stdlib.in.h | |
parent | d411aa6ffa127d2707958a364896a0fd7d500b1b (diff) | |
download | gnulib-52c7413a808f2db9658e86183a122f3028ed88b8.tar.gz |
Make it possible to turn off each of the Windows oldnames workarounds.
* lib/fcntl.in.h (creat, open): Conditionalize each of the Windows
oldnames workarounds through a GNULIB_MDA_<func> symbol.
* lib/math.in.h (j0, j1, jn, y0, y1, yn): Likewise.
* lib/search.in.h (lfind, lsearch): Likewise.
* lib/stdio.in.h (fcloseall, fdopen, fileno, getw, putw, tempnam):
Likewise.
* lib/stdlib.in.h (ecvt, fcvt, gcvt, mktemp, putenv): Likewise.
* lib/string.in.h (memccpy, strdup): Likewise.
* lib/sys_stat.in.h (chmod, umask): Likewise.
* lib/time.in.h (tzset): Likewise.
* lib/unistd.in.h (access, chdir, close, dup, dup2, execl, execle,
execlp, execv, execve, execvp, execvpe, getcwd, getpid, isatty, lseek,
read, rmdir, swab, unlink, write): Likewise.
* lib/utime.in.h (utime): Likewise.
* lib/wchar.in.h (wcsdup): Likewise.
* m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize these
GNULIB_MDA_<func> symbols.
* m4/math_h.m4 (gl_MATH_H_DEFAULTS): Likewise.
* m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Likewise.
* m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise.
* m4/utime_h.m4 (gl_UTIME_H_DEFAULTS): Likewise.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Likewise.
* modules/fcntl-h (Makefile.am): Substitute these GNULIB_MDA_<func>
symbols.
* modules/math (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/sys_stat (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/utime-h (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r-- | lib/stdlib.in.h | 78 |
1 files changed, 43 insertions, 35 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 1964443a22..d02d72f319 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -242,46 +242,50 @@ _GL_WARN_ON_USE (canonicalize_file_name, # endif #endif +#if @GNULIB_MDA_ECVT@ /* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have it. */ -#if defined _WIN32 && !defined __CYGWIN__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ecvt -# define ecvt _ecvt -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif _GL_CXXALIAS_MDA (ecvt, char *, (double number, int ndigits, int *decptp, int *signp)); -#else -# if @HAVE_DECL_ECVT@ +# else +# if @HAVE_DECL_ECVT@ _GL_CXXALIAS_SYS (ecvt, char *, (double number, int ndigits, int *decptp, int *signp)); +# endif # endif -#endif -#if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@ +# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@ _GL_CXXALIASWARN (ecvt); +# endif #endif +#if @GNULIB_MDA_FCVT@ /* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have it. */ -#if defined _WIN32 && !defined __CYGWIN__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fcvt -# define fcvt _fcvt -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif _GL_CXXALIAS_MDA (fcvt, char *, (double number, int ndigits, int *decptp, int *signp)); -#else -# if @HAVE_DECL_FCVT@ +# else +# if @HAVE_DECL_FCVT@ _GL_CXXALIAS_SYS (fcvt, char *, (double number, int ndigits, int *decptp, int *signp)); +# endif # endif -#endif -#if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@ +# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@ _GL_CXXALIASWARN (fcvt); +# endif #endif #if @GNULIB_FREE_POSIX@ @@ -305,23 +309,25 @@ _GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " "use gnulib module free for portability"); #endif +#if @GNULIB_MDA_GCVT@ /* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have it. */ -#if defined _WIN32 && !defined __CYGWIN__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gcvt -# define gcvt _gcvt -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif _GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); -#else -# if @HAVE_DECL_GCVT@ +# else +# if @HAVE_DECL_GCVT@ _GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif # endif -#endif -#if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@ +# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@ _GL_CXXALIASWARN (gcvt); +# endif #endif #if @GNULIB_GETLOADAVG@ @@ -575,19 +581,21 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " # endif #endif +#if @GNULIB_MDA_MKTEMP@ /* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between platforms by defining GNULIB_NAMESPACE::mktemp always. */ -#if defined _WIN32 && !defined __CYGWIN__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mktemp -# define mktemp _mktemp -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif _GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); -#else +# else _GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); -#endif +# endif _GL_CXXALIASWARN (mktemp); +#endif /* Allocate memory with indefinite extent and specified alignment. */ #if @GNULIB_POSIX_MEMALIGN@ @@ -706,7 +714,7 @@ _GL_CXXALIAS_MDA (putenv, int, (char *string)); _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif _GL_CXXALIASWARN (putenv); -#else +#elif @GNULIB_MDA_PUTENV@ /* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between platforms by defining GNULIB_NAMESPACE::putenv always. */ |