+2023-04-19 Bruno Haible <bruno@clisp.org>
+
+ ctime: Fix compilation errors in C++ mode on mingw 10.
+ * lib/c++defs.h (_GL_FUNCDECL_RPL): Add a comment.
+ * lib/time.in.h (ctime): Don't use _GL_ATTRIBUTE_DEPRECATED before
+ _GL_FUNCDECL_RPL in C++ mode.
+
2023-04-19 Bruno Haible <bruno@clisp.org>
random: Fix compilation errors in C++ mode on mingw 10.
Example:
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
_GL_ARG_NONNULL ((1)));
+
+ Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
+ of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's
+ because
+ [[...]] extern "C" <declaration>;
+ is invalid syntax in C++.)
*/
#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
_GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define ctime rpl_ctime
# endif
+# ifndef __cplusplus
_GL_ATTRIBUTE_DEPRECATED
+# endif
_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));