diff options
author | Bruno Haible <bruno@clisp.org> | 2021-06-20 03:14:22 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-06-20 03:14:22 +0200 |
commit | 3f9e15ab18395229c41380f7ccfe37d542288ba0 (patch) | |
tree | b6ff6ab579502068bbc8875984cbb37f11725f2f /modules/unitypes | |
parent | 0647171f083cd3eb4a9a4077c013fe7d069589c7 (diff) | |
download | gnulib-3f9e15ab18395229c41380f7ccfe37d542288ba0.tar.gz |
unitypes: Fix trouble caused by installed older versions of unitypes.h.
* modules/unitypes (configure.ac): Define _UC_RESTRICT through config.h.
Diffstat (limited to 'modules/unitypes')
-rw-r--r-- | modules/unitypes | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/unitypes b/modules/unitypes index 8d3ccf0c19..46ed80d8c8 100644 --- a/modules/unitypes +++ b/modules/unitypes @@ -11,6 +11,22 @@ stdint configure.ac: gl_LIBUNISTRING_LIBHEADER([0.9.11], [unitypes.h]) +AH_VERBATIM([unitypes_restrict], [ +/* This definition is a duplicate of the one in unitypes.h. + It is here so that we can cope with an older version of unitypes.h + that does not contain this definition and that is pre-installed among + the public header files. */ +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 +# define _UC_RESTRICT __restrict +# elif 199901L <= __STDC_VERSION__ || defined restrict +# define _UC_RESTRICT restrict +# else +# define _UC_RESTRICT +# endif +]) + Makefile.am: BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) |