News for hackers. Stuff that matters.
Re:My "retirement" project: Release 40 years worth of my "so... by bigbillheck on Friday November 03, 2023 @07:25PM (#38136376)
I took a quick look at cosmopolitan.h: https://justine.lol/cosmopolitan/cosmopolitan.h and counted 886 occurrences of "#if" (including #if and #ifdef)
Re:My "retirement" project: Release 40 years worth of my "so... by jart on Saturday November 04, 2023 @02:09AM (#38138614)
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.