mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-12 18:04:39 +08:00
Unify defintions of inline for MSVC (and old armcc?)
Having multiple definitions was cumbersome, and meant we might forget the definition when adding an inline definition to a file that didn't have one before (as I did when I added an inline definition in common.h). Resolves #6649. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
42649d9270
commit
6157fee306
@ -61,11 +61,6 @@
|
|||||||
/** Invalid input data. */
|
/** Invalid input data. */
|
||||||
#define MBEDTLS_ERR_AES_BAD_INPUT_DATA -0x0021
|
#define MBEDTLS_ERR_AES_BAD_INPUT_DATA -0x0021
|
||||||
|
|
||||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
|
||||||
!defined(inline) && !defined(__cplusplus)
|
|
||||||
#define inline __inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -53,6 +53,12 @@
|
|||||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define `inline` on some non-C99-compliant compilers. */
|
||||||
|
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
||||||
|
!defined(inline) && !defined(__cplusplus)
|
||||||
|
#define inline __inline
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
#include "mbedtls/mbedtls_config.h"
|
#include "mbedtls/mbedtls_config.h"
|
||||||
#else
|
#else
|
||||||
|
@ -46,11 +46,6 @@
|
|||||||
#define MBEDTLS_CIPHER_MODE_STREAM
|
#define MBEDTLS_CIPHER_MODE_STREAM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
|
||||||
!defined(inline) && !defined(__cplusplus)
|
|
||||||
#define inline __inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** The selected feature is not available. */
|
/** The selected feature is not available. */
|
||||||
#define MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE -0x6080
|
#define MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE -0x6080
|
||||||
/** Bad input parameters. */
|
/** Bad input parameters. */
|
||||||
|
@ -26,11 +26,6 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
|
||||||
!defined(inline) && !defined(__cplusplus)
|
|
||||||
#define inline __inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Error code layout.
|
* Error code layout.
|
||||||
*
|
*
|
||||||
|
@ -27,11 +27,6 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
|
||||||
!defined(inline) && !defined(__cplusplus)
|
|
||||||
#define inline __inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name PEM Error codes
|
* \name PEM Error codes
|
||||||
* These error codes are returned in case of errors reading the
|
* These error codes are returned in case of errors reading the
|
||||||
|
@ -44,11 +44,6 @@
|
|||||||
#include "psa/crypto.h"
|
#include "psa/crypto.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
|
|
||||||
!defined(inline) && !defined(__cplusplus)
|
|
||||||
#define inline __inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Memory allocation failed. */
|
/** Memory allocation failed. */
|
||||||
#define MBEDTLS_ERR_PK_ALLOC_FAILED -0x3F80
|
#define MBEDTLS_ERR_PK_ALLOC_FAILED -0x3F80
|
||||||
/** Type mismatch, eg attempt to encrypt with an ECDSA key */
|
/** Type mismatch, eg attempt to encrypt with an ECDSA key */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user