Re: CVS tip problems

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: CVS tip problems
Дата
Msg-id 1086074587.27765.1056.camel@linda
обсуждение исходный текст
Ответ на Re: CVS tip problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: CVS tip problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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_ris 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                                          olly@lfix.co.uk
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 
 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: New btree_gist code has a few problems
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: New btree_gist code has a few problems