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

Re: [pgsql-hackers-win32] snprintf causes regression tests

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Nicolai Tufar <ntufar(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Magnus Hagander <mha(at)sollentuna(dot)net>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests
Date: 2005-03-10 03:51:27
Message-ID: 200503100351.j2A3pRZ07424@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
Nicolai Tufar wrote:
> Dear all,
> After struggling for one week to to integrate FreeBSD's vfprintf.c into
> PostgreSQL I finally gave up. It is too dependent on underlying
> FreeBSD system functions. To incorporate it into PostgreSQL we need
> to move vfprintf.c file itself, two dozen files form gdtoa and a half
> a dozen __XXtoa.c files scattered in apparently random fashion all
> around FreeBSD source tree.
> 
> Instead I researched some other implementations of snprintf on
> the web released under a license compatible with PostgreSQL's.
> The most suitable one I have come upon is Trio
> [http://daniel.haxx.se/projects/trio/].
> It is distributed under a MIT-like license which, I think will be
> compatible with us.
> 
> What do you think about it? Shall I abandon FreeBSD and go ahead
> ?ncorporat?ng Tr?o?

Yes, maybe just add the proper %$ handling from Trio to what we have
now.

> And by the way, what ?s the conclus?on of snpr?ntf() vs. pg_snprintf()
> and UNIX libraries discussion a week ago? Which one shall 
> I implement?

I think the proper direction is not to export snprintf() from libpq so
that user applications will use the native snprintf, but our code can
use our custom version.

I will work on a patch now.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2005-03-10 03:53:08
Subject: Re: fool-toleranced optimizer
Previous:From: Christopher BrowneDate: 2005-03-10 03:47:52
Subject: Re: One vacuum full is not enough.

pgsql-patches by date

Next:From: Neil ConwayDate: 2005-03-10 13:13:37
Subject: Re: fork() refactoring
Previous:From: Luiz K. MatsumuraDate: 2005-03-10 03:31:56
Subject: problem with CR+LF in files in psql \i command

pgsql-hackers-win32 by date

Next:From: Nicolai TufarDate: 2005-03-10 19:22:13
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests to fail
Previous:From: pgsqlDate: 2005-03-09 15:38:27
Subject: Re: [pgsql-hackers-win32] snprintf causes regression

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group