Use stdio.h instead of cstdio for fdopen. Wrap all used POSIX functions for testing.

This commit is contained in:
Victor Zverovich
2014-05-15 08:58:10 -07:00
parent d758dbb33a
commit fb17316d77
5 changed files with 126 additions and 42 deletions
+2 -2
View File
@@ -65,8 +65,8 @@ class SuppressAssert {
// Fix "secure" warning about using fopen without defining
// _CRT_SECURE_NO_WARNINGS.
std::FILE *OpenFile(const char *filename, const char *mode) {
std::FILE *f = 0;
FILE *OpenFile(const char *filename, const char *mode) {
FILE *f = 0;
errno = fopen_s(&f, filename, mode);
return f;
}