Skip to content

Cleanup headers #1270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 26, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion stl/src/StlCompareStringA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <crtdbg.h>
#include <internal_shared.h>
#include <string.h>

#include <Windows.h>

Expand Down
4 changes: 0 additions & 4 deletions stl/src/StlCompareStringW.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <crtdbg.h>
#include <internal_shared.h>
#include <string.h>

#include <Windows.h>

#include "awint.hpp"
Expand Down
1 change: 0 additions & 1 deletion stl/src/StlLCMapStringA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <internal_shared.h>
#include <locale.h>

#include "awint.hpp"

Expand Down
3 changes: 0 additions & 3 deletions stl/src/StlLCMapStringW.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <internal_shared.h>
#include <locale.h>

#include "awint.hpp"

// int __cdecl __crtLCMapStringW - Get type information about a wide string.
Expand Down
7 changes: 3 additions & 4 deletions stl/src/_tolower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

#include <yvals.h>

#include <ctype.h>
#include <cctype>
#include <clocale>
#include <cstdlib>
#include <internal_shared.h>
#include <locale.h>
#include <stddef.h>
#include <stdlib.h>
#include <xlocinfo.h>

#include "awint.hpp"
Expand Down
6 changes: 3 additions & 3 deletions stl/src/_toupper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#include <yvals.h>

#include <ctype.h>
#include <locale.h>
#include <stddef.h>
#include <cctype>
#include <clocale>
#include <cstddef>
#include <xlocinfo.h>

#include "awint.hpp"
Expand Down
3 changes: 1 addition & 2 deletions stl/src/cond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

// condition variable functions

#include <cstdlib>
#include <internal_shared.h>
#include <limits.h>
#include <stdlib.h>
#include <type_traits>
#include <xthreads.h>
#include <xtimec.h>
Expand Down
8 changes: 4 additions & 4 deletions stl/src/cthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

// thread functions

#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <process.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xthreads.h>

#include <Windows.h>
Expand Down
2 changes: 0 additions & 2 deletions stl/src/excptptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#include <malloc.h>
#include <memory>
#include <new>
#include <stddef.h>
#include <stdexcept>
#include <string.h>
#include <trnsctrl.h>
#include <xcall_once.h>

Expand Down
1 change: 0 additions & 1 deletion stl/src/filesys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <direct.h>
#include <experimental/filesystem>
#include <io.h>
#include <string.h>

#include <Windows.h>

Expand Down
9 changes: 4 additions & 5 deletions stl/src/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
// Do not include or define anything else here.
// In particular, basic_string must not be included here.

#include <clocale>
#include <corecrt_terminate.h>
#include <cstdlib>
#include <cstring>
#include <internal_shared.h>
#include <limits.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
#include <xfilesystem_abi.h>

#include <Windows.h>
#include <WinIoCtl.h>
#include <winioctl.h>

// We have several switches that do not have case statements for every possible enum value.
// Hence, disabling this warning.
Expand Down
1 change: 0 additions & 1 deletion stl/src/future.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <cstdlib>
#include <exception>
#include <future>

Expand Down
39 changes: 0 additions & 39 deletions stl/src/ios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

// ios_base basic members

#include <new>
#include <xiosbase>
_STD_BEGIN

Expand All @@ -26,20 +25,6 @@ __PURE_APPDOMAIN_GLOBAL static ios_base* stdstr[_Nstdstr + 2] = {
nullptr}; // [1, _Nstdstr] hold pointers to standard streams
__PURE_APPDOMAIN_GLOBAL static char stdopens[_Nstdstr + 2] = {0}; // [1, _Nstdstr] hold open counts for standard streams

// void __CLR_OR_THIS_CALL ios_base::clear(iostate state, bool reraise) { // set state, possibly reraise exception
// _Mystate = (iostate)(state & _Statmask);
// if ((_Mystate & _Except) == 0)
// ;
// else if (reraise)
// _RERAISE;
// else if (_Mystate & _Except & badbit)
// _THROW(failure("ios_base::badbit set"));
// else if (_Mystate & _Except & failbit)
// _THROW(failure("ios_base::failbit set"));
// else
// _THROW(failure("ios_base::eofbit set"));
// }

void __CLRCALL_PURE_OR_CDECL ios_base::_Ios_base_dtor(ios_base* _This) { // destroy the object
if (0 < _This->_Stdstr && 0 < --stdopens[_This->_Stdstr]) {
return;
Expand All @@ -49,30 +34,6 @@ void __CLRCALL_PURE_OR_CDECL ios_base::_Ios_base_dtor(ios_base* _This) { // dest
delete _This->_Ploc;
}

// ios_base::_Iosarray& __CLR_OR_THIS_CALL ios_base::_Findarr(int idx) { // locate or make a variable array element
// static _Iosarray stub(0, 0);
// _Iosarray *p, *q;
//
// if (idx < 0) { // handle bad index
// setstate(badbit);
// return stub;
// }
//
// for (p = _Arr, q = 0; p != 0; p = p->_Next)
// if (p->_Index == idx)
// return *p; // found element, return it
// else if (q == 0 && p->_Lo == 0 && p->_Vp == 0)
// q = p; // found recycling candidate
//
// if (q != 0) { // recycle existing element
// q->_Index = idx;
// return *q;
// }
//
// _Arr = new _Iosarray(idx, _Arr); // make a new element
// return *_Arr;
// }

void __CLRCALL_PURE_OR_CDECL ios_base::_Addstd(ios_base* _This) { // add standard stream to destructor list
_BEGIN_LOCK(_LOCK_STREAM)
for (_This->_Stdstr = 1; _This->_Stdstr < _Nstdstr; ++_This->_Stdstr) {
Expand Down
2 changes: 1 addition & 1 deletion stl/src/locale0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ _STD_END

#if !STDCPP_IMPLIB || defined(_M_CEE_PURE)

#include <cstdlib>
#include <locale>
#include <stdlib.h>

_EXTERN_C

Expand Down
1 change: 0 additions & 1 deletion stl/src/mpiostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#error This file must be built with /clr:pure.
#endif

#include <fstream>
#include <iostream>

#pragma warning(disable : 4074)
Expand Down
4 changes: 2 additions & 2 deletions stl/src/mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

// mutex functions

#include <cstdio>
#include <cstdlib>
#include <internal_shared.h>
#include <stdio.h>
#include <stdlib.h>
#include <type_traits>
#include <xthreads.h>
#include <xtimec.h>
Expand Down
2 changes: 0 additions & 2 deletions stl/src/nothrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#undef MRTDLL
#endif

#include <yvals.h>

#include <new>
_STD_BEGIN

Expand Down
1 change: 0 additions & 1 deletion stl/src/ppltasks.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <crtdbg.h>
#include <crtdefs.h>
#include <pplinterface.h>
#include <ppltasks.h>
Expand Down
1 change: 0 additions & 1 deletion stl/src/primitives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <crtdefs.h>
#include <exception>
#include <new>
#include <stdlib.h>

#include <Windows.h>

Expand Down
4 changes: 0 additions & 4 deletions stl/src/special_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@
#include <boost/math/special_functions/bessel.hpp>
#include <boost/math/special_functions/beta.hpp>
#include <boost/math/special_functions/ellint_1.hpp>
#include <boost/math/special_functions/ellint_2.hpp>
#include <boost/math/special_functions/ellint_3.hpp>
#include <boost/math/special_functions/expint.hpp>
#include <boost/math/special_functions/hermite.hpp>
#include <boost/math/special_functions/laguerre.hpp>
#include <boost/math/special_functions/legendre.hpp>
#include <boost/math/special_functions/spherical_harmonic.hpp>
#include <boost/math/special_functions/zeta.hpp>
#include <boost/math/tools/config.hpp>
#include <boost/math/tools/precision.hpp>

#pragma warning(pop)

Expand Down
1 change: 0 additions & 1 deletion stl/src/taskscheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <condition_variable>
#include <mutex>
#include <ppltaskscheduler.h>
#include <stddef.h>

#include <Windows.h>

Expand Down
2 changes: 1 addition & 1 deletion stl/src/thread0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <yvals.h>

#include <stdlib.h>
#include <cstdlib>
#include <system_error>
#include <xthreads.h>

Expand Down
1 change: 0 additions & 1 deletion stl/src/vector_algorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <immintrin.h>
#include <intrin0.h>
#include <isa_availability.h>
#include <xmmintrin.h>

extern "C" long __isa_enabled;

Expand Down
3 changes: 1 addition & 2 deletions stl/src/winapinls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#if _STL_WIN32_WINNT < _WIN32_WINNT_VISTA

#include <algorithm>
#include <ctype.h>
#include <stdlib.h>
#include <cctype>
#include <string_view>

namespace {
Expand Down
6 changes: 2 additions & 4 deletions stl/src/winapisupp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
// clang-format off
// Prevent clang-format from reordering <AppModel.h> before <Windows.h>
#include <Windows.h>
#include <AppModel.h>
#include "awint.hpp"
#include <internal_shared.h>
#include <stdlib.h>
#include <cstdlib>
// clang-format on

#pragma warning(push)
#pragma warning(disable : 4265) // non-virtual destructor in base class
#include <wrl/wrappers/corewrappers.h>
#pragma warning(pop)
#include <intrin.h>
#include <stdint.h>
#include <cstdint>

#if !defined(_CRT_WINDOWS) && !defined(UNDOCKED_WINDOWS_UCRT)
// GetCurrentPackageId retrieves the current package id, if the app is deployed via a package.
Expand Down
2 changes: 1 addition & 1 deletion stl/src/xferaise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <yvals.h>

#include <errno.h>
#include <cerrno>
#include <ymath.h>

_EXTERN_C_UNLESS_PURE
Expand Down
1 change: 0 additions & 1 deletion stl/src/xfprec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@

// _FXp* functions

#include "xmath.hpp"
#include "xxfftype.hpp"
#include "xxxprec.hpp"
2 changes: 1 addition & 1 deletion stl/src/xgetwctype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <yvals.h>

#include <wchar.h>
#include <cwchar>
#include <xlocinfo.h>

#include "awint.hpp"
Expand Down
4 changes: 2 additions & 2 deletions stl/src/xlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include <yvals.h>

#include <locale.h>
#include <stdlib.h>
#include <clocale>
#include <cstdlib>

#include "xmtx.hpp"

Expand Down
1 change: 0 additions & 1 deletion stl/src/xlprec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@

// _LXp* functions

#include "xmath.hpp"
#include "xxlftype.hpp"
#include "xxxprec.hpp"
4 changes: 1 addition & 3 deletions stl/src/xmath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

#ifndef _XMATH
#define _XMATH
#include <errno.h>
#include <math.h>
#include <stddef.h>
#include <cmath>
#include <ymath.h>

// FLOAT PROPERTIES
Expand Down
9 changes: 3 additions & 6 deletions stl/src/xmbtowc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

// Convert multibyte char to wide char.

#include <cctype>
#include <cerrno>
#include <climits> // for INT_MAX
#include <crtdbg.h>
#include <ctype.h>
#include <errno.h>
#include <internal_shared.h>
#include <limits.h> // for INT_MAX
#include <locale.h>
#include <stdio.h> // for EOF
#include <stdlib.h>
#include <xlocinfo.h> // for _Cvtvec, _Mbrtowc

_EXTERN_C_UNLESS_PURE
Expand Down
Loading