cdefs: Limit definition of fortification macros
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 2 Feb 2023 12:49:02 +0000 (07:49 -0500)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 2 Feb 2023 12:49:02 +0000 (07:49 -0500)
commit2337e04e21ba6040926ec871e403533f77043c40
tree52f485cbfec3b00b8f74fb3aa76b705b08480749
parente0dc827bf6e9882e1531905c61a00c83cc91359d
cdefs: Limit definition of fortification macros

Define the __glibc_fortify and other macros only when __FORTIFY_LEVEL >
0.  This has the effect of not defining these macros on older C90
compilers that do not have support for variable length argument lists.

Also trim off the trailing backslashes from the definition of
__glibc_fortify and __glibc_fortify_n macros.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
misc/sys/cdefs.h