Re: AC_REPLACE_FUNCS([getaddrinfo]) in 8.1.3

Поиск
Список
Период
Сортировка
От Albert Chin
Тема Re: AC_REPLACE_FUNCS([getaddrinfo]) in 8.1.3
Дата
Msg-id 20060220022625.GE93931@mail1.thewrittenword.com
обсуждение исходный текст
Ответ на Re: AC_REPLACE_FUNCS([getaddrinfo]) in 8.1.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: AC_REPLACE_FUNCS([getaddrinfo]) in 8.1.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Feb 19, 2006 at 09:02:48PM -0500, Tom Lane wrote:
> Albert Chin <pgsql-hackers@mlists.thewrittenword.com> writes:
> > AC_REPLACE_FUNCS([getaddrinfo]) won't correctly detect getaddrinfo on
> > Tru64 UNIX because the function doesn't exist under that name in libc.
> 
> We changed that code specifically so it *would* work on Tru64 --- see
> this thread:
> http://archives.postgresql.org/pgsql-hackers/2006-01/msg00511.php
> Please explain why you think it's a regression.

From my reading, no completed patch was posted in the thread.
AC_REPLACE_FUNCS([getaddrinfo]) will not detect getaddrinfo() on Tru64
UNIX because getaddrinfo is not in libc. Because of this, getaddrinfo
isn't detected and the compilation of src/port/thread.c fails: cc -std -O2 -ieee -msym -readonly_strings
-I../../src/port-DFRONTEND -I../../src/include -I/opt/TWWfsw/gettext014/include -I/opt/TWWfsw/libopenssl097/include
-I/opt/TWWfsw/zlib11/include-I/opt/TWWfsw/tcl84/include -I/opt/TWWfsw/tk84/include -pthread  --thread-safe -D_REENTRANT
-D_THREAD_SAFE-D_POSIX_PTHREAD_SEMANTICS -c thread.c cc: Warning: thread.c, line 80: In this statement,
"strerror_r(...)"of type "int", is being converted to "pointer to char". (cvtdiftypes)         return
strerror_r(errnum,strerrbuf, buflen); ---------------^ cc: Warning: thread.c, line 141: In this statement, the
referencedtype of the pointer value "buffer" is "char", which is not compatible with "struct hostent_data".
(ptrmismatch)        *result = gethostbyname_r(name, resultbuf, buffer, buflen, herrno);
---------------------------------------------------^cc: Error: thread.c, line 141: In this statement, "gethostbyname_r"
expects3 arguments, but 5 are supplied. (toomanyargs)         *result = gethostbyname_r(name, resultbuf, buffer,
buflen,herrno); ------------------^ gmake[2]: *** [thread.o] Error 1
 

gethostbyname_r() on Tru64 UNIX accepts 3 arguments.

-- 
albert chin (china@thewrittenword.com)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: AC_REPLACE_FUNCS([getaddrinfo]) in 8.1.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: AC_REPLACE_FUNCS([getaddrinfo]) in 8.1.3