r226925 - Attempt to fix ::sscanf Cygwin build break reported in PR22302

Reid Kleckner reid at kleckner.net
Fri Jan 23 11:16:26 PST 2015


Author: rnk
Date: Fri Jan 23 13:16:25 2015
New Revision: 226925

URL: http://llvm.org/viewvc/llvm-project?rev=226925&view=rev
Log:
Attempt to fix ::sscanf Cygwin build break reported in PR22302

Modified:
    cfe/trunk/lib/Driver/MSVCToolChain.cpp

Modified: cfe/trunk/lib/Driver/MSVCToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/MSVCToolChain.cpp?rev=226925&r1=226924&r2=226925&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/MSVCToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/MSVCToolChain.cpp Fri Jan 23 13:16:25 2015
@@ -22,6 +22,8 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Process.h"
 
+#include <cstdio>
+
 // Include the necessary headers to interface with the Windows registry and
 // environment.
 #if defined(LLVM_ON_WIN32)
@@ -212,7 +214,7 @@ bool MSVCToolChain::getWindowsSDKDir(std
       "SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\$VERSION",
       "InstallationFolder", path, &sdkVersion);
   if (!sdkVersion.empty())
-    ::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor);
+    std::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor);
   return hasSDKDir && !path.empty();
 }
 





More information about the cfe-commits mailing list