vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / locale / localeconv.cpp
blob8b353ccef516e36362e5b844aef1e3cb0f406ddf
1 /*
2 * Copyright 2002-2010 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Author:
6 * Daniel Reinhold, danielre@users.sf.net
7 * Oliver Tappe, zooey@hirschkaefer.de
8 */
11 #include <PosixLocaleConv.h>
13 #ifndef _KERNEL_MODE
14 #include "LocaleBackend.h"
15 using BPrivate::Libroot::gLocaleBackend;
16 #endif
19 extern "C" struct lconv*
20 localeconv(void)
22 #ifndef _KERNEL_MODE
23 if (gLocaleBackend)
24 return const_cast<lconv*>(gLocaleBackend->LocaleConv());
25 #endif
27 return &BPrivate::Libroot::gPosixLocaleConv;