After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 320549 - environ symbol fix for darwin
environ symbol fix for darwin
Status: RESOLVED DUPLICATE of bug 124277
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
2.12.x
Other Mac OS
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-02 21:20 UTC by Daniel Macks
Modified: 2005-11-04 08:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Detect and use darwin's environ compatibility symbol (patch vs CVS HEAD) (1.12 KB, patch)
2005-11-02 21:21 UTC, Daniel Macks
none Details | Review

Description Daniel Macks 2005-11-02 21:20:41 UTC
Version details: 2.12.1 and CVS HEAD

libgnome-desktop/gnome-desktop-item.c declares it:

  extern char **environ;

which falsely assumes this symbol is defined in some system library. For OS X,
the correct declaration to get the equivalent environ symbol functionality is:

  #include <crt_externs.h>
  #define environ (*_NSGetEnviron())

For portability probably best to test for the presence of that header and symbol
and use their implementation if they are present.
Comment 1 Daniel Macks 2005-11-02 21:21:38 UTC
Created attachment 54246 [details] [review]
Detect and use darwin's environ compatibility symbol (patch vs CVS HEAD)
Comment 2 Mark McLoughlin 2005-11-04 08:00:48 UTC
Thanks for the patch - the real fix is to use g_listenv()

*** This bug has been marked as a duplicate of 124277 ***