Import Glibc or Darwin library automatically.
Please add "SwiftLibC" to Package.swift using Swift Package Manager(SPM).
import PackageDescription let package = Package( name: "Package Name", dependences: [ .package(url: "https://github.com/shotastage/SwiftCLibrary.git", from: "1.0.0"), ] )
You can import LibC like following code.
and You can use this library only add
import clib to first line of source.
You need not to write codes like following.
#if os(OSX) import Darwin #elseif os(Linux) import Glibc #endif
This program is freely distributed under the MIT, see LICENSE for detail.