cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NI_WITHSCOPEID (was Re: Debugging test cases) (fwd)

From: Joe Halpin <j.p.h_at_comcast.net>
Date: Wed, 31 Mar 2004 13:19:08 -0600

Joe Halpin wrote:
> I think the reason tests are still failing on Solaris 9 is fixed in this
> patch
>
> Index: lib/ftp.c
> ===================================================================
> RCS file: /repository/curl/lib/ftp.c,v
> retrieving revision 1.243
> diff -u -r1.243 ftp.c
> --- lib/ftp.c 31 Mar 2004 10:59:48 -0000 1.243
> +++ lib/ftp.c 31 Mar 2004 18:59:04 -0000
> @@ -105,7 +105,7 @@
> #include "memdebug.h"
> #endif
>
> -#ifdef NI_WITHSCOPEID
> +#ifdef HAVE_NI_WITHSCOPEID
> #define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID
> #else
> #define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV
>
> I'm not sure this will work for everything, but with this change all
> tests pass on Solaris 9 now.

Also I just noticed that lib/config.h doesn't seem right

/* Define if NI_SCOPEWITHID exists and works */
/* #undef HAVE_NI_SCOPEWITHID */

Shouldn't this be #define HAVE_NI_WITHSCOPEID rather than #undef?

I'm still working on learning autoconf, but here's a guess

Index: acinclude.m4
===================================================================
RCS file: /repository/curl/acinclude.m4,v
retrieving revision 1.30
diff -u -r1.30 acinclude.m4
--- acinclude.m4 31 Mar 2004 10:34:53 -0000 1.30
+++ acinclude.m4 31 Mar 2004 19:17:57 -0000
@@ -330,8 +330,8 @@
  ]) dnl end of AC_CACHE_CHECK

  if test "$ac_cv_working_ni_withscopeid" = "yes"; then
- AC_DEFINE(HAVE_NI_SCOPEWITHID, 1,
- [Define if NI_SCOPEWITHID exists and works])
+ AC_DEFINE(HAVE_NI_WITHSCOPEID, 1,
+ [Define if NI_WITHSCOPEID exists and works])
  fi

  ]) dnl end of AC_DEFUN

Joe
Received on 2004-03-31