source: trunk/dports/gnome/libgnome/files/patch_gnome-util.c @ 8371

Last change on this file since 8371 was 8371, checked in by olegb, 16 years ago

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
gnome 2.8

  • Property svn:eol-style set to native
File size: 789 bytes
Line 
1--- libgnome/gnome-util.c.org   Fri Sep 17 18:45:43 2004
2+++ libgnome/gnome-util.c       Fri Sep 17 18:47:11 2004
3@@ -189,10 +189,11 @@
4 void
5 gnome_unsetenv (const char *name)
6 {
7-#if defined (HAVE_UNSETENV)
8-       unsetenv (name);
9-#else
10-       extern char **environ;
11+#ifdef __APPLE__
12+# include <crt_externs.h>
13+# define environ (*_NSGetEnviron())
14+#elif extern char **environ;
15+#endif
16        int i, len;
17 
18        len = strlen (name);
19@@ -210,7 +211,6 @@
20                environ[i] = environ[i + 1];
21                i++;
22        }
23-#endif
24 }
25 
26 /**
27@@ -225,12 +225,14 @@
28 void
29 gnome_clearenv (void)
30 {
31-#ifdef HAVE_CLEARENV
32-       clearenv ();
33-#else
34-       extern char **environ;
35-       environ[0] = NULL;
36+
37+#ifdef __APPLE__
38+# include <crt_externs.h>
39+# define environ (*_NSGetEnviron())
40+#elif extern char **environ;
41 #endif
42+
43+       environ[0] = NULL;
44 }
45 
46 
Note: See TracBrowser for help on using the repository browser.