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
* Fix compile error in net.c with musl libc. Found and patch provided by
zhasha (#278).
* Fix macroization of 'inline' keywork when building as C++. (#279)
= Version 1.2.16 released 2015-09-17

View File

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

View File

@ -28,13 +28,10 @@
#include <string.h>
#if defined(_MSC_VER) && !defined(inline)
#define inline _inline
#else
#if defined(__ARMCC_VERSION) && !defined(inline)
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
!defined(inline) && !defined(__cplusplus)
#define inline __inline
#endif /* __ARMCC_VERSION */
#endif /*_MSC_VER */
#endif
#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. */

View File

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

View File

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