aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2013-08-26 23:18:57 +0000
committermistachkin <mistachkin@noemail.net>2013-08-26 23:18:57 +0000
commit4496a2329a0fd2f922e6f80fa7081294bd14a811 (patch)
tree435dd6090e0336680be179d28ddcae1c3308b980 /src
parent31706a2d940459e1de326942fcf2080d33cde398 (diff)
downloadsqlite-4496a2329a0fd2f922e6f80fa7081294bd14a811.tar.gz
sqlite-4496a2329a0fd2f922e6f80fa7081294bd14a811.zip
Preparation for further Windows path name handling changes.
FossilOrigin-Name: ec99224b0c9cf1ccd64b3dc93252556d888e93a3
Diffstat (limited to 'src')
-rw-r--r--src/os_win.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/os_win.c b/src/os_win.c
index 7bf8828db..e07883a61 100644
--- a/src/os_win.c
+++ b/src/os_win.c
@@ -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
@@ -59,12 +59,29 @@
#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
/*