Re: [GENERAL] [PATCH] Better way to check for getaddrinfo function.

Поиск
Список
Период
Сортировка
От R, Rajesh (STSD)
Тема Re: [GENERAL] [PATCH] Better way to check for getaddrinfo function.
Дата
Msg-id 5CBFB210D9870F40B9E5A0FBD31F3A77032F72F7@bgeexc01.asiapacific.cpqcorp.net
обсуждение исходный текст
Ответы Re: [GENERAL] [PATCH] Better way to check for getaddrinfo function.  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [GENERAL] [PATCH] Better way to check for getaddrinfo function.  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers

That was very much situation specific.
But the bottomline is the default test does not include <netdb.h> in the test code.
So, pg uses getaddrinfo.c.And the getaddrinfo.c does not work for me.
Ipv6 client authenciation fails.

I have modified the patch.

$ diff -r configure.in configure.in.new
918a919
> AC_MSG_CHECKING([for getaddrinfo])
920c921,926
<   AC_REPLACE_FUNCS([getaddrinfo])
---
>  AC_TRY_LINK([#include <netdb.h> #include <assert.h>],
>                 [char (*f)();f=getaddrinfo;],
>   ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no)
> if test x"$ac_cv_func_getaddrinfo" = xyes; then
>   AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
> fi
923a930
> AC_MSG_RESULT([$ac_cv_func_getaddrinfo])

Rajesh R
--
This space intentionally left non-blank.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Monday, January 16, 2006 11:28 PM
To: R, Rajesh (STSD)
Cc: pgsql-hackers@postgresql.org; pgsql-general@postgresql.org
Subject: Re: [GENERAL] [PATCH] Better way to check for getaddrinfo function.

"R, Rajesh (STSD)" <rajesh.r2@hp.com> writes:
> Just thought that the following patch might improve checking for
> getaddrinfo function (in configure.in)

Since AC_TRY_RUN tests cannot work in cross-compilation scenarios, you need an *extremely* good reason to put one in.  "I thought this might improve things" doesn't qualify.  Exactly what problem are you trying to solve and why is a run-time test necessary?  Why doesn't the existing coding work for you?

                        regards, tom lane <<configure-in.patch>>

Вложения

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Large Scale Aggregation (HashAgg Enhancement)
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: source documentation tool doxygen