Request for portability test of strerror().
От | Pete Forman |
---|---|
Тема | Request for portability test of strerror(). |
Дата | |
Msg-id | 14832.11634.315699.198502@kryten.bedford.waii.com обсуждение исходный текст |
Ответы |
Re: Request for portability test of strerror().
Re: Request for portability test of strerror(). Re: Request for portability test of strerror(). |
Список | pgsql-ports |
I'm preparing a patch for backend/utils/error to make the printing of error messages more robust. It would be very helpful if people on different systems would compile and run the following test program to check the behaviour of strerror(). The PostgreSQL code is called only in exceptional circumstances, so regular testing of my changes is not possible. According to the standards UNIX95 (aka XPG4v2) and later, strerror() should set errno to EINVAL if its argument is out of range. Most compliant systems seem to return a default string with a number printed in it and so never set errno. sys_nerr was last in XPG2 but has now been dropped. I'm hoping to remove it from the PostgreSQL code. My results so far follow. I've listed them by OS though there is also a dependency on libc. AIX 4.3: errno = 0 after strerror(-1) returned "Error -1 occurred." Cygwin B20: errno = 0 after strerror(-1) returned "error -1" IRIX 6.5: errno = 0 after strerror(-1) returned NULL Redhat 6.2: errno = 0 after strerror(-1) returned "Unknown error 4294967295" Solaris 2.6: errno = 0 after strerror(-1) returned NULL Solaris 7: errno = 0 after strerror(-1) returned NULL 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. -- Pete Forman -./\.- Disclaimer: This post is originated Western Geophysical -./\.- by myself and does not represent pete.forman@westgeo.com -./\.- the opinion of Baker Hughes or http://www.crosswinds.net/~petef -./\.- its divisions.
Вложения
В списке pgsql-ports по дате отправления: