From ac4d10b3c008ab1bf105708e29514435fabe4f69 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 30 Dec 2025 17:23:02 +0100 Subject: [PATCH] clar: define CLAR_MAX_PATH even w/o PATH_MAX PATH_MAX is an optional constant in POSIX, and at least on GNU/Hurd it is not provided on purpose. Define CLAR_MAX_PATH to a static value in case PATH_MAX is not available, using the same value used for the "Windows with long paths" case. In the end, 4096 should not be a problem for a test framework. --- clar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clar.h b/clar.h index f7e4363..9ea91d3 100644 --- a/clar.h +++ b/clar.h @@ -15,8 +15,10 @@ # define CLAR_MAX_PATH 4096 #elif defined(_WIN32) # define CLAR_MAX_PATH MAX_PATH -#else +#elif defined(PATH_MAX) # define CLAR_MAX_PATH PATH_MAX +#else +# define CLAR_MAX_PATH 4096 #endif #ifndef CLAR_SELFTEST