Re: pg_dump return status.. - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_dump return status..
Date
Msg-id 200101091426.JAA02836@candle.pha.pa.us
Whole thread Raw
In response to Re: pg_dump return status..  (Pete Forman <pete.forman@westerngeco.com>)
List 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Re: Recursion and SPI
Next
From: Thomas Lockhart
Date:
Subject: Re: tinterval - operator problems on AIX