Commit 7ee8adfd authored by Emmanuel Maillard's avatar Emmanuel Maillard Committed by Alexandre Julliard

Added environ support for Darwin.

parent 616cffb8
...@@ -276,9 +276,8 @@ const char *wine_get_user_name(void) ...@@ -276,9 +276,8 @@ const char *wine_get_user_name(void)
void wine_exec_wine_binary( const char *name, char **argv, char **envp ) void wine_exec_wine_binary( const char *name, char **argv, char **envp )
{ {
const char *path, *pos, *ptr; const char *path, *pos, *ptr;
extern char **environ;
if (!envp) envp = environ; if (!envp) envp = __wine_main_environ;
if (!name) name = argv0_name; if (!name) name = argv0_name;
/* first, try bin directory */ /* first, try bin directory */
......
...@@ -71,6 +71,13 @@ static const char **dll_paths; ...@@ -71,6 +71,13 @@ static const char **dll_paths;
static int nb_dll_paths; static int nb_dll_paths;
static int dll_path_maxlen; static int dll_path_maxlen;
#ifdef __APPLE__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern char **environ;
#endif
extern void mmap_init(void); extern void mmap_init(void);
/* build the dll load path from the WINEDLLPATH variable */ /* build the dll load path from the WINEDLLPATH variable */
...@@ -506,7 +513,6 @@ static void debug_usage(void) ...@@ -506,7 +513,6 @@ static void debug_usage(void)
*/ */
void wine_init( int argc, char *argv[], char *error, int error_size ) void wine_init( int argc, char *argv[], char *error, int error_size )
{ {
extern char **environ;
char *wine_debug; char *wine_debug;
int file_exists; int file_exists;
void *ntdll; void *ntdll;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment