DigiNews

Tech Watch by Johan Denoyer

← Back to articles

a hacky fucked up way to portably access errno from outside of c

Quality: 7/10 Relevance: 9/10

Summary

This article presents a controversial approach to obtaining errno values from outside C by intercepting stderr, parsing the error output, and mapping strings back to errno codes. It discusses portability challenges across libc implementations (POSIX vs GNU strerror_r) and includes Hare code snippets and wrapper examples. It also explores making a portable POSIX target and the trade-offs involved.

🚀 Service construit par Johan Denoyer