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

Re: sys_nerr, sys_errlist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sys_nerr, sys_errlist
Date: 2000-09-28 15:12:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> I suppose there isn't any good reason that elog.c and exc.c refer to
> sys_nerr and sys_errlist directly rather than using strerror()

I don't see any direct references to sys_errlist.  The references to
sys_nerr are necessary to avoid coredump with an out-of-range errno
value --- at least on machines where strerror() is a macro that expands
to an unchecked array access.

> an artifact from before port/strerror.c was added?) and given that it is
> provably unportable to do so (Cygwin) I'm inclined to make the obvious
> fix.

I think the obvious fix is to supply a sys_nerr value on Cygwin.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-09-28 15:17:36
Subject: Re: pg_dump and sequences - RFC
Previous:From: Tom LaneDate: 2000-09-28 15:01:08
Subject: Re: pg_dump and sequences - RFC

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