On Saturday 09 April 2011 17:15:45 Cactus wrote:
> The mpz.get_ux/sx and mpz..set_ux/sx tests now fail on MSVC (they used
> to work) because the stdint.h include in the test files has been
> guarded with HAVE_STDINT_H.
> 
> But since these test files don't include config.h, HAVE_STDINT_H is
> not defined so stdint.h is not included and the function definitions
> in mpir.h are hence bypassed.
> 
> The use of the HAVE_STDINT_H guard in these test files is wrong since
> these tests are NOT internal MPIR tests but tests of the external API
> where end users will expect the inclusion of stdint.h alone to be
> sufficient.
> 
> Jason, I assume you added these guards.  If so, can you let me know
> why they are needed as I think it is a mistake if they are.
> 
>     Brian

Yeah , for the guard to be of any use we would also need to put 
#include "config.h" in these specific tests which I forgot , I do notice that a 
few other tests have it in
grep -e config.h $(find -name \*.c)
./spinner.c:#include "config.h"
./mpn/t-get_d.c:#include "config.h"
./mpn/t-invert.c:#include "config.h"
./devel/try.c:#include "config.h"
./misc/t-scanf.c:#include "config.h"
./misc/t-locale.c:#include "config.h"
./misc/t-printf.c:#include "config.h"
./mpf/t-inp_str.c:#include "config.h"
./misc.c:#include "config.h"
./cxx/clocale.c:#include "config.h"
./mpz/t-io_raw.c:#include "config.h"
./mpz/io.c:#include "config.h"
./mpz/t-inp_str.c:#include "config.h"
./mpq/t-aors.c:#include "config.h"
./mpq/t-inp_str.c:#include "config.h"

it's either put it in or write some configure code(and batch file stuff) to 
exclude all these new tests. Linux has had stdint for probably at least 10 
years , not sure about darwin,solaris, etc , the only one I know of definitely 
is VS <=2008 
Including this guard and including config.h , should not affect the test , the 
user will just include stdint.h if needed and can ignore config.h , like we do 
the the other tests that include it

Jason

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to