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/09/03 11:29:54 UTC
Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sendrecv.c sockets.c
rbb@hyperreal.org wrote:
>...
> ap_status_t ap_recv(struct socket_t *sock, char *buf, ap_ssize_t *len, time_t sec)
> {
>...
> + if (sec == -1) {
Can you truly rely on time_t being a signed type? I don't think that you
can.
>...
> +/* ***APRDOC********************************************************
> + * ap_status_t ap_setipaddr(ap_socket_t *, apr_uint32_t addr)
> + * Assocaite a socket addr with an apr socket.
> + * arg 1) The socket to use
> + * arg 2) The IP address to attach to the socket.
> + * NOTE: This does not bind the two together, it is just telling apr
> + * that this socket is going to use this address if possible.
> + */
> +ap_status_t ap_setipaddr(struct socket_t *sock, const char *addr)
> +{
Nit: the comments don't match the function.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sendrecv.c sockets.c
Posted by Greg Stein <gs...@lyra.org>.
Manoj Kasichainula wrote:
>
> On Fri, Sep 03, 1999 at 02:29:54AM -0700, Greg Stein wrote:
> > Can you truly rely on time_t being a signed type? I don't think that you
> > can.
>
> I always thought you could; isn't the reason for the 2038 overflow
> that time_t is signed?
yah, but I figured the definition might change one day to unsigned :-)
> Also, the Single Unix man page for time() (which I would think would
> agree with even the non-SUS stuff out there) says it returns -1 on
> error.
ah. well, this certainly clutches it.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sendrecv.c sockets.c
Posted by Manoj Kasichainula <ma...@io.com>.
On Fri, Sep 03, 1999 at 02:29:54AM -0700, Greg Stein wrote:
> Can you truly rely on time_t being a signed type? I don't think that you
> can.
I always thought you could; isn't the reason for the 2038 overflow
that time_t is signed?
Also, the Single Unix man page for time() (which I would think would
agree with even the non-SUS stuff out there) says it returns -1 on
error.
--
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sendrecv.c
sockets.c
Posted by Ryan Bloom <rb...@ntrnet.net>.
> Can you truly rely on time_t being a signed type? I don't think that you
> can.
I'm not sure either. This isn't the correct way to solve the problem, but
I haven't had time to fix it properly. The plan is to add a field to
sockets and files, which will store the time limit for reading/writing.
As soon as I implement this, this issue goes away.
> Nit: the comments don't match the function.
This is a problem throughout the code. At some point, I'll have the time
to fix them all, until then, anybody who is going to use it can read the
code. :)
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@ntrnet.net
6209 H Shanda Dr.
Raleigh, NC 27609 Ryan Bloom -- thinker, adventurer, artist,
writer, but mostly, friend.
-------------------------------------------------------------------------------