From patchwork Fri Dec 12 12:35:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Zak X-Patchwork-Id: 5482111 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 415CE9F30B for ; Fri, 12 Dec 2014 12:37:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 456A620172 for ; Fri, 12 Dec 2014 12:37:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28792201C8 for ; Fri, 12 Dec 2014 12:37:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967723AbaLLMgg (ORCPT ); Fri, 12 Dec 2014 07:36:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53866 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967592AbaLLMgD (ORCPT ); Fri, 12 Dec 2014 07:36:03 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBCCa2Ob014110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 12 Dec 2014 07:36:02 -0500 Received: from x2.net.home (ovpn-113-55.phx2.redhat.com [10.3.113.55]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBCCa0K9012041; Fri, 12 Dec 2014 07:36:01 -0500 From: Karel Zak To: linux-btrfs@vger.kernel.org Cc: Karel Zak Subject: [PATCH 02/10] btrfs-progs: use config.h Date: Fri, 12 Dec 2014 13:35:16 +0100 Message-Id: <1418387724-20188-3-git-send-email-kzak@redhat.com> In-Reply-To: <1418387724-20188-1-git-send-email-kzak@redhat.com> References: <1418387724-20188-1-git-send-email-kzak@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP - the header file is generated by ./configure, the standard autotools way is to use -include config.h on compiler command line rather than include the file directly from code - remove _GNU_SOURCE from code, the macros is already defined in config.h by AC_USE_SYSTEM_EXTENSIONS autoconf macro Signed-off-by: Karel Zak --- Makefile.in | 4 +++- btrfs-calc-size.c | 1 - btrfs-convert.c | 1 - btrfs-corrupt-block.c | 2 +- btrfs-find-root.c | 2 +- btrfs-fragments.c | 1 - btrfs-image.c | 2 +- btrfs-list.c | 1 - btrfs-map-logical.c | 2 +- btrfs-select-super.c | 2 +- btrfs-show-super.c | 2 +- btrfs-zero-log.c | 2 +- btrfs.c | 1 - btrfstune.c | 2 +- chunk-recover.c | 1 - cmds-check.c | 2 +- cmds-receive.c | 1 - cmds-restore.c | 1 - cmds-send.c | 2 -- disk-io.c | 2 +- mkfs.c | 1 - send-test.c | 2 -- super-recover.c | 1 - utils-lib.c | 2 -- utils.c | 2 +- 25 files changed, 14 insertions(+), 28 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4cae30c..0dd83ea 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,9 @@ export CC = gcc LN = ln AR = ar -AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -DBTRFS_FLAT_INCLUDES -fno-strict-aliasing -fPIC +AM_CFLAGS = -include config.h -Wall \ + -D_FILE_OFFSET_BITS=64 -DBTRFS_FLAT_INCLUDES \ + -fno-strict-aliasing -fPIC CFLAGS = -g -O1 -fno-strict-aliasing -rdynamic objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \ root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \ diff --git a/btrfs-calc-size.c b/btrfs-calc-size.c index 501111c..3ec8230 100644 --- a/btrfs-calc-size.c +++ b/btrfs-calc-size.c @@ -17,7 +17,6 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 #include #include #include diff --git a/btrfs-convert.c b/btrfs-convert.c index 02c5e94..c88acc1 100644 --- a/btrfs-convert.c +++ b/btrfs-convert.c @@ -17,7 +17,6 @@ */ #define _XOPEN_SOURCE 600 -#define _GNU_SOURCE 1 #include "kerncompat.h" diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c index af9ae4d..e993680 100644 --- a/btrfs-corrupt-block.c +++ b/btrfs-corrupt-block.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/btrfs-find-root.c b/btrfs-find-root.c index 6fa61cc..b24dddf 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/btrfs-fragments.c b/btrfs-fragments.c index d03c2c3..ca45686 100644 --- a/btrfs-fragments.c +++ b/btrfs-fragments.c @@ -14,7 +14,6 @@ * Boston, MA 021110-1307, USA. */ -#define _GNU_SOURCE #include #include #include diff --git a/btrfs-image.c b/btrfs-image.c index cb17f16..1257966 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/btrfs-list.c b/btrfs-list.c index 50edcf4..3e29cf8 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -16,7 +16,6 @@ * Boston, MA 021110-1307, USA. */ -#define _GNU_SOURCE #include #include #include "ioctl.h" diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c index 47d1104..c34484f 100644 --- a/btrfs-map-logical.c +++ b/btrfs-map-logical.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/btrfs-select-super.c b/btrfs-select-super.c index 6231d42..54ac436 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/btrfs-show-super.c b/btrfs-show-super.c index 2b48f44..9702eb0 100644 --- a/btrfs-show-super.c +++ b/btrfs-show-super.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/btrfs-zero-log.c b/btrfs-zero-log.c index 4154175..411fae3 100644 --- a/btrfs-zero-log.c +++ b/btrfs-zero-log.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/btrfs.c b/btrfs.c index e83349c..2451885 100644 --- a/btrfs.c +++ b/btrfs.c @@ -14,7 +14,6 @@ * Boston, MA 021110-1307, USA. */ -#define _GNU_SOURCE #include #include #include diff --git a/btrfstune.c b/btrfstune.c index 050418a..899a721 100644 --- a/btrfstune.c +++ b/btrfstune.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/chunk-recover.c b/chunk-recover.c index 6f43066..688a7d7 100644 --- a/chunk-recover.c +++ b/chunk-recover.c @@ -16,7 +16,6 @@ * Boston, MA 021110-1307, USA. */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE #include #include diff --git a/cmds-check.c b/cmds-check.c index 9fc1410..0894cf0 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -17,7 +17,7 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 + #include #include #include diff --git a/cmds-receive.c b/cmds-receive.c index 358df1f..f234b15 100644 --- a/cmds-receive.c +++ b/cmds-receive.c @@ -16,7 +16,6 @@ * Boston, MA 021110-1307, USA. */ -#define _GNU_SOURCE #define _POSIX_C_SOURCE 200809 #define _XOPEN_SOURCE 700 #define _BSD_SOURCE diff --git a/cmds-restore.c b/cmds-restore.c index 2f9b72d..a5c99e8 100644 --- a/cmds-restore.c +++ b/cmds-restore.c @@ -17,7 +17,6 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 #include "kerncompat.h" diff --git a/cmds-send.c b/cmds-send.c index b17b5e2..f6fae44 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -16,8 +16,6 @@ * Boston, MA 021110-1307, USA. */ -#define _GNU_SOURCE - #include "kerncompat.h" #include diff --git a/disk-io.c b/disk-io.c index 03edf8e..9f15c0c 100644 --- a/disk-io.c +++ b/disk-io.c @@ -18,7 +18,7 @@ #define _XOPEN_SOURCE 600 #define __USE_XOPEN2K -#define _GNU_SOURCE 1 + #include #include #include diff --git a/mkfs.c b/mkfs.c index e10e62d..d5d03fc 100644 --- a/mkfs.c +++ b/mkfs.c @@ -17,7 +17,6 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE #include "kerncompat.h" diff --git a/send-test.c b/send-test.c index 0e804a2..af8229e 100644 --- a/send-test.c +++ b/send-test.c @@ -21,8 +21,6 @@ * Boston, MA 021110-1307, USA. */ -#define _GNU_SOURCE - #include #include #include diff --git a/super-recover.c b/super-recover.c index adb2c44..d0125f4 100644 --- a/super-recover.c +++ b/super-recover.c @@ -17,7 +17,6 @@ */ #define _XOPEN_SOURCE 500 -#define _GNU_SOURCE 1 #include #include diff --git a/utils-lib.c b/utils-lib.c index 9d53c6e..79ef35e 100644 --- a/utils-lib.c +++ b/utils-lib.c @@ -1,5 +1,3 @@ -#define _GNU_SOURCE - #include "kerncompat.h" #include #include diff --git a/utils.c b/utils.c index 2a92416..1f95a9b 100644 --- a/utils.c +++ b/utils.c @@ -20,7 +20,7 @@ #define _XOPEN_SOURCE 700 #define __USE_XOPEN2K8 #define __XOPEN2K8 /* due to an error in dirent.h, to get dirfd() */ -#define _GNU_SOURCE /* O_NOATIME */ + #include #include #include