── Temp directory helper ───────────────────────────────────── */
| 202 | |
| 203 | /* ── Temp directory helper ───────────────────────────────────── */ |
| 204 | static inline const char *cbm_tmpdir(void) { |
| 205 | #ifdef _WIN32 |
| 206 | const char *t = getenv("TEMP"); |
| 207 | if (!t) |
| 208 | t = getenv("TMP"); |
| 209 | return t ? t : "."; |
| 210 | #else |
| 211 | return "/tmp"; |
| 212 | #endif |
| 213 | } |
| 214 | |
| 215 | /* ── Signal handling ──────────────────────────────────────────── */ |
| 216 | /* Windows doesn't have sigaction; provide macro to select signal API. */ |
no outgoing calls