From ba19432d2eaadfebad883c6377e2febab4394c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 29 May 2015 09:47:57 +0200 Subject: [PATCH] Move from asm to __asm by default - GCC with -std=c99 warns about asm but likes __asm _ armcc5 has __asm but not asm --- include/mbedtls/bn_mul.h | 4 ++++ library/aesni.c | 4 ++++ library/padlock.c | 4 ++++ library/timing.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/include/mbedtls/bn_mul.h b/include/mbedtls/bn_mul.h index 7b8019c90..188d7f3bb 100644 --- a/include/mbedtls/bn_mul.h +++ b/include/mbedtls/bn_mul.h @@ -42,6 +42,10 @@ #if defined(MBEDTLS_HAVE_ASM) +#ifndef asm +#define asm __asm +#endif + #if defined(__GNUC__) #if defined(__i386__) diff --git a/library/aesni.c b/library/aesni.c index ff6c71dd3..9982b3b10 100644 --- a/library/aesni.c +++ b/library/aesni.c @@ -37,6 +37,10 @@ #include +#ifndef asm +#define asm __asm +#endif + #if defined(MBEDTLS_HAVE_X86_64) /* diff --git a/library/padlock.c b/library/padlock.c index 3e9f9a9b5..e980d24df 100644 --- a/library/padlock.c +++ b/library/padlock.c @@ -38,6 +38,10 @@ #include +#ifndef asm +#define asm __asm +#endif + #if defined(MBEDTLS_HAVE_X86) /* diff --git a/library/timing.c b/library/timing.c index 4ff11e79e..bdbdccef1 100644 --- a/library/timing.c +++ b/library/timing.c @@ -39,6 +39,10 @@ #if !defined(MBEDTLS_TIMING_ALT) +#ifndef asm +#define asm __asm +#endif + #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) #include