# Add illumos OS tag · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/285970982a662ae1882858ab8076b8c20609b9bb)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 285970982a662ae1882858ab8076b8c20609b9bb

Requested commit: 285970982a662ae1882858ab8076b8c20609b9bb

Commit: 285970982a662ae1882858ab8076b8c20609b9bb

Tree: 5141c17d8bbb44b401bbda3cbbfdf7dc73106a8a

Author: Stephen Gregoratto

Committer: Ryan Zezeski

## Message

```
Add illumos OS tag

- Adds `illumos` to the `Target.Os.Tag` enum. A new function,
  `isSolarish` has been added that returns true if the tag is either
  Solaris or Illumos. This matches the naming convention found in Rust's
  `libc` crate[1].
- Add the tag wherever `.solaris` is being checked against.
- Check for the C pre-processor macro `__illumos__` in CMake to set the
  proper target tuple. Illumos distros patch their compilers to have
  this in the "built-in" set (verified with `echo | cc -dM -E -`).

  Alternatively you could check the output of `uname -o`.

Right now, both Solaris and Illumos import from `c/solaris.zig`. In the
future it may be worth putting the shared ABI bits in a base file, and
mixing that in with specific `c/solaris.zig`/`c/illumos.zig` files.

[1]: https://github.com/rust-lang/libc/tree/6e02a329a2a27f6887ea86952f389ca11e06448c/src/unix/solarish

```

## Parents

- [51fa7ef1c43c2b159cfba15ee06cd6f3fab3e556](https://git.cafe/gitcafe/zig/commit/51fa7ef1c43c2b159cfba15ee06cd6f3fab3e556?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/285970982a662ae1882858ab8076b8c20609b9bb?format=markdown)
