Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8edf353b
Commit
8edf353b
authored
Apr 01, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Export __wine_get_main_environment on Mac OS to make sure it's reevaluated when used.
parent
c3a01b31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
process.c
dlls/kernel32/process.c
+9
-2
library.h
include/wine/library.h
+0
-1
loader.c
libs/wine/loader.c
+13
-1
No files found.
dlls/kernel32/process.c
View file @
8edf353b
...
...
@@ -56,6 +56,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(process);
WINE_DECLARE_DEBUG_CHANNEL
(
file
);
WINE_DECLARE_DEBUG_CHANNEL
(
relay
);
#ifdef __APPLE__
extern
char
**
__wine_get_main_environment
(
void
);
#define environ __wine_get_main_environment()
#else
extern
char
**
environ
;
#endif
typedef
struct
{
LPSTR
lpEnvAddress
;
...
...
@@ -267,7 +274,7 @@ static BOOL find_exe_file( const WCHAR *name, WCHAR *buffer, int buflen, HANDLE
*
* Build the Win32 environment from the Unix environment
*/
static
BOOL
build_initial_environment
(
char
**
environ
)
static
BOOL
build_initial_environment
(
void
)
{
SIZE_T
size
=
1
;
char
**
e
;
...
...
@@ -989,7 +996,7 @@ void CDECL __wine_kernel_init(void)
if
(
!
params
->
Environment
)
{
/* Copy the parent environment */
if
(
!
build_initial_environment
(
__wine_main_environ
))
exit
(
1
);
if
(
!
build_initial_environment
())
exit
(
1
);
/* convert old configuration to new format */
convert_old_config
();
...
...
include/wine/library.h
View file @
8edf353b
...
...
@@ -65,7 +65,6 @@ extern int wine_dll_get_owner( const char *name, char *buffer, int size, int *fi
extern
int
__wine_main_argc
;
extern
char
**
__wine_main_argv
;
extern
WCHAR
**
__wine_main_wargv
;
extern
char
**
__wine_main_environ
;
extern
void
__wine_dll_register
(
const
IMAGE_NT_HEADERS
*
header
,
const
char
*
filename
);
extern
void
wine_init
(
int
argc
,
char
*
argv
[],
char
*
error
,
int
error_size
);
...
...
libs/wine/loader.c
View file @
8edf353b
...
...
@@ -441,6 +441,18 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr )
/***********************************************************************
* __wine_get_main_environment
*
* Return an environment pointer to work around lack of environ variable.
* Only exported on Mac OS.
*/
char
**
__wine_get_main_environment
(
void
)
{
return
environ
;
}
/***********************************************************************
* __wine_dll_register
*
* Register a built-in DLL descriptor.
...
...
@@ -638,7 +650,7 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
build_dll_path
();
__wine_main_argc
=
argc
;
__wine_main_argv
=
argv
;
__wine_main_environ
=
environ
;
__wine_main_environ
=
__wine_get_main_environment
()
;
mmap_init
();
for
(
path
=
first_dll_path
(
"ntdll.dll"
,
0
,
&
context
);
path
;
path
=
next_dll_path
(
&
context
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment