── Temp directory helper ───────────────────────────────────── */
| 216 | |
| 217 | /* ── Temp directory helper ───────────────────────────────────── */ |
| 218 | static inline const char *cbm_tmpdir(void) { |
| 219 | #ifdef _WIN32 |
| 220 | const char *t = getenv("TEMP"); |
| 221 | if (!t) |
| 222 | t = getenv("TMP"); |
| 223 | return t ? t : "."; |
| 224 | #else |
| 225 | return "/tmp"; |
| 226 | #endif |
| 227 | } |
| 228 | |
| 229 | /* ── Signal handling ──────────────────────────────────────────── */ |
| 230 | /* Windows doesn't have sigaction; provide macro to select signal API. */ |
no outgoing calls