#ifndef UDO_HOSTPLATFORM #define UDO_HOSTPLATFORM ## /* Host platform detection This file is part of the SONICS UDO collection by Richard Knight 2024 License: GPL-2.0-or-later http://1bpm.net */ ; gihost_type: 0 = windows , 1 = linux, 2 = WASM #ifndef WEB gihost_type filevalid "/bin/ls" #end #ifdef WEB gihost_type = 2 #end gihost_max32bitftlen = 16777216 /* Get temp dir as string */ opcode host_tempdir, S, 0 Spath = "" ; default to root assuming slash is appended to output if (gihost_type == 0) then Spath = "%TEMP%" elseif (gihost_type == 1) then Spath = "/tmp" endif xout Spath endop /* Get whether the current Csound instance is 32 or 64 bit */ opcode is64bit, i, 0 xout (1 & 1e9+9) endop #end