diff options
author | Bruno Haible <bruno@clisp.org> | 2021-08-22 23:54:40 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-08-22 23:54:40 +0200 |
commit | 354f27fea9bd4ecb53980de6bd374434a204afc5 (patch) | |
tree | a44a75d96097c2ee3e2e679e55cba42f2bf39dc6 /lib/math.in.h | |
parent | 63f9565f371b2ad9060a0cfa4c40c90dfc4bd5e7 (diff) | |
download | gnulib-354f27fea9bd4ecb53980de6bd374434a204afc5.tar.gz |
Make generated .in.h files as standalone as possible.
Reported by Jan Engelhardt <jengelh@inai.de>.
* lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
_GL_ATTRIBUTE_MALLOC): Add fallback definitions.
* lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add
fallback definitions.
* lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition.
* lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition.
* lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition.
* lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency
with the other *.in.h files.
* lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback
definition.
* lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
* lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
* lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of
_GL_UNUSED.
(_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add
fallback definitions.
Diffstat (limited to 'lib/math.in.h')
-rw-r--r-- | lib/math.in.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/math.in.h b/lib/math.in.h index 6a055fbf55..c87cc12fc7 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -56,6 +56,16 @@ _GL_INLINE_HEADER_BEGIN # define _GL_MATH_INLINE _GL_INLINE #endif +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __const__ was added in gcc 2.95. */ +#ifndef _GL_ATTRIBUTE_CONST +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST /* empty */ +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_ARG_NONNULL is copied here. */ |