Added environ support for Darwin.
This commit is contained in:
parent
616cffb8b7
commit
7ee8adfd39
|
@ -276,9 +276,8 @@ const char *wine_get_user_name(void)
|
|||
void wine_exec_wine_binary( const char *name, char **argv, char **envp )
|
||||
{
|
||||
const char *path, *pos, *ptr;
|
||||
extern char **environ;
|
||||
|
||||
if (!envp) envp = environ;
|
||||
if (!envp) envp = __wine_main_environ;
|
||||
if (!name) name = argv0_name;
|
||||
|
||||
/* first, try bin directory */
|
||||
|
|
|
@ -71,6 +71,13 @@ static const char **dll_paths;
|
|||
static int nb_dll_paths;
|
||||
static int dll_path_maxlen;
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <crt_externs.h>
|
||||
#define environ (*_NSGetEnviron())
|
||||
#else
|
||||
extern char **environ;
|
||||
#endif
|
||||
|
||||
extern void mmap_init(void);
|
||||
|
||||
/* build the dll load path from the WINEDLLPATH variable */
|
||||
|
@ -506,7 +513,6 @@ static void debug_usage(void)
|
|||
*/
|
||||
void wine_init( int argc, char *argv[], char *error, int error_size )
|
||||
{
|
||||
extern char **environ;
|
||||
char *wine_debug;
|
||||
int file_exists;
|
||||
void *ntdll;
|
||||
|
|
Loading…
Reference in New Issue