aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-02-28 01:51:41 -0600
committerBrent Cook <busterb@gmail.com>2023-02-28 01:51:41 -0600
commitb98c56fd5e86fa76eb55a98a2266a923f64f705c (patch)
treeabfc4a6ae7db1cc78e3f9c530bead5ad353dc3aa /include
parent65af3925dcb7fc84000cedc373d5f84db3fc3265 (diff)
downloadportable-b98c56fd5e86fa76eb55a98a2266a923f64f705c.tar.gz
portable-b98c56fd5e86fa76eb55a98a2266a923f64f705c.tar.bz2
portable-b98c56fd5e86fa76eb55a98a2266a923f64f705c.zip
stop exposing hidden defines in public opensslconf.h
pull in hidden headers instead, patching drectly for Windows support
Diffstat (limited to 'include')
-rw-r--r--include/CMakeLists.txt4
-rw-r--r--include/openssl/Makefile.am.tpl23
-rw-r--r--include/openssl/opensslconf.h.in15
3 files changed, 11 insertions, 31 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index dafdee7..a08a781 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -7,8 +7,6 @@ if(ENABLE_LIBRESSL_INSTALL)
7 PATTERN "Makefile*" EXCLUDE) 7 PATTERN "Makefile*" EXCLUDE)
8endif(ENABLE_LIBRESSL_INSTALL) 8endif(ENABLE_LIBRESSL_INSTALL)
9 9
10file(READ openssl/opensslconf.h.in OPENSSLCONF)
11file(WRITE openssl/opensslconf.h "${OPENSSLCONF}")
12if(HOST_AARCH64) 10if(HOST_AARCH64)
13 file(READ arch/aarch64/opensslconf.h OPENSSLCONF) 11 file(READ arch/aarch64/opensslconf.h OPENSSLCONF)
14elseif(HOST_ARM) 12elseif(HOST_ARM)
@@ -28,4 +26,4 @@ elseif(HOST_SPARC64)
28elseif(HOST_X86_64) 26elseif(HOST_X86_64)
29 file(READ arch/amd64/opensslconf.h OPENSSLCONF) 27 file(READ arch/amd64/opensslconf.h OPENSSLCONF)
30endif() 28endif()
31file(APPEND openssl/opensslconf.h "${OPENSSLCONF}") 29file(WRITE openssl/opensslconf.h "${OPENSSLCONF}")
diff --git a/include/openssl/Makefile.am.tpl b/include/openssl/Makefile.am.tpl
index 167183a..2f67d10 100644
--- a/include/openssl/Makefile.am.tpl
+++ b/include/openssl/Makefile.am.tpl
@@ -3,40 +3,37 @@ include $(top_srcdir)/Makefile.am.common
3if !ENABLE_LIBTLS_ONLY 3if !ENABLE_LIBTLS_ONLY
4opensslincludedir=$(includedir)/openssl 4opensslincludedir=$(includedir)/openssl
5 5
6noinst_HEADERS = opensslconf.h.in
7BUILT_SOURCES = opensslconf.h 6BUILT_SOURCES = opensslconf.h
8CLEANFILES = opensslconf.h 7CLEANFILES = opensslconf.h
9 8
10opensslconf.h: opensslconf.h.in Makefile 9opensslconf.h: Makefile
11 -echo "generating opensslconf.h ..." 10 -echo "generating opensslconf.h ..."
12 -cp $(top_srcdir)/include/openssl/opensslconf.h.in opensslconf.h
13 -chmod u+w opensslconf.h
14if HOST_AARCH64 11if HOST_AARCH64
15 -cat $(top_srcdir)/include/arch/aarch64/opensslconf.h >> opensslconf.h 12 -cp $(top_srcdir)/include/arch/aarch64/opensslconf.h opensslconf.h
16endif 13endif
17if HOST_ARM 14if HOST_ARM
18 -cat $(top_srcdir)/include/arch/arm/opensslconf.h >> opensslconf.h 15 -cp $(top_srcdir)/include/arch/arm/opensslconf.h opensslconf.h
19endif 16endif
20if HOST_I386 17if HOST_I386
21 -cat $(top_srcdir)/include/arch/i386/opensslconf.h >> opensslconf.h 18 -cp $(top_srcdir)/include/arch/i386/opensslconf.h opensslconf.h
22endif 19endif
23if HOST_MIPS64 20if HOST_MIPS64
24 -cat $(top_srcdir)/include/arch/mips64/opensslconf.h >> opensslconf.h 21 -cp $(top_srcdir)/include/arch/mips64/opensslconf.h opensslconf.h
25endif 22endif
26if HOST_POWERPC 23if HOST_POWERPC
27 -cat $(top_srcdir)/include/arch/powerpc/opensslconf.h >> opensslconf.h 24 -cp $(top_srcdir)/include/arch/powerpc/opensslconf.h opensslconf.h
28endif 25endif
29if HOST_POWERPC64 26if HOST_POWERPC64
30 -cat $(top_srcdir)/include/arch/powerpc64/opensslconf.h >> opensslconf.h 27 -cp $(top_srcdir)/include/arch/powerpc64/opensslconf.h opensslconf.h
31endif 28endif
32if HOST_RISCV64 29if HOST_RISCV64
33 -cat $(top_srcdir)/include/arch/riscv64/opensslconf.h >> opensslconf.h 30 -cp $(top_srcdir)/include/arch/riscv64/opensslconf.h opensslconf.h
34endif 31endif
35if HOST_SPARC64 32if HOST_SPARC64
36 -cat $(top_srcdir)/include/arch/sparc64/opensslconf.h >> opensslconf.h 33 -cp $(top_srcdir)/include/arch/sparc64/opensslconf.h opensslconf.h
37endif 34endif
38if HOST_X86_64 35if HOST_X86_64
39 -cat $(top_srcdir)/include/arch/amd64/opensslconf.h >> opensslconf.h 36 -cp $(top_srcdir)/include/arch/amd64/opensslconf.h opensslconf.h
40endif 37endif
41 38
42opensslinclude_HEADERS = opensslconf.h 39opensslinclude_HEADERS = opensslconf.h
diff --git a/include/openssl/opensslconf.h.in b/include/openssl/opensslconf.h.in
deleted file mode 100644
index 8842f00..0000000
--- a/include/openssl/opensslconf.h.in
+++ /dev/null
@@ -1,15 +0,0 @@
1#if defined(_MSC_VER) && !defined(__clang__) && !defined(__attribute__)
2#define __attribute__(a)
3#endif
4
5#if defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_NAMESPACE)
6# define LCRYPTO_UNUSED(x)
7# define LCRYPTO_USED(x)
8# define LCRYPTO_ALIAS1(pre, x)
9# define LCRYPTO_ALIAS(x)
10
11# define LSSL_UNUSED(x)
12# define LSSL_USED(x)
13# define LSSL_ALIAS(x)
14#endif /* LIBRESSL_INTERNAL && !LIBRESSL_NAMESPACE */
15