mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
Check for crt_externs.h and _NSGetEnviron.
2005-08-17 Matthias Clasen <mclasen@redhat.com> * configure.in: Check for crt_externs.h and _NSGetEnviron. * glib/gutils.c: On Darwin, include crt-externs.h and define environ using _NSGetEnviron(). (#313731)
This commit is contained in:
parent
63828e25ec
commit
a1ab92582c
@ -1,3 +1,10 @@
|
||||
2005-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Check for crt_externs.h and _NSGetEnviron.
|
||||
|
||||
* glib/gutils.c: On Darwin, include crt-externs.h and
|
||||
define environ using _NSGetEnviron(). (#313731)
|
||||
|
||||
2005-08-16 Stepan Kasal <kasal@ucw.cz>
|
||||
|
||||
* glib/gutils.c (g_get_any_init): Move the body of the big if...
|
||||
|
@ -1,3 +1,10 @@
|
||||
2005-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Check for crt_externs.h and _NSGetEnviron.
|
||||
|
||||
* glib/gutils.c: On Darwin, include crt-externs.h and
|
||||
define environ using _NSGetEnviron(). (#313731)
|
||||
|
||||
2005-08-16 Stepan Kasal <kasal@ucw.cz>
|
||||
|
||||
* glib/gutils.c (g_get_any_init): Move the body of the big if...
|
||||
|
@ -1,3 +1,10 @@
|
||||
2005-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Check for crt_externs.h and _NSGetEnviron.
|
||||
|
||||
* glib/gutils.c: On Darwin, include crt-externs.h and
|
||||
define environ using _NSGetEnviron(). (#313731)
|
||||
|
||||
2005-08-16 Stepan Kasal <kasal@ucw.cz>
|
||||
|
||||
* glib/gutils.c (g_get_any_init): Move the body of the big if...
|
||||
|
@ -1,3 +1,10 @@
|
||||
2005-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Check for crt_externs.h and _NSGetEnviron.
|
||||
|
||||
* glib/gutils.c: On Darwin, include crt-externs.h and
|
||||
define environ using _NSGetEnviron(). (#313731)
|
||||
|
||||
2005-08-16 Stepan Kasal <kasal@ucw.cz>
|
||||
|
||||
* glib/gutils.c (g_get_any_init): Move the body of the big if...
|
||||
|
@ -837,6 +837,9 @@ AC_MSG_RESULT(unsigned $glib_size_type)
|
||||
# Check for some functions
|
||||
AC_CHECK_FUNCS(lstat strerror strsignal memmove mkstemp vsnprintf stpcpy strcasecmp strncasecmp poll getcwd nanosleep vasprintf setenv unsetenv getc_unlocked readlink symlink)
|
||||
|
||||
AC_CHECK_HEADERS(crt_externs.h)
|
||||
AC_CHECK_FUNC(_NSGetEnviron)
|
||||
|
||||
AC_FUNC_VSNPRINTF_C99
|
||||
AC_FUNC_PRINTF_UNIX98
|
||||
|
||||
|
@ -46,6 +46,9 @@
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef HAVE_CRT_EXTERNS_H
|
||||
#include <crt-externs.h> /* for _NSGetEnviron */
|
||||
#endif
|
||||
|
||||
/* implement gutils's inline functions
|
||||
*/
|
||||
@ -1229,15 +1232,16 @@ g_setenv (const gchar *variable,
|
||||
#endif /* G_OS_WIN32 */
|
||||
}
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#ifdef HAVE__NSGETENVIRON
|
||||
#define environ (*_NSGetEnviron())
|
||||
#elif !defined(G_OS_WIN32)
|
||||
|
||||
/* According to the Single Unix Specification, environ is not in
|
||||
* any system header, although unistd.h often declares it.
|
||||
*/
|
||||
extern char **environ;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* g_unsetenv:
|
||||
* @variable: the environment variable to remove, must not contain '='.
|
||||
|
Loading…
Reference in New Issue
Block a user