                 return "\(String(cString: buf)) (\(errno))"
             }
             fatalError("strerror_r error: \(ERANGE)")
+          #endif
         }
 
         switch self {

    case waitpid(Int32)
}

import func SPMLibc.strerror_r
import var SPMLibc.EINVAL
import var SPMLibc.ERANGE

extension SystemError: CustomStringConvertible {
    public var description: String {
        func strerror(_ errno: Int32) -> String {
            var cap = 64
            while cap <= 16 * 1024 {
                var buf = [Int8](repeating: 0, count: cap)

///   - args: The executable arguments.
public func exec(path: String, args: [String]) throws {
    let cArgs = CStringArray(args)
  #if os(Windows)
    guard cArgs.cArray.withUnsafeBufferPointer({
        $0.withMemoryRebound(to: UnsafePointer<Int8>?.self, {
          _execv(path, $0.baseAddress) != -1
        })
    })
    else {
        throw SystemError.exec(errno, path: path, args: args)
    }
  #else
    guard execv(path, cArgs.cArray) != -1 else {
        throw SystemError.exec(errno, path: path, args: args)
    }
  #endif
}

// MARK: Utility function for searching for executables
