#if os(Windows)
import Foundation

// POSIX process vocabulary for the Windows build (docs/WINDOWS_PORT.md §4.3).
//
// The shared code — `ProcessHandle.terminate/terminateTree/interruptThenKill`, `GitRunner`'s
// timeout sweep, the backends' Stop paths — is written in POSIX terms: `pid_t`, `SIGTERM`,
// `SIGKILL`, `kill(pid, sig)`. None of that vocabulary is Windows-native (`ucrt`'s `signal.h`
// has SIGINT and SIGTERM but no SIGKILL, and there is no `kill` at all), and rewriting ~30 call
// sites in two vocabularies would smear `#if os(Windows)` across files that have no business
// knowing the platform.
//
// So this file supplies the vocabulary and `ProcessTree.swift` supplies the meaning, exactly the
// way `LinuxSupport.swift` supplies Apple-shaped stand-ins for the Linux build. These names are
// module-internal, so nothing outside NucleicCore sees a fake `SIGKILL`.
//
// Deliberately declared in a file that does NOT `import WinSDK`: `ucrt` also defines SIGINT and
// SIGTERM, and while a same-module declaration wins name lookup, keeping the two sets in
// different files means the question never arises.

/// POSIX `pid_t`. A Windows process id is a `DWORD`, but every shared call site stores it in the
/// `Int32` that `Process.processIdentifier` returns, so `Int32` is the honest width here; the
/// conversion to `DWORD` happens at the Win32 boundary in `ProcessTree.swift`.
typealias pid_t = Int32

/// Uncatchable termination. No Windows equivalent number exists (`ucrt` stops at SIGTERM = 15);
/// 9 is used so the value matches every other platform and the shared exit-code conventions
/// (`Backend.isSIGKILL` reads `128 + 9`).
let SIGKILL: Int32 = 9
/// Polite termination request.
let SIGTERM: Int32 = 15
/// Interactive interrupt — what Stop sends first so an agent can end its turn cleanly.
let SIGINT: Int32 = 2
#endif
