aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2016-11-06 04:32:16 -0600
committerBrent Cook <bcook@openbsd.org>2016-11-06 04:32:16 -0600
commit7e4ce26c27523f7a2ab9667a3d730edaff9f07f4 (patch)
treeabf1ee4b7c046559648a4b75ad3371abff27a6f3
parentd2f5ab1ee8376e817c4d0e68c2bded31341fbc0e (diff)
downloadportable-7e4ce26c27523f7a2ab9667a3d730edaff9f07f4.tar.gz
portable-7e4ce26c27523f7a2ab9667a3d730edaff9f07f4.tar.bz2
portable-7e4ce26c27523f7a2ab9667a3d730edaff9f07f4.zip
use __MINGW_PRINTF_FORMAT for BIO_* print functions if available
-rw-r--r--patches/bio.h.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/patches/bio.h.patch b/patches/bio.h.patch
new file mode 100644
index 0000000..7212b54
--- /dev/null
+++ b/patches/bio.h.patch
@@ -0,0 +1,36 @@
1--- include/openssl/bio.h.orig Mon Oct 3 06:09:28 2016
2+++ include/openssl/bio.h Sun Nov 6 04:24:57 2016
3@@ -678,8 +678,24 @@
4
5 /*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/
6
7+#ifdef __MINGW_PRINTF_FORMAT
8 int
9 BIO_printf(BIO *bio, const char *format, ...)
10+ __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2)));
11+int
12+BIO_vprintf(BIO *bio, const char *format, va_list args)
13+ __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 0), __nonnull__(2)));
14+int
15+BIO_snprintf(char *buf, size_t n, const char *format, ...)
16+ __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 4),
17+ __nonnull__(3)));
18+int
19+BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
20+ __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0),
21+ __nonnull__(3)));
22+#else
23+int
24+BIO_printf(BIO *bio, const char *format, ...)
25 __attribute__((__format__(__printf__, 2, 3), __nonnull__(2)));
26 int
27 BIO_vprintf(BIO *bio, const char *format, va_list args)
28@@ -692,6 +708,8 @@
29 BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
30 __attribute__((__deprecated__, __format__(__printf__, 3, 0),
31 __nonnull__(3)));
32+#endif
33+
34
35 /* BEGIN ERROR CODES */
36 /* The following lines are auto generated by the script mkerr.pl. Any changes