Workaround Uncrustify parsing of "asm"
The following code:
#ifndef asm
#define asm __asm
#endif
causes Uncrustify to stop correcting the rest of the file. This may be
due to parsing the "asm" keyword in the definition.
Work around this by wrapping the idiom in an *INDENT-OFF* comment
wherever it appears.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/library/aesni.c b/library/aesni.c
index 87d818a..12125c9 100644
--- a/library/aesni.c
+++ b/library/aesni.c
@@ -36,9 +36,11 @@
#include <string.h>
+/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
+/* *INDENT-ON* */
#if defined(MBEDTLS_HAVE_X86_64)
diff --git a/library/bn_mul.h b/library/bn_mul.h
index 6b8106f..a34a7c7 100644
--- a/library/bn_mul.h
+++ b/library/bn_mul.h
@@ -82,9 +82,11 @@
#if defined(MBEDTLS_HAVE_ASM)
+/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
+/* *INDENT-ON* */
/* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */
#if defined(__GNUC__) && \
diff --git a/library/padlock.c b/library/padlock.c
index a128775..81bea1f 100644
--- a/library/padlock.c
+++ b/library/padlock.c
@@ -31,9 +31,11 @@
#include <string.h>
+/* *INDENT-OFF* */
#ifndef asm
#define asm __asm
#endif
+/* *INDENT-ON* */
#if defined(MBEDTLS_HAVE_X86)
diff --git a/library/sha256.c b/library/sha256.c
index 6965820..6e6a58f 100644
--- a/library/sha256.c
+++ b/library/sha256.c
@@ -89,9 +89,11 @@
#include <signal.h>
#include <setjmp.h>
+/* *INDENT-OFF* */
#ifndef asm
#define asm __asm__
#endif
+/* *INDENT-ON* */
static jmp_buf return_from_sigill;
diff --git a/library/sha512.c b/library/sha512.c
index 5de151d..46e3dab 100644
--- a/library/sha512.c
+++ b/library/sha512.c
@@ -104,9 +104,11 @@
#include <signal.h>
#include <setjmp.h>
+/* *INDENT-OFF* */
#ifndef asm
#define asm __asm__
#endif
+/* *INDENT-ON* */
static jmp_buf return_from_sigill;
@@ -297,9 +299,11 @@
# define mbedtls_internal_sha512_process_a64_crypto mbedtls_internal_sha512_process
#endif
+/* *INDENT-OFF* */
#ifndef asm
#define asm __asm__
#endif
+/* *INDENT-ON* */
/* Accelerated SHA-512 implementation originally written by Simon Tatham for PuTTY,
* under the MIT licence; dual-licensed as Apache 2 with his kind permission.