mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-27 06:51:04 +08:00
Fix #1648 - set MG_PATH_MAX to FILENAME_MAX on windows and unix
This commit is contained in:
parent
cde441bca6
commit
e8289ec17d
10
mongoose.h
10
mongoose.h
@ -479,6 +479,10 @@ extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size);
|
|||||||
#define MG_ENABLE_DIRLIST 1
|
#define MG_ENABLE_DIRLIST 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MG_PATH_MAX
|
||||||
|
#define MG_PATH_MAX FILENAME_MAX
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -544,9 +548,11 @@ typedef enum { false = 0, true = 1 } bool;
|
|||||||
|
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
#define MG_DIRSEP '\\'
|
#define MG_DIRSEP '\\'
|
||||||
#ifndef PATH_MAX
|
|
||||||
#define PATH_MAX MAX_PATH
|
#ifndef MG_PATH_MAX
|
||||||
|
#define MG_PATH_MAX FILENAME_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EINPROGRESS
|
#ifndef EINPROGRESS
|
||||||
#define EINPROGRESS WSAEINPROGRESS
|
#define EINPROGRESS WSAEINPROGRESS
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,4 +52,8 @@
|
|||||||
#define MG_ENABLE_DIRLIST 1
|
#define MG_ENABLE_DIRLIST 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MG_PATH_MAX
|
||||||
|
#define MG_PATH_MAX FILENAME_MAX
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -62,9 +62,11 @@ typedef enum { false = 0, true = 1 } bool;
|
|||||||
|
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
#define MG_DIRSEP '\\'
|
#define MG_DIRSEP '\\'
|
||||||
#ifndef PATH_MAX
|
|
||||||
#define PATH_MAX MAX_PATH
|
#ifndef MG_PATH_MAX
|
||||||
|
#define MG_PATH_MAX FILENAME_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EINPROGRESS
|
#ifndef EINPROGRESS
|
||||||
#define EINPROGRESS WSAEINPROGRESS
|
#define EINPROGRESS WSAEINPROGRESS
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user