diff --git a/mongoose.h b/mongoose.h index c198c8e5..35fde3b6 100644 --- a/mongoose.h +++ b/mongoose.h @@ -479,6 +479,10 @@ extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size); #define MG_ENABLE_DIRLIST 1 #endif +#ifndef MG_PATH_MAX +#define MG_PATH_MAX FILENAME_MAX +#endif + #endif @@ -544,9 +548,11 @@ typedef enum { false = 0, true = 1 } bool; typedef int socklen_t; #define MG_DIRSEP '\\' -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH + +#ifndef MG_PATH_MAX +#define MG_PATH_MAX FILENAME_MAX #endif + #ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS #endif diff --git a/src/arch_unix.h b/src/arch_unix.h index 7eaeeeb1..eaf1876d 100644 --- a/src/arch_unix.h +++ b/src/arch_unix.h @@ -52,4 +52,8 @@ #define MG_ENABLE_DIRLIST 1 #endif +#ifndef MG_PATH_MAX +#define MG_PATH_MAX FILENAME_MAX +#endif + #endif diff --git a/src/arch_win32.h b/src/arch_win32.h index 2616156a..ec3b383b 100644 --- a/src/arch_win32.h +++ b/src/arch_win32.h @@ -62,9 +62,11 @@ typedef enum { false = 0, true = 1 } bool; typedef int socklen_t; #define MG_DIRSEP '\\' -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH + +#ifndef MG_PATH_MAX +#define MG_PATH_MAX FILENAME_MAX #endif + #ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS #endif