muon/include/compat.h
Stone Tickle d286201f39
rename posix.h to compat.h
Currently all compat.h does is define the appropriate POSIX macro unless
you are on windows, as well as conditionally enabling
__attribute__(format...).
2023-03-10 09:35:04 -05:00

18 lines
379 B
C

/*
* SPDX-FileCopyrightText: Stone Tickle <lattis@mochiro.moe>
* SPDX-License-Identifier: GPL-3.0-only
*/
#if !defined(_WIN32)
#if !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 200809L
#endif
#endif
#if defined(__GNUC__)
#define MUON_ATTR_FORMAT(type, start, end) __attribute__ ((format(type, start, end)))
#else
#define MUON_ATTR_FORMAT(type, start, end)
#endif