Add compiler testing for always_inline attribute
Add compiler testing for fastcall attribute Add the FASTCALL define to visual c Remove some overkill inline routines Make sure that all the inline routines in headers are static Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3355
This commit is contained in:
parent
5f6236ee35
commit
88caf1dc71
20 changed files with 182 additions and 147 deletions
19
configure.in
19
configure.in
|
@ -142,6 +142,25 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|||
typedef struct { } __attribute__((packed)) junk;]],
|
||||
[[ ]])],[ AC_MSG_RESULT(yes);AC_DEFINE(C_HAS_ATTRIBUTE)],AC_MSG_RESULT(no))
|
||||
|
||||
|
||||
#Check if the compiler supports certain attributes
|
||||
OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="-Werror"
|
||||
|
||||
AH_TEMPLATE([C_ATTRIBUTE_ALWAYS_INLINE],[Determines if the compilers supports always_inline attribute.])
|
||||
AC_MSG_CHECKING(if compiler allows __attribute__((always_inline)) )
|
||||
AC_COMPILE_IFELSE([ void __attribute__((always_inline)) test(){}
|
||||
],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_ALWAYS_INLINE)],AC_MSG_RESULT(no))
|
||||
|
||||
AH_TEMPLATE([C_ATTRIBUTE_FASTCALL],[Determines if the compilers supports fastcall attribute.])
|
||||
AC_MSG_CHECKING(if compiler allows __attribute__((fastcall)) )
|
||||
AC_COMPILE_IFELSE([ void __attribute__((fastcall)) test(){}
|
||||
],[ AC_MSG_RESULT(yes);AC_DEFINE(C_ATTRIBUTE_FASTCALL)],AC_MSG_RESULT(no))
|
||||
|
||||
|
||||
CFLAGS="$OLDCFLAGS"
|
||||
|
||||
|
||||
#Check if the compiler supports __builtin_expect
|
||||
#Switch language to c++
|
||||
AC_LANG_PUSH(C++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue