AK: Provide more complete definitions for AK_OS_WINDOWS

MSG_NOSIGNAL is a no-op for Windows, so we can define it to 0.

At the same *time*, none of the CLOCK_* macros are defined on
Windows, as clock_gettime does not exist. Put AK_OS_WINDOWS in the
same category of the BSDs for the COARSE versions of those macros.

Co-authored-by: Andrew Kaster <akaster@serenityos.org>
This commit is contained in:
Cameron Youell 2023-08-30 16:50:28 +10:00 committed by Andrew Kaster
parent e1710939ce
commit 958ffad706
Notes: github-actions[bot] 2024-10-16 18:16:31 +00:00

View file

@ -277,10 +277,10 @@
#endif
#if defined(AK_OS_WINDOWS)
# define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC
# define MSG_NOSIGNAL 0
#endif
#if defined(AK_OS_BSD_GENERIC) && !defined(AK_OS_FREEBSD) || defined(AK_OS_HAIKU)
#if defined(AK_OS_BSD_GENERIC) && !defined(AK_OS_FREEBSD) || defined(AK_OS_HAIKU) || defined(AK_OS_WINDOWS)
# define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC
# define CLOCK_REALTIME_COARSE CLOCK_REALTIME
#endif