criu/Makefile.config
Cyrill Gorcunov bc002e8537 Add strlcpy helper
Same as kernel provides, adopted from Linux sources.

strlcpy is similar to strncpy but _always_ adds \0
at the end of string even if destination is shorter.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-28 19:06:43 +04:00

23 lines
637 B
Text

include scripts/utilities.mak
include scripts/feature-tests.mak
CONFIG := include/config.h
$(CONFIG): scripts/utilities.mak scripts/feature-tests.mak
$(E) " GEN " $@
$(Q) @echo '#ifndef __CR_CONFIG_H__' > $@
$(Q) @echo '#define __CR_CONFIG_H__' >> $@
ifeq ($(call try-cc,$(TCP_REPAIR_TEST),,),y)
$(Q) @echo '#define CONFIG_HAS_TCP_REPAIR' >> $@
endif
ifeq ($(call try-cc,$(PRLIMIT_TEST),,),y)
$(Q) @echo '#define CONFIG_HAS_PRLIMIT' >> $@
endif
ifeq ($(call try-cc,$(STRLCPY_TEST),,),y)
$(Q) @echo '#define CONFIG_HAS_STRLCPY' >> $@
endif
$(Q) @echo '#endif /* __CR_CONFIG_H__ */' >> $@
config: $(CONFIG)
.PHONY: config