GNOME Bugzilla – Bug 757748
Improve compatibility of workarounds for c89 systems
Last modified: 2018-04-15 00:10:40 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
I would suggest the right fix here is to make the netbsd headers only declare functions that actually exist.
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.
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