@@ -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 \
@@ -17,7 +17,6 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -17,7 +17,6 @@
*/
#define _XOPEN_SOURCE 600
-#define _GNU_SOURCE 1
#include "kerncompat.h"
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -14,7 +14,6 @@
* Boston, MA 021110-1307, USA.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
@@ -16,7 +16,6 @@
* Boston, MA 021110-1307, USA.
*/
-#define _GNU_SOURCE
#include <sys/ioctl.h>
#include <sys/mount.h>
#include "ioctl.h"
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -14,7 +14,6 @@
* Boston, MA 021110-1307, USA.
*/
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -16,7 +16,6 @@
* Boston, MA 021110-1307, USA.
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE
#include <stdio.h>
#include <stdio_ext.h>
@@ -17,7 +17,7 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -16,7 +16,6 @@
* Boston, MA 021110-1307, USA.
*/
-#define _GNU_SOURCE
#define _POSIX_C_SOURCE 200809
#define _XOPEN_SOURCE 700
#define _BSD_SOURCE
@@ -17,7 +17,6 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
#include "kerncompat.h"
@@ -16,8 +16,6 @@
* Boston, MA 021110-1307, USA.
*/
-#define _GNU_SOURCE
-
#include "kerncompat.h"
#include <unistd.h>
@@ -18,7 +18,7 @@
#define _XOPEN_SOURCE 600
#define __USE_XOPEN2K
-#define _GNU_SOURCE 1
+
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -17,7 +17,6 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE
#include "kerncompat.h"
@@ -21,8 +21,6 @@
* Boston, MA 021110-1307, USA.
*/
-#define _GNU_SOURCE
-
#include <unistd.h>
#include <stdint.h>
#include <dirent.h>
@@ -17,7 +17,6 @@
*/
#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
@@ -1,5 +1,3 @@
-#define _GNU_SOURCE
-
#include "kerncompat.h"
#include <unistd.h>
#include <stdlib.h>
@@ -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 <stdio.h>
#include <stdlib.h>
#include <string.h>
- 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 <kzak@redhat.com> --- 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(-)