Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Commit 9e8c422

Browse files
committed
Updated for Swift 3.1
1 parent 7260d28 commit 9e8c422

22 files changed

+61
-44
lines changed

Package.pins

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"autoPin": true,
3+
"pins": [
4+
{
5+
"package": "CJSONC",
6+
"reason": null,
7+
"repositoryURL": "https://github.com/PureSwift/CJSONC.git",
8+
"version": "1.0.0"
9+
},
10+
{
11+
"package": "CStatfs",
12+
"reason": null,
13+
"repositoryURL": "https://github.com/PureSwift/CStatfs.git",
14+
"version": "1.0.0"
15+
}
16+
],
17+
"version": 1
18+
}

Sources/SwiftFoundation/Data.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import Darwin.C
1111
#elseif os(Linux)
1212
import Glibc
@@ -24,7 +24,7 @@
2424

2525
// MARK: - Properties
2626

27-
fileprivate var _bytes: ContiguousArray<Byte>
27+
internal var _bytes: ContiguousArray<Byte>
2828

2929
public var bytes: [Byte] {
3030

@@ -210,7 +210,7 @@
210210

211211
// MARK: - Darwin
212212

213-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
213+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
214214

215215
extension Foundation.Data: ByteValue {
216216

Sources/SwiftFoundation/Date.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import Darwin.C
1111
import struct Foundation.Date
1212
#elseif os(Linux)
@@ -194,7 +194,7 @@
194194

195195
// MARK: - Darwin
196196

197-
#if (os(OSX) || os(iOS) || os(watchOS) || os(tvOS)) && !XcodeLinux
197+
#if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && !XcodeLinux
198198

199199
public typealias Date = Foundation.Date
200200

Sources/SwiftFoundation/DateComponents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import Darwin.C
1111
import Foundation
1212
#elseif os(Linux)

Sources/SwiftFoundation/FileDescriptor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import Darwin
1111
#elseif os(Linux)
1212
import Glibc
1313
import CStatfs
1414
#endif
1515

16-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
16+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1717

1818
/// POSIX File Descriptor
1919
public typealias FileDescriptor = CInt

Sources/SwiftFoundation/FileManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import Darwin.C
1111
#elseif os(Linux)
1212
import Glibc
@@ -187,7 +187,7 @@ public struct FileManager {
187187

188188
let fileSize = attributes.fileSize
189189

190-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
190+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
191191

192192
assert(fileSize <= SSIZE_MAX, "File size (\(fileSize)) is larger than the max number of bytes allowed (\(SSIZE_MAX))")
193193

Sources/SwiftFoundation/JSONParse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import JSON
1111
#elseif os(Linux)
1212
import CJSONC

Sources/SwiftFoundation/JSONSerialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import JSON
1111
#elseif os(Linux)
1212
import CJSONC

Sources/SwiftFoundation/Lock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2016 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
1010
import Darwin.C
1111
#elseif os(Linux)
1212
import Glibc

Sources/SwiftFoundation/POSIXError.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
// Copyright © 2015 PureSwift. All rights reserved.
77
//
88

9-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
10-
import Darwin.C
11-
import Foundation
9+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
10+
import Darwin
1211
#elseif os(Linux)
1312
import Glibc
1413
#endif
1514

15+
import struct Foundation.POSIXError
16+
import class Foundation.NSError
17+
1618
public extension POSIXError {
1719

1820
/// Creates error from C ```errno```.
@@ -24,7 +26,7 @@ public extension POSIXError {
2426
return self.init(code: code)
2527
}
2628

27-
#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS)
29+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
2830

2931
/// Creates `POSIXError` from error code.
3032
init(code: POSIXErrorCode) {
@@ -34,8 +36,7 @@ public extension POSIXError {
3436
self.init(_nsError: nsError)
3537
}
3638

37-
#endif
38-
39+
#endif
3940
}
4041

4142
#if os(Linux)
@@ -263,5 +264,3 @@ public extension POSIXError {
263264
}
264265

265266
#endif
266-
267-

0 commit comments

Comments
 (0)