Alexandre Julliard : ntdll: Move the window and system dir variables to directory.c
Alexandre Julliard
julliard at winehq.org
Fri Oct 23 10:18:58 CDT 2009
Module: wine
Branch: master
Commit: 4e77222820d0e0b32b02a2a4c677ff98a47ba824
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e77222820d0e0b32b02a2a4c677ff98a47ba824
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Oct 22 19:55:02 2009 +0200
ntdll: Move the window and system dir variables to directory.c
---
dlls/ntdll/directory.c | 15 +++++++++++++++
dlls/ntdll/loader.c | 6 +-----
dlls/ntdll/ntdll_misc.h | 1 +
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 413b96f..ce9e81d 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -153,6 +153,9 @@ static int show_dot_files = -1;
/* at some point we may want to allow Winelib apps to set this */
static const int is_case_sensitive = FALSE;
+UNICODE_STRING windows_dir = { 0, 0, NULL }; /* windows directory */
+UNICODE_STRING system_dir = { 0, 0, NULL }; /* system directory */
+
static RTL_CRITICAL_SECTION dir_section;
static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
@@ -1835,6 +1838,18 @@ not_found:
}
+/***********************************************************************
+ * DIR_init_windows_dir
+ */
+void DIR_init_windows_dir( const WCHAR *win, const WCHAR *sys )
+{
+ /* FIXME: should probably store paths as NT file names */
+
+ RtlCreateUnicodeString( &windows_dir, win );
+ RtlCreateUnicodeString( &system_dir, sys );
+}
+
+
/******************************************************************************
* get_dos_device
*
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 42c4225..6ce51e7 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -98,9 +98,6 @@ static UINT tls_module_count; /* number of modules with TLS directory */
static UINT tls_total_size; /* total size of TLS storage */
static const IMAGE_TLS_DIRECTORY **tls_dirs; /* array of TLS directories */
-UNICODE_STRING windows_dir = { 0, 0, NULL }; /* windows directory */
-UNICODE_STRING system_dir = { 0, 0, NULL }; /* system directory */
-
static RTL_CRITICAL_SECTION loader_section;
static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
@@ -2654,8 +2651,7 @@ void CDECL __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir )
PLIST_ENTRY mark, entry;
LPWSTR buffer, p;
- RtlCreateUnicodeString( &windows_dir, windir );
- RtlCreateUnicodeString( &system_dir, sysdir );
+ DIR_init_windows_dir( windir, sysdir );
strcpyW( user_shared_data->NtSystemRoot, windir );
/* prepend the system dir to the name of the already created modules */
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index e80d502..b3842e0 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -139,6 +139,7 @@ extern NTSTATUS TAPE_DeviceIoControl(HANDLE hDevice,
/* file I/O */
extern NTSTATUS FILE_GetNtStatus(void);
+extern void DIR_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir );
extern BOOL DIR_is_hidden_file( const UNICODE_STRING *name );
extern NTSTATUS DIR_unmount_device( HANDLE handle );
extern NTSTATUS DIR_get_unix_cwd( char **cwd );
More information about the wine-cvs
mailing list