From: Bruno Haible Date: Sun, 18 Sep 2022 00:32:13 +0000 (+0200) Subject: swab: Fix compilation error with Sun C++ on Solaris 11.3. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=50bcc90faa1eb58d2709ad61e704c0f30f759c58;p=gnulib.git swab: Fix compilation error with Sun C++ on Solaris 11.3. * lib/unistd.in.h (swab): For the C++ declaration, under Solaris 11 but not under Solaris 10, test also __XOPEN_OR_POSIX. --- diff --git a/ChangeLog b/ChangeLog index 35a275a1c1..f280a860e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-09-17 Bruno Haible + + swab: Fix compilation error with Sun C++ on Solaris 11.3. + * lib/unistd.in.h (swab): For the C++ declaration, under Solaris 11 but + not under Solaris 10, test also __XOPEN_OR_POSIX. + 2022-09-17 Bruno Haible time C++ tests: Fix link error on CentOS 5. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index ef3e68fcd2..50f6e56550 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -2057,7 +2057,7 @@ _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 */ +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !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));