diff --git a/Changes b/Changes index bd1fc12f7..6b5ff7f24 100644 --- a/Changes +++ b/Changes @@ -2665,3 +2665,5 @@ seen. gmtime warning still there - Added a function join_channel which will make it easier for module coders to force users to join a channel - Made it possible to compile the win32 version with libcurl support +- Updated the win32 TRE lib/dll to the latest version (0.6.3) +- Fixed a PATH_MAX vs MAX_PATH problem diff --git a/include/sys.h b/include/sys.h index 609ba234d..2632ccf37 100644 --- a/include/sys.h +++ b/include/sys.h @@ -127,6 +127,7 @@ typedef unsigned int u_int; #ifdef _WIN32 #define MYOSNAME OSName extern char OSName[256]; +#define PATH_MAX MAX_PATH #endif #ifdef DEBUGMODE // #define ircsprintf sprintf diff --git a/src/support.c b/src/support.c index f2263caa7..be30a21a5 100644 --- a/src/support.c +++ b/src/support.c @@ -1693,11 +1693,11 @@ char *unreal_mktemp(char *dir, char *suffix) { FILE *fd; unsigned int i; - static char tempbuf[MAX_PATH+1]; + static char tempbuf[PATH_MAX+1]; for (i = 500; i > 0; i--) { - snprintf(tempbuf, MAX_PATH, "%s/%X.%s", dir, rand(), suffix); + snprintf(tempbuf, PATH_MAX, "%s/%X.%s", dir, rand(), suffix); fd = fopen(tempbuf, "r"); if (!fd) return tempbuf; diff --git a/src/win32/tre.dll b/src/win32/tre.dll index 343384633..51b26e43e 100644 Binary files a/src/win32/tre.dll and b/src/win32/tre.dll differ diff --git a/src/win32/tre.lib b/src/win32/tre.lib index 9c0569514..58e5781a6 100644 Binary files a/src/win32/tre.lib and b/src/win32/tre.lib differ