prefix private macros by PRIVATE_
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
diff --git a/tommath.h b/tommath.h
index bd20597..44c35df 100644
--- a/tommath.h
+++ b/tommath.h
@@ -136,8 +136,8 @@ extern int KARATSUBA_MUL_CUTOFF,
#endif
/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */
-#define _MP_WARRAY_PRIVATE (1u << (((CHAR_BIT * sizeof(mp_word)) - (2 * MP_DIGIT_BIT)) + 1))
-#define MP_WARRAY (MP_DEPRECATED_PRAGMA("MP_WARRAY is an internal macro") _MP_WARRAY_PRIVATE)
+#define PRIVATE_MP_WARRAY (1u << (((CHAR_BIT * sizeof(mp_word)) - (2 * MP_DIGIT_BIT)) + 1))
+#define MP_WARRAY (MP_DEPRECATED_PRAGMA("MP_WARRAY is an internal macro") PRIVATE_MP_WARRAY)
/* the infamous mp_int structure */
typedef struct {
@@ -150,8 +150,8 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat);
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 301)
# define MP_DEPRECATED(x) __attribute__((deprecated("replaced by " #x)))
-# define _MP_DEPRECATED_PRAGMA(s) _Pragma(#s)
-# define MP_DEPRECATED_PRAGMA(s) _MP_DEPRECATED_PRAGMA(GCC warning s)
+# define PRIVATE_MP_DEPRECATED_PRAGMA(s) _Pragma(#s)
+# define MP_DEPRECATED_PRAGMA(s) PRIVATE_MP_DEPRECATED_PRAGMA(GCC warning s)
#elif defined(_MSC_VER) && _MSC_VER >= 1500
# define MP_DEPRECATED(x) __declspec(deprecated("replaced by " #x))
# define MP_DEPRECATED_PRAGMA(s) __pragma(message(s))
diff --git a/tommath_private.h b/tommath_private.h
index 63e6034..88d5de6 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -25,11 +25,9 @@ extern void *MP_CALLOC(size_t nmemb, size_t size);
extern void MP_FREE(void *mem, size_t size);
#endif
-/* TODO: Remove _MP_WARRAY_PRIVATE as soon as deprecated
- * MP_WARRAY is removed from tommath.h
-*/
+/* TODO: Remove PRIVATE_MP_WARRAY as soon as deprecated MP_WARRAY is removed from tommath.h */
#undef MP_WARRAY
-#define MP_WARRAY _MP_WARRAY_PRIVATE
+#define MP_WARRAY PRIVATE_MP_WARRAY
#define MP_MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MP_MAX(x, y) (((x) > (y)) ? (x) : (y))