Fix some Window-isms to get these tests to pass on Windows.

llvm-svn: 85450
This commit is contained in:
John Thompson 2009-10-29 00:10:42 +00:00
parent 3903320a48
commit e413e88f2e
2 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,10 @@
char * global_fmt;
#if defined(_WIN32) || defined(_WIN64)
extern int snprintf(char*, size_t, const char*, ...);
#endif
void check_string_literal( FILE* fp, const char* s, char *buf, ... ) {
char * b;
@ -83,7 +87,7 @@ void check_wide_string(char* b, ...)
va_start(ap,b);
printf(L"foo %d",2); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}}
vasprintf(&b,L"bar %d",ap); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}}
vsprintf(b,L"bar %d",ap); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}}
}
void check_asterisk_precision_width(int x) {

View File

@ -203,7 +203,11 @@ int test30() {
if (j)
longjmp(test30_j, 1);
else
#if defined(_WIN32) || defined(_WIN64)
longjmp(test30_j, 2);
#else
_longjmp(test30_j, 1);
#endif
}
typedef void test31_t(int status);