JuliaLang/julia — pull request #3844 by vtjnash (2013-07-26 22:45:04+00:00)
Title: better platform macros

This adds new platform macros that are easier to use for the common case where we need a special case for one platform for a small amount of code.

Simple blocks:
```julia
ccall( (@windows? :_fopen : :fopen), ...)
```

Complex blocks:
```julia
@linux? (
begin
some_complicated_thing(a)
end
: begin
some_different_thing(a)
end
)
```

Chaining (parentheses optional, but recommended for readability):
```julia
@windows? :a : (@osx? :b : :c)
```

Even the original platform macros:
```
macro windows_only(ex)
@windows? esc(ex) : nothing
end
```