| From: | "R, Rajesh (STSD)" <rajesh(dot)r2(at)hp(dot)com> |
|---|---|
| To: | <pgsql-hackers(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org> |
| Subject: | [PATCH] Better way to check for getaddrinfo function. |
| Date: | 2006-01-16 13:57:26 |
| Message-ID: | 5CBFB210D9870F40B9E5A0FBD31F3A77032F703F@bgeexc01.asiapacific.cpqcorp.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers |
Just thought that the following patch might improve checking for
getaddrinfo function (in configure.in)
I was forced to write 'coz getaddrinfo went unnoticed in Tru64 Unix.
(displaying attached patch)
$ diff -r configure.in configure.in.1
920c920,944
< AC_REPLACE_FUNCS([getaddrinfo])
---
> AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
> [AC_TRY_LINK([#include <netdb.h>],
> [struct addrinfo *g,h;g=&h;getaddrinfo("","",g,&g);],
> AC_TRY_RUN([
> #include <assert.h>
> #include <netdb.h>
> #include <sys/types.h>
> #ifndef AF_INET
> # include <sys/socket.h>
> #endif
> #ifdef __cplusplus
> extern "C"
> #endif
> char (*f) ();
> int main(void) {
>
> f = getaddrinfo;
>
> return 0;
> }
> ],ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no),
> ac_cv_func_getaddrinfo=no)])
> if test "$ac_cv_func_getaddrinfo" = yes; then
> AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo
function])
> fi
Rajesh R
--
This space intentionally left non-blank.
<<configure-in.patch>>
| Attachment | Content-Type | Size |
|---|---|---|
| configure-in.patch | application/octet-stream | 775 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tony Caduto | 2006-01-16 14:01:08 | Re: visual query builder for Postgres? |
| Previous Message | Mikael Carneholm | 2006-01-16 12:49:20 | Re: Plans for 8.2? |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2006-01-16 13:57:53 | Re: source documentation tool doxygen |
| Previous Message | Kim Bisgaard | 2006-01-16 12:44:50 | Re: source documentation tool doxygen |