mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
configure: avoid repeative inclusion of configure.h
Since configure.h is a generated header and it's missing traditional ifdefs preambule - it can be included & parsed multiple times. Normally compiler is fine when defines have same value and there is no warning - yet we don't need to parse this several times and by adding -include directive we can ensure every file in the package is rightly compile with configure.h as the first header file.
This commit is contained in:
parent
a7034fa420
commit
18aa541ca2
@ -13,8 +13,6 @@
|
|||||||
#ifndef BASE_DATA_STRUCT_RADIX_TREE_H
|
#ifndef BASE_DATA_STRUCT_RADIX_TREE_H
|
||||||
#define BASE_DATA_STRUCT_RADIX_TREE_H
|
#define BASE_DATA_STRUCT_RADIX_TREE_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#ifndef BASE_MEMORY_ZALLOC_H
|
#ifndef BASE_MEMORY_ZALLOC_H
|
||||||
#define BASE_MEMORY_ZALLOC_H
|
#define BASE_MEMORY_ZALLOC_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#ifndef _LVM_CLOG_LOGGING_H
|
#ifndef _LVM_CLOG_LOGGING_H
|
||||||
#define _LVM_CLOG_LOGGING_H
|
#define _LVM_CLOG_LOGGING_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
#include "libdevmapper-event.h"
|
#include "libdevmapper-event.h"
|
||||||
#include "dmeventd.h"
|
#include "dmeventd.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
#include "libdevmapper-event.h"
|
#include "libdevmapper-event.h"
|
||||||
#include "dmeventd.h"
|
#include "dmeventd.h"
|
||||||
#include "libdm/misc/dm-logging.h"
|
#include "libdm/misc/dm-logging.h"
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
#ifndef LIB_DEVICE_MAPPER_H
|
#ifndef LIB_DEVICE_MAPPER_H
|
||||||
#define LIB_DEVICE_MAPPER_H
|
#define LIB_DEVICE_MAPPER_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
|
|
||||||
#include "base/data-struct/list.h"
|
#include "base/data-struct/list.h"
|
||||||
#include "base/data-struct/hash.h"
|
#include "base/data-struct/hash.h"
|
||||||
#include "vdo/target.h"
|
#include "vdo/target.h"
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
/* Note: this object is also used by VDO dmeventd plugin for parsing status */
|
/* Note: this object is also used by VDO dmeventd plugin for parsing status */
|
||||||
/* File could be included by VDO plugin and can use original libdm library */
|
/* File could be included by VDO plugin and can use original libdm library */
|
||||||
#ifndef LIB_DMEVENT_H
|
#ifndef LIB_DMEVENT_H
|
||||||
#include "configure.h"
|
|
||||||
// For DM_ARRAY_SIZE!
|
|
||||||
#include "device_mapper/all.h"
|
#include "device_mapper/all.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// For canonicalize_file_name()
|
// For canonicalize_file_name()
|
||||||
#include "configure.h"
|
|
||||||
#include "libdm/misc/dm-logging.h"
|
#include "libdm/misc/dm-logging.h"
|
||||||
#include "libdm/dm-tools/util.h"
|
#include "libdm/dm-tools/util.h"
|
||||||
|
|
||||||
|
@ -275,11 +275,11 @@ LIB_VERSION_LVM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir
|
|||||||
|
|
||||||
LIB_VERSION_DM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir)/VERSION_DM)
|
LIB_VERSION_DM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir)/VERSION_DM)
|
||||||
|
|
||||||
INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include
|
INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include -include configure.h
|
||||||
|
|
||||||
|
|
||||||
DEPS = $(top_builddir)/libdm/make.tmpl $(top_srcdir)/VERSION \
|
DEPS = $(top_builddir)/libdm/make.tmpl $(top_srcdir)/VERSION \
|
||||||
$(top_builddir)/libdm/Makefile
|
$(top_builddir)/libdm/Makefile $(top_builddir)/include/configure.h
|
||||||
|
|
||||||
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
||||||
POTFILES = $(SOURCES:%.c=%.pot)
|
POTFILES = $(SOURCES:%.c=%.pot)
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
#ifndef _DM_LIB_H
|
#ifndef _DM_LIB_H
|
||||||
#define _DM_LIB_H
|
#define _DM_LIB_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Symbol export control macros
|
* Symbol export control macros
|
||||||
*
|
*
|
||||||
|
@ -294,12 +294,12 @@ LIB_VERSION_DM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir)
|
|||||||
|
|
||||||
LIB_VERSION_APP := $(shell $(AWK) -F '[(). ]' '{printf "%s.%s",$$1,$$4}' $(top_srcdir)/VERSION)
|
LIB_VERSION_APP := $(shell $(AWK) -F '[(). ]' '{printf "%s.%s",$$1,$$4}' $(top_srcdir)/VERSION)
|
||||||
|
|
||||||
INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include
|
INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include -include configure.h
|
||||||
|
|
||||||
#VDO_INCLUDES=-I@VDO_INCLUDE@
|
#VDO_INCLUDES=-I@VDO_INCLUDE@
|
||||||
|
|
||||||
DEPS = $(top_builddir)/make.tmpl $(top_srcdir)/VERSION \
|
DEPS = $(top_builddir)/make.tmpl $(top_srcdir)/VERSION \
|
||||||
$(top_builddir)/Makefile
|
$(top_builddir)/Makefile $(top_builddir)/include/configure.h
|
||||||
|
|
||||||
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
||||||
POTFILES = $(SOURCES:%.c=%.pot)
|
POTFILES = $(SOURCES:%.c=%.pot)
|
||||||
|
@ -80,8 +80,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
|
|
||||||
/* Timeout for the whole test suite in hours */
|
/* Timeout for the whole test suite in hours */
|
||||||
static const time_t TEST_SUITE_TIMEOUT = 4;
|
static const time_t TEST_SUITE_TIMEOUT = 4;
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef TEST_UNIT_FRAMEWORK_H
|
#ifndef TEST_UNIT_FRAMEWORK_H
|
||||||
#define TEST_UNIT_FRAMEWORK_H
|
#define TEST_UNIT_FRAMEWORK_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
#include "device_mapper/all.h"
|
#include "device_mapper/all.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
#ifndef _LVM_TOOL_H
|
#ifndef _LVM_TOOL_H
|
||||||
#define _LVM_TOOL_H
|
#define _LVM_TOOL_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
|
|
||||||
#include "base/memory/zalloc.h"
|
#include "base/memory/zalloc.h"
|
||||||
#include "device_mapper/all.h"
|
#include "device_mapper/all.h"
|
||||||
#include "lib/misc/util.h"
|
#include "lib/misc/util.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user