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 757748 - Improve compatibility of workarounds for c89 systems
Improve compatibility of workarounds for c89 systems
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
3.16.x
Other NetBSD
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-11-07 20:16 UTC by he
Modified: 2018-04-15 00:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested pattern for patch to gtk/fallback-c89.c (1020 bytes, text/plain)
2015-11-07 20:16 UTC, he
Details

Description he 2015-11-07 20:16:33 UTC
Created attachment 315064 [details]
Suggested pattern for patch to gtk/fallback-c89.c

NetBSD's <math.h> declares nearbyint(); all NetBSD ports share
this file.  However, nearbyint() isn't neccessarily implemented
on all of the ports, among them the powerpc-based ports, do not
actually (yet) implement the function, so for the powerpc-based
ports, the build of gtk+ fails when the static declaration
from gtk/fallback-c89.c follows the non-static from <math.h>.

I suggest to use another function name and use the C preprocessor
as in the attachment to fix this problem (I'm not attached to the "my_"
prefix in the patch -- use whatever you find best).

Best regards,

- Håvard
Comment 1 Matthias Clasen 2015-11-09 19:08:38 UTC
I would suggest the right fix here is to make the netbsd headers only declare functions that actually exist.
Comment 2 Matthias Clasen 2018-02-10 04:59:48 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 3 Matthias Clasen 2018-04-15 00:10:40 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new