%% options copyright owner = Dirk Krause copyright year = 2019-xxxx SPDX-License-Identifier: BSD-3-Clause %% header /** @file dk3use.h Define constants which feature to use. */ #ifndef DK3CONF_H_INCLUDED #include #endif /* For cross-compiled programs wchar_t string output failed after _setmode(_fileno(stdout), _O_U16TEXT); */ #ifndef DK3_USE_SETMODE_UTF16 #if DK3_ON_WINDOWS && (DK3_CHAR_SIZE > 1) && defined(_MSC_VER) /** Use _setmode() before writing wchar_t strings on Windows. */ #define DK3_USE_SETMODE_UTF16 1 #else /** Do not use _setmode() before writing wchar_t strings on Windows. */ #define DK3_USE_SETMODE_UTF16 0 #endif #endif /* Here we keep the possibility to select more detailed where to use _setmode(_fileno(stdout), _O_BINARY); and back. */ #ifndef DK3_USE_SETMODE_BINARY #if DK3_ON_WINDOWS /* && defined(_MSC_VER) */ #define DK3_USE_SETMODE_BINARY 1 #else #define DK3_USE_SETMODE_BINARY 0 #endif #endif