OSDN Git Service

Avoid multiple link time definitions of _printf() for C++
authorkeithmarshall <keithmarshall>
Tue, 1 Sep 2009 20:41:55 +0000 (20:41 +0000)
committerkeithmarshall <keithmarshall>
Tue, 1 Sep 2009 20:41:55 +0000 (20:41 +0000)
winsup/mingw/ChangeLog
winsup/mingw/include/stdio.h

index 0cbef44..27c4089 100644 (file)
@@ -1,3 +1,11 @@
+2009-09-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Avoid multiple link time definitions of _printf() for C++;
+       (problem reported by Alexander Shaduri, via MinGW-users ML).
+
+       * include/stdio.h [__USE_MINGW_ANSI_STDIO]:
+       (__mingw_stdio_redirect__) [__cplusplus]: remove `static' keyword.
+
 2009-08-14 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
 
        * include/_mingw.h: Increment version to 3.16.
index b7ed9b7..11a92ea 100644 (file)
@@ -220,7 +220,7 @@ extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VAL
  * For C++ we use inline implementations, to avoid interference
  * with namespace qualification, which may result from using #defines.
  */
-#  define __mingw_stdio_redirect__  static inline __cdecl __MINGW_NOTHROW
+#  define __mingw_stdio_redirect__  inline __cdecl __MINGW_NOTHROW
 
 # elif defined __GNUC__
 /*