summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/primes/primes.c4
-rw-r--r--usr.bin/uniq/uniq.c13
2 files changed, 2 insertions, 15 deletions
diff --git a/usr.bin/primes/primes.c b/usr.bin/primes/primes.c
index 33fcfd3cb679..900e5f03d4e9 100644
--- a/usr.bin/primes/primes.c
+++ b/usr.bin/primes/primes.c
@@ -101,9 +101,7 @@ main(int argc, char *argv[])
int ch;
char *p;
- /* Cache NLS data, for strerror, for err(3), before cap_enter. */
- (void)catopen("libc", NL_CAT_LOCALE);
-
+ caph_cache_catpages();
if (caph_enter() < 0)
err(1, "cap_enter");
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c
index d47893ca5578..862b7525e82a 100644
--- a/usr.bin/uniq/uniq.c
+++ b/usr.bin/uniq/uniq.c
@@ -87,17 +87,6 @@ static wchar_t *skip(wchar_t *);
static void obsolete(char *[]);
static void usage(void);
-static void
-strerror_init(void)
-{
-
- /*
- * Cache NLS data before entering capability mode.
- * XXXPJD: There should be strerror_init() and strsignal_init() in libc.
- */
- (void)catopen("libc", NL_CAT_LOCALE);
-}
-
int
main (int argc, char *argv[])
{
@@ -177,7 +166,7 @@ main (int argc, char *argv[])
}
}
- strerror_init();
+ caph_cache_catpages();
if (caph_enter() < 0)
err(1, "unable to enter capability mode");