From: Jim Meyering Date: Thu, 6 Feb 2003 10:13:28 +0000 (+0000) Subject: (__restrict): Define to `restrict' or to nothing. X-Git-Tag: v4.5.6~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac0250af06f90061bb425d99a4ccc3832b1eeac3;p=thirdparty%2Fcoreutils.git (__restrict): Define to `restrict' or to nothing. --- diff --git a/lib/search_.h b/lib/search_.h index 6263622709..78e3980ec8 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,