Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE.
commit5b6ea85121af42b78348d8b396f84b281aa4998a
authorBruno Haible <bruno@clisp.org>
Sun, 6 Dec 2020 15:43:36 +0000 (6 16:43 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 6 Dec 2020 15:43:36 +0000 (6 16:43 +0100)
tree1b00bc4f24142e7377576c1176b10437523c7d48
parent5af457737fb72ec05544a3336ce4b867b744b4d2
Do the Windows oldnames workaround through the C++ GNULIB_NAMESPACE.

Reported by Daniel R. Hurtmans <Daniel.Hurtmans@ulb.ac.be> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00029.html>.

* lib/c++defs.h (_GL_CXXALIAS_MDA_CAST): New macro.
* lib/fcntl.in.h (creat, open):  In C++ mode, when GNULIB_NAMESPACE is
defined: 1. Define a symbol in this namespace. 2. Don't redirect using
a preprocessor #define.
* 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/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_FCLOSEALL.
(gl_STDIO_H): Set HAVE_DECL_FCLOSEALL.
* modules/stdio (Makefile.am): Substitute HAVE_DECL_FCLOSEALL.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_ECVT,
HAVE_DECL_FCVT, HAVE_DECL_GCVT.
(gl_STDLIB_H): Set HAVE_DECL_ECVT, HAVE_DECL_FCVT, HAVE_DECL_GCVT.
* modules/stdlib (Makefile.am): Substitute HAVE_DECL_ECVT,
HAVE_DECL_FCVT, HAVE_DECL_GCVT.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize HAVE_DECL_EXECVPE.
(gl_UNISTD_H): Set HAVE_DECL_EXECVPE.
* modules/unistd (Makefile.am): Substitute HAVE_DECL_EXECVPE.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize HAVE_DECL_WCSDUP.
(gl_WCHAR_H): Set HAVE_DECL_WCSDUP.
* modules/wchar (Makefile.am): Substitute HAVE_DECL_WCSDUP.
21 files changed:
ChangeLog
lib/c++defs.h
lib/fcntl.in.h
lib/math.in.h
lib/search.in.h
lib/stdio.in.h
lib/stdlib.in.h
lib/string.in.h
lib/sys_stat.in.h
lib/time.in.h
lib/unistd.in.h
lib/utime.in.h
lib/wchar.in.h
m4/stdio_h.m4
m4/stdlib_h.m4
m4/unistd_h.m4
m4/wchar_h.m4
modules/stdio
modules/stdlib
modules/unistd
modules/wchar