From: tb Date: Wed, 5 Jul 2023 19:25:01 +0000 (+0000) Subject: Merge bio.h patch from libressl-portable X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=70bd79abae3fe3d37edfc5b8c199d299800013df;p=openbsd Merge bio.h patch from libressl-portable ok beck@ --- diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index 82c4d68f128..124690b1ee5 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.57 2023/07/05 17:32:51 beck Exp $ */ +/* $OpenBSD: bio.h,v 1.58 2023/07/05 19:25:01 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -663,6 +663,8 @@ void BIO_copy_next_retry(BIO *b); /*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/ +/* Needed for libressl-portable. */ +#ifndef __MINGW_PRINTF_FORMAT int BIO_printf(BIO *bio, const char *format, ...) __attribute__((__format__(__printf__, 2, 3), __nonnull__(2))); int BIO_vprintf(BIO *bio, const char *format, va_list args) @@ -673,6 +675,18 @@ int BIO_snprintf(char *buf, size_t n, const char *format, ...) int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) __attribute__((__deprecated__, __format__(__printf__, 3, 0), __nonnull__(3))); +#else +int BIO_printf(BIO *bio, const char *format, ...) + __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2))); +int BIO_vprintf(BIO *bio, const char *format, va_list args) + __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 0), __nonnull__(2))); +int BIO_snprintf(char *buf, size_t n, const char *format, ...) + __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 4), + __nonnull__(3))); +int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) + __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0), + __nonnull__(3))); +#endif void ERR_load_BIO_strings(void);