aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--include/Makefile.am1
-rw-r--r--include/sys/cdefs.h31
3 files changed, 44 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 43ef0cd..91ae7ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,18 @@ case $host_cpu in
88 ;; 88 ;;
89esac 89esac
90 90
91AC_MSG_CHECKING([if .gnu.warning accepts long strings])
92AC_LINK_IFELSE([AC_LANG_SOURCE([[
93extern void SSLv3_method();
94__asm__(".section .gnu.warning.SSLv3_method; .ascii \"SSLv3_method is insecure\" ; .text");
95int main() {return 0;}
96]])], [
97 AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.])
98 AC_MSG_RESULT(yes)
99], [
100 AC_MSG_RESULT(no)
101])
102
91AC_ARG_ENABLE([asm], 103AC_ARG_ENABLE([asm],
92 AS_HELP_STRING([--disable-asm], [Disable assembly])) 104 AS_HELP_STRING([--disable-asm], [Disable assembly]))
93AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) 105AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"])
diff --git a/include/Makefile.am b/include/Makefile.am
index b620938..92ee9e7 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -21,6 +21,7 @@ noinst_HEADERS += machine/endian.h
21noinst_HEADERS += netinet/in.h 21noinst_HEADERS += netinet/in.h
22noinst_HEADERS += netinet/tcp.h 22noinst_HEADERS += netinet/tcp.h
23 23
24noinst_HEADERS += sys/cdefs.h
24noinst_HEADERS += sys/ioctl.h 25noinst_HEADERS += sys/ioctl.h
25noinst_HEADERS += sys/mman.h 26noinst_HEADERS += sys/mman.h
26noinst_HEADERS += sys/select.h 27noinst_HEADERS += sys/select.h
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
new file mode 100644
index 0000000..21ef031
--- /dev/null
+++ b/include/sys/cdefs.h
@@ -0,0 +1,31 @@
1/*
2 * Public domain
3 * sys/cdefs.h compatibility shim
4 */
5
6#ifndef LIBCRYPTOCOMPAT_SYS_CDEFS_H
7#define LIBCRYPTOCOMPAT_SYS_CDEFS_H
8
9#ifdef _WIN32
10
11#define __warn_references(sym,msg)
12
13#else
14
15#include_next <sys/cdefs.h>
16
17#ifndef __warn_references
18
19#if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG)
20#define __warn_references(sym,msg) \
21 __asm__(".section .gnu.warning." __STRING(sym) \
22 " ; .ascii \"" msg "\" ; .text");
23#else
24#define __warn_references(sym,msg)
25#endif
26
27#endif /* __warn_references */
28
29#endif /* _WIN32 */
30
31#endif /* LIBCRYPTOCOMPAT_SYS_CDEFS_H */