Re: Request for portability test of strerror().

From: Pete Forman <gsez020(at)kryten(dot)bedford(dot)waii(dot)com>
To: pgsql-ports(at)postgresql(dot)org
Subject: Re: Request for portability test of strerror().
Date: 2000-10-20 12:20:42
Message-ID: 14832.14490.954318.955855@kryten.bedford.waii.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Pete Forman writes:
> What I'd like to know is whether any version of strerror() returns
> a non-NULL pointer that does not contain a print of the number.

Bernd Tegg writes:
> QNX 4.25: errno = 0 after strerror(-1) returned "Unknown error"
> (egcs-2.91.66 using watcom 10.6 QNX specific libs)

I'll modify the question then. Does any version of strerror() return
a non-NULL pointer to a garbage string?

The proposed modifications to the PostgreSQL code would be to remove
references to sys_nerr and print both the error number and its text,
if available. Testing against sys_nerr is probably redundant anyway
as most calls to the routines will be with a valid errno. If anyone
feels strongly about keeping sys_nerr it should be tested for by
configure and not with the OS-specific ifdefs in the code.
--
Pete Forman -./\.- <mailto:pete(dot)forman(at)westgeo(dot)com>
Western Geophysical -./\.- <tel:+44-1234-224798>
Manton Lane, Bedford, MK41 7PA, UK -./\.- <fax:+44-1234-224804>
-./\.- <http://www.bedford.waii.com/wsdev/petef/PeteF_links.html>

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message Jason Tishler 2000-10-20 13:17:10 Re: Request for portability test of strerror().
Previous Message Pete Forman 2000-10-20 11:33:06 Request for portability test of strerror().