Fixes the Windows regression test.

This commit is contained in:
Andrea Mazzoleni 2014-07-11 23:33:19 +02:00
parent 71ff0620ce
commit ea4eafb60d
2 changed files with 5 additions and 4 deletions

View file

@ -125,7 +125,7 @@ unsigned char* file_read(const char* path, int size, int extra_alloc)
data = malloc(size + extra_alloc);
f = open(path, O_RDONLY);
f = open(path, O_RDONLY | O_BINARY);
if (f < 0) {
/* LCOV_EXCL_START */
fprintf(stderr, "Error opening file %s\n", path);
@ -154,7 +154,7 @@ void file_write(const char* path, const unsigned char* data, int size, struct st
{
int f;
f = creat(path, S_IRUSR | S_IWUSR);
f = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_NOFOLLOW, 0600);
if (f < 0) {
/* LCOV_EXCL_START */
fprintf(stderr, "Error creating file %s\n", path);