Commits

Daniel Green committed fd0f112

Enables ANSI implemention of MinGW stdio.

Comments (0)

Files changed (2)

 # 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...
 
 # the D language specification.
 #D_EXTRA_DEFINES += -DD_VA_LIST_TYPE_VOIDPTR=1
 
+# Enables MinGW support for 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
 // 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;