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/pthread.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/pthread.in.h')
-rw-r--r-- | lib/pthread.in.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/pthread.in.h b/lib/pthread.in.h index c4cd36c126..65693d5d10 100644 --- a/lib/pthread.in.h +++ b/lib/pthread.in.h @@ -69,6 +69,16 @@ #include <sys/types.h> #include <time.h> +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _Noreturn is copied here. */ |