leif wrote:
Jean-Pierre Flori wrote:
On Thursday, April 4, 2013 6:22:43 PM UTC+2, Snark wrote:

    Le 04/04/2013 17:52, Jean-Pierre Flori a �crit :
     > I'm currently trying to build Sage on FreeBSD and the eclib spkg
    failed
     > because it uses int64_t in eclib/xmod.h.
     > Including <inttypes.h> there solves the problem.

Hard to tell without a configure / build log.


    I think int64_t is supposed to come from stdint.h, and it's standard:
    http://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h
    <http://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h>

    I hope that helps,

Thanks.
Indeed, including inttypes.h solves the issue because it itself includes
stdint.h where this is defined.
Maybe some C99 hell on FreeBSD or with the GCC Sage built there, I don't
know.

Well, eclib is C++.  My guess is that on all other systems, stdint.h (or
cstdint) gets pulled in by some other directly or indirectly included
header file.

FWIW, here on Linux <algorithm> (included by "interface.h") pulls in <sys/types.h> [indirectly, of course^TM], which defines int64_t et al.

(xmod.h is only included by arith.h, which in turn includes interface.h, before xmod.h.)

Or otherwise ask John Cremona... ;-)


-leif


But note that in xmod.h, there's also

#ifdef USE_DMOD

// code not using int64_t

#else

// code using int64_t

#endif

(I haven't found traces of USE_DMOD in my build log though.)


In any case, including cstdint in the '#else' branch shouldn't hurt
(although it's probably really a FreeBSD bug, or at least your
installation is somehow broken -- we haven't had problems on Solaris...
;-) ).


-leif



--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to