summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/b_print.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/b_print.c')
-rw-r--r--src/lib/libcrypto/bio/b_print.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bio/b_print.c b/src/lib/libcrypto/bio/b_print.c
index b4f7a85f2e..91a049406e 100644
--- a/src/lib/libcrypto/bio/b_print.c
+++ b/src/lib/libcrypto/bio/b_print.c
@@ -109,7 +109,11 @@
109#endif 109#endif
110 110
111#if HAVE_LONG_LONG 111#if HAVE_LONG_LONG
112#define LLONG long long 112# if defined(WIN32) && !defined(__GNUC__)
113# define LLONG _int64
114# else
115# define LLONG long long
116# endif
113#else 117#else
114#define LLONG long 118#define LLONG long
115#endif 119#endif
@@ -152,7 +156,7 @@ static void _dopr(char **sbuffer, char **buffer,
152 156
153/* some handy macros */ 157/* some handy macros */
154#define char_to_int(p) (p - '0') 158#define char_to_int(p) (p - '0')
155#define MAX(p,q) ((p >= q) ? p : q) 159#define OSSL_MAX(p,q) ((p >= q) ? p : q)
156 160
157static void 161static void
158_dopr( 162_dopr(
@@ -503,13 +507,13 @@ fmtint(
503 convert[place] = 0; 507 convert[place] = 0;
504 508
505 zpadlen = max - place; 509 zpadlen = max - place;
506 spadlen = min - MAX(max, place) - (signvalue ? 1 : 0); 510 spadlen = min - OSSL_MAX(max, place) - (signvalue ? 1 : 0);
507 if (zpadlen < 0) 511 if (zpadlen < 0)
508 zpadlen = 0; 512 zpadlen = 0;
509 if (spadlen < 0) 513 if (spadlen < 0)
510 spadlen = 0; 514 spadlen = 0;
511 if (flags & DP_F_ZERO) { 515 if (flags & DP_F_ZERO) {
512 zpadlen = MAX(zpadlen, spadlen); 516 zpadlen = OSSL_MAX(zpadlen, spadlen);
513 spadlen = 0; 517 spadlen = 0;
514 } 518 }
515 if (flags & DP_F_MINUS) 519 if (flags & DP_F_MINUS)
@@ -641,7 +645,7 @@ fmtfp(
641 (caps ? "0123456789ABCDEF" 645 (caps ? "0123456789ABCDEF"
642 : "0123456789abcdef")[fracpart % 10]; 646 : "0123456789abcdef")[fracpart % 10];
643 fracpart = (fracpart / 10); 647 fracpart = (fracpart / 10);
644 } while (fracpart && (fplace < 20)); 648 } while (fplace < max);
645 if (fplace == 20) 649 if (fplace == 20)
646 fplace--; 650 fplace--;
647 fconvert[fplace] = 0; 651 fconvert[fplace] = 0;