[Nagiosplug-devel] [ nagiosplug-Bugs-1497248 ] check_disk does not compile on Solaris 10 because of floorf

SourceForge.net noreply at sourceforge.net
Mon Apr 9 22:57:45 CEST 2007


Bugs item #1497248, was opened at 2006-05-29 19:45
Message generated for change (Comment added) made by ramereth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1497248&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compilation
Group: Release (specify)
Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Austin (danaus)
Assigned to: Ton Voon (tonvoon)
Summary: check_disk does not compile on Solaris 10 because of floorf

Initial Comment:
Nagios Plugis: 1.4.3
Related to previous bug: 1374705

Compilation on Solaris 10 results in error when
compiling check_disk.c:

error: static declaration of 'floorf' follows
non-static declaration

On line 32 of check_disk.c common.h is imported. On
line 196 of common.h we see:

/* Solaris does not have floorf, but floor works.
Should probably be in configure */
#if defined(__sun) || defined(__sun__)
static inline float floorf (float x) { return floor(x); } 
#endif


Solaris 10 actually *does* have floorf (but not earlier
versions it seems).

Workaround is to just comment out the line for now but,
as original commenter said, prob best to replace this
with configure test. Sorry -- lack the skill to do that
at the moment, so no patch. :-(

----------------------------------------------------------------------

Comment By: Lance Albertson (ramereth)
Date: 2007-04-09 15:57

Message:
Logged In: YES 
user_id=696519
Originator: NO

Looks like there's a reference to this in lib/utils_base.c. See output
below:

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../gl -I../intl -I../plugins 
-D_REENTRANT  -g -O2 -MT utils_base.o -MD -MP -MF ".deps/utils_base.Tpo" -c
-o utils_base.o utils_base.c; \
        then mv -f ".deps/utils_base.Tpo" ".deps/utils_base.Po"; else rm
-f ".deps/utils_base.Tpo"; exit 1; fi
In file included from utils_base.c:16:
../plugins/common.h:179: error: static declaration of 'floorf' follows
non-static declaration

It appears as though floorf is defined on Solaris 10, but not prior to
that. I tried building this package on Solaris 9 and didn't encounter this
problem. It might be better to add a check in configure for this, but I'm
no autoconf guru. :-)

Thanks-

----------------------------------------------------------------------

Comment By: SourceForge Robot (sf-robot)
Date: 2006-08-02 21:20

Message:
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2006-07-19 18:29

Message:
Logged In: YES 
user_id=664364

Daniel,

Can you please try the snapshot at http://nagiosplug.sf.net/snapshot.
floorf has 
been removed from check_disk.c, so it should compile happily.

Ton

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1497248&group_id=29880




More information about the Devel mailing list