Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditional Windows comments in Common Lisp

What's the canonical Windows/Not-windows conditional comment in Common Lisp?

#-win32 (non-windows-stuff) #+win32 (usually-some-horrific-hack)

seems to work correctly on SBCL and LispWorks (whether the underlying platform is 32 or 64 bit), but CCL only seems to understand

#-windows (non-windows-stuff) #+windows (usually-some-horrific-hack)

How do I dispatch on platform in a portable (across implementations) way? Is there a reference for standard comment flags somewhere?

like image 754
Inaimathi Avatar asked Apr 14 '26 02:04

Inaimathi


1 Answers

There is no canonical element of *features* that works across all implementations. The trivial-features project normalizes features across platforms and implementations so, after loading trivial-features, you can use #+windows anywhere to mean Windows.

like image 146
Xach Avatar answered Apr 16 '26 10:04

Xach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!