Search Postgresql Archives

[PATCH] Better way to check for getaddrinfo function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

 
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: configure-in.patch
Description: configure-in.patch


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux