Re: SV: ANSI standards


Subject: Re: SV: ANSI standards
d.rose@salford.ac.uk
Date: Thu Jan 20 2000 - 08:44:52 CST


On Thu, Jan 20, 2000 at 02:07:03PM +0100, Henrik Berg wrote:
> > According to bug 238, several string manipulation functions that we use
> > are not ansi standard. I did some checking, and here are the platforms on
> > which we use the functions in question:
> >
> > strdup
> > BEOS Unix QNX
> >
> > stricmp, strnicmp
> > Win32 QNX
> >
> > strcasecmp, strncasecmp
> > BEOS
> >
> > Are these really not ansi standard? the compiler on linux is set to give
> > every warning possible, and it doesn't complain about strdup. What about
> > the other platforms? Does this need to be fixed?
> > By the way, this was in my ZAPing of the Release Practicies POW.
>
> The one I don't regornice is strcasecmp and strncasecmp, but its just stricmp and strnicmp with other names isn't it? strdup is just a little bad, since it need a free call.
>
> If stricmp and strnicmp is present on BEOS, it would be nice to change, but thats just me, I dont do BEOS, so I don't have a say.
>
> --hb
>

None of these are mentioned in K&R 2, and the man pages for strdup,
strcasecmp, strncasecmp state BSD conformance rather than ANSI. I don't
have man pages on my (Linux) box for stricmp, strnicmp.

I guess none of these functions are ANSI.

I think the compiler options need -strict -ansi -pedantic or something
to highlight variance from the ANSI standard - IIRC stuff like -Wall
won't highlight non-ansi methods in the standard libraries (though I
could be wrong about that, I often am :)

        -Duncan

>



This archive was generated by hypermail 2b25 : Thu Jan 20 2000 - 08:40:46 CST