From 6d6ef2b43f68bb714f367c502fda0f72fff7cc54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wolfgang=20St=C3=B6ggl?= Date: Sat, 2 Feb 2019 00:30:52 +0100 Subject: [PATCH] Define PATH_MAX as _MAX_PATH for MSVC builds - The max. length of full pathname is 260 under Windows. _MAX_PATH is defined in stdlib.h, use: #define PATH_MAX _MAX_PATH --- win32/rrd_config.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win32/rrd_config.h b/win32/rrd_config.h index 62fac45f..8c2fbaf7 100644 --- a/win32/rrd_config.h +++ b/win32/rrd_config.h @@ -106,9 +106,10 @@ /* Define to 1 if you have the `vasprintf' function. */ #define HAVE_VASPRINTF 1 -/* Misc Missing Windows defines */ -#undef PATH_MAX /* PATH_MAX is defined in win32/dirent.h too. Relevant, if included before rrd_config.h */ -#define PATH_MAX 1024 +/* Misc missing Windows defines */ +#ifndef PATH_MAX /* PATH_MAX is defined in win32/dirent.h too. Relevant, if included before rrd_config.h */ +#define PATH_MAX _MAX_PATH /* max. length of full pathname is 260 under Windows, _MAX_PATH is defined in stdlib.h */ +#endif #include -- 2.47.2