From: Luca Boccassi <bluca@debian.org>
To: linux-fscrypt@vger.kernel.org
Cc: ebiggers@google.com
Subject: [PATCH v7 1/3] Move -D_GNU_SOURCE to CPPFLAGS
Date: Tue, 22 Dec 2020 00:10:31 +0000 [thread overview]
Message-ID: <20201222001033.302274-1-bluca@debian.org> (raw)
In-Reply-To: <20201221232428.298710-1-bluca@debian.org>
Use _GNU_SOURCE consistently in every file rather than just one file.
This is needed for the Windows build in order to consistently get the MinGW
version of printf.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
v6: split from mingw patch
v7: adjust commit message and add CPPFLAG to run-sparse.sh as well
Makefile | 2 +-
lib/utils.c | 2 --
scripts/run-sparse.sh | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index bfe83c4..f1ba956 100644
--- a/Makefile
+++ b/Makefile
@@ -47,7 +47,7 @@ override CFLAGS := -Wall -Wundef \
$(call cc-option,-Wvla) \
$(CFLAGS)
-override CPPFLAGS := -Iinclude -D_FILE_OFFSET_BITS=64 $(CPPFLAGS)
+override CPPFLAGS := -Iinclude -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $(CPPFLAGS)
ifneq ($(V),1)
QUIET_CC = @echo ' CC ' $@;
diff --git a/lib/utils.c b/lib/utils.c
index 8b5d6cb..13e3b35 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -9,8 +9,6 @@
* https://opensource.org/licenses/MIT.
*/
-#define _GNU_SOURCE /* for asprintf() and strerror_r() */
-
#include "lib_private.h"
#include <stdio.h>
diff --git a/scripts/run-sparse.sh b/scripts/run-sparse.sh
index 30730b2..f75b837 100755
--- a/scripts/run-sparse.sh
+++ b/scripts/run-sparse.sh
@@ -10,5 +10,5 @@ set -e -u -o pipefail
find . -name '*.c' | while read -r file; do
sparse "$file" -gcc-base-dir "$(gcc --print-file-name=)" \
- -Iinclude -D_FILE_OFFSET_BITS=64 -Wbitwise
+ -Iinclude -D_FILE_OFFSET_BITS=64 -Wbitwise -D_GNU_SOURCE
done
--
2.29.2
next prev parent reply other threads:[~2020-12-22 0:11 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 14:47 [fsverity-utils PATCH v2 1/2] Remove unneeded includes luca.boccassi
2020-12-17 14:47 ` [fsverity-utils PATCH v2 2/2] Allow to build and run sign/digest on Windows luca.boccassi
2020-12-17 18:32 ` Eric Biggers
2020-12-17 18:44 ` Luca Boccassi
2020-12-17 19:05 ` Eric Biggers
2020-12-17 19:12 ` Luca Boccassi
2020-12-17 19:20 ` Eric Biggers
2020-12-17 19:26 ` Luca Boccassi
2020-12-17 19:16 ` [fsverity-utils PATCH v3 1/2] Remove unneeded includes luca.boccassi
2020-12-17 19:16 ` [fsverity-utils PATCH v3 2/2] Allow to build and run sign/digest on Windows luca.boccassi
2020-12-17 19:25 ` [fsverity-utils PATCH v4 1/2] Remove unneeded includes luca.boccassi
2020-12-17 19:25 ` [fsverity-utils PATCH v4 2/2] Allow to build and run sign/digest on Windows luca.boccassi
2020-12-21 21:40 ` Eric Biggers
2020-12-21 22:23 ` Luca Boccassi
2020-12-21 22:19 ` [PATCH v5] " Luca Boccassi
2020-12-21 23:03 ` Eric Biggers
2020-12-21 23:26 ` Luca Boccassi
2020-12-21 23:24 ` [PATCH v6 1/3] Move -D_GNU_SOURCE to CPPFLAGS Luca Boccassi
2020-12-21 23:24 ` [PATCH v6 2/3] Wrap ./fsverity in TEST_WRAPPER_PROG too Luca Boccassi
2020-12-21 23:24 ` [PATCH v6 3/3] Allow to build and run sign/digest on Windows Luca Boccassi
2020-12-21 23:53 ` Eric Biggers
2020-12-21 23:57 ` Luca Boccassi
2020-12-22 0:03 ` Eric Biggers
2020-12-22 0:11 ` Luca Boccassi
2020-12-22 0:00 ` [PATCH v6 1/3] Move -D_GNU_SOURCE to CPPFLAGS Eric Biggers
2020-12-22 0:12 ` Luca Boccassi
2020-12-22 0:10 ` Luca Boccassi [this message]
2020-12-22 0:10 ` [PATCH v7 2/3] Wrap ./fsverity in TEST_WRAPPER_PROG too Luca Boccassi
2020-12-22 18:41 ` Eric Biggers
2020-12-22 0:10 ` [PATCH v7 3/3] Allow to build and run sign/digest on Windows Luca Boccassi
2020-12-22 18:40 ` Eric Biggers
2020-12-22 8:21 ` [PATCH v7 1/3] Move -D_GNU_SOURCE to CPPFLAGS Eric Biggers
2020-12-22 18:40 ` Eric Biggers
2020-12-21 21:32 ` [fsverity-utils PATCH v4 1/2] Remove unneeded includes Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201222001033.302274-1-bluca@debian.org \
--to=bluca@debian.org \
--cc=ebiggers@google.com \
--cc=linux-fscrypt@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).