HP-UX strerror() returns an empty string for an unknown error code.
This caused an assertion to fail under DEBUGGING builds. This patch
removes the assertion and changes the return into a non-empty string
indicating the errno is for an unknown error.
PERL_ARGS_ASSERT_FIXUP_ERRNO_STRING;
assert(SvOK(sv));
- assert(strNE(SvPVX(sv), ""));
+
+ if(strEQ(SvPVX(sv), "")) {
+ sv_catpv(sv, UNKNOWN_ERRNO_MSG);
+ }
+ else {
/* In some locales the error string may come back as UTF-8, in
* which case we should turn on that flag. This didn't use to
{
SvUTF8_on(sv);
}
+ }
}
#ifdef VMS