don't use switch statement for MirOS.

MirOS defines both ERANGE and EOVERFLOW as 34.
(This violates POSIX, though.)
use memcpy() instead of strcpy() to suppress warning on MirOS.