1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Preparation for further Windows path name handling changes.

FossilOrigin-Name: ec99224b0c9cf1ccd64b3dc93252556d888e93a3
This commit is contained in:
mistachkin
2013-08-26 23:18:57 +00:00
parent 31706a2d94
commit 4496a2329a
3 changed files with 27 additions and 10 deletions

View File

@@ -30,7 +30,7 @@
** available in Windows platforms based on the NT kernel.
*/
#if !SQLITE_OS_WINNT && !defined(SQLITE_OMIT_WAL)
# error "WAL mode requires support from the Windows NT kernel, compile\
# error "WAL mode requires support from the Windows NT kernel, compile\
with SQLITE_OMIT_WAL."
#endif
@@ -58,13 +58,30 @@
# define SQLITE_WIN32_MAX_PATH_CHARS (MAX_PATH)
#endif
/*
** Maximum pathname length (in chars) for WinNT. This should normally be
** 32767.
*/
#ifndef SQLITE_WINNT_MAX_PATH_CHARS
# define SQLITE_WINNT_MAX_PATH_CHARS (32767)
#endif
/*
** Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in
** characters, so we allocate 3 bytes per character assuming worst-case of
** 3-bytes-per-character for UTF8.
** 4-bytes-per-character for UTF8.
*/
#ifndef SQLITE_WIN32_MAX_PATH_BYTES
# define SQLITE_WIN32_MAX_PATH_BYTES (SQLITE_WIN32_MAX_PATH_CHARS*3)
# define SQLITE_WIN32_MAX_PATH_BYTES (SQLITE_WIN32_MAX_PATH_CHARS*4)
#endif
/*
** Maximum pathname length (in bytes) for WinNT. This should normally be
** 32767 * sizeof(WCHAR).
*/
#ifndef SQLITE_WINNT_MAX_PATH_BYTES
# define SQLITE_WINNT_MAX_PATH_BYTES \
(sizeof(WCHAR) * SQLITE_WINNT_MAX_PATH_CHARS)
#endif
/*