apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apr/threadproc/win32 proc.c
Date Mon, 27 Nov 2000 19:28:52 GMT
On 27 Nov 2000, Karl Fogel wrote:

> I'm curious -- how does it cause warnings to have a const in the
> prototype of a function you're calling with non-const data?  It seems
> odd to me that this would cause a problem... Perhaps there's something
> else going on here?
> I mean, we're writing the functions, and we know we're not going to
> change that data, right?  

We are asking for data that is const char * const *, but passing in
char * const * data.  This causes incompatible pointer type warnings when
compiling Apache.

> (Or is the issue that when we pass some of the data through to
> execve() or whatever, it's making less strict promises than our
> wrapper does, so we'd have to, ick, cast?)

APR is actually not complaining, but it does seem a bit odd to me that we
are asking for stricter access than the underlying functions we are
using.  One of the arguments made for this commit was that we may actually
get const data, so we had better be sure that we treat it as const.  I
disagree.  If we are given const data, then we have a problem, because
POSIX doesn't state that the C Run-Time won't change the data underneath

We NEED to match POSIX in this, and require char *const * data.


Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131

View raw message