[v3] system_error, round one

Ulrich Drepper drepper@redhat.com
Fri May 11 22:57:00 GMT 2007


- You have to use strerror_r() if available since some strings are 
dynamically created.

- why has this class no explicit association with a locale?  It should 
have.  strerror() and strerror_r() provide translated strings based on 
the global locale

- if such a locale is added as for many other classes, then use 
strerror_l() which is available in glibc and will be available in all 
future POSIX systems.

- you shouldn't hardcode the highest error number.  If you really need 
that information use the _sys_nerr variable which most Unix systems provide.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖



More information about the Libstdc++ mailing list