Undef ASSERT before defining it to ensure that no previous definition
has sneaked in through included files.

Signed-off-by: Ouss4 <abdelatif.guettouche@gmail.com>
diff --git a/library/chacha20.c b/library/chacha20.c
index bda39b2..d8a51ec 100644
--- a/library/chacha20.c
+++ b/library/chacha20.c
@@ -516,6 +516,9 @@
     375U
 };
 
+/* Make sure no other definition is already present. */
+#undef ASSERT
+
 #define ASSERT( cond, args )            \
     do                                  \
     {                                   \
diff --git a/library/chachapoly.c b/library/chachapoly.c
index d51227a..b05a145 100644
--- a/library/chachapoly.c
+++ b/library/chachapoly.c
@@ -472,6 +472,9 @@
     }
 };
 
+/* Make sure no other definition is already present. */
+#undef ASSERT
+
 #define ASSERT( cond, args )            \
     do                                  \
     {                                   \
diff --git a/library/poly1305.c b/library/poly1305.c
index 069b82d..9fc79a9 100644
--- a/library/poly1305.c
+++ b/library/poly1305.c
@@ -509,6 +509,9 @@
     }
 };
 
+/* Make sure no other definition is already present. */
+#undef ASSERT
+
 #define ASSERT( cond, args )            \
     do                                  \
     {                                   \
diff --git a/undef_assert_before_defining_it.txt b/undef_assert_before_defining_it.txt
new file mode 100644
index 0000000..74a2018
--- /dev/null
+++ b/undef_assert_before_defining_it.txt
@@ -0,0 +1,3 @@
+Changes
+   * Undefine the ASSERT macro before defining it locally, in case it is defined
+     in a platform header. Contributed by Abdelatif Guettouche in #3557.