Search Postgresql Archives

Re: [HACKERS] [PATCH] Better way to check for getaddrinfo

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

 



Tom Lane wrote:
> Bruce Momjian <pgman@xxxxxxxxxxxxxxxx> writes:
> > I am not sure what to do on this.  Right now we have a one-line test:
> >     AC_REPLACE_FUNCS([getaddrinfo])
> > To test for a macro we are going to need to add include netdb.h, and the
> > LINK test below is overkill.  I am thinking we should just hard-code in
> > HAVE_GETADDRINFO for the True64 platform;  anything more is going to be
> > just a Tru64 hack anyway.
> 
> I still want to understand why any change is needed at all.  There must
> be something very peculiar about getaddrinfo on Tru64 if the original
> coding doesn't work.  Why is it different from every other function we
> test for?

I have the answer.  Tru64 netdb.h has:

	#if defined (_SOCKADDR_LEN) || defined (_XOPEN_SOURCE_EXTENDED)
	#define getaddrinfo ngetaddrinfo
	#else
	#define getaddrinfo ogetaddrinfo
	#endif

so it is a macro, and configure produces this line:

	#undef $ac_func

meaning that even if we added #include <netdb.h>, our configure test
still would not work.

Perhaps we should just test for ngetaddrinfo on that platform, and
define HAVE_GETADDRINFO.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@xxxxxxxxxxxxxxxx               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073


[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