gmp-4.2.1 on IRIX6.5, MIPSPro 7.4.1m

Marc Glisse marc.glisse at normalesup.org
Thu Jun 1 21:40:33 CEST 2006


(sorry for breaking the thread, I had not subscribed to the list yet)

> When using Marc's patch for gmpxx
> http://gmplib.org/list-archives/gmp-bugs/2006-May/000417.html
> 
> I found that it was too aggressive for MIPSPro 7.4.1m -- which does
> declare size_t in the std:: namespace, but not FILE.  The attached patch
> is a bit simplistic, but does the job for me.

I am not sure I understand what you are saying. Is it:

1) size_t, va_list and FILE can be used without specifying the namespace,
but if I specify std::, then FILE does not work.

2) one can use std::size_t, std::va_list and ::FILE but none of ::size_t,
::va_list and std::FILE (that would be the most weirdly broken thing I
can imagine)

In the first case, the easiest solution would be to define GMP_CSTD to
std:: only if __cplusplus is defined but not __MIPSPRO (or whatever the
macro is). Or even do it only for sunpro if it seems safer.

In the second case, I guess we might as well define GMP_FILE that would be 
either std::FILE or FILE depending on some tests, and similarly 
GMP_va_list for va_list and GMP_size_t, but that looks bad.

What header did you include to get the definitions of FILE (and size_t
and va_list)? Was it cstdio or stdio.h? (does it change anything?)

-- 
Marc Glisse


More information about the gmp-bugs mailing list