── Temp directory helper ───────────────────────────────────── */
| 144 | |
| 145 | /* ── Temp directory helper ───────────────────────────────────── */ |
| 146 | static inline const char *cbm_tmpdir(void) { |
| 147 | #ifdef _WIN32 |
| 148 | const char *t = getenv("TEMP"); |
| 149 | if (!t) |
| 150 | t = getenv("TMP"); |
| 151 | return t ? t : "."; |
| 152 | #else |
| 153 | return "/tmp"; |
| 154 | #endif |
| 155 | } |
| 156 | |
| 157 | /* ── Signal handling ──────────────────────────────────────────── */ |
| 158 | /* Windows doesn't have sigaction; provide macro to select signal API. */ |
no outgoing calls