diff -r 584a5f3a7dce d/Make-lang.in --- a/d/Make-lang.in Fri Apr 29 14:13:02 2011 +0100 +++ b/d/Make-lang.in Wed Jun 01 21:41:06 2011 -0400 @@ -17,6 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +target_os=$(shell echo $(target) | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)/\3/') # Manual configuration since patching gcc/configure.ac is troublesome... @@ -51,6 +52,11 @@ # the D language specification. #D_EXTRA_DEFINES += -DD_VA_LIST_TYPE_VOIDPTR=1 +# Enables support for support C99 printf format specfiers +ifeq ($(target_os), mingw32) +D_EXTRA_DEFINES += -D__USE_MINGW_ANSI_STDIO +endif + # As with C++: (quote) OTOH, I think this means the g++ driver... # Note that it would be nice to move the dependency on g++ # into the C++ rule, but that needs a little bit of work diff -r 584a5f3a7dce d/dmd/root.c --- a/d/dmd/root.c Fri Apr 29 14:13:02 2011 +0100 +++ b/d/dmd/root.c Wed Jun 01 21:41:06 2011 -0400 @@ -1831,7 +1831,7 @@ // The compiler shipped with Visual Studio 2005 (and possible // other versions) does not support C99 printf format specfiers // such as %z and %j -#if _WIN32 //_MSC_VER +#if _MSC_VER using std::string; using std::wstring;