aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.am.common4
-rw-r--r--include/Makefile.am14
-rw-r--r--include/openssl/opensslconf.h.in15
-rw-r--r--patches/opensslconf.h.patch24
-rwxr-xr-xupdate.sh7
7 files changed, 41 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
index 3a0b97f..a47dd50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -145,6 +145,7 @@ stamp-h1
145stamp-h2 145stamp-h2
146 146
147include/openssl/Makefile.am 147include/openssl/Makefile.am
148include/arch
148 149
149VERSION 150VERSION
150crypto/VERSION 151crypto/VERSION
@@ -152,6 +153,7 @@ ssl/VERSION
152tls/VERSION 153tls/VERSION
153libtls-standalone/VERSION 154libtls-standalone/VERSION
154 155
156ssl/hidden
155ssl/*.c 157ssl/*.c
156ssl/*.h 158ssl/*.h
157tls/*.c 159tls/*.c
diff --git a/Makefile.am b/Makefile.am
index ed59df0..d28692a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
1SUBDIRS = crypto ssl tls include apps man 1SUBDIRS = include crypto ssl tls apps man
2if ENABLE_TESTS 2if ENABLE_TESTS
3SUBDIRS += tests 3SUBDIRS += tests
4endif 4endif
diff --git a/Makefile.am.common b/Makefile.am.common
index 87aa807..5405704 100644
--- a/Makefile.am.common
+++ b/Makefile.am.common
@@ -1,3 +1,5 @@
1AM_CFLAGS = 1AM_CFLAGS =
2AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/compat -DLIBRESSL_INTERNAL 2AM_CPPFLAGS = -I$(top_srcdir)/include
3AM_CPPFLAGS += -I$(abs_top_builddir)/include
4AM_CPPFLAGS += -I$(top_srcdir)/include/compat -DLIBRESSL_INTERNAL
3AM_CPPFLAGS += -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= 5AM_CPPFLAGS += -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS=
diff --git a/include/Makefile.am b/include/Makefile.am
index aed6721..26e82fe 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -44,4 +44,18 @@ noinst_HEADERS += compat/sys/time.h
44noinst_HEADERS += compat/sys/types.h 44noinst_HEADERS += compat/sys/types.h
45noinst_HEADERS += compat/sys/uio.h 45noinst_HEADERS += compat/sys/uio.h
46 46
47noinst_HEADERS += arch/aarch64/opensslconf.h
48noinst_HEADERS += arch/alpha/opensslconf.h
49noinst_HEADERS += arch/amd64/opensslconf.h
50noinst_HEADERS += arch/arm/opensslconf.h
51noinst_HEADERS += arch/hppa/opensslconf.h
52noinst_HEADERS += arch/i386/opensslconf.h
53noinst_HEADERS += arch/m88k/opensslconf.h
54noinst_HEADERS += arch/mips64/opensslconf.h
55noinst_HEADERS += arch/powerpc/opensslconf.h
56noinst_HEADERS += arch/powerpc64/opensslconf.h
57noinst_HEADERS += arch/riscv64/opensslconf.h
58noinst_HEADERS += arch/sh/opensslconf.h
59noinst_HEADERS += arch/sparc64/opensslconf.h
60
47include_HEADERS = tls.h 61include_HEADERS = tls.h
diff --git a/include/openssl/opensslconf.h.in b/include/openssl/opensslconf.h.in
new file mode 100644
index 0000000..8842f00
--- /dev/null
+++ b/include/openssl/opensslconf.h.in
@@ -0,0 +1,15 @@
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
diff --git a/patches/opensslconf.h.patch b/patches/opensslconf.h.patch
deleted file mode 100644
index ee5d645..0000000
--- a/patches/opensslconf.h.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1--- include/openssl/opensslconf.h.orig Tue Nov 22 21:08:27 2022
2+++ include/openssl/opensslconf.h Wed Nov 23 12:38:07 2022
3@@ -1,6 +1,21 @@
4 #include <openssl/opensslfeatures.h>
5 /* crypto/opensslconf.h.in */
6
7+#if defined(_MSC_VER) && !defined(__clang__) && !defined(__attribute__)
8+#define __attribute__(a)
9+#endif
10+
11+#if defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_NAMESPACE)
12+# define LCRYPTO_UNUSED(x)
13+# define LCRYPTO_USED(x)
14+# define LCRYPTO_ALIAS1(pre, x)
15+# define LCRYPTO_ALIAS(x)
16+
17+# define LSSL_UNUSED(x)
18+# define LSSL_USED(x)
19+# define LSSL_ALIAS(x)
20+#endif /* LIBRESSL_INTERNAL && !LIBRESSL_NAMESPACE */
21+
22 #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
23 #define OPENSSLDIR "/etc/ssl"
24 #endif
diff --git a/update.sh b/update.sh
index 3d0a608..29600a4 100755
--- a/update.sh
+++ b/update.sh
@@ -70,7 +70,6 @@ fi
70 70
71$CP $libssl_src/LICENSE COPYING 71$CP $libssl_src/LICENSE COPYING
72 72
73$CP $libcrypto_src/arch/amd64/opensslconf.h include/openssl
74$CP $libcrypto_src/opensslfeatures.h include/openssl 73$CP $libcrypto_src/opensslfeatures.h include/openssl
75$CP $libssl_src/pqueue.h include 74$CP $libssl_src/pqueue.h include
76 75
@@ -152,6 +151,12 @@ for i in `awk '/SOURCES|HEADERS/ { print $3 }' crypto/Makefile.am` ; do
152 fi 151 fi
153done 152done
154 153
154for i in $libcrypto_src/arch/*; do
155 arch=`basename $i`
156 mkdir -p include/arch/$arch
157 $CP $libcrypto_src/arch/$arch/opensslconf.h include/arch/$arch/
158done
159
155for i in $libcrypto_src/bn/arch/*; do 160for i in $libcrypto_src/bn/arch/*; do
156 arch=`basename $i` 161 arch=`basename $i`
157 mkdir -p crypto/bn/arch/$arch 162 mkdir -p crypto/bn/arch/$arch