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 21:26:47
Message-ID: 200503102126.j2ALQl608615@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
Nicolai Tufar wrote:
> On Wed, 9 Mar 2005 22:51:27 -0500 (EST), Bruce Momjian
> <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> > > What do you think about it? Shall I abandon FreeBSD and go ahead
> > > Incorporating Trio?
> > 
> > Yes, maybe just add the proper %$ handling from Trio to what we have
> > now.
> 
> Adding proper %$ from Trio will require too much effort. I would
> rather not do it. Not because I am lazy but because:
> 
> 1) Trio team seem to be very serious about standards, update
> the library as soon as new standards come out:
> <quote>
> Trio fully implements the C99 (ISO/IEC 9899:1999) and UNIX98 (the
> Single Unix Specification, Version 2) standards, as well as many
> features from other implementations, e.g. the GNU libc and BSD4.
> </quote>
> 
> 2) If we integrate the whole library in source code we will
> not have to maintain it and will rely on Trio team for bug fixes
> and updates. Integrating it will be very easy since all of the 
> functions begin with "trio_". I used it instead of the src/port/snrpintf.c
> one and it passes regression tests under Win32 just fine.
> 
> The downside is that Trio library is rather big. It is 3 .c and 6 .h
> files totalling 11556 lines. Compiled it is 71224 bytes not stripped
> and 56204 bytes stripped on Solaris 10 for x86, 32-bit. Even for
> a shared library it will probably be too much. Trio has a lot
> of string handling functions which are probably not necessary.
> Would you like me to try to remove everything unnecessary from
> it or we will settle with the full version?

Please see my posting about using a macro for snprintf.  If the current
implementation of snprintf is enough for our existing translation users
we probably don't need to add anything more to it because snprintf will
not be exported to client applications.

-- 
  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: Jaime CasanovaDate: 2005-03-10 21:28:06
Subject: Re: Raw size
Previous:From: Bruce MomjianDate: 2005-03-10 21:25:56
Subject: Re: [pgsql-hackers-win32] Repleacement for src/port/snprintf.c

pgsql-patches by date

Next:From: Nicolai TufarDate: 2005-03-10 22:43:48
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests
Previous:From: Bruce MomjianDate: 2005-03-10 21:25:56
Subject: Re: [pgsql-hackers-win32] Repleacement for src/port/snprintf.c

pgsql-hackers-win32 by date

Next:From: Nicolai TufarDate: 2005-03-10 22:43:48
Subject: Re: [pgsql-hackers-win32] snprintf causes regression tests
Previous:From: Bruce MomjianDate: 2005-03-10 21:25:56
Subject: Re: [pgsql-hackers-win32] Repleacement for src/port/snprintf.c

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