bugGPSD - Bugs: bug #35868, Unable to build gpsd on Solaris...

 
 

bug #35868: Unable to build gpsd on Solaris 11.0 due to lack of NAN

Submitted by:  Andrew Evdokimov <elahi>
Submitted on:  Sat 17 Mar 2012 09:54:46 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Eric S. Raymond <esr>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 17 Apr 2012 08:36:11 AM UTC, comment #1:

Fix shipped in 3.5.

Eric S. Raymond <esr>
Project AdministratorIn charge of this item.
Sat 17 Mar 2012 09:54:46 AM UTC, original submission:

Solaris 11.0 does not have NAN, thus build fails with following error:

gcc -o gpsutils.o -c -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE -O2 gpsutils.c
gpsutils.c: In function 'gps_clear_fix':
gpsutils.c:234:18: error: 'NAN' undeclared (first use in this function)
gpsutils.c:234:18: note: each undeclared identifier is reported only once for each function it appears in
gpsutils.c: In function 'gps_clear_dop':
gpsutils.c:253:21: error: 'NAN' undeclared (first use in this function)
gpsutils.c: In function 'earth_distance_and_bearings':
gpsutils.c:444:9: error: 'NAN' undeclared (first use in this function)
scons: *** [gpsutils.o] Error 1
scons: building terminated because of errors.

Quick and dirty workaround - to define NAN in gpsd.h and gps.h

#ifndef NAN
#define NAN (0.0/0.0)
#endif

Andrew Evdokimov <elahi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by esr (Updated the item)
  • -unavailable- added by elahi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 17 Apr 2012 08:36:11 AM UTCesrOpen/ClosedOpen=>Closed
    Fri 23 Mar 2012 01:10:31 PM UTCesrStatusNone=>Fixed
      Assigned toNone=>esr

    Back to the top


    Powered by Savane 3.1-cleanup1