mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 06:08:38 -04:00
dbdimp.c - Fix for Windows quadmath builds.
This commit is contained in:
parent
2ab93a4e41
commit
c5374438f4
1 changed files with 7 additions and 1 deletions
8
dbdimp.c
8
dbdimp.c
|
@ -407,10 +407,16 @@ sqlite_is_number(pTHX_ const char *v, int sql_type)
|
||||||
if (sql_type != SQLITE_INTEGER) {
|
if (sql_type != SQLITE_INTEGER) {
|
||||||
#ifdef USE_QUADMATH
|
#ifdef USE_QUADMATH
|
||||||
sprintf(format, (has_plus ? "+%%.%dQf" : "%%.%dQf"), precision);
|
sprintf(format, (has_plus ? "+%%.%dQf" : "%%.%dQf"), precision);
|
||||||
|
# if defined(WIN32)
|
||||||
|
/* On Windows quadmath, we need to use strtoflt128(), not atov() */
|
||||||
|
if (strEQ(form(format, strtoflt128(v, NULL)), v)) return 2;
|
||||||
|
# else
|
||||||
|
if (strEQ(form(format, atof(v)), v)) return 2;
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
sprintf(format, (has_plus ? "+%%.%df" : "%%.%df" ), precision);
|
sprintf(format, (has_plus ? "+%%.%df" : "%%.%df" ), precision);
|
||||||
#endif
|
|
||||||
if (strEQ(form(format, atof(v)), v)) return 2;
|
if (strEQ(form(format, atof(v)), v)) return 2;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue