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 681328 - portability: get WIFEXITED and WEXITSTATUS from sys/wait.h
portability: get WIFEXITED and WEXITSTATUS from sys/wait.h
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.34.x
Other OpenBSD
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2012-08-06 18:39 UTC by Antoine Jacoutot
Modified: 2012-12-16 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
get WIFEXITED and WEXITSTATUS from sys/wait.h (894 bytes, patch)
2012-08-06 18:39 UTC, Antoine Jacoutot
none Details | Review

Description Antoine Jacoutot 2012-08-06 18:39:32 UTC
Created attachment 220484 [details] [review]
get WIFEXITED and WEXITSTATUS from sys/wait.h

Hi.

Linux has a definition for WIFEXITED and WEXITSTATUS in both stdlib.h
and sys/wait.h which is not the case on at least FreeBSD and OpenBSD.
The norm is to get them from sys/wait.h which should work on all Unices.

Otherwise on !linux, we end up with:
screen.o(.text+0x2a9f): In function `meta_screen_new':
: warning: sprintf() is often misused, please use snprintf()
delete.o(.text+0x462): In function `dialog_exited':
: undefined reference to `WIFEXITED'
delete.o(.text+0x485): In function `dialog_exited':
: undefined reference to `WEXITSTATUS'

Would that be alright to push?
Comment 1 Antoine Jacoutot 2012-11-08 16:00:41 UTC
Anyone?
Comment 2 Olav Vitters 2012-11-08 16:13:18 UTC
If it doesn't break Linux, then please commit.
Comment 3 Olav Vitters 2012-11-08 16:15:49 UTC
Btw: Build fixes are generally ok to commit. Just make very sure that you know what you're doing. Meaning: only small and really obvious fixes plus fix has to be tested.
Comment 4 Antoine Jacoutot 2012-11-08 16:57:15 UTC
Thank you Olav. It's in as f94e552...
Build was successfully tested on Linux.