Problems with IBM RS6000 C compiler
diamond@tkovoa
diamond at tkou02.enet.dec.com
Mon Aug 6 17:52:09 AEST 1990
In article <476 at mtndew.UUCP> friedl at mtndew.UUCP (Stephen J. Friedl) writes:
>Hi folks,
Hi Steve. Say hello to Jeff for me.
> extern int stat(char *filename, struct stat *stptr);
>Shouldn't the "filename" argument be const qualified?
Suppose someone has a call of the form
x = stat("myfile", &my_stat);
or
x = stat(my_mallocked_buffer_p, &my_stat);
stat is not defined by ANSI, so either way, it would not violate ANSI.
But if const is included, it would break a lot of code that presently
works under Unix(tm) operating system. (I'm not sure what Posix(tm?)
standards say.) 'Fraid I have to disagree with Karl Heuer's answer!
--
Norman Diamond, Nihon DEC diamond at tkou02.enet.dec.com
This is me speaking. If you want to hear the company speak, you need DECtalk.
More information about the Comp.lang.c
mailing list