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 721059 - g_subprocess_launcher_set_environ vs "environ"
g_subprocess_launcher_set_environ vs "environ"
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.39.x
Other All
: Normal major
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-12-25 23:38 UTC by Morten Welinder
Modified: 2013-12-26 12:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2013-12-25 23:38:57 UTC
After preprocessing the prototype looks like this for me:

extern
void g_subprocess_launcher_set_environ (GSubprocessLauncher *self,
                                                                         gchar **(*__p__environ()));

That is a K&R prototype, not an ANSI prototype.  And it doesn't mean what glib
wants it to mean.

Can we call the second argument something other than "environ", please?
C99 doesn't define it, but there is a long tradition of libc owning that
identifier.

This is with mingw/linuxmint, but there problem could hit any environment.
Comment 1 Morten Welinder 2013-12-26 00:03:29 UTC
There also priv->environ in gio/gapplicationcommandline.c
Comment 2 Allison Karlitskaya (desrt) 2013-12-26 00:12:26 UTC
Sounds like a good idea.  Care to do a patch?  'envp' would be a reasonable choice for a new name.