Re: pg_dump return status..

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Pete Forman <pete(dot)forman(at)westerngeco(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump return status..
Date: 2001-01-09 14:26:15
Message-ID: 200101091426.JAA02836@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> There are two versions of sprintf() available in SunOS 4 - 8. The
> standard one (ANSI C) in libc returns an int, the number of characters
> written (excluding '\0'). The BSD version returns a char* which
> points to the target. If you have a -lbsd on your link line then you
> get the BSD version. There are no compiler errors, just run time
> errors if you rely on the return from sprintf() being the number of
> characters. The workaround is to put an extra -lc on the link line
> before the -lbsd if your code needs both standard sprintf() and some
> other BSD function.
>
> Ultrix is documented as having the same behaviour as Solaris. I don't
> know about NeXTSTEP/OPENSTEP/GNUStep.

Of course, if sprintf() returns an error, you have pretty big problems.
:-)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message admin 2001-01-09 14:48:54 odbc
Previous Message Adam Lang 2001-01-09 13:56:47 Re: xml middleware

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-01-09 15:06:03 Re: tinterval - operator problems on AIX
Previous Message Bruce Momjian 2001-01-09 14:23:50 Re: [PATCHES] Re: Recursion and SPI