Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: [PATCHES] Repleacement for src/port/snprintf.c


  • From: Kurt Roeckx <kurt(at)roeckx(dot)be>
  • To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
  • Cc: Nicolai Tufar <ntufar(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-hackers(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org, devrim(at)gunduz(dot)org
  • Subject: Re: [PATCHES] Repleacement for src/port/snprintf.c
  • Date: Tue, 22 Feb 2005 19:57:15 +0100
  • Message-id: <20050222185715(dot)GA31626(at)roeckx(dot)be>

On Mon, Feb 21, 2005 at 10:53:08PM -0500, Bruce Momjian wrote:
> 
> Applied.

The configure test is a little broken.  It needs to quote the
$'s.

I've rewritten the test a little.


Kurt

Index: config/c-library.m4
===================================================================
RCS file: /projects/cvsroot/pgsql/config/c-library.m4,v
retrieving revision 1.30
diff -u -r1.30 c-library.m4
--- config/c-library.m4	22 Feb 2005 03:55:50 -0000	1.30
+++ config/c-library.m4	22 Feb 2005 18:53:23 -0000
@@ -279,19 +279,17 @@
 [AC_MSG_CHECKING([printf supports argument control])
 AC_CACHE_VAL(pgac_cv_printf_arg_control,
 [AC_TRY_RUN([#include <stdio.h>
+#include <string.h>
 
-int does_printf_have_arg_control()
+int main()
 {
   char buf[100];
 
   /* can it swap arguments? */
-  snprintf(buf, 100, "%2$d|%1$d", 3, 4);
-  if (strcmp(buf, "4|3") != 0)
-    return 0;
-  return 1;
-}
-main() {
-  exit(! does_printf_have_arg_control());
+  snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
+  if (strcmp(buf, "4 3") != 0)
+    return 1;
+  return 0;
 }],
 [pgac_cv_printf_arg_control=yes],
 [pgac_cv_printf_arg_control=no],


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group