summaryrefslogtreecommitdiffstats
path: root/comm/third_party/libgcrypt/mpi/generic/mpi-asm-defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'comm/third_party/libgcrypt/mpi/generic/mpi-asm-defs.h')
-rw-r--r--comm/third_party/libgcrypt/mpi/generic/mpi-asm-defs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/comm/third_party/libgcrypt/mpi/generic/mpi-asm-defs.h b/comm/third_party/libgcrypt/mpi/generic/mpi-asm-defs.h
new file mode 100644
index 0000000000..e607806e10
--- /dev/null
+++ b/comm/third_party/libgcrypt/mpi/generic/mpi-asm-defs.h
@@ -0,0 +1,8 @@
+/* This file defines some basic constants for the MPI machinery.
+ * AMD64 compiled for the x32 ABI is special and thus we can't use the
+ * standard values for this ABI. */
+#if __GNUC__ >= 3 && defined(__x86_64__) && defined(__ILP32__)
+#define BYTES_PER_MPI_LIMB 8
+#else
+#define BYTES_PER_MPI_LIMB (SIZEOF_UNSIGNED_LONG)
+#endif