File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -11545,6 +11545,52 @@ _ACEOF
1154511545 ;;
1154611546esac
1154711547
11548+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for C/C++ restrict keyword" >&5
11549+ $as_echo_n " checking for C/C++ restrict keyword... " >&6 ; }
11550+ if ${ac_cv_c_restrict+: } false ; then :
11551+ $as_echo_n " (cached) " >&6
11552+ else
11553+ ac_cv_c_restrict=no
11554+ # The order here caters to the fact that C++ does not require restrict.
11555+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
11556+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
11557+ /* end confdefs.h. */
11558+ typedef int * int_ptr;
11559+ int foo (int_ptr $ac_kw ip) {
11560+ return ip[0];
11561+ }
11562+ int
11563+ main ()
11564+ {
11565+ int s[1];
11566+ int * $ac_kw t = s;
11567+ t[0] = 0;
11568+ return foo(t)
11569+ ;
11570+ return 0;
11571+ }
11572+ _ACEOF
11573+ if ac_fn_c_try_compile " $LINENO " ; then :
11574+ ac_cv_c_restrict=$ac_kw
11575+ fi
11576+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11577+ test " $ac_cv_c_restrict " ! = no && break
11578+ done
11579+
11580+ fi
11581+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_c_restrict " >&5
11582+ $as_echo " $ac_cv_c_restrict " >&6 ; }
11583+
11584+ case $ac_cv_c_restrict in
11585+ restrict) ;;
11586+ no) $as_echo " #define restrict /**/" >> confdefs.h
11587+ ;;
11588+ * ) cat >> confdefs.h << _ACEOF
11589+ #define restrict $ac_cv_c_restrict
11590+ _ACEOF
11591+ ;;
11592+ esac
11593+
1154811594{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for printf format archetype" >&5
1154911595$as_echo_n " checking for printf format archetype... " >&6 ; }
1155011596if ${pgac_cv_printf_archetype+: } false ; then :
Original file line number Diff line number Diff line change 12991299m4_defun([AC_PROG_CC_STDC], []) dnl We don't want that.
13001300AC_C_BIGENDIAN
13011301AC_C_INLINE
1302+ AC_C_RESTRICT
13021303PGAC_PRINTF_ARCHETYPE
13031304AC_C_FLEXIBLE_ARRAY_MEMBER
13041305PGAC_C_SIGNED
Original file line number Diff line number Diff line change 923923 if such a type exists, and if the system does not define it. */
924924#undef intptr_t
925925
926+ /* Define to the equivalent of the C99 'restrict' keyword, or to
927+ nothing if this is not supported. Do not define if restrict is
928+ supported directly. */
929+ #undef restrict
930+ /* Work around a bug in Sun C++: it does not support _Restrict or
931+ __restrict__, even though the corresponding Sun C compiler ends up with
932+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
933+ previous line. Perhaps some future version of Sun C++ will work with
934+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
935+ #if defined __SUNPRO_CC && !defined __RESTRICT
936+ # define _Restrict
937+ # define __restrict__
938+ #endif
939+
926940/* Define to empty if the C compiler does not understand signed types. */
927941#undef signed
928942
Original file line number Diff line number Diff line change 681681#define inline __inline
682682#endif
683683
684+ /* Define to the equivalent of the C99 'restrict' keyword, or to
685+ nothing if this is not supported. Do not define if restrict is
686+ supported directly. */
687+ /* Visual Studio 2008 and upwards */
688+ #if (_MSC_VER >= 1500)
689+ /* works for C and C++ in msvc */
690+ #define restrict __restrict
691+ #else
692+ #define restrict
693+ #endif
694+
684695/* Define to empty if the C compiler does not understand signed types. */
685696/* #undef signed */
686697
You can’t perform that action at this time.
0 commit comments