diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-12-11 15:15:28 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-12-11 15:25:18 -0800 |
commit | 8f19de6df0cfab5eff9e62e3c8ec8443558476d1 (patch) | |
tree | d8fdb84b7721722d4a41b2485015bfecf9a06daa /lib | |
parent | efc940dc82763b7b2d6e65f04d15d5972d829c0a (diff) | |
download | autoconf-8f19de6df0cfab5eff9e62e3c8ec8443558476d1.tar.gz |
Improve port of AC_C_RESTRICT to Oracle C++
Problem reported by Christian Biesinger in:
https://lists.gnu.org/r/bug-gnulib/2019-12/msg00159.html
* lib/autoconf/c.m4 (AC_C_RESTRICT): Port better to
Oracle Developer Studio C++ 12.5 or later.
This patch is adapted from Gnulib.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/autoconf/c.m4 | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 601c2df4..14240460 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -2031,12 +2031,13 @@ AC_DEFUN([AC_C_RESTRICT], nothing if this is not supported. Do not define if restrict is supported only directly. */ #undef restrict -/* Work around a bug in Sun C++ 5.13: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__". - Perhaps some future version of Sun C++ will work with restrict; - if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ # define _Restrict # define __restrict__ #endif]) |