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 669024 - goption: implement platform_get_argv0() for OpenBSD
goption: implement platform_get_argv0() for OpenBSD
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.31.x
Other OpenBSD
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-01-30 12:44 UTC by Antoine Jacoutot
Modified: 2012-01-30 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
implement platform_get_argv0() for OpenBSD (2.27 KB, patch)
2012-01-30 12:44 UTC, Antoine Jacoutot
accepted-commit_now Details | Review

Description Antoine Jacoutot 2012-01-30 12:44:18 UTC
Created attachment 206417 [details] [review]
implement platform_get_argv0() for OpenBSD

Hi.

This patch adds support for platform_get_argv0() on OpenBSD using the sysctl(3) interface.
Regression test is happy and return value is the same as in Linux.
Ok to push?
Comment 1 Colin Walters 2012-01-30 14:47:12 UTC
Review of attachment 206417 [details] [review]:

Coding style, looks fine to commit after fixing that.

::: glib/goption.c
@@ +1701,3 @@
+  cmdline = (char **)realloc(cmdline, len);
+
+  if (sysctl(mib, nitems(mib), cmdline, &len, NULL, 0) == -1) {

GLib coding style is GNU - space between identifier and paren, brace on a new line.
Comment 2 Antoine Jacoutot 2012-01-30 15:22:40 UTC
Thanks Colin.
I've fixed the style and pushed as e43a98c00091f5e293d2d9d72df2c04081802abe