diff options
author | Bruno Haible <bruno@clisp.org> | 2020-08-16 18:44:53 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-08-16 18:44:53 +0200 |
commit | f79f0b4f919a3270153a64b19d3189c15c939b5b (patch) | |
tree | bdc0432732f274b845ac81d8666e19a1cf905614 /lib/glob.in.h | |
parent | bed51ff8cc7bb755b32fa83c589436d8221380c6 (diff) | |
download | gnulib-f79f0b4f919a3270153a64b19d3189c15c939b5b.tar.gz |
Use __restrict also on clang.
* lib/argp.h (__restrict): Don't define as a macro on clang >= 3.
* lib/glob.in.h (_Restrict_): Use __restrict on clang >= 3.
* lib/unitypes.in.h (_UC_RESTRICT): Likewise.
Diffstat (limited to 'lib/glob.in.h')
-rw-r--r-- | lib/glob.in.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/glob.in.h b/lib/glob.in.h index 7061a253a0..d1c0733fa9 100644 --- a/lib/glob.in.h +++ b/lib/glob.in.h @@ -45,7 +45,9 @@ 'configure' might #define 'restrict' to those words, so pick a different name. */ #ifndef _Restrict_ -# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 # define _Restrict_ __restrict # elif 199901L <= __STDC_VERSION__ || defined restrict # define _Restrict_ restrict |