From: Wolfgang Stöggl Date: Fri, 1 Feb 2019 23:30:52 +0000 (+0100) Subject: Define PATH_MAX as _MAX_PATH for MSVC builds X-Git-Tag: v1.7.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d6ef2b43f68bb714f367c502fda0f72fff7cc54;p=thirdparty%2Frrdtool-1.x.git 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 --- 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