aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-14 21:25:06 +0100
committerMattias Andrée <maandree@kth.se>2022-02-14 21:25:06 +0100
commitea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b (patch)
tree416ad9e2f06aef594714b06a91f7f379d1766749 /common.h
parentFix previous commit (diff)
downloadlibar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.gz
libar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.bz2
libar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.xz
Refine libar2_hash_buf_size + add test + securely erase parts of the hash output buffer that is written to but is not part of the hash
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.h b/common.h
index d918563..e02d2c6 100644
--- a/common.h
+++ b/common.h
@@ -28,6 +28,11 @@
#endif
+#if defined(__GNUC__)
+# define LIBAR2_WEAKLY_LINKED__ __attribute__((weak))
+#endif
+
+
#ifndef CACHE_LINE_SIZE
# define CACHE_LINE_SIZE 256 /* better with larger than actual than smaller than actual */
#endif
@@ -48,6 +53,7 @@
# endif
#endif
+
#define ELEMSOF(ARR) (sizeof(ARR) / sizeof(*(ARR)))
#define MAX(A, B) ((A) > (B) ? (A) : (B))