Moved environ definition to port.h.

This commit is contained in:
Alexandre Julliard 2004-05-25 18:05:39 +00:00
parent a935c2afd2
commit 2dff1fe1e5
3 changed files with 9 additions and 8 deletions

View File

@ -172,6 +172,14 @@ struct statvfs
# define S_IXOTH S_IEXEC
#endif
#ifdef __APPLE__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern char **environ;
#endif
/****************************************************************
* Constants
*/

View File

@ -277,7 +277,7 @@ void wine_exec_wine_binary( const char *name, char **argv, char **envp )
{
const char *path, *pos, *ptr;
if (!envp) envp = __wine_main_environ;
if (!envp) envp = environ;
if (!name) name = argv0_name;
/* first, try bin directory */

View File

@ -71,13 +71,6 @@ 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 */