Commit 22768cf08c6adf28cdb9de23c3bb5f9b158ef50a

Steffen Jaeckel 2019-05-21T18:04:47

Merge pull request #271 from libtom/private-headers make tommath_class.h and tommath_superclass.h private

diff --git a/makefile.mingw b/makefile.mingw
index f330491..1659203 100644
--- a/makefile.mingw
+++ b/makefile.mingw
@@ -58,9 +58,8 @@ bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o bn_s
 bn_s_mp_mul_high_digs_fast.o bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o \
 bn_s_mp_sqr.o bn_s_mp_sqr_fast.o bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o
 
-HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
-
-HEADERS=tommath_private.h $(HEADERS_PUB)
+HEADERS_PUB=tommath.h
+HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
 
 #The default rule for make builds the libtommath.a library (static)
 default: $(LIBMAIN_S)
diff --git a/makefile.msvc b/makefile.msvc
index 78030a4..b7a28c8 100644
--- a/makefile.msvc
+++ b/makefile.msvc
@@ -50,9 +50,8 @@ bn_s_mp_montgomery_reduce_fast.obj bn_s_mp_mul_digs.obj bn_s_mp_mul_digs_fast.ob
 bn_s_mp_mul_high_digs_fast.obj bn_s_mp_rand_jenkins.obj bn_s_mp_rand_platform.obj bn_s_mp_reverse.obj \
 bn_s_mp_sqr.obj bn_s_mp_sqr_fast.obj bn_s_mp_sub.obj bn_s_mp_toom_mul.obj bn_s_mp_toom_sqr.obj
 
-HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
-
-HEADERS=tommath_private.h $(HEADERS_PUB)
+HEADERS_PUB=tommath.h
+HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
 
 #The default rule for make builds the tommath.lib library (static)
 default: $(LIBMAIN_S)
diff --git a/makefile.unix b/makefile.unix
index 6e097cf..7a1548f 100644
--- a/makefile.unix
+++ b/makefile.unix
@@ -59,9 +59,8 @@ bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o bn_s
 bn_s_mp_mul_high_digs_fast.o bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o \
 bn_s_mp_sqr.o bn_s_mp_sqr_fast.o bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o
 
-HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
-
-HEADERS=tommath_private.h $(HEADERS_PUB)
+HEADERS_PUB=tommath.h
+HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
 
 #The default rule for make builds the libtommath.a library (static)
 default: $(LIBMAIN_S)
diff --git a/makefile_include.mk b/makefile_include.mk
index cae5ac7..9303ffc 100644
--- a/makefile_include.mk
+++ b/makefile_include.mk
@@ -116,8 +116,8 @@ else
    COVERAGE_APP = ./test
 endif
 
-HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
-HEADERS=tommath_private.h $(HEADERS_PUB)
+HEADERS_PUB=tommath.h
+HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
 
 test_standalone: CFLAGS+=-DLTM_DEMO_TEST_VS_MTEST=0
 
diff --git a/tommath.h b/tommath.h
index 20a6462..ba14826 100644
--- a/tommath.h
+++ b/tommath.h
@@ -16,8 +16,6 @@
 #  include <stdio.h>
 #endif
 
-#include "tommath_class.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/tommath_private.h b/tommath_private.h
index d1a8b63..5be62c5 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -5,6 +5,7 @@
 #define TOMMATH_PRIV_H_
 
 #include "tommath.h"
+#include "tommath_class.h"
 
 /* Hardening libtommath
  * --------------------