[packages/postfix] - 64-bit long long support in vbuf_print()
adwol
adwol at pld-linux.org
Thu Aug 4 23:46:39 CEST 2016
commit b894a8178e139012c51c3e23d091ebb8be807715
Author: Adam Osuchowski <adwol at pld-linux.org>
Date: Thu Aug 4 23:46:06 2016 +0200
- 64-bit long long support in vbuf_print()
postfix-vbuf_print.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
postfix.spec | 2 ++
2 files changed, 50 insertions(+)
---
diff --git a/postfix.spec b/postfix.spec
index 37c0b18..46e4bd3 100644
--- a/postfix.spec
+++ b/postfix.spec
@@ -71,6 +71,7 @@ Patch10: %{name}-link.patch
Patch11: %{name}-scache_clnt.patch
Patch12: format-security.patch
Patch13: %{name}-no_cdb.patch
+Patch14: %{name}-vbuf_print.patch
URL: http://www.postfix.org/
%{?with_sasl:BuildRequires: cyrus-sasl-devel}
BuildRequires: db-devel
@@ -299,6 +300,7 @@ sed -i '/scache_clnt_create/s/server/var_scache_service/' src/global/scache_clnt
%patch12 -p1
%endif
%{!?with_cdb:%patch13 -p1}
+%patch14 -p1
%if %{with tcp}
sed -i 's/ifdef SNAPSHOT/if 1/' src/util/dict_open.c
diff --git a/postfix-vbuf_print.patch b/postfix-vbuf_print.patch
new file mode 100644
index 0000000..e1bd572
--- /dev/null
+++ b/postfix-vbuf_print.patch
@@ -0,0 +1,48 @@
+--- postfix-2.9.4.orig/src/util/vbuf_print.c 2012-09-19 20:00:06.000000000 +0200
++++ postfix-2.9.4/src/util/vbuf_print.c 2012-09-19 20:06:01.000000000 +0200
+@@ -122,7 +122,7 @@
+ unsigned char *cp;
+ int width; /* width and numerical precision */
+ int prec; /* are signed for overflow defense */
+- unsigned long_flag; /* long or plain integer */
++ unsigned long_flag; /* long long or long or plain integer */
+ int ch;
+ char *s;
+
+@@ -193,8 +193,17 @@
+ msg_warn("%s: bad precision %d in %.50s", myname, prec, format);
+ prec = 0;
+ }
+- if ((long_flag = (*cp == 'l')) != 0)/* long whatever */
++ /* long whatever */
++ long_flag = 0;
++ if (*cp == 'l') {
++ long_flag++;
+ VSTRING_ADDCH(fmt, *cp++);
++
++ if (*cp == 'l') {
++ long_flag++;
++ VSTRING_ADDCH(fmt, *cp++);
++ }
++ }
+ if (*cp == 0) /* premature end, punt */
+ break;
+ VSTRING_ADDCH(fmt, *cp); /* type (checked below) */
+@@ -220,13 +229,16 @@
+ break;
+ case 'c': /* integral-valued argument */
+ case 'd':
++ case 'i':
+ case 'u':
+ case 'o':
+ case 'x':
+ case 'X':
+ if (VBUF_SPACE(bp, (width > prec ? width : prec) + INT_SPACE))
+ return (bp);
+- if (long_flag)
++ if (long_flag > 1)
++ sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, long long));
++ else if (long_flag == 1)
+ sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, long));
+ else
+ sprintf((char *) bp->ptr, vstring_str(fmt), va_arg(ap, int));
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/postfix.git/commitdiff/b894a8178e139012c51c3e23d091ebb8be807715
More information about the pld-cvs-commit
mailing list