diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2019-08-16 00:08:27 -0700 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2019-08-16 00:08:27 -0700 |
commit | 8b6e6bf04f6f62a576ae818758d6d5a58ca69a5d (patch) | |
tree | 1aa4af4af6e7ce892da9aaf8d9834356be8c428e /configure.ac | |
parent | 9fbd9fb8596af9fd4cdf6a962e53f9d5e18d7d87 (diff) | |
download | nasm-8b6e6bf04f6f62a576ae818758d6d5a58ca69a5d.tar.gz |
config.h: separate function and function pointer attributes; automate
Separate out function and function pointer attributes, as not all
versions of all compilers support both.
Have macros related to function attributes auto-generated by
autoheader. As a result, rename config.h.in to unconfig.h, to make it
more obvious that it is really intended to be included from some C
programs.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 35116b7c..9f3f9d5f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ dnl Process this file with autoconf 2.69 or later to produce dnl a configure script. AC_PREREQ(2.69) -AC_INIT(config/config.h.in) -AC_CONFIG_HEADERS(config/config.h) +AC_INIT([config/undef.h]) +AC_CONFIG_HEADERS([config/config.h:config/unconfig.h]) AC_PREFIX_PROGRAM(nasm) AC_CONFIG_AUX_DIR(autoconf/helpers) @@ -225,14 +225,15 @@ dnl some other features of gcc. dnl PA_ADD_CFLAGS([-Werror=attributes]) PA_FUNC_ATTRIBUTE(noreturn) -PA_FUNC_ATTRIBUTE(returns_nonnull) +PA_FUNC_ATTRIBUTE(returns_nonnull,,,,,never_null) PA_FUNC_ATTRIBUTE(malloc) -PA_FUNC_ATTRIBUTE(alloc_size, (1)) -PA_FUNC_ATTRIBUTE(sentinel,,, [const char *, ...], ["a","b",NULL]) -PA_FUNC_ATTRIBUTE(format, [(printf,1,2)], int, [const char *, ...], ["%d",1]) +PA_FUNC_ATTRIBUTE(alloc_size,[1]) +PA_FUNC_ATTRIBUTE(alloc_size,[1,2]) +PA_FUNC_ATTRIBUTE(sentinel,,, [const char *, ...], ["a","b",NULL],end_with_null) +PA_FUNC_ATTRIBUTE(format, [printf,1,2], int, [const char *, ...], ["%d",1]) PA_FUNC_ATTRIBUTE(const) PA_FUNC_ATTRIBUTE(pure) -PA_FUNC_ATTRIBUTE(cold) +PA_FUNC_ATTRIBUTE(cold,,,,,unlikely_func) PA_FUNC_ATTRIBUTE_ERROR dnl |