Changeset 327

Show
Ignore:
Timestamp:
11/28/99 11:29:09 (14 years ago)
Author:
ucacoxh
Message:

- Removed Solaris/Linux specific defines from net_udp.c. Common library is now

clean of UNIX platform specific defines.

- Added test for struct addrinfo to IPv6 checks. Should now work on FreeBSD,

since previous tests excluded it from code it needed.

-o

Location:
common/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • common/trunk/configure

    r325 r327  
    20912091  
    20922092                echo "$ac_t""yes" 1>&6 
    2093                 for ac_hdr in netinet6/in6.h 
     2093else 
     2094  rm -rf conftest* 
     2095  echo "$ac_t""no" 1>&6  
     2096                echo "configure: warning: IPv6 support not found.  Ignoring request." 1>&2 
     2097fi 
     2098rm -f conftest* 
     2099 
     2100        for ac_hdr in netinet6/in6.h 
    20942101do 
    20952102ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 
    20962103echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 
    2097 echo "configure:2098: checking for $ac_hdr" >&5 
     2104echo "configure:2105: checking for $ac_hdr" >&5 
    20982105if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 
    20992106  echo $ac_n "(cached) $ac_c" 1>&6 
    21002107else 
    21012108  cat > conftest.$ac_ext <<EOF 
    2102 #line 2103 "configure" 
     2109#line 2110 "configure" 
    21032110#include "confdefs.h" 
    21042111#include <$ac_hdr> 
    21052112EOF 
    21062113ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 
    2107 { (eval echo configure:2108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
     2114{ (eval echo configure:2115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
    21082115ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 
    21092116if test -z "$ac_err"; then 
     
    21312138done 
    21322139 
     2140        echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6 
     2141echo "configure:2142: checking for struct addrinfo" >&5 
     2142        cat > conftest.$ac_ext <<EOF 
     2143#line 2144 "configure" 
     2144#include "confdefs.h" 
     2145#include <netdb.h> 
     2146EOF 
     2147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 
     2148  egrep "addrinfo" >/dev/null 2>&1; then 
     2149  rm -rf conftest* 
     2150  cat >> confdefs.h <<\EOF 
     2151#define HAVE_ST_ADDRINFO 1 
     2152EOF 
     2153 
     2154                echo "$ac_t""yes" 1>&6 
    21332155else 
    21342156  rm -rf conftest* 
  • common/trunk/configure.in

    r325 r327  
    191191                # variant tests to go here 
    192192                [AC_DEFINE(HAVE_IPv6)  
    193                 AC_MSG_RESULT(yes) 
    194                 AC_CHECK_HEADERS(netinet6/in6.h)], 
     193                AC_MSG_RESULT(yes)], 
     194                [AC_MSG_RESULT(no)  
     195                AC_MSG_WARN(IPv6 support not found.  Ignoring request.)]) 
     196        AC_CHECK_HEADERS(netinet6/in6.h) 
     197        AC_MSG_CHECKING(for struct addrinfo) 
     198        AC_EGREP_HEADER(addrinfo, 
     199                netdb.h, 
     200                [AC_DEFINE(HAVE_ST_ADDRINFO) 
     201                AC_MSG_RESULT(yes)], 
    195202                AC_MSG_RESULT(no)) 
    196203fi]) 
  • common/trunk/src/config.h.in

    r325 r327  
    2828 */ 
    2929#undef HAVE_IPv6 
     30 
     31/* 
     32 * V6 structure that host may or may not be present. 
     33 */ 
     34#undef HAVE_ST_ADDRINFO 
    3035 
    3136/* 
  • common/trunk/src/crypt_random.c

    r314 r327  
    5959{ 
    6060#ifdef HAVE_DEV_URANDOM 
    61         /* I don't trust the LBL random number generator, so if   */ 
    62         /* we're on Linux we now use the random number generator  */ 
    63         /* in the kernel which is cryptographically strong. [csp] */ 
    6461        int     fd, res, l; 
    6562 
  • common/trunk/src/net_udp.c

    r314 r327  
    448448        int                      error_num; 
    449449#endif 
    450 #if defined(Linux) || defined(Solaris) 
     450#if HAVE_ST_ADDRINFO 
    451451        int gai_err; 
    452452        struct addrinfo hints, *ai; 
     
    482482                hname = xstrdup(inet6_ntoa((const struct in6_addr *) hent->h_addr_list[0])); 
    483483#else 
    484 #if defined(Linux) || defined(Solaris) 
     484#ifdef HAVE_ST_ADDRINFO 
    485485                 
    486486                memset(&hints, 0, sizeof(struct addrinfo)); 
     
    534534                        abort(); 
    535535                } 
    536 #endif /*Linux || Solaris7 IPv6 */ 
    537 #endif /*MS_IPV6*/ 
     536#endif /* HAVE_ST_ADDRINFO */ 
     537#endif /* MS_IPV 6*/ 
    538538                return hname; 
    539539        }