From af5c3afa91cc29268c6754ea70f15cae30f22403 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 27 Jan 2014 10:12:12 -0400 Subject: compat: add canonicalize_file_name the POSIX 2008 behaviour of realpath is not available everywhere so we provide a simple wrapper function. We use (and provide) the gnu extension canonicalize_file_name to make it cleaner to test for the feature we need; otherwise we have to rely on realpath segfaulting if the second argument is null. --- compat/Makefile.local | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compat/Makefile.local') diff --git a/compat/Makefile.local b/compat/Makefile.local index b0d5417f..bcb9f0ec 100644 --- a/compat/Makefile.local +++ b/compat/Makefile.local @@ -5,6 +5,10 @@ extra_cflags += -I$(srcdir)/$(dir) notmuch_compat_srcs := +ifneq ($(HAVE_CANONICALIZE_FILE_NAME),1) +notmuch_compat_srcs += $(dir)/canonicalize_file_name.c +endif + ifneq ($(HAVE_GETLINE),1) notmuch_compat_srcs += $(dir)/getline.c $(dir)/getdelim.c endif -- cgit v1.2.3