diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-01-09 12:49:06 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2020-01-09 12:49:06 +0000 |
commit | a57ad645f0074c9d5e7a97d82ee868e43ab3c91e (patch) | |
tree | a644df7639f452040c4454342f4e75b2a1222832 /tests/tversion.c | |
parent | 727cc079facb6f83311024d48e22be21f9ff163b (diff) | |
download | mpfr-a57ad645f0074c9d5e7a97d82ee868e43ab3c91e.tar.gz |
[tests/tversion.c]
* Output sizeof(mpfr_intmax_t) too.
* When building with MinGW, output a line about it:
MinGW32 / MinGW64, and the __USE_MINGW_ANSI_STDIO definition.
(merged changesets associated with this file r13457,13562,13658
from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@13660 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tversion.c')
-rw-r--r-- | tests/tversion.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/tversion.c b/tests/tversion.c index 843df0a9b..3c9a2a0fc 100644 --- a/tests/tversion.c +++ b/tests/tversion.c @@ -162,6 +162,25 @@ main (void) ); #endif + /* With MinGW64, both __MINGW32__ and __MINGW64__ seem to be defined, + but test both, just in case this will change in the future. Tested + with "x86_64-w64-mingw32-gcc -dM -E -xc /dev/null" under Debian. */ +#if defined(__MINGW32__) || defined(__MINGW64__) + (puts) ("[tversion] MinGW" +#if defined(__MINGW64__) + "64" +#else + "32" +#endif + ": __USE_MINGW_ANSI_STDIO = " +#if defined(__USE_MINGW_ANSI_STDIO) + MAKE_STR(__USE_MINGW_ANSI_STDIO) +#else + "undef" +#endif + ); +#endif + #if defined(__GLIBC__) (puts) ("[tversion] __GLIBC__ = " MAKE_STR(__GLIBC__) ", __GLIBC_MINOR__ = " #if defined(__GLIBC_MINOR__) @@ -377,11 +396,11 @@ main (void) /**************************** ABI information ****************************/ - (printf) ("[tversion] sizeof(long) = %ld" + (printf) ("[tversion] sizeof(long) = %ld, sizeof(mpfr_intmax_t) = %ld" #if defined(_MPFR_H_HAVE_INTMAX_T) ", sizeof(intmax_t) = %ld" #endif - "\n", (long) sizeof(long) + "\n", (long) sizeof(long), (long) sizeof(mpfr_intmax_t) #if defined(_MPFR_H_HAVE_INTMAX_T) , (long) sizeof(intmax_t) #endif |