diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/pg_config.h.in | 14 | ||||
-rw-r--r-- | src/include/pg_config.h.win32 | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index b0298cca19c..80ee37dd622 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -923,6 +923,20 @@ if such a type exists, and if the system does not define it. */ #undef intptr_t +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. 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 +# define _Restrict +# define __restrict__ +#endif + /* Define to empty if the C compiler does not understand signed types. */ #undef signed diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index b76aad02676..3be1c235aaa 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -681,6 +681,17 @@ #define inline __inline #endif +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +/* Visual Studio 2008 and upwards */ +#if (_MSC_VER >= 1500) +/* works for C and C++ in msvc */ +#define restrict __restrict +#else +#define restrict +#endif + /* Define to empty if the C compiler does not understand signed types. */ /* #undef signed */ |