mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Drop support for MSVCRT's %I64 format strings.
MSVCRT predated C99 and invented non-standard placeholders for 64-bit numbers, and then later used them in standard macros when C99 <inttypes.h> arrived. The macros just use %lld etc when building with UCRT, so there should be no way for our interposed sprintf.c code to receive the pre-standard kind these days. Time to drop the code that parses them. That code was in fact already dead when commit962da900landed, as we'd disclaimed MSVCRT support a couple of weeks earlier in commit1758d424, but patch development overlapped and the history of these macros hadn't been investigated. Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/4d8b1a67-aab2-4429-b44b-f03988095939%40eisentraut.org
This commit is contained in:
@@ -557,28 +557,6 @@ nextch2:
|
|||||||
fmtpos = accum;
|
fmtpos = accum;
|
||||||
accum = 0;
|
accum = 0;
|
||||||
goto nextch2;
|
goto nextch2;
|
||||||
#ifdef WIN32
|
|
||||||
case 'I':
|
|
||||||
/* Windows PRI*{32,64,PTR} size */
|
|
||||||
if (format[0] == '3' && format[1] == '2')
|
|
||||||
format += 2;
|
|
||||||
else if (format[0] == '6' && format[1] == '4')
|
|
||||||
{
|
|
||||||
format += 2;
|
|
||||||
longlongflag = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#if SIZEOF_VOID_P == SIZEOF_LONG
|
|
||||||
longflag = 1;
|
|
||||||
#elif SIZEOF_VOID_P == SIZEOF_LONG_LONG
|
|
||||||
longlongflag = 1;
|
|
||||||
#else
|
|
||||||
#error "cannot find integer type of the same size as intptr_t"
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
goto nextch2;
|
|
||||||
#endif
|
|
||||||
case 'l':
|
case 'l':
|
||||||
if (longflag)
|
if (longflag)
|
||||||
longlongflag = 1;
|
longlongflag = 1;
|
||||||
@@ -842,28 +820,6 @@ nextch1:
|
|||||||
fmtpos = accum;
|
fmtpos = accum;
|
||||||
accum = 0;
|
accum = 0;
|
||||||
goto nextch1;
|
goto nextch1;
|
||||||
#ifdef WIN32
|
|
||||||
case 'I':
|
|
||||||
/* Windows PRI*{32,64,PTR} size */
|
|
||||||
if (format[0] == '3' && format[1] == '2')
|
|
||||||
format += 2;
|
|
||||||
else if (format[0] == '6' && format[1] == '4')
|
|
||||||
{
|
|
||||||
format += 2;
|
|
||||||
longlongflag = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#if SIZEOF_VOID_P == SIZEOF_LONG
|
|
||||||
longflag = 1;
|
|
||||||
#elif SIZEOF_VOID_P == SIZEOF_LONG_LONG
|
|
||||||
longlongflag = 1;
|
|
||||||
#else
|
|
||||||
#error "cannot find integer type of the same size as intptr_t"
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
goto nextch1;
|
|
||||||
#endif
|
|
||||||
case 'l':
|
case 'l':
|
||||||
if (longflag)
|
if (longflag)
|
||||||
longlongflag = 1;
|
longlongflag = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user