albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
912 stars 156 forks source link

Fix iOS detection #282

Closed SirLynix closed 8 months ago

SirLynix commented 8 months ago

IOS macro is not automatically defined when compiling to iOS devices.

The reliable way to detect iOS is to detect __APPLE__, include and then check for TARGET_OS_IPHONE.

See https://stackoverflow.com/questions/5919996/how-to-detect-reliably-mac-os-x-ios-linux-windows-in-c-preprocessor and https://gist.github.com/TatsuyaOGth/7a6006c9ddecbc3fb655