summaryrefslogtreecommitdiff
path: root/lib/asan/asan_printf.cc
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2012-01-27 15:15:04 +0000
committerAlexander Potapenko <glider@google.com>2012-01-27 15:15:04 +0000
commit6f0452914ec76c786eb865983793bc03b00fc7b6 (patch)
treec9436071c73edb5be08daf3dafc3734faeab984d /lib/asan/asan_printf.cc
parentc8365231004cb1d956aba4164c89ea1398eadd6b (diff)
downloadcompiler-rt-6f0452914ec76c786eb865983793bc03b00fc7b6.tar.gz
Make compiler-rt/trunk/lib/asan compileable with Visual Studio 2008 on Windows.
Patch by Timur Iskhodzhanov (timurrrr@google.com) To test: $ cl /c *.c* in the asan directory. The code fails to link if you omit the "/c" part but that's one of the next steps, as well as a few TODO's I've put into the Windows-specific code. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_printf.cc')
-rw-r--r--lib/asan/asan_printf.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/asan/asan_printf.cc b/lib/asan/asan_printf.cc
index c833d214e..665256e17 100644
--- a/lib/asan/asan_printf.cc
+++ b/lib/asan/asan_printf.cc
@@ -180,11 +180,16 @@ void Report(const char *format, ...) {
}
int SScanf(const char *str, const char *format, ...) {
+#ifndef _WIN32
va_list args;
va_start(args, format);
int res = vsscanf(str, format, args);
va_end(args);
return res;
+#else
+ UNIMPLEMENTED();
+ return -1;
+#endif
}
} // namespace __asan