cdefs.h 651 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #define _POSIX_VERSION 200809L
  8. #ifndef ALWAYS_INLINE
  9. # define ALWAYS_INLINE inline __attribute__((always_inline))
  10. #endif
  11. #ifdef __cplusplus
  12. # ifndef __BEGIN_DECLS
  13. # define __BEGIN_DECLS extern "C" {
  14. # define __END_DECLS }
  15. # endif
  16. #else
  17. # ifndef __BEGIN_DECLS
  18. # define __BEGIN_DECLS
  19. # define __END_DECLS
  20. # endif
  21. #endif
  22. #undef __P
  23. #define __P(a) a
  24. #define offsetof(type, member) __builtin_offsetof(type, member)
  25. #ifdef __cplusplus
  26. //extern "C" int main(int, char**);
  27. #endif