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 765441 - There is no alloca.h on FreeBSD
There is no alloca.h on FreeBSD
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
3.20.x
Other FreeBSD
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-22 20:20 UTC by Ting-Wei Lan
Modified: 2016-04-23 02:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
egg-simple-label: replace alloca with C99 VLA (1.33 KB, patch)
2016-04-22 20:21 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-04-22 20:20:28 UTC
The recently added egg-simple-label.c uses alloca.h. It may be possible to fix it by replacing it with stdlib.h, but I think using the standard VLA feature is better.
Comment 1 Ting-Wei Lan 2016-04-22 20:21:03 UTC
Created attachment 326575 [details] [review]
egg-simple-label: replace alloca with C99 VLA

alloca is a non-standard feature. As we already requires a compiler
supporting C11, using the standard variable-length array seems to be
better. Although VLA is an optional feature in C11, both gcc and clang
support it for a long time.

This commit fixes the build on FreeBSD, which puts alloca in stdlib.h
instead of alloca.h.
Comment 2 Christian Hergert 2016-04-22 21:13:32 UTC
Review of attachment 326575 [details] [review]:

LGTM, good to know about the alloca situation
Comment 3 Ting-Wei Lan 2016-04-23 02:53:00 UTC
Attachment 326575 [details] pushed as 9568071 - egg-simple-label: replace alloca with C99 VLA