mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00

POSIX doesn't tell us to export a macro like this, and it's largely going to never be defined when compiling a serenity-native C++ file, since AK defines it already. This does raise a strange issue where some futex-related helpers in serenity.h are declared with ALWAYS_INLINE. Whether these helpers belong in a C-visible header as file-static methods is questionable, but let's work around the issue but adding some preprocessor magic to make sure these declarations get the behavior they used to have without leaking macros.
26 lines
494 B
C
26 lines
494 B
C
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define _POSIX_VERSION 200809L
|
|
|
|
#ifdef __cplusplus
|
|
# ifndef __BEGIN_DECLS
|
|
# define __BEGIN_DECLS extern "C" {
|
|
# define __END_DECLS }
|
|
# endif
|
|
#else
|
|
# ifndef __BEGIN_DECLS
|
|
# define __BEGIN_DECLS
|
|
# define __END_DECLS
|
|
# endif
|
|
#endif
|
|
|
|
#undef __P
|
|
#define __P(a) a
|
|
|
|
#define offsetof(type, member) __builtin_offsetof(type, member)
|