In article <>, Jordan Abel <> writes:
> On 2005-11-13, Michael Wojcik <> wrote:
> > In article <>, Jordan Abel <> writes:
> >> On 2005-11-11, Michael Wojcik <> wrote:
> >
> >> > For a function like your "strcasecmp" (note that this name is
> >> > reserved to the implementation, and you should not use it)
> >>
> >> which is why it's #ifndef'd to only compile on systems that don't
> >> provide it.
> >
> > So what? That identifier is still reserved to the implementation.
>
> As function names in stdlib.h and string.h - they are not reserved for
> any other purpose, and if it has been determined that the headers in
> question don't contain that function name...
Wrong. C90 7.13: "All external names described below are reserved
no matter what headers are included by the program"; 7.13.8: "Function
names beginning with str, ...".
> > Perhaps the next revision of the implementation for that platform
> > *will* include it.
>
> At which point HAVE_STRCASECMP will presumably test true,
Now there's a compelling argument. "This is wrong, but presumably
it'll go away if it might cause a problem." Why not avoid the
problem in the first place?
> since these
> are generated by seeing if a test program trying to use it successfully
> translates.
And you know that how?
> > Perhaps that implementation uses it for some other purpose - it's not
> > required to document that.
>
> It's not allowed to do that. The language of the standard only permits
> implementations to use it as a function name, and only in stdlib.h or
> string.h. Nowhere else and for no other purpose.
Wrong. The identifier is reserved to the implementation. The
implementation *may* add it to string.h, but need not.
If the implementation does add it to string.h, it need not do what
the OP's function does.
--
Michael Wojcik
Recently, they appeared at the reopening of the Brookdale Library,
luring passersby with the opportunity to be anonymously silly.