summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/bsd-snprintf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-03-19 00:09:49 +1100
committerDarren Tucker <dtucker@zip.com.au>2006-03-19 00:09:49 +1100
commitf516a3dea118dc568a08e024763813f5b35d67d9 (patch)
tree5a02cf348155af3f9cdfebace4e5df27111d352a /openbsd-compat/bsd-snprintf.c
parent106a70847559fea1517f860f92d9998546c076b8 (diff)
- (dtucker) [openbsd-compat/bsd-snprintf.c] Bug #1173: make fmtint() takeV_4_3
a LLONG rather than a long. Fixes scp'ing of large files on platforms with missing/broken snprintfs. Patch from e.borovac at bom.gov.au.
Diffstat (limited to 'openbsd-compat/bsd-snprintf.c')
-rw-r--r--openbsd-compat/bsd-snprintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index e4ba154f..bdd86fb8 100644
--- a/openbsd-compat/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
@@ -89,7 +89,7 @@
#include "includes.h"
-RCSID("$Id: bsd-snprintf.c,v 1.11 2005/12/17 11:32:04 dtucker Exp $");
+RCSID("$Id: bsd-snprintf.c,v 1.11.2.1 2006/03/18 13:09:49 dtucker Exp $");
#if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */
# undef HAVE_SNPRINTF
@@ -161,7 +161,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format,
static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
char *value, int flags, int min, int max);
static void fmtint(char *buffer, size_t *currlen, size_t maxlen,
- long value, int base, int min, int max, int flags);
+ LLONG value, int base, int min, int max, int flags);
static void fmtfp(char *buffer, size_t *currlen, size_t maxlen,
LDOUBLE fvalue, int min, int max, int flags);
static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c);
@@ -468,10 +468,10 @@ static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
static void fmtint(char *buffer, size_t *currlen, size_t maxlen,
- long value, int base, int min, int max, int flags)
+ LLONG value, int base, int min, int max, int flags)
{
int signvalue = 0;
- unsigned long uvalue;
+ unsigned LLONG uvalue;
char convert[20];
int place = 0;
int spadlen = 0; /* amount to space pad */