(library
 (name spawn)
 (foreign_stubs
  (language c)
  (flags (:standard (:include flags.sexp)))
  (names spawn_stubs))
 (libraries unix threads.posix))

(rule
 (target flags.sexp)
 (enabled_if
  (= %{os_type} "Win32"))
 (action
  (with-stdout-to
   %{target}
   (echo "(-DUNICODE -D_UNICODE)"))))

(rule
 (target flags.sexp)
 (enabled_if
  (<> %{os_type} "Win32"))
 (action
  (with-stdout-to
   %{target}
   (echo "()"))))
