2024-12-03 10:36:06 +08:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
/**
|
|
|
|
Copyright (C) 2023 Beckhoff Automation GmbH & Co. KG
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <io.h>
|
|
|
|
#endif
|
|
|
|
|
2024-12-09 09:41:04 +08:00
|
|
|
namespace Beckhoff
|
2024-12-03 10:36:06 +08:00
|
|
|
{
|
|
|
|
static inline void ForceBinaryOutputOnWindows()
|
|
|
|
{
|
|
|
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
|
|
|
(void)_setmode(_fileno(stdout), O_BINARY);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|