apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/network_io/unix sockopt.c
Date Fri, 27 Feb 2004 14:40:27 GMT
trawick     2004/02/27 06:40:27

  Modified:    network_io/unix Tag: APR_0_9_BRANCH sockopt.c
  Log:
  fix some compile and/or run-time bogosity on Unix-ish platforms
  with no O_NDELAY or FNDELAY flags
  
  this has been here since apr time zero when it was mis-copied
  from Apache httpd 1.3's buff.c, so perhaps this doesn't actually
  make anyone's life easer
  
  Discovered by: Joe Orton
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.70.2.3  +4 -6      apr/network_io/unix/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v
  retrieving revision 1.70.2.2
  retrieving revision 1.70.2.3
  diff -u -r1.70.2.2 -r1.70.2.3
  --- sockopt.c	13 Feb 2004 09:33:51 -0000	1.70.2.2
  +++ sockopt.c	27 Feb 2004 14:40:27 -0000	1.70.2.3
  @@ -29,10 +29,9 @@
   #elif defined(O_NDELAY)
       fd_flags &= ~O_NDELAY;
   #elif defined(FNDELAY)
  -    fd_flags &= ~O_FNDELAY;
  +    fd_flags |= FNDELAY;
   #else
  -    /* XXXX: this breaks things, but an alternative isn't obvious...*/
  -    return -1;
  +#error Please teach APR how to make sockets blocking on your platform.
   #endif
       if (fcntl(sd, F_SETFL, fd_flags) == -1) {
           return errno;
  @@ -56,10 +55,9 @@
   #elif defined(O_NDELAY)
       fd_flags |= O_NDELAY;
   #elif defined(FNDELAY)
  -    fd_flags |= O_FNDELAY;
  +    fd_flags |= FNDELAY;
   #else
  -    /* XXXX: this breaks things, but an alternative isn't obvious...*/
  -    return -1;
  +#error Please teach APR how to make sockets non-blocking on your platform.
   #endif
       if (fcntl(sd, F_SETFL, fd_flags) == -1) {
           return errno;
  
  
  

Mime
View raw message