Hi, On Sun, Dec 06, 2015 at 07:01:46PM -0500, Selva Nair wrote: > This adds a macro file with a permissive license. Its small so I don't > mind inlining the macro into configure.ac if that is preferred. > -------8<--------
This looks interesting, but I'm not convinced that this actually *works* - the reason why I had to add an explicit compile test is that the standard configure.ac test will claim "inet_pton is not there" because the way the test program is built conflicts with the definitions in wstcpip.h Which environments did you test this on? It needs to work on mingw as shipped with ubuntu 12.04 (no inet_pton), mingw as shipped with 14.04 (inet_pton, *and* the definition its using conflicts with our compat/ libraries, so a false negative will fail later) and cygwin. It's not pretty, but it's the way it is for a reason :-) > + [AC_TRY_COMPILE([#include <$2>], [(void) $1;], This is wrong on multiple levels, actually - it will only try compilation, not linking - so all we know is "we did not conflict with a header file", not "this function exists and this combination of header files and function calls will make us link the right stuff" (from the docs "This macro does not try to link; use AC_TRY_LINK if you need to do that") - it will build a test program that will not call the function searched correctly, just "(void) inet_pton()". Which will actually make it *fail* on MinGW on ubuntu 14.04 - there *is* a prototype, so it must be called correctly. There's a reason for commit f96baabc6cf10edddedda1819a27a6927f274d8e :-) gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
signature.asc
Description: PGP signature