Merge branch 'wip/lantw/gspawn-declare-environ' into 'master'

gspawn: Declare environ

See merge request GNOME/glib!134
This commit is contained in:
Emmanuele Bassi 2018-06-23 13:27:47 +00:00
commit a65ee63c71

View File

@ -32,6 +32,10 @@
#include <dirent.h> #include <dirent.h>
#include <spawn.h> #include <spawn.h>
#ifdef HAVE_CRT_EXTERNS_H
#include <crt_externs.h> /* for _NSGetEnviron */
#endif
#ifdef HAVE_SYS_SELECT_H #ifdef HAVE_SYS_SELECT_H
#include <sys/select.h> #include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H */ #endif /* HAVE_SYS_SELECT_H */
@ -71,6 +75,12 @@
#endif /* __GLIBC__ */ #endif /* __GLIBC__ */
#endif /* HAVE_POSIX_SPAWN */ #endif /* HAVE_POSIX_SPAWN */
#ifdef HAVE__NSGETENVIRON
#define environ (*_NSGetEnviron())
#else
extern char **environ;
#endif
/** /**
* SECTION:spawn * SECTION:spawn
* @Short_description: process launching * @Short_description: process launching