From ac0250af06f90061bb425d99a4ccc3832b1eeac3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 6 Feb 2003 10:13:28 +0000 Subject: (__restrict): Define to `restrict' or to nothing. --- lib/search_.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/search_.h') diff --git a/lib/search_.h b/lib/search_.h index 626362270..78e3980ec 100644 --- a/lib/search_.h +++ b/lib/search_.h @@ -22,6 +22,18 @@ typedef enum } VISIT; +/* GCC 2.95 and later have "__restrict"; C99 compilers have + "restrict", and "configure" may have defined "restrict". */ +#ifndef __restrict +# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) +# if defined restrict || 199901L <= __STDC_VERSION__ +# define __restrict restrict +# else +# define __restrict +# endif +# endif +#endif + /* Search for an entry matching the given KEY in the tree pointed to by *ROOTP and insert a new element if not found. */ extern void *tsearch (const void *__key, void **__rootp, -- cgit v1.2.3-54-g00ecf