Move warn/error into common and make static builds work.

This commit is contained in:
Todd C. Miller
2012-11-25 09:34:40 -05:00
parent c2c6616a0c
commit 2632ec7e69
22 changed files with 202 additions and 266 deletions

View File

@@ -98,3 +98,17 @@ sudoers_setlocale(int newlocale, int *prevlocale)
}
return res ? true : false;
}
static int warning_locale;
void
warning_set_locale(void)
{
sudoers_setlocale(SUDOERS_LOCALE_USER, &warning_locale);
}
void
warning_restore_locale(void)
{
sudoers_setlocale(warning_locale, NULL);
}