[vox-tech] strerror deprecated?
Peter Jay Salzman
p at dirac.org
Tue Dec 26 13:46:43 PST 2006
On Tue 26 Dec 06, 11:49 AM, Richard Harke <rharke at earthlink.net> said:
>
> I would try the strerror_r() on MS just in case there is a doc error.
> As far as buffer length -- I believe all the standard error messages
> are less than a line long, i.e. less than 80 chars. Of course, if you expect
> to use locales other than "C", you will probably need to double or
> triple this to allow for multi-byte chars. (The locale correctness is a
> motivation to use strerror and kin)
> If streeror_r doesn't work on MS, there is the old and ugly macro
> method:
> #ifdef MS
> #define Strerror_r() strerror_s()
> #else
> #defiene Strerror_r() strerror()
> #endif
> But you knew that. Sorry I can't suggest anything more elegant.
>
> Richard
Thanks, Richard!
For the record, strerror_r() isn't implemented in VC++, but it does appear
to be a drop in replacement for strerror_s().
BTW, when you say that all the error messages are a line long, are you
speaking pragmatically or from a standards view? I'm really trying to write
this "by the books."
Pete
More information about the vox-tech
mailing list