cURL / Mailing Lists / curl-library / Single Mail


__floatdidf on Solaris 2.6 and gcc 3.2

From: Andreas Baumann <>
Date: Wed, 23 Oct 2002 12:11:15 +0200


Compiling libcurl 0.9.7, gcc 3.2, Solaris 2.6 results in:
Undefined first referenced
 symbol in file
__floatdidf file.lo
ld: fatal: Symbol referencing errors. No output written to

The problem in lib/file.c is the following cast:

expected_size = (double)statbuf.st_size;

As st_size is normally something like off_t (which is nowadays
defined to something with 64 bits).

The hint to use -lgcc_s to the link options is not very
good (as it makes the code depend on the compiler!). IMHO

I rather suggest a cast like:

expected_size = (double)((unsigned long)statbuf.st_size);

Comments welcome... :-)


This emial is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now.
Received on 2002-10-23