
Summary: This patch refactors and tries to remove as much of the Windows support headers as possible. This is needed because they currently introduce super weird include cycles and dependencies between STL and libc headers. The changes in this patch are: * remove `support/win32/support.h` completely. The required parts have either been moved into `support/win32/msvc_support.h` (for `MSVC` only helpers not needed by Clang), or directly into their respective `foo.h` headers. * Combine `locale_win32.h` and `locale_mgmt_win32.h` into a single headers, this header should only be included within `__locale` or `locale` to avoid include cycles. * Remove the unneeded parts of `limits_win32.h` and re-name it to `limits_msvc_win32.h` since it's only needed by Clang. I've tested this patch using Clang on Windows, but I suspect it might technically regress our non-existent support for MSVC. Is somebody able to double check? This refactor is needed to support upcoming fixes to `<locale>` on Windows. Reviewers: bcraig, rmaprath, compnerd, EricWF Reviewed By: EricWF Subscribers: majnemer, cfe-commits Differential Revision: https://reviews.llvm.org/D32988 llvm-svn: 302727
61 lines
1.1 KiB
C++
61 lines
1.1 KiB
C++
// -*- C++ -*-
|
|
//===---------------------------- ctype.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_CTYPE_H
|
|
#define _LIBCPP_CTYPE_H
|
|
|
|
/*
|
|
ctype.h synopsis
|
|
|
|
int isalnum(int c);
|
|
int isalpha(int c);
|
|
int isblank(int c); // C99
|
|
int iscntrl(int c);
|
|
int isdigit(int c);
|
|
int isgraph(int c);
|
|
int islower(int c);
|
|
int isprint(int c);
|
|
int ispunct(int c);
|
|
int isspace(int c);
|
|
int isupper(int c);
|
|
int isxdigit(int c);
|
|
int tolower(int c);
|
|
int toupper(int c);
|
|
*/
|
|
|
|
#include <__config>
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
|
#pragma GCC system_header
|
|
#endif
|
|
|
|
#include_next <ctype.h>
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#undef isalnum
|
|
#undef isalpha
|
|
#undef isblank
|
|
#undef iscntrl
|
|
#undef isdigit
|
|
#undef isgraph
|
|
#undef islower
|
|
#undef isprint
|
|
#undef ispunct
|
|
#undef isspace
|
|
#undef isupper
|
|
#undef isxdigit
|
|
#undef tolower
|
|
#undef toupper
|
|
|
|
#endif
|
|
|
|
#endif // _LIBCPP_CTYPE_H
|