Commit 80f5fac53b8fc315878365bdf23b05fdddfdc377

Daniel Mendler 2019-04-26T12:35:39

rename LTM_NO_FILE to MP_NO_FILE

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