diff --git a/debugger/hash.c b/debugger/hash.c index 454ff8d5aac..79b9d9c46e7 100644 --- a/debugger/hash.c +++ b/debugger/hash.c @@ -29,7 +29,7 @@ #define NR_NAME_HASH 16384 #ifndef PATH_MAX -#define PATH_MAX _MAX_PATH +#define PATH_MAX MAX_PATH #endif #ifdef __i386__ diff --git a/debugger/msc.c b/debugger/msc.c index aff74dd8656..a3172d2ed9d 100644 --- a/debugger/msc.c +++ b/debugger/msc.c @@ -35,7 +35,7 @@ #include #include #ifndef PATH_MAX -#define PATH_MAX _MAX_PATH +#define PATH_MAX MAX_PATH #endif #include "debugger.h" diff --git a/debugger/source.c b/debugger/source.c index 65fc73c6eb8..b9db16f3396 100644 --- a/debugger/source.c +++ b/debugger/source.c @@ -32,7 +32,7 @@ #include #include #ifndef PATH_MAX -#define PATH_MAX _MAX_PATH +#define PATH_MAX MAX_PATH #endif #include "debugger.h" diff --git a/debugger/stabs.c b/debugger/stabs.c index 42265db8d00..7824dd1b15b 100644 --- a/debugger/stabs.c +++ b/debugger/stabs.c @@ -34,7 +34,7 @@ #include #include #ifndef PATH_MAX -#define PATH_MAX _MAX_PATH +#define PATH_MAX MAX_PATH #endif #include "debugger.h" diff --git a/dlls/msvcrt/dir.c b/dlls/msvcrt/dir.c index abb30525208..c43bd52ed57 100644 --- a/dlls/msvcrt/dir.c +++ b/dlls/msvcrt/dir.c @@ -215,7 +215,7 @@ int _wfindnext(long hand, struct _wfinddata_t * ft) */ char* _getcwd(char * buf, int size) { - char dir[_MAX_PATH]; + char dir[MAX_PATH]; int dir_len = GetCurrentDirectoryA(MAX_PATH,dir); if (dir_len < 1) @@ -241,7 +241,7 @@ char* _getcwd(char * buf, int size) */ WCHAR* _wgetcwd(WCHAR * buf, int size) { - WCHAR dir[_MAX_PATH]; + WCHAR dir[MAX_PATH]; int dir_len = GetCurrentDirectoryW(MAX_PATH,dir); if (dir_len < 1) @@ -286,7 +286,7 @@ char* _getdcwd(int drive, char * buf, int size) return _getcwd(buf,size); /* current */ else { - char dir[_MAX_PATH]; + char dir[MAX_PATH]; char drivespec[4] = {'A', ':', '\\', 0}; int dir_len; @@ -297,7 +297,7 @@ char* _getdcwd(int drive, char * buf, int size) return NULL; } - dir_len = GetFullPathNameA(drivespec,_MAX_PATH,dir,&dummy); + dir_len = GetFullPathNameA(drivespec,MAX_PATH,dir,&dummy); if (dir_len >= size || dir_len < 1) { SET_THREAD_VAR(errno,MSVCRT_ERANGE); @@ -326,7 +326,7 @@ WCHAR* _wgetdcwd(int drive, WCHAR * buf, int size) return _wgetcwd(buf,size); /* current */ else { - WCHAR dir[_MAX_PATH]; + WCHAR dir[MAX_PATH]; WCHAR drivespec[4] = {'A', ':', '\\', 0}; int dir_len; @@ -337,7 +337,7 @@ WCHAR* _wgetdcwd(int drive, WCHAR * buf, int size) return NULL; } - dir_len = GetFullPathNameW(drivespec,_MAX_PATH,dir,&dummy); + dir_len = GetFullPathNameW(drivespec,MAX_PATH,dir,&dummy); if (dir_len >= size || dir_len < 1) { SET_THREAD_VAR(errno,MSVCRT_ERANGE); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 2c3fb6f7301..62a8abd1759 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -137,12 +137,12 @@ QueryPathOfRegTypeLib( HRESULT hr = E_FAIL; - DWORD dwPathLen = _MAX_PATH; LCID myLCID = lcid; char szXGUID[80]; char szTypeLibKey[100]; - char szPath[dwPathLen]; + char szPath[MAX_PATH]; + DWORD dwPathLen = sizeof(szPath); if ( !HIWORD(guid) ) { diff --git a/include/windef.h b/include/windef.h index d3f0bebd2ef..d7e6ee98aaf 100644 --- a/include/windef.h +++ b/include/windef.h @@ -149,17 +149,7 @@ typedef INT (CALLBACK *PROC)(); #endif #endif /* NOMINMAX */ -#ifndef _MAX_PATH -/* FIXME: These are supposed to be in stdlib.h only */ -#define _MAX_DRIVE 3 -#define _MAX_FNAME 256 -#define _MAX_DIR _MAX_FNAME -#define _MAX_EXT _MAX_FNAME -#define _MAX_PATH 260 -#endif -#define MAX_PATH _MAX_PATH - - +#define MAX_PATH 260 #define HFILE_ERROR ((HFILE)-1) /* The SIZE structure */