You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dr...@locus.apache.org on 2000/06/12 15:51:23 UTC

cvs commit: apache-2.0/src/lib/apr/file_io/unix fileio.h readwrite.c

dreid       00/06/12 06:51:22

  Modified:    src/lib/apr/file_io/unix fileio.h readwrite.c
  Log:
  Another change to allow the newest version of BeOS to be used to it's
  full potential.
  
  Revision  Changes    Path
  1.20      +3 -0      apache-2.0/src/lib/apr/file_io/unix/fileio.h
  
  Index: fileio.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/fileio.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- fileio.h	2000/04/22 06:16:20	1.19
  +++ fileio.h	2000/06/12 13:51:22	1.20
  @@ -98,6 +98,9 @@
   #ifdef BEOS
   #include <kernel/OS.h>
   #endif
  +#if BEOS && HAVE_ARPA_INET_H
  +#include <sys/socket.h> /* for fd_set definitions */
  +#endif
   /* End System headers */
   
   #define APR_FILE_BUFSIZE 4096
  
  
  
  1.52      +7 -3      apache-2.0/src/lib/apr/file_io/unix/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/readwrite.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- readwrite.c	2000/06/01 22:23:16	1.51
  +++ readwrite.c	2000/06/12 13:51:22	1.52
  @@ -55,7 +55,11 @@
   #include "fileio.h"
   #include "apr_lock.h"
   
  -#ifndef BEOS
  +#if !BEOS || (BEOS && HAVE_ARPA_INET_H)
  +#define USE_WAIT_FOR_IO
  +#endif
  +
  +#ifdef USE_WAIT_FOR_IO
   static ap_status_t wait_for_io_or_timeout(ap_file_t *file, int for_read)
   {
       struct timeval tv, *tvptr;
  @@ -159,7 +163,7 @@
           do {
               rv = read(thefile->filedes, buf, *nbytes);
           } while (rv == -1 && errno == EINTR);
  -#ifndef BEOS
  +#ifdef USE_WAIT_FOR_IO
           if (rv == -1 && 
               (errno == EAGAIN || errno == EWOULDBLOCK) && 
               thefile->timeout != 0) {
  @@ -232,7 +236,7 @@
           do {
               rv = write(thefile->filedes, buf, *nbytes);
           } while (rv == (ap_size_t)-1 && errno == EINTR);
  -#ifndef BEOS
  +#ifdef USE_WAIT_FOR_IO
           if (rv == (ap_size_t)-1 &&
               (errno == EAGAIN || errno == EWOULDBLOCK) && 
               thefile->timeout != 0) {
  
  
  

Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix fileio.h readwrite.c

Posted by David Reid <dr...@jetnet.co.uk>.
I'll be changing this tomorrow when I return from Edinburgh in the morning.

david
----- Original Message -----
From: "David Reid" <dr...@jetnet.co.uk>
To: <ne...@apache.org>; <tr...@bellsouth.net>
Sent: Monday, June 12, 2000 5:03 PM
Subject: Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix fileio.h
readwrite.c


> > Why do we need BEOS as part of the check?  just include it if it is
> > available...
>
> Fair comment.  I didn't want to include files unless they're needed, and
> AFAIK most unix's don't need socket.h to get fd_set defined.
>
> >
> >
> > Why do we check HAVE_ARPA_INET_H for including sys/socket.h?
> >
>
> I'm not checking for the presence of arpa_inet.h but using it to
> differentiate between versions of BeOS.
>
> This code is for a developmental version of BeOS with a new networking
> stack, and so far it doesn't have a version number I can verify.  The
> arpa_inet.h header is a difference and it's just what I'm using.  It'll go
> away once the development is further along and code better established.
>
> I'm already sailing near the wind with a piece of paper I signed by
> including the code and saying as much as I have done!  Nuff said?
>
> david
>
>
>


Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix fileio.h readwrite.c

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Jun 12, 2000 at 05:03:48PM +0100, David Reid wrote:
>...
> > Why do we check HAVE_ARPA_INET_H for including sys/socket.h?
> 
> I'm not checking for the presence of arpa_inet.h but using it to
> differentiate between versions of BeOS.

This brings up a good point. Maybe there should be a check somewhere to
require a specific version of BeOS? From some of these changes, I'd guess
that Apache will no longer work on older versions of BeOS.

> This code is for a developmental version of BeOS with a new networking
> stack, and so far it doesn't have a version number I can verify.  The
> arpa_inet.h header is a difference and it's just what I'm using.  It'll go
> away once the development is further along and code better established.

Maybe create a symbol that you can use, so this is clearer? For example:

#ifdef BEOS
#if HAVE_ARPA_INET_H
#define BEOS_R46   /* or whatever it is you're working with :-) */
#else
#undef BEOS_R46
#endif


oh... your other note says you'll be changing this tomorrow. Whatever :-),
just figured to throw in a couple ideas.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix fileio.h readwrite.c

Posted by David Reid <dr...@jetnet.co.uk>.
> Why do we need BEOS as part of the check?  just include it if it is
> available...

Fair comment.  I didn't want to include files unless they're needed, and
AFAIK most unix's don't need socket.h to get fd_set defined.

>
>
> Why do we check HAVE_ARPA_INET_H for including sys/socket.h?
>

I'm not checking for the presence of arpa_inet.h but using it to
differentiate between versions of BeOS.

This code is for a developmental version of BeOS with a new networking
stack, and so far it doesn't have a version number I can verify.  The
arpa_inet.h header is a difference and it's just what I'm using.  It'll go
away once the development is further along and code better established.

I'm already sailing near the wind with a piece of paper I signed by
including the code and saying as much as I have done!  Nuff said?

david



Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix fileio.h readwrite.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
> From: dreid@locus.apache.org
> Date: 12 Jun 2000 13:51:23 -0000
> 
> dreid       00/06/12 06:51:22
> 
>   Modified:    src/lib/apr/file_io/unix fileio.h readwrite.c
>   Log:
>   Another change to allow the newest version of BeOS to be used to it's
>   full potential.
>   
>   Revision  Changes    Path
>   1.20      +3 -0      apache-2.0/src/lib/apr/file_io/unix/fileio.h
>   
>   Index: fileio.h
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/fileio.h,v
>   retrieving revision 1.19
>   retrieving revision 1.20
>   diff -u -r1.19 -r1.20
>   --- fileio.h	2000/04/22 06:16:20	1.19
>   +++ fileio.h	2000/06/12 13:51:22	1.20
>   @@ -98,6 +98,9 @@
>    #ifdef BEOS
>    #include <kernel/OS.h>
>    #endif
>   +#if BEOS && HAVE_ARPA_INET_H
>   +#include <sys/socket.h> /* for fd_set definitions */
>   +#endif

Why do we need BEOS as part of the check?  just include it if it is
available...   

Why do we check HAVE_ARPA_INET_H for including sys/socket.h?


-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: cvs commit: apache-2.0/src/lib/apr/file_io/unix fileio.h readwrite.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
> From: dreid@locus.apache.org
> Date: 12 Jun 2000 13:51:23 -0000
> 
> dreid       00/06/12 06:51:22
> 
>   Modified:    src/lib/apr/file_io/unix fileio.h readwrite.c
>   Log:
>   Another change to allow the newest version of BeOS to be used to it's
>   full potential.
>   
>   Revision  Changes    Path
>   1.20      +3 -0      apache-2.0/src/lib/apr/file_io/unix/fileio.h
>   
>   Index: fileio.h
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/fileio.h,v
>   retrieving revision 1.19
>   retrieving revision 1.20
>   diff -u -r1.19 -r1.20
>   --- fileio.h	2000/04/22 06:16:20	1.19
>   +++ fileio.h	2000/06/12 13:51:22	1.20
>   @@ -98,6 +98,9 @@
>    #ifdef BEOS
>    #include <kernel/OS.h>
>    #endif
>   +#if BEOS && HAVE_ARPA_INET_H
>   +#include <sys/socket.h> /* for fd_set definitions */
>   +#endif

Why do we need BEOS as part of the check?  just include it if it is
available...   

Why do we check HAVE_ARPA_INET_H for including sys/socket.h?


-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...