Number: 509
Title: HUGE instead of MAXFLOAT
Submitter: Jonah Beckford
Date: Thu Aug 12 06:44:11 2004
Subsys: Build/Installation
Version: 1.12
System: x86-Other-Cygwin
Severity: minor
Problem:
Built on cygwin with the following:

./configure && make

Got the following error:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../graph -I../../agraph -I../../cdt -I../../pathplan -I../../dotneato/pack -I../../dotneato/neatogen -I../../dotneato/gvrender -I../../dotneato/common -I/usr/local/include -g -O2 -Wall -Wno-unknown-pragmas -c `test -f dijkstra.c || echo './'`dijkstra.c dijkstra.c: In function `queue_nodes': dijkstra.c:88: error: `HUGE' undeclared (first use in this function) dijkstra.c:88: error: (Each undeclared identifier is reported only once dijkstra.c:88: error: for each function it appears in.)

The fix is in the "Fix" section.


Fix:
I changed the dijkstra.c line:

#define BIG HUGE /* ha */

to:

#define BIG MAXFLOAT /* ha */

I got this more portable fix from http://www.cygwin.com/ml/cygwin/2003-09/msg00406.html

Semantically, it seems you wanted MAXFLOAT instead of HUGE anyways in dijkstra.c. See http://www.cs.cf.ac.uk/Dave/C/node17.html for the difference.

graphviz compiled and built correctly on Cygwin after this fix. Comments: This is bug 493
Owner: ellson
Status: Fixed