On Tue, 2004-06-01 at 01:33, Tom Lane wrote: > First you might want to check which flavor of strerror_r() your platform > has --- does it return int or char* ?
I made the following change to the strerror_r call, which makes it work correctly with threading enabled: --- src/port/thread.c 23 Apr 2004 18:15:55 -0000 1.20 +++ src/port/thread.c 1 Jun 2004 07:18:26 -0000 @@ -71,7 +71,8 @@ #if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) && defined(HAVE_STRERROR_R) /* reentrant strerror_r is available */ /* some early standards had strerror_r returning char * */ - strerror_r(errnum, strerrbuf, buflen); + char buf[256]; + StrNCpy(strerrbuf, strerror_r(errnum, buf, 256), buflen); return strerrbuf; #else (I realise this is not sufficient for a patch to correct the problem.) -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA ======================================== "Thou will show me the path of life; in thy presence is fullness of joy; at thy right hand there are pleasures for evermore." Psalms 16:11 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster