/ Check-in [3fefe4dd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use the UNICODE_STRING_MAX_CHARS constant from WinNT.h.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | win32heap
Files: files | file ages | folders
SHA1:3fefe4dd43539ec7e525ef58f0bfeffd31288ebd
User & Date: mistachkin 2013-11-09 21:11:36
Context
2013-11-09
22:08
Add the sqlite3_win32_compact_heap() function for cleaning up memory allocations on Win32 system. Also cleanup the winGetTempname() function. Changes to the Win32 VFS only. check-in: d06d9fdb user: drh tags: trunk
21:11
Use the UNICODE_STRING_MAX_CHARS constant from WinNT.h. Closed-Leaf check-in: 3fefe4dd user: mistachkin tags: win32heap
21:10
Furhter cleanup of the winGetTempname function. check-in: 674de36b user: mistachkin tags: win32heap
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

    65     65   */
    66     66   #ifndef SQLITE_WIN32_MAX_PATH_CHARS
    67     67   #  define SQLITE_WIN32_MAX_PATH_CHARS   (MAX_PATH)
    68     68   #endif
    69     69   
    70     70   /*
    71     71   ** Maximum pathname length (in chars) for WinNT.  This should normally be
    72         -** 32767.
           72  +** UNICODE_STRING_MAX_CHARS.
    73     73   */
    74     74   #ifndef SQLITE_WINNT_MAX_PATH_CHARS
    75         -#  define SQLITE_WINNT_MAX_PATH_CHARS   (32767)
           75  +#  define SQLITE_WINNT_MAX_PATH_CHARS   (UNICODE_STRING_MAX_CHARS)
    76     76   #endif
    77     77   
    78     78   /*
    79     79   ** Maximum pathname length (in bytes) for Win32.  The MAX_PATH macro is in
    80     80   ** characters, so we allocate 3 bytes per character assuming worst-case of
    81     81   ** 4-bytes-per-character for UTF8.
    82     82   */
    83     83   #ifndef SQLITE_WIN32_MAX_PATH_BYTES
    84     84   #  define SQLITE_WIN32_MAX_PATH_BYTES   (SQLITE_WIN32_MAX_PATH_CHARS*4)
    85     85   #endif
    86     86   
    87     87   /*
    88     88   ** Maximum pathname length (in bytes) for WinNT.  This should normally be
    89         -** 32767 * sizeof(WCHAR).
           89  +** UNICODE_STRING_MAX_CHARS * sizeof(WCHAR).
    90     90   */
    91     91   #ifndef SQLITE_WINNT_MAX_PATH_BYTES
    92     92   #  define SQLITE_WINNT_MAX_PATH_BYTES   \
    93     93                               (sizeof(WCHAR) * SQLITE_WINNT_MAX_PATH_CHARS)
    94     94   #endif
    95     95   
    96     96   /*