From aa47b5f1a37f8284e994f2acd1a769f41938c6c6 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 25 May 2020 14:43:15 -0400 Subject: [PATCH] Don't override the PATH_SEP definition if present PATH_SEP is declared on Windows to be ";" and not ":" by include/config.h.w32. lib/base/context.c and lib/hx509.c must not override an existing setting. Otherwise, file lists cannot be separated and will be treated as a single file name. Change-Id: I5521188faca36e41fbae95fbb8942970eab261c8 --- lib/base/context.c | 4 +++- lib/hx509/cert.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/base/context.c b/lib/base/context.c index bbbb7ed89..c16bc1014 100644 --- a/lib/base/context.c +++ b/lib/base/context.c @@ -176,7 +176,9 @@ heim_set_debug_dest(heim_context context, heim_log_facility *fac) return 0; } -#define PATH_SEP ":" +#ifndef PATH_SEP +# define PATH_SEP ":" +#endif static heim_error_code add_file(char ***pfilenames, int *len, char *file) diff --git a/lib/hx509/cert.c b/lib/hx509/cert.c index 6cb871d96..5f9b3fa37 100644 --- a/lib/hx509/cert.c +++ b/lib/hx509/cert.c @@ -125,7 +125,9 @@ hx509_get_instance(const char *libname) return 0; } -#define PATH_SEP ":" +#ifndef PATH_SEP +# define PATH_SEP ":" +#endif static const char *hx509_config_file = "~/.hx509/config" PATH_SEP SYSCONFDIR "/hx509.conf" PATH_SEP