File tree Expand file tree Collapse file tree 5 files changed +26
-15
lines changed
Tests/SotoCoreTests/Credential Expand file tree Collapse file tree 5 files changed +26
-15
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,6 @@ import INIParser
17
17
import Logging
18
18
import NIOCore
19
19
import NIOPosix
20
- #if os(Linux)
21
- import Glibc
22
- #else
23
- import Foundation. NSString
24
- #endif
25
20
26
21
/// Load settings from AWS credentials and profile configuration files
27
22
/// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
- #if os(Linux )
15
+ #if canImport(Glibc )
16
16
import Glibc
17
- #else
17
+ #elseif canImport(Musl)
18
+ import Musl
19
+ #elseif canImport(Darwin)
18
20
import Darwin. C
21
+ #else
22
+ #error("Unsupported platform")
19
23
#endif
20
24
21
- internal enum Environment {
22
- internal static subscript( _ name: String ) -> String ? {
25
+ enum Environment {
26
+ static subscript( _ name: String ) -> String ? {
23
27
guard let value = getenv ( name) else {
24
28
return nil
25
29
}
Original file line number Diff line number Diff line change 12
12
//
13
13
//===----------------------------------------------------------------------===//
14
14
15
- #if os(Linux )
15
+ #if canImport(Glibc )
16
16
import Glibc
17
- #else
17
+ #elseif canImport(Musl)
18
+ import Musl
19
+ #elseif canImport(Darwin)
18
20
import Darwin. C
21
+ #else
22
+ #error("Unsupported platform")
19
23
#endif
20
24
21
25
internal enum Environment {
Original file line number Diff line number Diff line change 18
18
// Licensed under Apache License v2.0 http://www.apache.org/licenses/LICENSE-2.0.html
19
19
//
20
20
21
- #if os(Linux )
21
+ #if canImport(Glibc )
22
22
import Glibc
23
- #else
23
+ #elseif canImport(Musl)
24
+ import Musl
25
+ #elseif canImport(Darwin)
24
26
import Darwin. C
27
+ #else
28
+ #error("Unsupported platform")
25
29
#endif
26
30
27
31
@_implementationOnly import CSotoExpat
Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
15
15
import XCTest
16
- #if os(Linux )
16
+ #if canImport(Glibc )
17
17
import Glibc
18
+ #elseif canImport(Musl)
19
+ import Musl
20
+ #elseif canImport(Darwin)
21
+ import Darwin. C
18
22
#else
19
- import Darwin
23
+ #error("Unsupported platform")
20
24
#endif
21
25
@testable import SotoCore
22
26
You can’t perform that action at this time.
0 commit comments