apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/build apr_network.m4
Date Fri, 04 Jun 2004 13:19:16 GMT
jorton      2004/06/04 06:19:16

  Modified:    build    Tag: APR_0_9_BRANCH apr_network.m4
  Log:
  As per HEAD:
  
  * build/apr_network.m4 (APR_CHECK_SCTP): Safer check for SCTP support
  and clean up macro.
  
  PR: 28576
  Submitted by: Paul Querna <chip force-elite.com>, Joe Orton
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.23.2.4  +11 -15    apr/build/apr_network.m4
  
  Index: apr_network.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_network.m4,v
  retrieving revision 1.23.2.3
  retrieving revision 1.23.2.4
  diff -d -w -u -r1.23.2.3 -r1.23.2.4
  --- apr_network.m4	21 May 2004 22:10:51 -0000	1.23.2.3
  +++ apr_network.m4	4 Jun 2004 13:19:16 -0000	1.23.2.4
  @@ -633,7 +633,7 @@
   dnl check for presence of SCTP protocol support
   dnl
   AC_DEFUN(APR_CHECK_SCTP,[
  -  AC_CACHE_CHECK(if SCTP protocol is supported, ac_cv_sctp,[
  +  AC_CACHE_CHECK([whether SCTP is supported], [apr_cv_sctp], [
     AC_TRY_RUN( [
   #ifdef HAVE_SYS_TYPES_H
   #include <sys/types.h>
  @@ -644,21 +644,17 @@
   #ifdef HAVE_NETINET_IN_H
   #include <netinet/in.h>
   #endif
  +#include <stdlib.h>
   int main(void) {
  -    int s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
  -    if (s < 0) {
  +    int s, opt = 1;
  +    if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)) < 0)
           exit(1);
  -    }
  +    if (setsockopt(s, IPPROTO_SCTP, SCTP_NODELAY, &opt, sizeof(int)) < 0)
  +       exit(2);
       exit(0);
  -}
  -],[
  -    ac_cv_sctp="yes"
  -],[
  -    ac_cv_sctp="no"
  -],[
  -    ac_cv_sctp="yes"
  -])])
  -if test "$ac_cv_sctp" = "yes"; then
  +}], [apr_cv_sctp=yes], [apr_cv_sctp=no], [apr_cv_sctp=no])])
  +
  +if test "$apr_cv_sctp" = "yes"; then
       have_sctp=1
   else
       have_sctp=0
  
  
  

Mime
View raw message