You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 1999/04/09 23:46:16 UTC

Re: cvs commit: apache-apr/include apr_file_io.h

rbb@hyperreal.org wrote:
> 
> rbb         99/04/09 11:02:59
> 
>   Modified:    apr/file_io/unix readwrite.c
>                apr/test testfile.c
>                docs     fileio.txt
>                include  apr_file_io.h
>   Log:
>   Added apr_writev call, and requisite defines.  I also added the permissions
>   abstraction #defines.
>...
>   -
>   -apr_ssize_t apr_read(apr_file_t *thefile, void *buf, apr_size_t nbytes)
>   +#include <sys/uio.h>
>   +apr_ssize_t apr_read(apr_file_t *thefile, void *buf, apr_ssize_t nbytes)

I think this is wrong. On my Linux box here, I see that "nbytes" is
listed as a size_t, NOT an ssize_t. It does *return* and ssize_t,
though.

>...
>   +apr_ssize_t apr_writev(apr_file_t *thefile, const apr_iovec_t * vec, apr_ssize_t iocnt)

On my system, that last parameter is an integer count (of iovec
structs), not an ssize_t.


IMO, these parameters should be changed to an ssize_t and an int until
another platform is found which defines them differently. At that point,
a choice will need to be made.

Cheers,
-g

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