Respond to PR feedback.
authorLakshmi Priya Sekar <lasekar@microsoft.com>
Fri, 28 Aug 2015 20:46:30 +0000 (13:46 -0700)
committerLakshmi Priya Sekar <lasekar@microsoft.com>
Fri, 28 Aug 2015 20:46:30 +0000 (13:46 -0700)
src/pal/inc/rt/sal.h
src/pal/inc/rt/specstrings_strict.h
src/pal/src/file/find.cpp
src/pal/src/thread/context.cpp
src/pal/tests/palsuite/file_io/CreateDirectoryA/test1/CreateDirectoryA.c
src/pal/tests/palsuite/file_io/CreateDirectoryW/test1/CreateDirectoryW.c

index 69efaf1..a4ec019 100644 (file)
 
    The success criteria can be specified with the _Success_(expr) annotation:
      _Success_(return != FALSE) BOOL
-     PathCanonicalizeA(_Out_writes_(MAX_LONGPATH) LPSTR pszBuf, LPCSTR pszPath) :
+     PathCanonicalizeA(_Out_writes_(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) :
         pszBuf is only guaranteed to be NULL-terminated when TRUE is returned,
         and FALSE indiates failure. In common practice, callers check for zero
         vs. non-zero returns, so it is preferable to express the success
@@ -785,7 +785,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default};
    (<parameter>|return)[+n]  e.g. cch, return, cb+2
    
    If the buffer size is a constant expression use the c_ postfix.
-   E.g. cap_c_(20), count_c_(MAX_LONGPATH), bytecount_c_(16)
+   E.g. cap_c_(20), count_c_(MAX_PATH), bytecount_c_(16)
 
    If the buffer size is given by a limiting pointer use the ptrdiff_ versions
    of the macros.
@@ -2349,7 +2349,7 @@ typedef struct __F_ __F_;
  Advanced Annotation Examples
 
  __success(return != FALSE) LWSTDAPI_(BOOL) 
- PathCanonicalizeA(__out_ecount(MAX_LONGPATH) LPSTR pszBuf, LPCSTR pszPath) :
+ PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) :
     pszBuf is only guaranteed to be NULL-terminated when TRUE is returned.
 
  typedef __nullterminated WCHAR* LPWSTR : Initialized LPWSTRs are NULL-terminated strings.
index a5aa70f..5b7eceb 100644 (file)
 *  Advanced Annotation Examples
 * 
 *  __success(return == TRUE) LWSTDAPI_(BOOL) 
-*  PathCanonicalizeA(__out_ecount(MAX_LONGPATH) LPSTR pszBuf, LPCSTR pszPath);
+*  PathCanonicalizeA(__out_ecount(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath);
 *  //  pszBuf is only guaranteed to be null-terminated when TRUE is returned.
 * 
 *  // Initialized LPWSTRs are null-terminated strings.
index ca49422..c24962f 100644 (file)
@@ -147,7 +147,7 @@ FindFirstFileA(
     if (strlen(lpFileName) >= MAX_LONGPATH)
     {
         WARN("FindFirstFileA called with a pattern whose size is "
-             "%d >= MAX_PATH_FNAME (%d)\n", strlen(lpFileName), MAX_PATH_FNAME);
+             "%d >= MAX_LONGPATH (%d)\n", strlen(lpFileName), MAX_LONGPATH);
         dwLastError = ERROR_FILENAME_EXCED_RANGE;
         goto done;
     }
index 4f6972f..b8b343c 100644 (file)
@@ -193,7 +193,7 @@ BOOL CONTEXT_GetRegisters(DWORD processId, ucontext_t *registers)
             return FALSE;
         }
 #elif HAVE_BSD_REGS_T
-        char buf[MAX_LONGPATH];
+        char buf[MAX_PATH];
         struct reg bsd_registers;
 
         sprintf_s(buf, sizeof(buf), "/proc/%d/regs", processId);
index d5eff8e..bad2ae2 100644 (file)
@@ -24,7 +24,7 @@
 #if WIN32
 #define CREATE_MAX_PATH_SIZE    248
 #else
-#define CREATE_MAX_PATH_SIZE    _MAX_PATH
+#define CREATE_MAX_PATH_SIZE    MAX_LONGPATH
 #endif
 
 
index 799e00f..ea51f1c 100644 (file)
@@ -20,7 +20,7 @@
 #if WIN32
 #define CREATE_MAX_PATH_SIZE    248
 #else
-#define CREATE_MAX_PATH_SIZE    _MAX_PATH
+#define CREATE_MAX_PATH_SIZE    MAX_LONGPATH
 #endif