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...@hyperreal.org on 1999/10/10 15:54:19 UTC
cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c
dreid 99/10/10 06:54:18
Modified: src/lib/apr/network_io/beos sockopt.c
Log:
This stops a small moan by the compiler.
h_errno is a global so it'll need to be made threadsafe.
Revision Changes Path
1.5 +2 -1 apache-2.0/src/lib/apr/network_io/beos/sockopt.c
Index: sockopt.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockopt.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sockopt.c 1999/10/08 21:27:41 1.4
+++ sockopt.c 1999/10/10 13:54:18 1.5
@@ -108,7 +108,7 @@
hptr = gethostbyaddr((char *)&(sock->addr->sin_addr),
sizeof(struct in_addr), AF_INET);
if (hptr != NULL) {
- *name = ap_pstrdup(sock->cntxt, hptr->h_name);
+ name = (char**)ap_pstrdup(sock->cntxt, hptr->h_name);
if (*name) {
return APR_SUCCESS;
}
@@ -116,5 +116,6 @@
}
/* XXX - Is this threadsafe? - manoj */
+ /* on BeOS this is a global... */
return h_errno;
}
Re: cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c
Posted by David Reid <ab...@dial.pipex.com>.
Yeah well that'll teach me to use the code as a scratchpad whilst doing
other things as well!!
I corrected it in a later commit once I realised I'd let it slip through.
Sorry :-(
----- Original Message -----
From: Ben Laurie <be...@algroup.co.uk>
To: <ne...@apache.org>
Sent: 11 October 1999 11:52
Subject: Re: cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c
> Greg Stein wrote:
> >
> > Actually, I don't see how this could work. ap_pstrup() returns a char*.
I
> > don't see how you can cast that to a char** ...
>
> That's exactly what I was about to say. This looks like nonsense to me!
>
> >
> > (maybe Brian was saying the same thing but more diplomatically :-)
>
> Diplomatic? What's that?
>
> > On Sun, 10 Oct 1999, Brian Behlendorf wrote:
> > > Is there a way to fix this without a cast? Or is this a case where
casts
> > > are harmless?
> > >
> > > Brian
> > >
> > > On 10 Oct 1999 dreid@hyperreal.org wrote:
> > > > dreid 99/10/10 06:54:18
> > > >
> > > > Modified: src/lib/apr/network_io/beos sockopt.c
> > > > Log:
> > > > This stops a small moan by the compiler.
> > > ...
> > > > - *name = ap_pstrdup(sock->cntxt, hptr->h_name);
> > > > + name = (char**)ap_pstrdup(sock->cntxt, hptr->h_name);
> > >
>
> Cheers,
>
> Ben.
>
> --
> http://www.apache-ssl.org/ben.html
>
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
> - Indira Gandhi
Re: cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c
Posted by Ben Laurie <be...@algroup.co.uk>.
Greg Stein wrote:
>
> Actually, I don't see how this could work. ap_pstrup() returns a char*. I
> don't see how you can cast that to a char** ...
That's exactly what I was about to say. This looks like nonsense to me!
>
> (maybe Brian was saying the same thing but more diplomatically :-)
Diplomatic? What's that?
> On Sun, 10 Oct 1999, Brian Behlendorf wrote:
> > Is there a way to fix this without a cast? Or is this a case where casts
> > are harmless?
> >
> > Brian
> >
> > On 10 Oct 1999 dreid@hyperreal.org wrote:
> > > dreid 99/10/10 06:54:18
> > >
> > > Modified: src/lib/apr/network_io/beos sockopt.c
> > > Log:
> > > This stops a small moan by the compiler.
> > ...
> > > - *name = ap_pstrdup(sock->cntxt, hptr->h_name);
> > > + name = (char**)ap_pstrdup(sock->cntxt, hptr->h_name);
> >
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
Re: cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c
Posted by Greg Stein <gs...@lyra.org>.
Actually, I don't see how this could work. ap_pstrup() returns a char*. I
don't see how you can cast that to a char** ...
(maybe Brian was saying the same thing but more diplomatically :-)
On Sun, 10 Oct 1999, Brian Behlendorf wrote:
> Is there a way to fix this without a cast? Or is this a case where casts
> are harmless?
>
> Brian
>
> On 10 Oct 1999 dreid@hyperreal.org wrote:
> > dreid 99/10/10 06:54:18
> >
> > Modified: src/lib/apr/network_io/beos sockopt.c
> > Log:
> > This stops a small moan by the compiler.
> ...
> > - *name = ap_pstrdup(sock->cntxt, hptr->h_name);
> > + name = (char**)ap_pstrdup(sock->cntxt, hptr->h_name);
>
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c
Posted by Brian Behlendorf <br...@apache.org>.
Is there a way to fix this without a cast? Or is this a case where casts
are harmless?
Brian
On 10 Oct 1999 dreid@hyperreal.org wrote:
> dreid 99/10/10 06:54:18
>
> Modified: src/lib/apr/network_io/beos sockopt.c
> Log:
> This stops a small moan by the compiler.
...
> - *name = ap_pstrdup(sock->cntxt, hptr->h_name);
> + name = (char**)ap_pstrdup(sock->cntxt, hptr->h_name);