diff options
author | Lakshmi Priya Sekar <lasekar@microsoft.com> | 2015-09-08 12:01:33 -0700 |
---|---|---|
committer | Lakshmi Priya Sekar <lasekar@microsoft.com> | 2015-09-08 14:31:43 -0700 |
commit | 260f64716ae3bc8fb9ae4708cbb8d4a0a6c48a91 (patch) | |
tree | eaf3d7a932739a8da89e64f0c9ac322e8c671dba /src/utilcode | |
parent | 2d2d0a5b512e2832565c448d9b4c6d6c1897f150 (diff) | |
download | coreclr-260f64716ae3bc8fb9ae4708cbb8d4a0a6c48a91.tar.gz coreclr-260f64716ae3bc8fb9ae4708cbb8d4a0a6c48a91.tar.bz2 coreclr-260f64716ae3bc8fb9ae4708cbb8d4a0a6c48a91.zip |
Replace MAX_PATH with new defines, rest of coreclr.
Diffstat (limited to 'src/utilcode')
-rw-r--r-- | src/utilcode/dlwrap.cpp | 2 | ||||
-rw-r--r-- | src/utilcode/log.cpp | 4 | ||||
-rw-r--r-- | src/utilcode/makepath.cpp | 12 | ||||
-rw-r--r-- | src/utilcode/stacktrace.cpp | 4 | ||||
-rw-r--r-- | src/utilcode/util.cpp | 6 | ||||
-rw-r--r-- | src/utilcode/util_nodependencies.cpp | 10 | ||||
-rw-r--r-- | src/utilcode/utilmessagebox.cpp | 10 |
7 files changed, 24 insertions, 24 deletions
diff --git a/src/utilcode/dlwrap.cpp b/src/utilcode/dlwrap.cpp index 6cd8f44932..f649e5267b 100644 --- a/src/utilcode/dlwrap.cpp +++ b/src/utilcode/dlwrap.cpp @@ -91,7 +91,7 @@ CreateUrlCacheEntryW_NoThrow( IN LPCWSTR lpszUrlName, IN DWORD dwExpectedFileSize, IN LPCWSTR lpszFileExtension, - __out_ecount(MAX_PATH+1) LPWSTR lpszFileName, + __out_ecount(MAX_LONGPATH+1) LPWSTR lpszFileName, IN DWORD dwReserved ) { diff --git a/src/utilcode/log.cpp b/src/utilcode/log.cpp index f18b7f1b96..df290c4d71 100644 --- a/src/utilcode/log.cpp +++ b/src/utilcode/log.cpp @@ -33,7 +33,7 @@ static DWORD LogFlags = 0; -static char szLogFileName[MAX_PATH+1] = DEFAULT_LOGFILE_NAME; +static char szLogFileName[MAX_LONGPATH+1] = DEFAULT_LOGFILE_NAME; static HANDLE LogFileHandle = INVALID_HANDLE_VALUE; static MUTEX_COOKIE LogFileMutex = 0; static DWORD LogFacilityMask = LF_ALL; @@ -123,7 +123,7 @@ VOID InitLogging() } if (LogFileHandle == INVALID_HANDLE_VALUE) { DWORD written; - char buff[MAX_PATH+60]; + char buff[MAX_LONGPATH+60]; strcpy(buff, "Could not open log file, logging to "); strcat_s(buff, _countof(buff), szLogFileName); // ARULM--Changed WriteConsoleA to WriteFile to be CE compat diff --git a/src/utilcode/makepath.cpp b/src/utilcode/makepath.cpp index 0443b991aa..f58efdc246 100644 --- a/src/utilcode/makepath.cpp +++ b/src/utilcode/makepath.cpp @@ -40,7 +40,7 @@ *******************************************************************************/ void MakePath ( - __out_ecount (MAX_PATH) WCHAR *path, + __out_ecount (MAX_LONGPATH) WCHAR *path, __in LPCWSTR drive, __in LPCWSTR dir, __in LPCWSTR fname, @@ -92,7 +92,7 @@ void MakePath ( *path++ = *p++; count++; - if (count == MAX_PATH) { + if (count == MAX_LONGPATH) { --path; *path = _T('\0'); return; @@ -112,7 +112,7 @@ void MakePath ( *path++ = _T('\\'); count++; - if (count == MAX_PATH) { + if (count == MAX_LONGPATH) { --path; *path = _T('\0'); return; @@ -127,7 +127,7 @@ void MakePath ( *path++ = *p++; count++; - if (count == MAX_PATH) { + if (count == MAX_LONGPATH) { --path; *path = _T('\0'); return; @@ -144,7 +144,7 @@ void MakePath ( *path++ = _T('.'); count++; - if (count == MAX_PATH) { + if (count == MAX_LONGPATH) { --path; *path = _T('\0'); return; @@ -154,7 +154,7 @@ void MakePath ( while ((*path++ = *p++)) { count++; - if (count == MAX_PATH) { + if (count == MAX_LONGPATH) { --path; *path = _T('\0'); return; diff --git a/src/utilcode/stacktrace.cpp b/src/utilcode/stacktrace.cpp index 7cea7ffc92..f2086182f3 100644 --- a/src/utilcode/stacktrace.cpp +++ b/src/utilcode/stacktrace.cpp @@ -617,13 +617,13 @@ DWORD_PTR dwAddr { if (mbi.Type & MEM_IMAGE) { - char achFile[MAX_PATH] = {0}; + char achFile[MAX_LONGPATH] = {0}; DWORD cch; cch = GetModuleFileNameA( (HINSTANCE)mbi.AllocationBase, achFile, - MAX_PATH); + MAX_LONGPATH); // Ignore the return code since we can't do anything with it. _SymLoadModule( diff --git a/src/utilcode/util.cpp b/src/utilcode/util.cpp index 3bc6f73382..e7d6a620ff 100644 --- a/src/utilcode/util.cpp +++ b/src/utilcode/util.cpp @@ -56,12 +56,12 @@ void InitWinRTStatus() const WCHAR wszComBaseDll[] = W("\\combase.dll"); const SIZE_T cchComBaseDll = _countof(wszComBaseDll); - WCHAR wszComBasePath[MAX_PATH + 1]; + WCHAR wszComBasePath[MAX_LONGPATH + 1]; const SIZE_T cchComBasePath = _countof(wszComBasePath); ZeroMemory(wszComBasePath, cchComBasePath * sizeof(wszComBasePath[0])); - UINT cchSystemDirectory = WszGetSystemDirectory(wszComBasePath, MAX_PATH); + UINT cchSystemDirectory = WszGetSystemDirectory(wszComBasePath, MAX_LONGPATH); // Make sure that we're only probing in the system directory. If we can't find the system directory, or // we find it but combase.dll doesn't fit into it, we'll fall back to a safe default of saying that WinRT @@ -3630,7 +3630,7 @@ namespace Util DWORD cCharsNeeded; cCharsNeeded = GetEnvironmentVariableW(W("LOCALAPPDATA"), NULL, 0); - if ((cCharsNeeded != 0) && (cCharsNeeded < MAX_PATH)) + if ((cCharsNeeded != 0) && (cCharsNeeded < MAX_LONGPATH)) { wszLocalAppData = new WCHAR[cCharsNeeded]; cCharsNeeded = GetEnvironmentVariableW(W("LOCALAPPDATA"), wszLocalAppData, cCharsNeeded); diff --git a/src/utilcode/util_nodependencies.cpp b/src/utilcode/util_nodependencies.cpp index 8246a2074a..27720ae0f8 100644 --- a/src/utilcode/util_nodependencies.cpp +++ b/src/utilcode/util_nodependencies.cpp @@ -384,7 +384,7 @@ BOOL IsCurrentModuleFileNameInAutoExclusionList() return FALSE; } - WCHAR wszAppName[MAX_PATH]; + WCHAR wszAppName[MAX_LONGPATH]; DWORD cchAppName = NumItems(wszAppName); // Get the appname to look up in the exclusion or inclusion list. @@ -419,7 +419,7 @@ void GetDebuggerSettingInfo(SString &ssDebuggerString, BOOL *pfAuto) EX_TRY { - DWORD cchDebuggerString = MAX_PATH; + DWORD cchDebuggerString = MAX_LONGPATH; INDEBUG(DWORD cchOldDebuggerString = cchDebuggerString); WCHAR * buf = ssDebuggerString.OpenUnicodeBuffer(cchDebuggerString); @@ -553,7 +553,7 @@ HRESULT GetDebuggerSettingInfoWorker(__out_ecount_part_opt(*pcchDebuggerString, BOOL fAuto = FALSE; // Get the appname to look up in DebugApplications key. - WCHAR wzAppName[MAX_PATH]; + WCHAR wzAppName[MAX_LONGPATH]; DWORD cchAppName = NumItems(wzAppName); long iValue; @@ -573,9 +573,9 @@ HRESULT GetDebuggerSettingInfoWorker(__out_ecount_part_opt(*pcchDebuggerString, { // Look in AeDebug key for "Auto"; get the size of any value stored there. ret = WszRegQueryValueEx(hKeyHolder, kUnmanagedDebuggerAutoValue, 0, &valueType, 0, &valueSize); - if ((ret == ERROR_SUCCESS) && (valueType == REG_SZ) && (valueSize / sizeof(WCHAR) < MAX_PATH)) + if ((ret == ERROR_SUCCESS) && (valueType == REG_SZ) && (valueSize / sizeof(WCHAR) < MAX_LONGPATH)) { - WCHAR wzAutoKey[MAX_PATH]; + WCHAR wzAutoKey[MAX_LONGPATH]; valueSize = NumItems(wzAutoKey) * sizeof(WCHAR); WszRegQueryValueEx(hKeyHolder, kUnmanagedDebuggerAutoValue, NULL, NULL, reinterpret_cast< LPBYTE >(wzAutoKey), &valueSize); diff --git a/src/utilcode/utilmessagebox.cpp b/src/utilcode/utilmessagebox.cpp index 83e2831c20..f28d2d48f3 100644 --- a/src/utilcode/utilmessagebox.cpp +++ b/src/utilcode/utilmessagebox.cpp @@ -38,8 +38,8 @@ UINT GetCLRMBRTLStyle() WRAPPER_NO_CONTRACT; UINT mbStyle = 0; - WCHAR buff[MAX_PATH]; - if(SUCCEEDED(UtilLoadStringRC(IDS_RTL, buff, MAX_PATH, true))) { + WCHAR buff[MAX_LONGPATH]; + if(SUCCEEDED(UtilLoadStringRC(IDS_RTL, buff, MAX_LONGPATH, true))) { if(wcscmp(buff, W("RTL_True")) == 0) { mbStyle = 0x00080000 |0x00100000; // MB_RIGHT || MB_RTLREADING } @@ -152,8 +152,8 @@ int MessageBoxImpl( ACTCTX ctx = { sizeof(ACTCTX) }; ctx.dwFlags = 0; StackSString manifestPath; // Point this at %windir%\WindowsShell.manifest, for comctl32 version 6. - UINT numChars = WszGetWindowsDirectory(manifestPath.OpenUnicodeBuffer(MAX_PATH), MAX_PATH); - if (numChars == 0 || numChars >= MAX_PATH) + UINT numChars = WszGetWindowsDirectory(manifestPath.OpenUnicodeBuffer(MAX_PATH_FNAME), MAX_PATH_FNAME); + if (numChars == 0 || numChars >= MAX_PATH_FNAME) { _ASSERTE(0); // How did this fail? } @@ -359,7 +359,7 @@ int UtilMessageBoxNonLocalizedVA( formattedMessage.VPrintf(lpText, args); // Try to get filename of Module and add it to title - if (showFileNameInTitle && WszGetModuleFileName(NULL, fileName.OpenUnicodeBuffer(MAX_PATH), MAX_PATH)) + if (showFileNameInTitle && WszGetModuleFileName(NULL, fileName.OpenUnicodeBuffer(MAX_LONGPATH), MAX_LONGPATH)) { LPCWSTR wszName = NULL; size_t cchName = 0; |