Commit 676e7ea4885b16fca8dd74bfacca7beef34d2232

Donald Chan 2015-10-30T10:33:46

Adding LTM_NO_FILE flag Certain embedded implementatino does not have FILE defined, adding LTM_NO_FILE flag to avoid compiler errors Signed-off-by: Donald Chan <hoiho.chan@gmail.com> Reviewed-by: Tom St Denis <tstdenis82@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/tommath.h b/tommath.h
index d662c3e..c65b671 100644
--- a/tommath.h
+++ b/tommath.h
@@ -577,8 +577,10 @@ int mp_toradix(mp_int *a, char *str, int radix);
 int mp_toradix_n(mp_int * a, char *str, int radix, int maxlen);
 int mp_radix_size(mp_int *a, int radix, int *size);
 
+#ifndef LTM_NO_FILE
 int mp_fread(mp_int *a, int radix, FILE *stream);
 int mp_fwrite(mp_int *a, int radix, FILE *stream);
+#endif
 
 #define mp_read_raw(mp, str, len) mp_read_signed_bin((mp), (str), (len))
 #define mp_raw_size(mp)           mp_signed_bin_size(mp)