mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 12:02:36 +08:00
Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This change adds proper guard around that include statement. For newlib 2.4, some releases contain these functions and some don't, and they all have the same version numbers. This patch will work properly with the initial "2.4.0" release which does not include these functions and require __nop_local_mgmt.h. This has been tested against newlib 2.2 and 2.5, and also sanity checks against other different version numbers. Patch by Martin J. O'Riordan and Walter Lee Differential Revision: https://reviews.llvm.org/D32146 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305394 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
824 B
C
29 lines
824 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>
|
|
#if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \
|
|
__NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5
|
|
#include <support/xlocale/__nop_locale_mgmt.h>
|
|
#endif
|
|
#include <support/xlocale/__posix_l_fallback.h>
|
|
#include <support/xlocale/__strtonum_fallback.h>
|
|
|
|
#endif // _NEWLIB_VERSION
|
|
|
|
#endif
|