]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Define PATH_MAX as _MAX_PATH for MSVC builds
authorWolfgang Stöggl <c72578@yahoo.de>
Fri, 1 Feb 2019 23:30:52 +0000 (00:30 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Sat, 2 Feb 2019 21:27:50 +0000 (22:27 +0100)
- 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

index 62fac45f461b1f7186a10767eaaa9df4dcbc1fb8..8c2fbaf77920961094eaa725f413f5256d3a75e3 100644 (file)
 /* 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 <ctype.h>