
The various _l locale extension functions originate from very different places. Some come from POSIX, some are BSD extensions, and some are shared BSD and GLIBC extensions. This patch tries to group the local extension reimplementations by source. This should make it easier to make libcxx work with POSIX compliant C libraries that lack these extensions. The fallback locale functions are also useful on their own for other lightweight platforms. Putting these fallback implementations in support/xlocale should enable code sharing. I have no access to a newlib system or an android system to build and test with. I _do_ have access to a system without any of the _l locale extensions though, and I was able to ensure that the new __posix_l_fallback.h and __strtonum_fallback.h didn't have any massive problems. http://reviews.llvm.org/D17416 llvm-svn: 270213
26 lines
725 B
C
26 lines
725 B
C
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H
|
|
#define _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H
|
|
|
|
#if defined(_NEWLIB_VERSION)
|
|
|
|
#include <cstdlib>
|
|
#include <clocale>
|
|
#include <cwctype>
|
|
#include <ctype.h>
|
|
#include <support/xlocale/__nop_locale_mgmt.h>
|
|
#include <support/xlocale/__posix_l_fallback.h>
|
|
#include <support/xlocale/__strtonum_fallback.h>
|
|
|
|
#endif // _NEWLIB_VERSION
|
|
|
|
#endif
|