Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libshaderc_util/src/io_shaderc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "libshaderc_util/universal_unistd.h"

#if _WIN32
#ifdef _WIN32
// Need _fileno from stdio.h
// Need _O_BINARY and _O_TEXT from fcntl.h
#include <fcntl.h>
Expand Down Expand Up @@ -131,14 +131,14 @@ bool WriteFile(std::ostream* stream, const string_piece& output_data) {

void FlushAndSetBinaryModeOnStdout() {
std::fflush(stdout);
#if _WIN32
#ifdef _WIN32
_setmode(_fileno(stdout), _O_BINARY);
#endif
}

void FlushAndSetTextModeOnStdout() {
std::fflush(stdout);
#if _WIN32
#ifdef _WIN32
_setmode(_fileno(stdout), _O_TEXT);
#endif
}
Expand Down
Loading