diff options
author | Brent Cook <bcook@openbsd.org> | 2014-10-29 15:44:36 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-10-30 19:15:11 -0500 |
commit | a4cc953911a745d6e769a03cbe6442ee2fc27cbd (patch) | |
tree | 8c26006db95beb6249b755e108ee1aa317e742bd | |
parent | 727bccd093eaeac853ac84c7b6f31e67e452cde9 (diff) | |
download | portable-a4cc953911a745d6e769a03cbe6442ee2fc27cbd.tar.gz portable-a4cc953911a745d6e769a03cbe6442ee2fc27cbd.tar.bz2 portable-a4cc953911a745d6e769a03cbe6442ee2fc27cbd.zip |
Improve and simplify function and header detection logic.
Simplify autoconf checks by using AC_CHECK_FUNCS/HEADERS.
Clarify some ambiguous dependencies around strnlen/strndup.
Unconditionally enable pidwraptest for all arc4random implementations.
Remove HAVE_VASPRINTF conditional, since asprintf requires vasprintf.
ok @doug
-rw-r--r-- | apps/Makefile.am.tpl | 2 | ||||
-rw-r--r-- | configure.ac | 97 | ||||
-rw-r--r-- | crypto/Makefile.am.tpl | 25 | ||||
-rw-r--r-- | crypto/compat/bsd-asprintf.c | 4 | ||||
-rw-r--r-- | include/stdio.h | 2 | ||||
-rw-r--r-- | include/stdlib.h | 6 | ||||
-rw-r--r-- | include/string.h | 17 | ||||
-rw-r--r-- | include/unistd.h | 4 | ||||
-rw-r--r-- | tests/Makefile.am.tpl | 4 | ||||
-rwxr-xr-x | update.sh | 3 |
10 files changed, 52 insertions, 112 deletions
diff --git a/apps/Makefile.am.tpl b/apps/Makefile.am.tpl index 9bc7b2e..433fca2 100644 --- a/apps/Makefile.am.tpl +++ b/apps/Makefile.am.tpl | |||
@@ -10,6 +10,6 @@ openssl_LDADD += $(top_builddir)/crypto/libcrypto.la | |||
10 | openssl_SOURCES = | 10 | openssl_SOURCES = |
11 | noinst_HEADERS = | 11 | noinst_HEADERS = |
12 | 12 | ||
13 | if NO_STRTONUM | 13 | if !HAVE_STRTONUM |
14 | openssl_SOURCES += strtonum.c | 14 | openssl_SOURCES += strtonum.c |
15 | endif | 15 | endif |
diff --git a/configure.ac b/configure.ac index eca3134..6ae06a1 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -58,75 +58,26 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], | |||
58 | ) | 58 | ) |
59 | CFLAGS="$save_cflags $AM_CFLAGS" | 59 | CFLAGS="$save_cflags $AM_CFLAGS" |
60 | 60 | ||
61 | AC_CHECK_FUNC(strlcpy, | 61 | AC_CHECK_FUNCS([arc4random_buf asprintf explicit_bzero funopen getauxval]) |
62 | AM_CONDITIONAL(NO_STRLCPY, false), | 62 | AC_CHECK_FUNCS([getentropy issetugid memmem reallocarray]) |
63 | AC_DEFINE(NO_STRLCPY) | 63 | AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strtonum]) |
64 | AM_CONDITIONAL(NO_STRLCPY, true)) | 64 | AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp]) |
65 | 65 | ||
66 | AC_CHECK_FUNC(strlcat, | 66 | # Share test results with automake |
67 | AM_CONDITIONAL(NO_STRLCAT, false), | 67 | AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF], [test "x$ac_cv_func_arc4random_buf" = xyes]) |
68 | AC_DEFINE(NO_STRLCAT) | 68 | AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) |
69 | AM_CONDITIONAL(NO_STRLCAT, true)) | 69 | AM_CONDITIONAL([HAVE_EXPLICIT_BZERO], [test "x$ac_cv_func_explicit_bzero" = xyes]) |
70 | 70 | AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = xyes]) | |
71 | AC_CHECK_FUNC(strndup, | 71 | AM_CONDITIONAL([HAVE_ISSETUGID], [test "x$ac_cv_func_issetugid" = xyes]) |
72 | AM_CONDITIONAL(NO_STRNDUP, false), | 72 | AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) |
73 | AC_DEFINE(NO_STRNDUP) | 73 | AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) |
74 | AM_CONDITIONAL(NO_STRNDUP, true)) | 74 | AM_CONDITIONAL([HAVE_STRLCAT], [test "x$ac_cv_func_strlcat" = xyes]) |
75 | 75 | AM_CONDITIONAL([HAVE_STRLCPY], [test "x$ac_cv_func_strlcpy" = xyes]) | |
76 | AC_CHECK_FUNC(strnlen, | 76 | AM_CONDITIONAL([HAVE_STRNDUP], [test "x$ac_cv_func_strndup" = xyes]) |
77 | AM_CONDITIONAL(NO_STRNLEN, false), | 77 | AM_CONDITIONAL([HAVE_STRNLEN], [test "x$ac_cv_func_strnlen" = xyes]) |
78 | AC_DEFINE(NO_STRNLEN) | 78 | AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes]) |
79 | AM_CONDITIONAL(NO_STRNLEN, true)) | 79 | AM_CONDITIONAL([HAVE_TIMINGSAFE_BCMP], [test "x$ac_cv_func_timingsafe_bcmp" = xyes]) |
80 | 80 | AM_CONDITIONAL([HAVE_TIMINGSAFE_MEMCMP], [test "x$ac_cv_func_timingsafe_memcmp" = xyes]) | |
81 | AC_CHECK_FUNC(asprintf, | ||
82 | AM_CONDITIONAL(NO_ASPRINTF, false), | ||
83 | AC_DEFINE(NO_ASPRINTF) | ||
84 | AM_CONDITIONAL(NO_ASPRINTF, true)) | ||
85 | |||
86 | AC_CHECK_FUNC(reallocarray, | ||
87 | AM_CONDITIONAL(NO_REALLOCARRAY, false), | ||
88 | AC_DEFINE(NO_REALLOCARRAY) | ||
89 | AM_CONDITIONAL(NO_REALLOCARRAY, true)) | ||
90 | |||
91 | AC_CHECK_FUNC(timingsafe_bcmp, | ||
92 | AM_CONDITIONAL(NO_TIMINGSAFE_BCMP, false), | ||
93 | AC_DEFINE(NO_TIMINGSAFE_BCMP) | ||
94 | AM_CONDITIONAL(NO_TIMINGSAFE_BCMP, true)) | ||
95 | |||
96 | AC_CHECK_FUNC(timingsafe_memcmp, | ||
97 | AM_CONDITIONAL(NO_TIMINGSAFE_MEMCMP, false), | ||
98 | AC_DEFINE(NO_TIMINGSAFE_MEMCMP) | ||
99 | AM_CONDITIONAL(NO_TIMINGSAFE_MEMCMP, true)) | ||
100 | |||
101 | AC_CHECK_FUNC(arc4random_buf, | ||
102 | AM_CONDITIONAL(NO_ARC4RANDOM_BUF, false), | ||
103 | AC_DEFINE(NO_ARC4RANDOM_BUF) | ||
104 | AM_CONDITIONAL(NO_ARC4RANDOM_BUF, true)) | ||
105 | |||
106 | AC_CHECK_FUNC(getentropy, | ||
107 | AM_CONDITIONAL(NO_GETENTROPY, false), | ||
108 | AC_DEFINE(NO_GETENTROPY) | ||
109 | AM_CONDITIONAL(NO_GETENTROPY, true)) | ||
110 | |||
111 | AC_CHECK_FUNC(issetugid, | ||
112 | AM_CONDITIONAL(NO_ISSETUGID, false), | ||
113 | AC_DEFINE(NO_ISSETUGID) | ||
114 | AM_CONDITIONAL(NO_ISSETUGID, true)) | ||
115 | |||
116 | AC_CHECK_FUNC(strtonum, | ||
117 | AM_CONDITIONAL(NO_STRTONUM, false), | ||
118 | AC_DEFINE(NO_STRTONUM) | ||
119 | AM_CONDITIONAL(NO_STRTONUM, true)) | ||
120 | |||
121 | AC_CHECK_FUNC(memmem, | ||
122 | AM_CONDITIONAL(NO_MEMMEM, false), | ||
123 | AC_DEFINE(NO_MEMMEM) | ||
124 | AM_CONDITIONAL(NO_MEMMEM, true)) | ||
125 | |||
126 | AC_CHECK_FUNC(explicit_bzero, | ||
127 | AM_CONDITIONAL(NO_EXPLICIT_BZERO, false), | ||
128 | AC_DEFINE(NO_EXPLICIT_BZERO) | ||
129 | AM_CONDITIONAL(NO_EXPLICIT_BZERO, true)) | ||
130 | 81 | ||
131 | AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [ | 82 | AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [ |
132 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | 83 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
@@ -153,13 +104,7 @@ if test "x$ac_cv_have___va_copy" = "xyes" ; then | |||
153 | AC_DEFINE([HAVE___VA_COPY], [1], [Define if __va_copy exists]) | 104 | AC_DEFINE([HAVE___VA_COPY], [1], [Define if __va_copy exists]) |
154 | fi | 105 | fi |
155 | 106 | ||
156 | AC_CHECK_FUNC(getauxval, AC_DEFINE(HAVE_GETAUXVAL)) | 107 | AC_CHECK_HEADERS([sys/sysctl.h err.h]) |
157 | |||
158 | AC_CHECK_FUNC(funopen, AC_DEFINE(HAVE_FUNOPEN)) | ||
159 | |||
160 | AC_CHECK_HEADER(sys/sysctl.h, AC_DEFINE(HAVE_SYS_SYSCTL_H)) | ||
161 | |||
162 | AC_CHECK_HEADER(err.h, AC_DEFINE(HAVE_ERR_H)) | ||
163 | 108 | ||
164 | AC_ARG_WITH([openssldir], | 109 | AC_ARG_WITH([openssldir], |
165 | AS_HELP_STRING([--with-openssldir], [Set the default openssl directory]), | 110 | AS_HELP_STRING([--with-openssldir], [Set the default openssl directory]), |
diff --git a/crypto/Makefile.am.tpl b/crypto/Makefile.am.tpl index 04ff7f7..0ace78a 100644 --- a/crypto/Makefile.am.tpl +++ b/crypto/Makefile.am.tpl | |||
@@ -16,7 +16,7 @@ noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la | |||
16 | libcompatnoopt_la_CFLAGS = -O0 | 16 | libcompatnoopt_la_CFLAGS = -O0 |
17 | libcompatnoopt_la_SOURCES = | 17 | libcompatnoopt_la_SOURCES = |
18 | 18 | ||
19 | if NO_EXPLICIT_BZERO | 19 | if !HAVE_EXPLICIT_BZERO |
20 | libcompatnoopt_la_SOURCES += compat/explicit_bzero.c | 20 | libcompatnoopt_la_SOURCES += compat/explicit_bzero.c |
21 | endif | 21 | endif |
22 | 22 | ||
@@ -25,41 +25,42 @@ libcompat_la_CFLAGS = $(CFLAGS) $(USER_CFLAGS) | |||
25 | libcompat_la_SOURCES = | 25 | libcompat_la_SOURCES = |
26 | libcompat_la_LIBADD = $(PLATFORM_LDADD) | 26 | libcompat_la_LIBADD = $(PLATFORM_LDADD) |
27 | 27 | ||
28 | if NO_STRLCAT | 28 | if !HAVE_STRLCAT |
29 | libcompat_la_SOURCES += compat/strlcat.c | 29 | libcompat_la_SOURCES += compat/strlcat.c |
30 | endif | 30 | endif |
31 | 31 | ||
32 | if NO_STRLCPY | 32 | if !HAVE_STRLCPY |
33 | libcompat_la_SOURCES += compat/strlcpy.c | 33 | libcompat_la_SOURCES += compat/strlcpy.c |
34 | endif | 34 | endif |
35 | 35 | ||
36 | if NO_STRNDUP | 36 | if !HAVE_STRNDUP |
37 | libcompat_la_SOURCES += compat/strndup.c | 37 | libcompat_la_SOURCES += compat/strndup.c |
38 | if NO_STRNLEN | 38 | # the only user of strnlen is strndup, so only build it if needed |
39 | if !HAVE_STRNLEN | ||
39 | libcompat_la_SOURCES += compat/strnlen.c | 40 | libcompat_la_SOURCES += compat/strnlen.c |
40 | endif | 41 | endif |
41 | endif | 42 | endif |
42 | 43 | ||
43 | if NO_ASPRINTF | 44 | if !HAVE_ASPRINTF |
44 | libcompat_la_SOURCES += compat/bsd-asprintf.c | 45 | libcompat_la_SOURCES += compat/bsd-asprintf.c |
45 | endif | 46 | endif |
46 | 47 | ||
47 | if NO_REALLOCARRAY | 48 | if !HAVE_REALLOCARRAY |
48 | libcompat_la_SOURCES += compat/reallocarray.c | 49 | libcompat_la_SOURCES += compat/reallocarray.c |
49 | endif | 50 | endif |
50 | 51 | ||
51 | if NO_TIMINGSAFE_MEMCMP | 52 | if !HAVE_TIMINGSAFE_MEMCMP |
52 | libcompat_la_SOURCES += compat/timingsafe_memcmp.c | 53 | libcompat_la_SOURCES += compat/timingsafe_memcmp.c |
53 | endif | 54 | endif |
54 | 55 | ||
55 | if NO_TIMINGSAFE_BCMP | 56 | if !HAVE_TIMINGSAFE_BCMP |
56 | libcompat_la_SOURCES += compat/timingsafe_bcmp.c | 57 | libcompat_la_SOURCES += compat/timingsafe_bcmp.c |
57 | endif | 58 | endif |
58 | 59 | ||
59 | if NO_ARC4RANDOM_BUF | 60 | if !HAVE_ARC4RANDOM_BUF |
60 | libcompat_la_SOURCES += compat/arc4random.c | 61 | libcompat_la_SOURCES += compat/arc4random.c |
61 | 62 | ||
62 | if NO_GETENTROPY | 63 | if !HAVE_GETENTROPY |
63 | if HOST_LINUX | 64 | if HOST_LINUX |
64 | libcompat_la_SOURCES += compat/getentropy_linux.c | 65 | libcompat_la_SOURCES += compat/getentropy_linux.c |
65 | endif | 66 | endif |
@@ -76,7 +77,7 @@ endif | |||
76 | 77 | ||
77 | endif | 78 | endif |
78 | 79 | ||
79 | if NO_ISSETUGID | 80 | if !HAVE_ISSETUGID |
80 | if HOST_LINUX | 81 | if HOST_LINUX |
81 | libcompat_la_SOURCES += compat/issetugid_linux.c | 82 | libcompat_la_SOURCES += compat/issetugid_linux.c |
82 | endif | 83 | endif |
diff --git a/crypto/compat/bsd-asprintf.c b/crypto/compat/bsd-asprintf.c index 8ccfa22..3728bc5 100644 --- a/crypto/compat/bsd-asprintf.c +++ b/crypto/compat/bsd-asprintf.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 17 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef HAVE_VASPRINTF | 20 | #ifndef HAVE_ASPRINTF |
21 | 21 | ||
22 | #include <errno.h> | 22 | #include <errno.h> |
23 | #include <limits.h> /* for INT_MAX */ | 23 | #include <limits.h> /* for INT_MAX */ |
@@ -80,9 +80,7 @@ fail: | |||
80 | errno = ENOMEM; | 80 | errno = ENOMEM; |
81 | return (-1); | 81 | return (-1); |
82 | } | 82 | } |
83 | #endif | ||
84 | 83 | ||
85 | #ifndef HAVE_ASPRINTF | ||
86 | int asprintf(char **str, const char *fmt, ...) | 84 | int asprintf(char **str, const char *fmt, ...) |
87 | { | 85 | { |
88 | va_list ap; | 86 | va_list ap; |
diff --git a/include/stdio.h b/include/stdio.h index fffa170..4a40f6a 100644 --- a/include/stdio.h +++ b/include/stdio.h | |||
@@ -3,7 +3,7 @@ | |||
3 | #ifndef LIBCRYPTOCOMPAT_STDIO_H | 3 | #ifndef LIBCRYPTOCOMPAT_STDIO_H |
4 | #define LIBCRYPTOCOMPAT_STDIO_H | 4 | #define LIBCRYPTOCOMPAT_STDIO_H |
5 | 5 | ||
6 | #ifdef NO_ASPRINTF | 6 | #ifndef HAVE_ASPRINTF |
7 | #include <stdarg.h> | 7 | #include <stdarg.h> |
8 | int vasprintf(char **str, const char *fmt, va_list ap); | 8 | int vasprintf(char **str, const char *fmt, va_list ap); |
9 | int asprintf(char **str, const char *fmt, ...); | 9 | int asprintf(char **str, const char *fmt, ...); |
diff --git a/include/stdlib.h b/include/stdlib.h index c314f38..1a1cb6c 100644 --- a/include/stdlib.h +++ b/include/stdlib.h | |||
@@ -7,16 +7,16 @@ | |||
7 | #include <sys/time.h> | 7 | #include <sys/time.h> |
8 | #include <stdint.h> | 8 | #include <stdint.h> |
9 | 9 | ||
10 | #ifdef NO_ARC4RANDOM_BUF | 10 | #ifndef HAVE_ARC4RANDOM_BUF |
11 | uint32_t arc4random(void); | 11 | uint32_t arc4random(void); |
12 | void arc4random_buf(void *_buf, size_t n); | 12 | void arc4random_buf(void *_buf, size_t n); |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #ifdef NO_REALLOCARRAY | 15 | #ifndef HAVE_REALLOCARRAY |
16 | void *reallocarray(void *, size_t, size_t); | 16 | void *reallocarray(void *, size_t, size_t); |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef NO_STRTONUM | 19 | #ifndef HAVE_STRTONUM |
20 | long long strtonum(const char *nptr, long long minval, | 20 | long long strtonum(const char *nptr, long long minval, |
21 | long long maxval, const char **errstr); | 21 | long long maxval, const char **errstr); |
22 | #endif | 22 | #endif |
diff --git a/include/string.h b/include/string.h index f092477..47ada28 100644 --- a/include/string.h +++ b/include/string.h | |||
@@ -12,34 +12,35 @@ | |||
12 | #include <strings.h> | 12 | #include <strings.h> |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #ifdef NO_STRLCPY | 15 | #ifndef HAVE_STRLCPY |
16 | size_t strlcpy(char *dst, const char *src, size_t siz); | 16 | size_t strlcpy(char *dst, const char *src, size_t siz); |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef NO_STRLCAT | 19 | #ifndef HAVE_STRLCAT |
20 | size_t strlcat(char *dst, const char *src, size_t siz); | 20 | size_t strlcat(char *dst, const char *src, size_t siz); |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef NO_STRNDUP | 23 | #ifndef HAVE_STRNDUP |
24 | char * strndup(const char *str, size_t maxlen); | 24 | char * strndup(const char *str, size_t maxlen); |
25 | #ifdef NO_STRNLEN | 25 | /* the only user of strnlen is strndup, so only build it if needed */ |
26 | #ifndef HAVE_STRNLEN | ||
26 | size_t strnlen(const char *str, size_t maxlen); | 27 | size_t strnlen(const char *str, size_t maxlen); |
27 | #endif | 28 | #endif |
28 | #endif | 29 | #endif |
29 | 30 | ||
30 | #ifdef NO_EXPLICIT_BZERO | 31 | #ifndef HAVE_EXPLICIT_BZERO |
31 | void explicit_bzero(void *, size_t); | 32 | void explicit_bzero(void *, size_t); |
32 | #endif | 33 | #endif |
33 | 34 | ||
34 | #ifdef NO_TIMINGSAFE_BCMP | 35 | #ifndef HAVE_TIMINGSAFE_BCMP |
35 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); | 36 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); |
36 | #endif | 37 | #endif |
37 | 38 | ||
38 | #ifdef NO_TIMINGSAFE_MEMCMP | 39 | #ifndef HAVE_TIMINGSAFE_MEMCMP |
39 | int timingsafe_memcmp(const void *b1, const void *b2, size_t len); | 40 | int timingsafe_memcmp(const void *b1, const void *b2, size_t len); |
40 | #endif | 41 | #endif |
41 | 42 | ||
42 | #ifdef NO_MEMMEM | 43 | #ifndef HAVE_MEMMEM |
43 | void * memmem(const void *big, size_t big_len, const void *little, | 44 | void * memmem(const void *big, size_t big_len, const void *little, |
44 | size_t little_len); | 45 | size_t little_len); |
45 | #endif | 46 | #endif |
diff --git a/include/unistd.h b/include/unistd.h index 037b11a..38caeb1 100644 --- a/include/unistd.h +++ b/include/unistd.h | |||
@@ -3,11 +3,11 @@ | |||
3 | #ifndef LIBCRYPTOCOMPAT_UNISTD_H | 3 | #ifndef LIBCRYPTOCOMPAT_UNISTD_H |
4 | #define LIBCRYPTOCOMPAT_UNISTD_H | 4 | #define LIBCRYPTOCOMPAT_UNISTD_H |
5 | 5 | ||
6 | #ifdef NO_GETENTROPY | 6 | #ifndef HAVE_GETENTROPY |
7 | int getentropy(void *buf, size_t buflen); | 7 | int getentropy(void *buf, size_t buflen); |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #ifdef NO_ISSETUGID | 10 | #ifndef HAVE_ISSETUGID |
11 | int issetugid(void); | 11 | int issetugid(void); |
12 | #endif | 12 | #endif |
13 | 13 | ||
diff --git a/tests/Makefile.am.tpl b/tests/Makefile.am.tpl index 52df298..5a760da 100644 --- a/tests/Makefile.am.tpl +++ b/tests/Makefile.am.tpl | |||
@@ -9,7 +9,3 @@ LDADD += $(top_builddir)/crypto/libcrypto.la | |||
9 | TESTS = | 9 | TESTS = |
10 | check_PROGRAMS = | 10 | check_PROGRAMS = |
11 | EXTRA_DIST = | 11 | EXTRA_DIST = |
12 | |||
13 | if !NO_ARC4RANDOM_BUF | ||
14 | TESTS += pidwraptest.sh | ||
15 | endif | ||
@@ -305,7 +305,6 @@ test_drivers=( | |||
305 | # disabled by-default tests | 305 | # disabled by-default tests |
306 | tests_disabled=( | 306 | tests_disabled=( |
307 | biotest | 307 | biotest |
308 | pidwraptest | ||
309 | ) | 308 | ) |
310 | $CP $libc_src/string/memmem.c tests/ | 309 | $CP $libc_src/string/memmem.c tests/ |
311 | (cd tests | 310 | (cd tests |
@@ -319,7 +318,7 @@ $CP $libc_src/string/memmem.c tests/ | |||
319 | echo "check_PROGRAMS += $TEST" >> Makefile.am | 318 | echo "check_PROGRAMS += $TEST" >> Makefile.am |
320 | echo "${TEST}_SOURCES = $i" >> Makefile.am | 319 | echo "${TEST}_SOURCES = $i" >> Makefile.am |
321 | done | 320 | done |
322 | echo "if NO_MEMMEM" >> Makefile.am | 321 | echo "if !HAVE_MEMMEM" >> Makefile.am |
323 | echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am | 322 | echo "explicit_bzero_SOURCES += memmem.c" >> Makefile.am |
324 | echo "endif" >> Makefile.am | 323 | echo "endif" >> Makefile.am |
325 | ) | 324 | ) |