Fix macroization of inline in C++

When compiling as C++, MSVC complains about our macroization of a keyword.
Stop doing that as we know inline is always available in C++
This commit is contained in:
Manuel Pégourié-Gonnard 2015-10-05 11:40:01 +01:00
parent 021a11500f
commit 0123405f32
5 changed files with 11 additions and 20 deletions

View File

@ -5,6 +5,7 @@ PolarSSL ChangeLog
Bugfix Bugfix
* Fix compile error in net.c with musl libc. Found and patch provided by * Fix compile error in net.c with musl libc. Found and patch provided by
zhasha (#278). zhasha (#278).
* Fix macroization of 'inline' keywork when building as C++. (#279)
= Version 1.2.16 released 2015-09-17 = Version 1.2.16 released 2015-09-17

View File

@ -29,10 +29,8 @@
#include <string.h> #include <string.h>
#if defined(_MSC_VER) && !defined(inline) #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
#define inline _inline !defined(inline) && !defined(__cplusplus)
#else
#if defined(__ARMCC_VERSION) && !defined(inline)
#define inline __inline #define inline __inline
#endif /* __ARMCC_VERSION */ #endif /* __ARMCC_VERSION */
#endif /*_MSC_VER */ #endif /*_MSC_VER */

View File

@ -28,13 +28,10 @@
#include <string.h> #include <string.h>
#if defined(_MSC_VER) && !defined(inline) #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
#define inline _inline !defined(inline) && !defined(__cplusplus)
#else
#if defined(__ARMCC_VERSION) && !defined(inline)
#define inline __inline #define inline __inline
#endif /* __ARMCC_VERSION */ #endif
#endif /*_MSC_VER */
#define POLARSSL_ERR_MD_FEATURE_UNAVAILABLE -0x5080 /**< The selected feature is not available. */ #define POLARSSL_ERR_MD_FEATURE_UNAVAILABLE -0x5080 /**< The selected feature is not available. */
#define POLARSSL_ERR_MD_BAD_INPUT_DATA -0x5100 /**< Bad input parameters to function. */ #define POLARSSL_ERR_MD_BAD_INPUT_DATA -0x5100 /**< Bad input parameters to function. */

View File

@ -34,10 +34,8 @@
#include <pkcs11-helper-1.0/pkcs11h-certificate.h> #include <pkcs11-helper-1.0/pkcs11h-certificate.h>
#if defined(_MSC_VER) && !defined(inline) #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
#define inline _inline !defined(inline) && !defined(__cplusplus)
#else
#if defined(__ARMCC_VERSION) && !defined(inline)
#define inline __inline #define inline __inline
#endif /* __ARMCC_VERSION */ #endif /* __ARMCC_VERSION */
#endif /*_MSC_VER */ #endif /*_MSC_VER */

View File

@ -43,13 +43,10 @@
#include "zlib.h" #include "zlib.h"
#endif #endif
#if defined(_MSC_VER) && !defined(inline) #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
#define inline _inline !defined(inline) && !defined(__cplusplus)
#else
#if defined(__ARMCC_VERSION) && !defined(inline)
#define inline __inline #define inline __inline
#endif /* __ARMCC_VERSION */ #endif
#endif /*_MSC_VER */
/* /*
* SSL Error codes * SSL Error codes