rmaprath created this revision. rmaprath added reviewers: EricWF, mclow.lists, rsmith. rmaprath added a subscriber: cfe-commits.
The implementation of [depr.c.headers] in https://reviews.llvm.org/D12747 introduced the necessary C headers into libc++. This patch adds one more missing headers: limits.h We spotted this due to a failing C++03 test [limits_h.pass.cpp] in our libc++ configuration; when the limits.h header is included from a C++ program, it now bypassed the __config header and went directly into the underlying C library's limits.h header, which is problematic for us because we use __config header to configure the underlying C library's behaviour when used from a C++ context. https://reviews.llvm.org/D25361 Files: include/limits.h Index: include/limits.h =================================================================== --- /dev/null +++ include/limits.h @@ -0,0 +1,49 @@ +// -*- C++ -*- +//===--------------------------- limits.h ---------------------------------===// +// +// 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_LIMITS_H +#define _LIBCPP_LIMITS_H + +/* + limits.h synopsis + +Macros: + + CHAR_BIT + SCHAR_MIN + SCHAR_MAX + UCHAR_MAX + CHAR_MIN + CHAR_MAX + MB_LEN_MAX + SHRT_MIN + SHRT_MAX + USHRT_MAX + INT_MIN + INT_MAX + UINT_MAX + LONG_MIN + LONG_MAX + ULONG_MAX + LLONG_MIN // C99 + LLONG_MAX // C99 + ULLONG_MAX // C99 + +*/ + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +#include_next <limits.h> + +#endif // _LIBCPP_LIMITS_H
Index: include/limits.h =================================================================== --- /dev/null +++ include/limits.h @@ -0,0 +1,49 @@ +// -*- C++ -*- +//===--------------------------- limits.h ---------------------------------===// +// +// 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_LIMITS_H +#define _LIBCPP_LIMITS_H + +/* + limits.h synopsis + +Macros: + + CHAR_BIT + SCHAR_MIN + SCHAR_MAX + UCHAR_MAX + CHAR_MIN + CHAR_MAX + MB_LEN_MAX + SHRT_MIN + SHRT_MAX + USHRT_MAX + INT_MIN + INT_MAX + UINT_MAX + LONG_MIN + LONG_MAX + ULONG_MAX + LLONG_MIN // C99 + LLONG_MAX // C99 + ULLONG_MAX // C99 + +*/ + +#include <__config> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +#include_next <limits.h> + +#endif // _LIBCPP_LIMITS_H
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits