map/das-dn/third_party/AdsLib/Beckhoff/WindowsQuirks.h
2024-12-09 09:41:04 +08:00

22 lines
370 B
C++

// 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
namespace Beckhoff
{
static inline void ForceBinaryOutputOnWindows()
{
#if defined(_WIN32) || defined(__CYGWIN__)
(void)_setmode(_fileno(stdout), O_BINARY);
#endif
}
}