Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I took a quick look at cosmopolitan.h: https://justine.lol/cosmopolitan/cosmopolitan.h and counted 886 occurrences of "#if" (including #if and #ifdef)


cosmopolitan.h is a concatenated rollup of hundreds of header files, shipped as part of the "amalgamation" variant of our release, and those sub-headers had #ifndef _FOO_H guards at the top and bottom. The rest of the #ifs are required by standards so we don't clobber the user's control of their namespace, e.g. `#ifndef _GNU_SOURCE`. What you won't see is the annoying stuff that checks for CPU, OSes, endianness, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: