mirror of
https://github.com/postgres/postgres.git
synced 2025-06-01 00:01:20 -04:00
Use our own snprintf() only if NLS is enabled, and support %qd and %I64d.
This commit is contained in:
parent
70d4a9343f
commit
bb7a3a740c
3
configure
vendored
3
configure
vendored
@ -14527,7 +14527,8 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Force use of our snprintf if system's doesn't do arg control
|
# Force use of our snprintf if system's doesn't do arg control
|
||||||
if test $pgac_need_repl_snprintf = no; then
|
# This feature is used by NLS
|
||||||
|
if test "$enable_nls" = yes -a $pgac_need_repl_snprintf = no; then
|
||||||
echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
|
echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
|
||||||
echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
|
echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
|
||||||
if test "${pgac_cv_printf_arg_control+set}" = set; then
|
if test "${pgac_cv_printf_arg_control+set}" = set; then
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl $PostgreSQL: pgsql/configure.in,v 1.403 2005/02/28 20:55:18 tgl Exp $
|
dnl $PostgreSQL: pgsql/configure.in,v 1.404 2005/03/02 14:48:22 momjian Exp $
|
||||||
dnl
|
dnl
|
||||||
dnl Developers, please strive to achieve this order:
|
dnl Developers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@ -1067,7 +1067,8 @@ AC_MSG_ERROR([[
|
|||||||
|
|
||||||
|
|
||||||
# Force use of our snprintf if system's doesn't do arg control
|
# Force use of our snprintf if system's doesn't do arg control
|
||||||
if test $pgac_need_repl_snprintf = no; then
|
# This feature is used by NLS
|
||||||
|
if test "$enable_nls" = yes -a $pgac_need_repl_snprintf = no; then
|
||||||
PGAC_FUNC_PRINTF_ARG_CONTROL
|
PGAC_FUNC_PRINTF_ARG_CONTROL
|
||||||
if test $pgac_cv_printf_arg_control != yes ; then
|
if test $pgac_cv_printf_arg_control != yes ; then
|
||||||
pgac_need_repl_snprintf=yes
|
pgac_need_repl_snprintf=yes
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
* causing nasty effects.
|
* causing nasty effects.
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
|
||||||
/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.12 2005/03/02 05:22:22 momjian Exp $";*/
|
/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.13 2005/03/02 14:48:22 momjian Exp $";*/
|
||||||
|
|
||||||
int snprintf(char *str, size_t count, const char *fmt,...);
|
int snprintf(char *str, size_t count, const char *fmt,...);
|
||||||
int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
|
int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
|
||||||
@ -259,6 +259,23 @@ dopr(char *buffer, const char *format, va_list args, char *end)
|
|||||||
else
|
else
|
||||||
longflag = 1;
|
longflag = 1;
|
||||||
goto nextch;
|
goto nextch;
|
||||||
|
/*
|
||||||
|
* We might export this to client apps so we should
|
||||||
|
* support 'qd' and 'I64d'(MinGW) also in case the
|
||||||
|
* native version does.
|
||||||
|
*/
|
||||||
|
case 'q':
|
||||||
|
longlongflag = 1;
|
||||||
|
longflag = 1;
|
||||||
|
goto nextch;
|
||||||
|
case 'I':
|
||||||
|
if (*(format+1) == '6' && *(format+2) == '4')
|
||||||
|
{
|
||||||
|
format += 2;
|
||||||
|
longlongflag = 1;
|
||||||
|
longflag = 1;
|
||||||
|
goto nextch;
|
||||||
|
}
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'U':
|
case 'U':
|
||||||
/* fmtnum(value,base,dosign,ljust,len,zpad,&output) */
|
/* fmtnum(value,base,dosign,ljust,len,zpad,&output) */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user