Parameter mismatch legality question
Karl Heuer
karl at ima.isc.com
Tue Nov 20 03:39:27 AEST 1990
In article <571 at mtndew.Tustin.CA.US> friedl at mtndew.Tustin.CA.US (Stephen Friedl) writes:
>In article <14502 at smoke.brl.mil>, gwyn at smoke.brl.mil (Doug Gwyn) writes:
>>... you're best off if you let <fcntl.h> declare open() for you.
>
>Unless of course you are IBM building the RS6000, where the prototype
>in <fcntl.h> omits the /const/ type qualifier on the pathname. Mighty
>nice of them not to burden us with qualifiers, eh?
In this case it's still true that the correct action is use <fcntl.h>
rather than declaring it yourself; but you should also reject the broken
implementation and replace it with a working one.
In the situation you describe, the simplest way to get a working
implementation is to edit the vendor's <fcntl.h> to fix the bug, or if this
isn't feasible, to maintain your own copy of the include directory.
Karl W. Z. Heuer (karl at ima.isc.com or uunet!ima!karl), The Walking Lint
More information about the Comp.lang.c
mailing list