mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
58 lines
1.5 KiB
Diff
58 lines
1.5 KiB
Diff
|
From 2ab9505240c7d32ea5cb4d367c86af0146ac0b7c Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Hull <peterhull90@gmail.com>
|
||
|
Date: Sun, 24 Jan 2016 13:19:27 +0000
|
||
|
Subject: [PATCH] Fix for inlining in C11 mode
|
||
|
|
||
|
---
|
||
|
libs/basekit/source/Common_inline.h | 36 ++++++++++++++++++++++++------------
|
||
|
1 file changed, 24 insertions(+), 12 deletions(-)
|
||
|
|
||
|
diff --git a/libs/basekit/source/Common_inline.h b/libs/basekit/source/Common_inline.h
|
||
|
index a4086d7..19f8d47 100755
|
||
|
--- a/libs/basekit/source/Common_inline.h
|
||
|
+++ b/libs/basekit/source/Common_inline.h
|
||
|
@@ -117,19 +117,31 @@ Kudos to Daniel A. Koepke
|
||
|
#endif
|
||
|
|
||
|
#elif defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||
|
-
|
||
|
- #ifdef IO_IN_C_FILE
|
||
|
- // in .c
|
||
|
- #define IO_DECLARE_INLINES
|
||
|
- #define IOINLINE inline
|
||
|
- #define IOINLINE_RECURSIVE inline
|
||
|
+ #ifdef __GNUC_STDC_INLINE__
|
||
|
+ #ifdef IO_IN_C_FILE
|
||
|
+ // in .c
|
||
|
+ #define IO_DECLARE_INLINES
|
||
|
+ #define IOINLINE
|
||
|
+ #define IOINLINE_RECURSIVE
|
||
|
+ #else
|
||
|
+ // in .h
|
||
|
+ #define IO_DECLARE_INLINES
|
||
|
+ #define IOINLINE inline
|
||
|
+ #define IOINLINE_RECURSIVE inline
|
||
|
+ #endif
|
||
|
#else
|
||
|
- // in .h
|
||
|
- #define IO_DECLARE_INLINES
|
||
|
- #define IOINLINE extern inline
|
||
|
- #define IOINLINE_RECURSIVE extern inline
|
||
|
- #endif
|
||
|
-
|
||
|
+ #ifdef IO_IN_C_FILE
|
||
|
+ // in .c
|
||
|
+ #define IO_DECLARE_INLINES
|
||
|
+ #define IOINLINE inline
|
||
|
+ #define IOINLINE_RECURSIVE inline
|
||
|
+ #else
|
||
|
+ // in .h
|
||
|
+ #define IO_DECLARE_INLINES
|
||
|
+ #define IOINLINE extern inline
|
||
|
+ #define IOINLINE_RECURSIVE extern inline
|
||
|
+ #endif
|
||
|
+ #endif
|
||
|
#else
|
||
|
|
||
|
#ifdef IO_IN_C_FILE
|