Check for crt_extern.h and _NSGetEnviron. Fix compilation on Darwin where

2006-12-10  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Check for crt_extern.h and _NSGetEnviron.
        * gdk/x11/gdkspawn-x11.c: Fix compilation on Darwin where
        environ is not available.  (#384168, Min Sik Kim)
This commit is contained in:
Matthias Clasen
2006-12-10 06:29:05 +00:00
committed by Matthias Clasen
parent 9460c56aed
commit dd67027b32
3 changed files with 22 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2006-12-10 Matthias Clasen <mclasen@redhat.com>
* configure.in: Check for crt_extern.h and _NSGetEnviron.
* gdk/x11/gdkspawn-x11.c: Fix compilation on Darwin where
environ is not available. (#384168, Min Sik Kim)
2006-12-07 Paolo Maggi <paolo@gnome.org>
Fixes bug #383407

View File

@@ -728,6 +728,10 @@ fi
AC_MSG_RESULT($gtk_uxtheme_h)
# Checks for gdkspawn
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_FUNCS(_NSGetEnviron)
##################################################
# Checks for gdk-pixbuf
##################################################

View File

@@ -22,13 +22,25 @@
#include <config.h>
#include <string.h>
#ifdef HAVE_CRT_EXTERNS_H
#include <crt_externs.h> /* for _NSGetEnviron */
#endif
#include "gdkspawn.h"
#include <glib.h>
#include <gdk/gdk.h>
#include "gdkalias.h"
#ifdef HAVE__NSGETENVIRON
#define environ (*_NSGetEnviron())
#else
/* According to the Single Unix Specification, environ is not in
* any system header, although unistd.h often declares it.
*/
extern char **environ;
#endif
/**
* gdk_make_spawn_environment_for_screen: