On 6/11/2013 15:55, Koehne Kai wrote: > > >> -----Original Message----- >> From: Jim Michaels [mailto:jmich...@yahoo.com] >> Sent: Tuesday, June 11, 2013 9:23 AM >> To: mingw-w64-public@lists.sourceforge.net >> Subject: Re: [Mingw-w64-public] PRIu64 and uint64_t >> >> >> why would I want to use __mingw_printf? what exactly is it? why shouldn't I >> just use printf like I think I should (end-user's prospective)? normally I >> would >> see that and assume it's some sort of internal compiler-use thing and avoid >> it >> and just stick with the the standard c library or c++ library stuff. > > http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf >
libstdc++ (GCC C++ implementation) REQUIRES C99, especially to support C++11, so these are staying whether used by the user or not. The proper macro selection is done automatically, and in my case, correctly depending on which feature set is requested. Example: #include <inttypes.h> #include <stdio.h> int main(){ printf("%" PRId64 "\n", __INT64_MAX__); printf("9223372036854775807LL\n"); return 0; } Notice PRId64 is replaced with C99 equivalents: $ x86_64-w64-mingw32-gcc printf64.c -posix -E |tail ... int main(){ printf("%" "lld" "\n", 9223372036854775807LL); printf("9223372036854775807LL\n"); return 0; } Notice the default is still the MS %I64d for compatibility: $ x86_64-w64-mingw32-gcc printf64.c -E |tail ... int main(){ printf("%" "I64d" "\n", 9223372036854775807LL); printf("9223372036854775807LL\n"); return 0; } >> >> this is news to me, and I have been working with mingw-w64 for a few years >> now - lost count. new feature? > > I think that's an old problem. Old news, more than a few years old by now.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public