rename LTM_NO_FILE to MP_NO_FILE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/bn_mp_fread.c b/bn_mp_fread.c
index 855c475..d5c5767 100644
--- a/bn_mp_fread.c
+++ b/bn_mp_fread.c
@@ -3,7 +3,7 @@
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
-#ifndef LTM_NO_FILE
+#ifndef MP_NO_FILE
/* read a bigint from a file stream in ASCII */
int mp_fread(mp_int *a, int radix, FILE *stream)
{
diff --git a/bn_mp_fwrite.c b/bn_mp_fwrite.c
index 540b734..d338604 100644
--- a/bn_mp_fwrite.c
+++ b/bn_mp_fwrite.c
@@ -3,7 +3,7 @@
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
-#ifndef LTM_NO_FILE
+#ifndef MP_NO_FILE
int mp_fwrite(const mp_int *a, int radix, FILE *stream)
{
char *buf;
diff --git a/tommath.h b/tommath.h
index 06d9962..bdf1213 100644
--- a/tommath.h
+++ b/tommath.h
@@ -8,6 +8,11 @@
#include <limits.h>
#ifndef LTM_NO_FILE
+# warning LTM_NO_FILE has been deprecated, use MP_NO_FILE.
+# define MP_NO_FILE
+#endif
+
+#ifndef MP_NO_FILE
# include <stdio.h>
#endif
@@ -610,7 +615,7 @@ int mp_toradix(const mp_int *a, char *str, int radix);
int mp_toradix_n(const mp_int *a, char *str, int radix, int maxlen);
int mp_radix_size(const mp_int *a, int radix, int *size);
-#ifndef LTM_NO_FILE
+#ifndef MP_NO_FILE
int mp_fread(mp_int *a, int radix, FILE *stream);
int mp_fwrite(const mp_int *a, int radix, FILE *stream);
#endif