You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
715 B

  1. From cf4dfbe15ef8ead3a7eda974af7d804d447f00db Mon Sep 17 00:00:00 2001
  2. From: Glenn Strauss <gstrauss@gluelogic.com>
  3. Date: Mon, 4 Oct 2021 09:51:22 -0400
  4. Subject: [PATCH] [core] define __BEGIN_DECLS, __END_DECLS if needed
  5. ---
  6. src/first.h | 16 ++++++++++++++++
  7. 1 file changed, 16 insertions(+)
  8. --- a/src/first.h
  9. +++ b/src/first.h
  10. @@ -39,6 +39,22 @@
  11. #include <sys/types.h>
  12. #include <stddef.h>
  13. +#ifndef __BEGIN_DECLS
  14. +#ifdef __cplusplus
  15. +#define __BEGIN_DECLS extern "C" {
  16. +#else
  17. +#define __BEGIN_DECLS
  18. +#endif
  19. +#endif
  20. +
  21. +#ifndef __END_DECLS
  22. +#ifdef __cplusplus
  23. +#define __END_DECLS }
  24. +#else
  25. +#define __END_DECLS
  26. +#endif
  27. +#endif
  28. +
  29. #if defined HAVE_STDINT_H
  30. # include <stdint.h>
  31. #elif defined HAVE_INTTYPES_H