httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: cvs commit: apache-1.3/src/os/unix os.c
Date Sun, 19 Apr 1998 15:53:27 GMT

In article <> you wrote:

> Is there any advantage to not just casting it for all platforms?

> I think that if you think OSF1 and FreeBSD will be the only platforms that
> do this, you will be quite mistaken, and having long lists of OSes in code
> isn't nice when it isn't necessayr.

Hmmm.... I don't know if it isn't necessary to cast always. What is ANSI C's
rule here: When I have a "const char *" and pass this to a function which
wants a "char *", the cast is needed or the compiler complains with
"discarding char". Ok. And on the other hand? When I've a "const char *" and
the function wants a "const char *" but I cast with "char *". Is this always
ok this way around? I'm not sure. Definitive comments?

                                       Ralf S. Engelschall

View raw message