diff options
| author | Paul Eggert | 2020-05-03 14:57:10 -0700 |
|---|---|---|
| committer | Paul Eggert | 2020-05-03 15:10:07 -0700 |
| commit | 6bd47f4477904a55fc08345394bfab9cd7eae2eb (patch) | |
| tree | 12c98d95f3e66d85164bcf3adbc8f8db1c391939 /lib/attribute.h | |
| parent | 40149b871889461713dc73634498f9d2150b0249 (diff) | |
| download | emacs-6bd47f4477904a55fc08345394bfab9cd7eae2eb.tar.gz emacs-6bd47f4477904a55fc08345394bfab9cd7eae2eb.zip | |
Update from Gnulib
This incorporates:
2020-05-03 attribute: new module
2020-04-13 explicit_bzero: improve code style
2020-04-13 explicit_bzero: On native Windows, use SecureZeroMemory
2020-04-13 explicit_bzero: use memset_s() when available
2020-04-04 maint: remove a stray inter-word space
* build-aux/config.guess, build-aux/config.sub:
* build-aux/gitlog-to-changelog, build-aux/update-copyright:
* doc/misc/texinfo.tex, lib/explicit_bzero.c, lib/ieee754.in.h:
* lib/nstrftime.c, m4/explicit_bzero.m4, m4/gnulib-common.m4:
Copy from Gnulib.
* lib/attribute.h: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
Diffstat (limited to 'lib/attribute.h')
| -rw-r--r-- | lib/attribute.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/lib/attribute.h b/lib/attribute.h new file mode 100644 index 00000000000..8ef9a399ade --- /dev/null +++ b/lib/attribute.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* ATTRIBUTE_* macros for using attributes in GCC and similar compilers | ||
| 2 | |||
| 3 | Copyright 2020 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This program is free software: you can redistribute it and/or modify it | ||
| 6 | under the terms of the GNU General Public License as published | ||
| 7 | by the Free Software Foundation; either version 3 of the License, or | ||
| 8 | (at your option) any later version. | ||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | /* Written by Paul Eggert. */ | ||
| 19 | |||
| 20 | /* Provide public ATTRIBUTE_* names for the private _GL_ATTRIBUTE_* | ||
| 21 | macros used within Gnulib. */ | ||
| 22 | |||
| 23 | #ifndef _GL_ATTRIBUTE_H | ||
| 24 | #define _GL_ATTRIBUTE_H | ||
| 25 | |||
| 26 | /* C2X standard attributes have macro names that do not begin with | ||
| 27 | 'ATTRIBUTE_'. */ | ||
| 28 | #define DEPRECATED _GL_ATTRIBUTE_DEPRECATED | ||
| 29 | #define FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH | ||
| 30 | #define MAYBE_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED | ||
| 31 | #define NODISCARD _GL_ATTRIBUTE_NODISCARD | ||
| 32 | |||
| 33 | /* Selected GCC attributes; see: | ||
| 34 | https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html | ||
| 35 | These names begin with 'ATTRIBUTE_' to avoid name clashes. */ | ||
| 36 | #define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE(args) | ||
| 37 | #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE | ||
| 38 | #define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL | ||
| 39 | #define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD | ||
| 40 | #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST | ||
| 41 | #define ATTRIBUTE_DEPRECATED _GL_ATTRIBUTE_DEPRECATED | ||
| 42 | #define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR(msg) | ||
| 43 | #define ATTRIBUTE_EXTERNALLY_VISIBLE _GL_ATTRIBUTE_EXTERNALLY_VISIBLE | ||
| 44 | #define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT(spec) | ||
| 45 | #define ATTRIBUTE_LEAF _GL_ATTRIBUTE_LEAF | ||
| 46 | #define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS | ||
| 47 | #define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC | ||
| 48 | #define ATTRIBUTE_NOINLINE _GL_ATTRIBUTE_NOINLINE | ||
| 49 | #define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL(args) | ||
| 50 | #define ATTRIBUTE_NONSTRING _GL_ATTRIBUTE_NONSTRING | ||
| 51 | #define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW | ||
| 52 | #define ATTRIBUTE_PACKED _GL_ATTRIBUTE_PACKED | ||
| 53 | #define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE | ||
| 54 | #define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL | ||
| 55 | #define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL(pos) | ||
| 56 | #define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING(msg) | ||
| 57 | |||
| 58 | #endif /* _GL_ATTRIBUTE_H */ | ||