summaryrefslogtreecommitdiff
path: root/legacy/evas/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2011-11-05 16:51:13 +0000
committerVincent Torri <vincent.torri@gmail.com>2011-11-05 16:51:13 +0000
commit3de60c77b4b17bd375bae28aa8b3a7859c1a8ae8 (patch)
tree661d1087af54f9d0e493e4f3cd7599d6f757a236 /legacy/evas/m4
parent14cfa65bd9a3ccdaf1946e7638f805de3ff04930 (diff)
Evas: fix use of __always_inline__ attribute
Fix multiple storage bug. * __forceinline is the equivalent of __always_inline__ on Windows. It has 'extern' as storage, so static must not be used with it * use __always_inline__ and not always_inline as attribute value instead. No need to add storage class with __always_inline__ too. * static inline is fine SVN revision: 64767
Diffstat (limited to 'legacy/evas/m4')
-rw-r--r--legacy/evas/m4/efl_attribute.m435
1 files changed, 31 insertions, 4 deletions
diff --git a/legacy/evas/m4/efl_attribute.m4 b/legacy/evas/m4/efl_attribute.m4
index 36c7a35..5d3af50 100644
--- a/legacy/evas/m4/efl_attribute.m4
+++ b/legacy/evas/m4/efl_attribute.m4
@@ -58,20 +58,47 @@ dnl call AC_DEFINE for alway_inline if __attribute__((always_inline)) is availab
58 58
59AC_DEFUN([EFL_ATTRIBUTE_ALWAYS_INLINE], 59AC_DEFUN([EFL_ATTRIBUTE_ALWAYS_INLINE],
60[ 60[
61AC_MSG_CHECKING([for __attribute__ ((always_inline))]) 61
62have_attribute_forceinline="no"
63
64AC_MSG_CHECKING([for __forceinline])
65
62AC_COMPILE_IFELSE( 66AC_COMPILE_IFELSE(
63 [AC_LANG_PROGRAM( 67 [AC_LANG_PROGRAM(
64 [[ 68 [[
65__attribute__((always_inline)) inline void foo(void) {} 69#include <windows.h>
70__forceinline void foo(void) {}
66 ]], 71 ]],
67 [[ 72 [[
68 ]])], 73 ]])],
69 [have_attribute_always_inline="yes"], 74 [
75 have_attribute_always_inline="yes"
76 have_attribute_forceinline="yes"
77 ],
70 [have_attribute_always_inline="no"]) 78 [have_attribute_always_inline="no"])
79
71AC_MSG_RESULT([${have_attribute_always_inline}]) 80AC_MSG_RESULT([${have_attribute_always_inline}])
72 81
82if test "x${have_attribute_always_inline}" = "xno" ; then
83 AC_MSG_CHECKING([for __attribute__ ((always_inline))])
84 AC_COMPILE_IFELSE(
85 [AC_LANG_PROGRAM(
86 [[
87__attribute__((always_inline)) inline void foo(void) {}
88 ]],
89 [[
90 ]])],
91 [have_attribute_always_inline="yes"],
92 [have_attribute_always_inline="no"])
93 AC_MSG_RESULT([${have_attribute_always_inline}])
94fi
95
73if test "x${have_attribute_always_inline}" = "xyes" ; then 96if test "x${have_attribute_always_inline}" = "xyes" ; then
74 AC_DEFINE([EFL_ALWAYS_INLINE], [__attribute__ ((always_inline)) inline], [Macro declaring a function to always be inlined.]) 97 if test "x${have_attribute_forceinline}" = "xyes" ; then
98 AC_DEFINE([EFL_ALWAYS_INLINE], [__forceinline], [Macro declaring a function to always be inlined.])
99 else
100 AC_DEFINE([EFL_ALWAYS_INLINE], [__attribute__ ((always_inline)) inline], [Macro declaring a function to always be inlined.])
101 fi
75else 102else
76 AC_DEFINE([EFL_ALWAYS_INLINE], [inline], [Macro declaring a function to always be inlined.]) 103 AC_DEFINE([EFL_ALWAYS_INLINE], [inline], [Macro declaring a function to always be inlined.])
77fi 104fi