On 01/03/2018 10:29 PM, Eric Blake wrote:
> We still use ChangeLog-style comments in the commit message (and/or
> ChangeLog itself) for gnulib commits; it's also nice to call out which
> previous commit to cdefs.h already added protection for -Wundef
> compilation.  But with those additions, I'm okay with your patch; I'll
> wait a day or so to see if anyone else chimes in.

Added GNU style commit message, unsure what you mean with "which
 previous commit to cdefs.h already added protection for -Wundef".
Can't find any (from commit messages).

Regards, Tim
From dc0c9b5e4d2e037325fce6bae762ae2eed77ebec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.rueh...@gmx.de>
Date: Wed, 3 Jan 2018 11:50:07 +0100
Subject: [PATCH] Fix -Wundef in user-included header lib/cdef.h

* lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL
---
 lib/cdefs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cdefs.h b/lib/cdefs.h
index 9ed0259dc..f6c20fe2e 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -295,7 +295,7 @@
 #if __GNUC_PREREQ (3,4)
 # define __attribute_warn_unused_result__ \
    __attribute__ ((__warn_unused_result__))
-# if __USE_FORTIFY_LEVEL > 0
+# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
 #  define __wur __attribute_warn_unused_result__
 # endif
 #else
-- 
2.15.1

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to