summaryrefslogtreecommitdiff
path: root/crypto/compat/bsd-asprintf.c
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2014-10-29 15:44:36 -0500
committerBrent Cook <bcook@openbsd.org>2014-10-30 19:15:11 -0500
commita4cc953911a745d6e769a03cbe6442ee2fc27cbd (patch)
tree8c26006db95beb6249b755e108ee1aa317e742bd /crypto/compat/bsd-asprintf.c
parent727bccd093eaeac853ac84c7b6f31e67e452cde9 (diff)
downloadportable-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
Diffstat (limited to 'crypto/compat/bsd-asprintf.c')
-rw-r--r--crypto/compat/bsd-asprintf.c4
1 files changed, 1 insertions, 3 deletions
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
86int asprintf(char **str, const char *fmt, ...) 84int asprintf(char **str, const char *fmt, ...)
87{ 85{
88 va_list ap; 86 va_list ap;