#unifdef HAVE_SETLOCALE, it is C89 so no need to check for it.

This commit is contained in:
Todd C. Miller
2012-11-12 08:51:58 -05:00
parent 6485906583
commit acf8af9aac
14 changed files with 5 additions and 50 deletions

View File

@@ -49,7 +49,6 @@ sudoers_getlocale(void)
* If prevlocale is non-NULL it will be filled in with the
* old SUDOERS_LOCALE_* value.
*/
#ifdef HAVE_SETLOCALE
bool
sudoers_setlocale(int newlocale, int *prevlocale)
{
@@ -82,19 +81,3 @@ sudoers_setlocale(int newlocale, int *prevlocale)
}
return res ? true : false;
}
#else
bool
sudoers_setlocale(int newlocale, int *prevlocale)
{
switch (newlocale) {
case SUDOERS_LOCALE_USER:
case SUDOERS_LOCALE_SUDOERS:
if (prevlocale)
*prevlocale = current_locale;
current_locale = newlocale;
return true;
default:
return false;
}
}
#endif /* HAVE_SETLOCALE */