Skip to content

Commit 5391abb

Browse files
committed
[Stdlib] Clean up includes in LibcShims and Random.
1 parent 1e8c35d commit 5391abb

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

stdlib/public/stubs/LibcShims.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,18 @@
1919
#include <io.h>
2020
#define WIN32_LEAN_AND_MEAN
2121
#include <Windows.h>
22-
#else
23-
#include <unistd.h>
2422
#endif
2523

26-
#include <algorithm>
27-
#include <cmath>
2824
#include <stdio.h>
29-
#include <stdlib.h>
30-
#include <string.h>
3125
#include <sys/types.h>
26+
3227
#include <type_traits>
3328

34-
#include "llvm/Support/DataTypes.h"
35-
#include "swift/Basic/Lazy.h"
36-
#include "swift/Runtime/Config.h"
37-
#include "swift/Runtime/Debug.h"
3829
#include "../SwiftShims/LibcShims.h"
3930

4031
using namespace swift;
4132

42-
static_assert(std::is_same<ssize_t, swift::__swift_ssize_t>::value,
33+
static_assert(std::is_same<ssize_t, __swift_ssize_t>::value,
4334
"__swift_ssize_t must be defined as equivalent to ssize_t in LibcShims.h");
4435
#if !defined(_WIN32) || defined(__CYGWIN__)
4536
static_assert(std::is_same<mode_t, swift::__swift_mode_t>::value,

stdlib/public/stubs/Random.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <Bcrypt.h>
2323
#pragma comment(lib, "Bcrypt.lib")
2424
#else
25+
#include <errno.h>
2526
#include <unistd.h>
2627
#endif
2728

stdlib/public/stubs/Stubs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ uint64_t swift_float80ToString(char *Buffer, size_t BufferLength,
280280
///
281281
/// \returns Size of character data returned in \c LinePtr, or -1
282282
/// if an error occurred, or EOF was reached.
283-
swift::__swift_ssize_t
283+
__swift_ssize_t
284284
swift::swift_stdlib_readLine_stdin(unsigned char **LinePtr) {
285285
#if defined(_WIN32)
286286
if (LinePtr == nullptr)

0 commit comments

Comments
 (0)