summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-12-03 18:14:26 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2018-12-14 15:09:13 +0100
commit0b19387dae782b33bb341e58ab3c7ff804ca4f14 (patch)
treea3914adc8ac8141e4380fbe6b20efc7307067030 /base
parent3c377643339be97940554323909d51b12c933f9e (diff)
downloadlvm2-0b19387dae782b33bb341e58ab3c7ff804ca4f14.tar.gz
headers: use configure.h as 1st. header
Ensure configure.h is always 1st. included header. Maybe we could eventually introduce gcc -include option, but for now this better uses dependency tracking. Also move _REENTRANT and _GNU_SOURCE into configure.h so it doesn't need to be present in various source files. This ensures consistent compilation of headers like stdio.h since it may produce different declaration.
Diffstat (limited to 'base')
-rw-r--r--base/data-struct/radix-tree-adaptive.c1
-rw-r--r--base/data-struct/radix-tree.h2
-rw-r--r--base/memory/zalloc.h2
3 files changed, 4 insertions, 1 deletions
diff --git a/base/data-struct/radix-tree-adaptive.c b/base/data-struct/radix-tree-adaptive.c
index 5e065b600..b9ba4179f 100644
--- a/base/data-struct/radix-tree-adaptive.c
+++ b/base/data-struct/radix-tree-adaptive.c
@@ -18,6 +18,7 @@
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
//----------------------------------------------------------------
diff --git a/base/data-struct/radix-tree.h b/base/data-struct/radix-tree.h
index 5d4d04c63..685b8280f 100644
--- a/base/data-struct/radix-tree.h
+++ b/base/data-struct/radix-tree.h
@@ -13,6 +13,8 @@
#ifndef BASE_DATA_STRUCT_RADIX_TREE_H
#define BASE_DATA_STRUCT_RADIX_TREE_H
+#include "configure.h"
+
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
diff --git a/base/memory/zalloc.h b/base/memory/zalloc.h
index 4f6df542f..069c59999 100644
--- a/base/memory/zalloc.h
+++ b/base/memory/zalloc.h
@@ -13,8 +13,8 @@
#ifndef BASE_MEMORY_ZALLOC_H
#define BASE_MEMORY_ZALLOC_H
+#include "configure.h"
#include <stdlib.h>
-#include <string.h>
//----------------------------------------------------------------