#define LDOUBLE double
#endif
-#if HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG
# if defined(OPENSSL_SYS_WIN32) && !defined(__GNUC__)
# define LLONG _int64
# else
int flags)
{
int signvalue = 0;
- char *prefix = "";
+ const char *prefix = "";
unsigned LLONG uvalue;
char convert[DECIMAL_SIZE(value)+3];
int place = 0;
}
static LDOUBLE
-pow10(int in_exp)
+pow_10(int in_exp)
{
LDOUBLE result = 1;
while (in_exp) {
int caps = 0;
long intpart;
long fracpart;
+ long max10;
if (max < 0)
max = 6;
/* we "cheat" by converting the fractional part to integer by
multiplying by a factor of 10 */
- fracpart = roundv((pow10(max)) * (ufvalue - intpart));
+ max10 = roundv(pow_10(max));
+ fracpart = roundv(pow_10(max) * (ufvalue - intpart));
- if (fracpart >= (long)pow10(max)) {
+ if (fracpart >= max10) {
intpart++;
- fracpart -= (long)pow10(max);
+ fracpart -= max10;
}
/* convert integer part */