diff --git a/locale.c b/locale.c index 018e4131a4e4..af61c1f4223d 100644 --- a/locale.c +++ b/locale.c @@ -342,6 +342,12 @@ S_get_category_index(const int category, const char * locale) "Unknown locale category %d%s%s", category, conditional_warn_text, locale); +# ifdef EINVAL + + SETERRNO(EINVAL, LIB_INVARG); + +# endif + /* Return an out-of-bounds value */ return NOMINAL_LC_ALL_INDEX + 1; } @@ -660,14 +666,6 @@ S_emulate_setlocale_i(pTHX_ const unsigned int index, const char * locale) return all_string; } -# ifdef EINVAL - - SETERRNO(EINVAL, LIB_INVARG); - -# endif - - return NULL; - # endif } /* End of this being setlocale(LC_foo, NULL) */