From: Richard Levitte Date: Wed, 2 May 2001 07:10:42 +0000 (+0000) Subject: Merge in the following changes (from the main trunk log): X-Git-Tag: OpenSSL_0_9_6b~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4760dc31c992d3c8bab892fb143c729509aa415e;p=oweals%2Fopenssl.git Merge in the following changes (from the main trunk log): >---------------------------- >revision 1.24 >date: 2001/04/29 16:30:59; author: steve; state: Exp; lines: +5 -1 >Win32 fixes: > >define LLONG properly for VC++. > >stop compiler complaining about signed/unsigned mismatch in apps/engine.c >---------------------------- >revision 1.22 >date: 2001/02/27 23:59:18; author: ulf; state: Exp; lines: +1 -1 >%f conversion bug fix >Submitted by: Henrik Eriksson >---------------------------- >revision 1.21 >date: 2000/10/22 12:44:12; author: levitte; state: Exp; lines: +3 -3 >On some operating systems, MAX is defined. Call ours OSSL_MAX instead --- diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index b4f7a85f2e..91a049406e 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -109,7 +109,11 @@ #endif #if HAVE_LONG_LONG -#define LLONG long long +# if defined(WIN32) && !defined(__GNUC__) +# define LLONG _int64 +# else +# define LLONG long long +# endif #else #define LLONG long #endif @@ -152,7 +156,7 @@ static void _dopr(char **sbuffer, char **buffer, /* some handy macros */ #define char_to_int(p) (p - '0') -#define MAX(p,q) ((p >= q) ? p : q) +#define OSSL_MAX(p,q) ((p >= q) ? p : q) static void _dopr( @@ -503,13 +507,13 @@ fmtint( convert[place] = 0; zpadlen = max - place; - spadlen = min - MAX(max, place) - (signvalue ? 1 : 0); + spadlen = min - OSSL_MAX(max, place) - (signvalue ? 1 : 0); if (zpadlen < 0) zpadlen = 0; if (spadlen < 0) spadlen = 0; if (flags & DP_F_ZERO) { - zpadlen = MAX(zpadlen, spadlen); + zpadlen = OSSL_MAX(zpadlen, spadlen); spadlen = 0; } if (flags & DP_F_MINUS) @@ -641,7 +645,7 @@ fmtfp( (caps ? "0123456789ABCDEF" : "0123456789abcdef")[fracpart % 10]; fracpart = (fracpart / 10); - } while (fracpart && (fplace < 20)); + } while (fplace < max); if (fplace == 20) fplace--; fconvert[fplace] = 0;