Skip to content

Commit 0dfa9da

Browse files
minadsjaeckel
authored andcommitted
make tommath_class.h and tommath_superclass.h private
These headers are used for configuration during build time. Therefore they shouldn't be exposed as part of the public API.
1 parent 7345a68 commit 0dfa9da

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

makefile.mingw

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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
5858
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 \
5959
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
6060

61-
HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
62-
63-
HEADERS=tommath_private.h $(HEADERS_PUB)
61+
HEADERS_PUB=tommath.h
62+
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
6463

6564
#The default rule for make builds the libtommath.a library (static)
6665
default: $(LIBMAIN_S)

makefile.msvc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ bn_s_mp_montgomery_reduce_fast.obj bn_s_mp_mul_digs.obj bn_s_mp_mul_digs_fast.ob
5050
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 \
5151
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
5252

53-
HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
54-
55-
HEADERS=tommath_private.h $(HEADERS_PUB)
53+
HEADERS_PUB=tommath.h
54+
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
5655

5756
#The default rule for make builds the tommath.lib library (static)
5857
default: $(LIBMAIN_S)

makefile.unix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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
5959
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 \
6060
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
6161

62-
HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
63-
64-
HEADERS=tommath_private.h $(HEADERS_PUB)
62+
HEADERS_PUB=tommath.h
63+
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
6564

6665
#The default rule for make builds the libtommath.a library (static)
6766
default: $(LIBMAIN_S)

makefile_include.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ else
116116
COVERAGE_APP = ./test
117117
endif
118118

119-
HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
120-
HEADERS=tommath_private.h $(HEADERS_PUB)
119+
HEADERS_PUB=tommath.h
120+
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h $(HEADERS_PUB)
121121

122122
test_standalone: CFLAGS+=-DLTM_DEMO_TEST_VS_MTEST=0
123123

tommath.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
# include <stdio.h>
1717
#endif
1818

19-
#include "tommath_class.h"
20-
2119
#ifdef __cplusplus
2220
extern "C" {
2321
#endif

tommath_private.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define TOMMATH_PRIV_H_
66

77
#include "tommath.h"
8+
#include "tommath_class.h"
89

910
/* Hardening libtommath
1011
* --------------------

0 commit comments

Comments
 (0)