+2021-06-20 Bruno Haible <bruno@clisp.org>
+
+ unistd: Avoid compilation error in C++ mode on Solaris, HP-UX, mingw.
+ Reported by Eli Zaretskii <eliz@gnu.org> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00135.html>.
+ * lib/unistd.in.h (swab): Consider different declarations on Solaris,
+ HP-UX, and old mingw.
+
2021-06-20 Bruno Haible <bruno@clisp.org>
Sync with GNU gettext.
# undef swab
# define swab _swab
# endif
-_GL_CXXALIAS_MDA (swab, void, (char *from, char *to, int n));
-# else
+/* Need to cast, because in old mingw the arguments are
+ (const char *from, char *to, size_t n). */
+_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n));
+# else
+# if defined __hpux /* HP-UX */
+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n));
+# elif defined __sun && !defined _XPG4 /* Solaris */
+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n));
+# else
_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n));
+# endif
# endif
_GL_CXXALIASWARN (swab);
#endif