Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbb7a3a7

Browse files
committed
Use our own snprintf() only if NLS is enabled, and support %qd and %I64d.
1 parent70d4a93 commitbb7a3a7

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

‎configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14527,7 +14527,8 @@ fi
1452714527

1452814528

1452914529
# Force use of our snprintf if system's doesn't do arg control
14530-
if test $pgac_need_repl_snprintf = no; then
14530+
# This feature is used by NLS
14531+
if test "$enable_nls" = yes -a $pgac_need_repl_snprintf = no; then
1453114532
echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
1453214533
echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
1453314534
if test "${pgac_cv_printf_arg_control+set}" = set; then

‎configure.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.403 2005/02/28 20:55:18 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.404 2005/03/02 14:48:22 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1067,7 +1067,8 @@ AC_MSG_ERROR([[
10671067

10681068

10691069
# Force use of our snprintf if system's doesn't do arg control
1070-
if test $pgac_need_repl_snprintf = no; then
1070+
# This feature is used by NLS
1071+
if test "$enable_nls" = yes -a $pgac_need_repl_snprintf = no; then
10711072
PGAC_FUNC_PRINTF_ARG_CONTROL
10721073
if test $pgac_cv_printf_arg_control != yes ; then
10731074
pgac_need_repl_snprintf=yes

‎src/port/snprintf.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* causing nasty effects.
6666
**************************************************************/
6767

68-
/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.12 2005/03/0205:22:22 momjian Exp $";*/
68+
/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.13 2005/03/0214:48:22 momjian Exp $";*/
6969

7070
intsnprintf(char*str,size_tcount,constchar*fmt,...);
7171
intvsnprintf(char*str,size_tcount,constchar*fmt,va_listargs);
@@ -259,6 +259,23 @@ dopr(char *buffer, const char *format, va_list args, char *end)
259259
else
260260
longflag=1;
261261
gotonextch;
262+
/*
263+
*We might export this to client apps so we should
264+
*support 'qd' and 'I64d'(MinGW) also in case the
265+
*native version does.
266+
*/
267+
case'q':
268+
longlongflag=1;
269+
longflag=1;
270+
gotonextch;
271+
case'I':
272+
if (*(format+1)=='6'&&*(format+2)=='4')
273+
{
274+
format+=2;
275+
longlongflag=1;
276+
longflag=1;
277+
gotonextch;
278+
}
262279
case'u':
263280
case'U':
264281
/* fmtnum(value,base,dosign,ljust,len,zpad,&output) */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp