diff options
author | Brent Cook <bcook@openbsd.org> | 2014-07-21 07:50:32 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-07-21 19:54:07 -0500 |
commit | f425f564d5062fdc3f7a0d15c7cc5c36a1723abd (patch) | |
tree | d8ebf841fcb5e43ce57956aaaef7d68f6b024808 | |
parent | 0ec7cdcbadd66def45046d093919799d9af3c12e (diff) | |
download | portable-f425f564d5062fdc3f7a0d15c7cc5c36a1723abd.tar.gz portable-f425f564d5062fdc3f7a0d15c7cc5c36a1723abd.tar.bz2 portable-f425f564d5062fdc3f7a0d15c7cc5c36a1723abd.zip |
test for and use system explicit_bzero if it exists
ok beck@ guenther@
-rw-r--r-- | configure.ac.tpl | 5 | ||||
-rw-r--r-- | crypto/Makefile.am.tpl | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac.tpl b/configure.ac.tpl index 84d2f69..ac66565 100644 --- a/configure.ac.tpl +++ b/configure.ac.tpl | |||
@@ -105,6 +105,11 @@ AC_CHECK_FUNC(strtonum,[AC_SEARCH_LIBS(write,, [NO_STRTONUM=], | |||
105 | AC_SUBST(NO_STRTONUM) | 105 | AC_SUBST(NO_STRTONUM) |
106 | AM_CONDITIONAL(NO_STRTONUM, test "x$NO_STRTONUM" = "xyes") | 106 | AM_CONDITIONAL(NO_STRTONUM, test "x$NO_STRTONUM" = "xyes") |
107 | 107 | ||
108 | AC_CHECK_FUNC(explicit_bzero,[AC_SEARCH_LIBS(write,, [NO_EXPLICIT_BZERO=], | ||
109 | [NO_EXPLICIT_BZERO=yes])], [NO_EXPLICIT_BZERO=yes]) | ||
110 | AC_SUBST(NO_EXPLICIT_BZERO) | ||
111 | AM_CONDITIONAL(NO_EXPLICIT_BZERO, test "x$NO_EXPLICIT_BZERO" = "xyes") | ||
112 | |||
108 | AC_CHECK_FUNC(getauxval, AC_DEFINE(HAVE_GETAUXVAL)) | 113 | AC_CHECK_FUNC(getauxval, AC_DEFINE(HAVE_GETAUXVAL)) |
109 | 114 | ||
110 | AC_CHECK_FUNC(funopen, AC_DEFINE(HAVE_FUNOPEN)) | 115 | AC_CHECK_FUNC(funopen, AC_DEFINE(HAVE_FUNOPEN)) |
diff --git a/crypto/Makefile.am.tpl b/crypto/Makefile.am.tpl index ac87a77..6e1c423 100644 --- a/crypto/Makefile.am.tpl +++ b/crypto/Makefile.am.tpl | |||
@@ -14,7 +14,11 @@ noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la | |||
14 | 14 | ||
15 | # compatibility functions that need to be built without optimizations | 15 | # compatibility functions that need to be built without optimizations |
16 | libcompatnoopt_la_CFLAGS = -O0 | 16 | libcompatnoopt_la_CFLAGS = -O0 |
17 | libcompatnoopt_la_SOURCES = compat/explicit_bzero.c | 17 | libcompatnoopt_la_SOURCES = |
18 | |||
19 | if NO_EXPLICIT_BZERO | ||
20 | libcompatnoopt_la_SOURCES += compat/explicit_bzero.c | ||
21 | endif | ||
18 | 22 | ||
19 | # other compatibility functions | 23 | # other compatibility functions |
20 | libcompat_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) | 24 | libcompat_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) |