summaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/mbsinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/locale/mbsinit.c')
-rw-r--r--lib/libc/locale/mbsinit.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/libc/locale/mbsinit.c b/lib/libc/locale/mbsinit.c
index 24408c7..be44fe5 100644
--- a/lib/libc/locale/mbsinit.c
+++ b/lib/libc/locale/mbsinit.c
@@ -2,6 +2,11 @@
* Copyright (c) 2002-2004 Tim J. Robbins.
* All rights reserved.
*
+ * Copyright (c) 2011 The FreeBSD Foundation
+ * All rights reserved.
+ * Portions of this software were developed by David Chisnall
+ * under sponsorship from the FreeBSD Foundation.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -31,8 +36,13 @@ __FBSDID("$FreeBSD$");
#include "mblocal.h"
int
+mbsinit_l(const mbstate_t *ps, locale_t locale)
+{
+ FIX_LOCALE(locale);
+ return (XLOCALE_CTYPE(locale)->__mbsinit(ps));
+}
+int
mbsinit(const mbstate_t *ps)
{
-
- return (__mbsinit(ps));
+ return mbsinit_l(ps, __get_locale());
}
OpenPOWER on IntegriCloud