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 693761 - MAXDOUBLE is deprecated
MAXDOUBLE is deprecated
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Compilation
unspecified
Other FreeBSD
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-02-14 04:32 UTC by giffunip
Modified: 2013-02-17 20:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use DBL_MAX (651 bytes, patch)
2013-02-14 04:32 UTC, giffunip
none Details | Review
use sys/types.h in numbers.h (226 bytes, patch)
2013-02-14 04:34 UTC, giffunip
none Details | Review

Description giffunip 2013-02-14 04:32:06 UTC
Created attachment 235984 [details] [review]
Use DBL_MAX

src/gnm-src-patch.c uses MAXDOUBLE which is deprecated on FreeBSD.

The attached patch uses DBL_MAX from <float.h> instead.
Comment 1 giffunip 2013-02-14 04:34:39 UTC
Created attachment 235985 [details] [review]
use sys/types.h in numbers.h

While here I am attaching another patch required for FreeBSD.
Comment 2 giffunip 2013-02-14 04:35:48 UTC
This is on gnumeric 1.12.0 BTW.
Comment 3 Morten Welinder 2013-02-14 15:55:07 UTC
MAXDOUBLE fixed -- it should have been G_MAXDOUBLE.

Why do you need sys/types.h?
Comment 4 giffunip 2013-02-14 16:44:13 UTC
Comment on attachment 235985 [details] [review]
use sys/types.h in numbers.h

Hmm..
That patch was not mine, it was in the legacy port.
I just ran the build without that patch and it goes fine. Perhaps there was some warning otr something that is now clean. Doesn't matter :).
Comment 5 giffunip 2013-02-14 16:44:46 UTC
Thanks!
Comment 6 Morten Welinder 2013-02-15 23:38:00 UTC
ok -- please let me know if anything else prevents compilation.
Just in case, I would recommend to do something like

    make clean
    make 2>&1 | tee error.log

and inspect error.log for warnings about missing prototypes.  Those can
lead to pretty nasty surprises later, especially on 64-bit.
Comment 7 giffunip 2013-02-17 15:50:56 UTC
Hello Morten;

I am trying to compile with the patch you committed but I see a problem with line 33:

#include <values.h>

This header doesn't exist on FreeBSD. You can ifdef it but if you don't need it anymore, I suggest just to remove it.
Comment 8 Morten Welinder 2013-02-17 20:37:13 UTC
Removed.