You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ryan Bloom <rb...@covalent.net> on 2002/07/11 08:25:06 UTC

RE: cvs commit: apr/include/arch/win32 fileio.h networkio.h

Well, you beat me by about five minutes.  I just finished compiling
almost the exact same code.

Thanks for doing to work, your implementation is cleaner than mine was.
:-)

Ryan

----------------------------------------------
Ryan Bloom                  rbb@covalent.net
645 Howard St.              rbb@apache.org
San Francisco, CA 

> -----Original Message-----
> From: wrowe@apache.org [mailto:wrowe@apache.org]
> Sent: Wednesday, July 10, 2002 11:22 PM
> To: apr-cvs@apache.org
> Subject: cvs commit: apr/include/arch/win32 fileio.h networkio.h
> 
> wrowe       2002/07/10 23:22:22
> 
>   Modified:    .        apr.dsp libapr.dsp
>                poll/unix poll.c
>                include/arch/win32 fileio.h networkio.h
>   Log:
>     Get Win32 building again.  Doesn't build clean, but at least it
> builds.
>     poll on win32 may or may not work correctly, but then again, I
don't
>     believe that httpd needs it at this moment.  Not blasting win32's
poll
>     until coders are done with it.
> 
>   Revision  Changes    Path
>   1.105     +1 -1      apr/apr.dsp
> 
>   Index: apr.dsp
>   ===================================================================
>   RCS file: /home/cvs/apr/apr.dsp,v
>   retrieving revision 1.104
>   retrieving revision 1.105
>   diff -u -r1.104 -r1.105
>   --- apr.dsp	8 Jun 2002 22:19:50 -0000	1.104
>   +++ apr.dsp	11 Jul 2002 06:22:22 -0000	1.105
>   @@ -266,7 +266,7 @@
>    # End Source File
>    # Begin Source File
> 
>   -SOURCE=.\network_io\win32\poll.c
>   +SOURCE=.\network_io\unix\poll.c
>    # End Source File
>    # Begin Source File
> 
> 
> 
> 
>   1.66      +1 -1      apr/libapr.dsp
> 
>   Index: libapr.dsp
>   ===================================================================
>   RCS file: /home/cvs/apr/libapr.dsp,v
>   retrieving revision 1.65
>   retrieving revision 1.66
>   diff -u -r1.65 -r1.66
>   --- libapr.dsp	8 Jun 2002 22:19:50 -0000	1.65
>   +++ libapr.dsp	11 Jul 2002 06:22:22 -0000	1.66
>   @@ -272,7 +272,7 @@
>    # End Source File
>    # Begin Source File
> 
>   -SOURCE=.\network_io\win32\poll.c
>   +SOURCE=.\network_io\unix\poll.c
>    # End Source File
>    # Begin Source File
> 
> 
> 
> 
>   1.2       +10 -10    apr/poll/unix/poll.c
> 
>   Index: poll.c
>   ===================================================================
>   RCS file: /home/cvs/apr/poll/unix/poll.c,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- poll.c	11 Jul 2002 05:19:45 -0000	1.1
>   +++ poll.c	11 Jul 2002 06:22:22 -0000	1.2
>   @@ -63,7 +63,7 @@
>    #include <sys/poll.h>
>    #endif
> 
>   -apr_status_t apr_poll_setup(apr_pollfd_t **new, apr_int32_t num,
> apr_pool_t *cont)
>   +APR_DECLARE(apr_status_t) apr_poll_setup(apr_pollfd_t **new,
> apr_int32_t num, apr_pool_t *cont)
>    {
>        (*new) = (apr_pollfd_t *)apr_pcalloc(cont, sizeof(apr_pollfd_t)
*
> (num + 1));
>        if ((*new) == NULL) {
>   @@ -74,7 +74,7 @@
>        return APR_SUCCESS;
>    }
> 
>   -apr_pollfd_t *find_poll_sock(apr_pollfd_t *aprset, apr_socket_t
*sock)
>   +APR_DECLARE(apr_pollfd_t*) find_poll_sock(apr_pollfd_t *aprset,
> apr_socket_t *sock)
>    {
>        apr_pollfd_t *curr = aprset;
> 
>   @@ -88,7 +88,7 @@
>        return curr;
>    }
> 
>   -apr_status_t apr_poll_socket_add(apr_pollfd_t *aprset,
>   +APR_DECLARE(apr_status_t) apr_poll_socket_add(apr_pollfd_t *aprset,
>    			       apr_socket_t *sock, apr_int16_t event)
>    {
>        apr_pollfd_t *curr = aprset;
>   @@ -106,7 +106,7 @@
>        return APR_SUCCESS;
>    }
> 
>   -apr_status_t apr_poll_revents_get(apr_int16_t *event, apr_socket_t
> *sock, apr_pollfd_t *aprset)
>   +APR_DECLARE(apr_status_t) apr_poll_revents_get(apr_int16_t *event,
> apr_socket_t *sock, apr_pollfd_t *aprset)
>    {
>        apr_pollfd_t *curr = find_poll_sock(aprset, sock);
>        if (curr == NULL) {
>   @@ -117,7 +117,7 @@
>        return APR_SUCCESS;
>    }
> 
>   -apr_status_t apr_poll_socket_mask(apr_pollfd_t *aprset,
>   +APR_DECLARE(apr_status_t) apr_poll_socket_mask(apr_pollfd_t
*aprset,
>                                      apr_socket_t *sock, apr_int16_t
> events)
>    {
>        apr_pollfd_t *curr = find_poll_sock(aprset, sock);
>   @@ -132,7 +132,7 @@
>        return APR_SUCCESS;
>    }
> 
>   -apr_status_t apr_poll_socket_remove(apr_pollfd_t *aprset,
apr_socket_t
> *sock)
>   +APR_DECLARE(apr_status_t) apr_poll_socket_remove(apr_pollfd_t
*aprset,
> apr_socket_t *sock)
>    {
>        apr_pollfd_t *curr = find_poll_sock(aprset, sock);
>        if (curr == NULL) {
>   @@ -144,7 +144,7 @@
>        return APR_SUCCESS;
>    }
> 
>   -apr_status_t apr_poll_socket_clear(apr_pollfd_t *aprset,
apr_int16_t
> events)
>   +APR_DECLARE(apr_status_t) apr_poll_socket_clear(apr_pollfd_t
*aprset,
> apr_int16_t events)
>    {
>        apr_pollfd_t *curr = aprset;
> 
>   @@ -198,7 +198,7 @@
>        return rv;
>    }
> 
>   -apr_status_t apr_poll(apr_pollfd_t *aprset, apr_int32_t num,
>   +APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset,
apr_int32_t
> num,
>                          apr_int32_t *nsds, apr_interval_time_t
timeout)
>    {
>        /* obvious optimization, it would be better if this could be
> allocated
>   @@ -242,7 +242,7 @@
> 
>    #else    /* Use select to mimic poll */
> 
>   -apr_status_t apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t
*nsds,
>   +APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num,
> apr_int32_t *nsds,
>    		    apr_interval_time_t timeout)
>    {
>        fd_set readset, writeset, exceptset;
>   @@ -328,7 +328,7 @@
>     * for right now, we'll leave it this way, and change it later if
>     * necessary.
>     */
>   -apr_status_t apr_socket_from_file(apr_socket_t **newsock,
apr_file_t
> *file)
>   +APR_DECLARE(apr_status_t) apr_socket_from_file(apr_socket_t
**newsock,
> apr_file_t *file)
>    {
>        (*newsock) = apr_pcalloc(file->pool, sizeof(**newsock));
>        (*newsock)->socketdes = file->filedes;
> 
> 
> 
>   1.69      +3 -0      apr/include/arch/win32/fileio.h
> 
>   Index: fileio.h
>   ===================================================================
>   RCS file: /home/cvs/apr/include/arch/win32/fileio.h,v
>   retrieving revision 1.68
>   retrieving revision 1.69
>   diff -u -r1.68 -r1.69
>   --- fileio.h	24 Jun 2002 02:13:44 -0000	1.68
>   +++ fileio.h	11 Jul 2002 06:22:22 -0000	1.69
>   @@ -185,6 +185,9 @@
>     *           correctly when writing to a file with this flag set
TRUE.
>     */
> 
>   +// for apr_poll.c;
>   +#define filedes filehand
>   +
>    struct apr_file_t {
>        apr_pool_t *pool;
>        HANDLE filehand;
> 
> 
> 
>   1.26      +3 -10     apr/include/arch/win32/networkio.h
> 
>   Index: networkio.h
>   ===================================================================
>   RCS file: /home/cvs/apr/include/arch/win32/networkio.h,v
>   retrieving revision 1.25
>   retrieving revision 1.26
>   diff -u -r1.25 -r1.26
>   --- networkio.h	6 Jun 2002 02:58:16 -0000	1.25
>   +++ networkio.h	11 Jul 2002 06:22:22 -0000	1.26
>   @@ -58,6 +58,9 @@
>    #include "apr_network_io.h"
>    #include "apr_general.h"
> 
>   +// for apr_poll.c;
>   +#define socketdes sock
>   +
>    struct apr_socket_t {
>        apr_pool_t *cntxt;
>        SOCKET sock;
>   @@ -70,16 +73,6 @@
>        int local_interface_unknown;
>        apr_int32_t netmask;
>        apr_int32_t inherit;
>   -};
>   -
>   -struct apr_pollfd_t {
>   -    apr_pool_t *cntxt;
>   -    fd_set *read;
>   -    int numread;
>   -    fd_set *write;
>   -    int numwrite;
>   -    fd_set *exception;
>   -    int numexcept;
>    };
> 
>    #ifdef _WIN32_WCE
> 
> 
> 


RE: cvs commit: apr/include/arch/win32 fileio.h networkio.h

Posted by Ryan Bloom <rb...@covalent.net>.
Yep, and I just sent mail letting you know that.   :-D

Now, you have to run testpipe to make sure that the pipe read is still
working.

Ryan

----------------------------------------------
Ryan Bloom                  rbb@covalent.net
645 Howard St.              rbb@apache.org
San Francisco, CA 

> -----Original Message-----
> From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> Sent: Wednesday, July 10, 2002 11:27 PM
> To: dev@apr.apache.org
> Subject: RE: cvs commit: apr/include/arch/win32 fileio.h networkio.h
> 
> At 01:25 AM 7/11/2002, Ryan Bloom wrote:
> >Well, you beat me by about five minutes.  I just finished compiling
> >almost the exact same code.
> >
> >Thanks for doing to work, your implementation is cleaner than mine
was.
> 
> Speaking of which, are these the results you were looking for?
> 
> APR Poll Test
> *************
> 
> Initializing...................................OK
> Creating context...............................OK
>          Creating the sockets I'll use..........OK
>          Setting up the pollset I'll use........OK
> Starting Tests
>          Socket 0        Socket 1        Socket 2
>          No wait         No wait         No wait
>          Sending message to socket 2............OK
>          Socket 0        Socket 1        Socket 2
>          No wait         No wait         POLLIN!
>          Trying to get message from socket 2....OK
>          Sending message to socket 1............OK
>          Socket 0        Socket 1        Socket 2
>          No wait         POLLIN!         No wait
>          Sending message to socket 2............OK
>          Socket 0        Socket 1        Socket 2
>          No wait         POLLIN!         POLLIN!
>          Trying to get message from socket 1....OK
>          Sending message to socket 0............OK
>          Socket 0        Socket 1        Socket 2
>          POLLIN!         No wait         POLLIN!
> Tests completed.
>          Closing sockets........................OK



RE: cvs commit: apr/include/arch/win32 fileio.h networkio.h

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 01:25 AM 7/11/2002, Ryan Bloom wrote:
>Well, you beat me by about five minutes.  I just finished compiling
>almost the exact same code.
>
>Thanks for doing to work, your implementation is cleaner than mine was.

Speaking of which, are these the results you were looking for?

APR Poll Test
*************

Initializing...................................OK
Creating context...............................OK
         Creating the sockets I'll use..........OK
         Setting up the pollset I'll use........OK
Starting Tests
         Socket 0        Socket 1        Socket 2
         No wait         No wait         No wait
         Sending message to socket 2............OK
         Socket 0        Socket 1        Socket 2
         No wait         No wait         POLLIN!
         Trying to get message from socket 2....OK
         Sending message to socket 1............OK
         Socket 0        Socket 1        Socket 2
         No wait         POLLIN!         No wait
         Sending message to socket 2............OK
         Socket 0        Socket 1        Socket 2
         No wait         POLLIN!         POLLIN!
         Trying to get message from socket 1....OK
         Sending message to socket 0............OK
         Socket 0        Socket 1        Socket 2
         POLLIN!         No wait         POLLIN!
Tests completed.
         Closing sockets........................OK