34 ms·
Open this code side by side with the source code for Cyrus IMAP, or Perl core, or libssl, and then scroll through them. You will be enlightened. In short, any
by nrdvana 5y ago
Open this code side by side with the source code for Cyrus IMAP, or Perl core, or libssl, and then scroll through them. You will be enlightened.
In short, any code that is intended to work on a wide variety of systems is usually littered with conditional compilation directives and macros that make the code extremely difficult to follow without a extensive study of the author’s “setup”. This is because to compile/run on a wide variety of systems, you actually need wildly different C source code, and what is written in the C source file ends up being more like a template for a program than the actual program.
- jart 5y agoThat's only if you want your source code to compile on a lot of different systems. If your goal is to be able to have your program run on a lot of systems, then it's so much easier to just attack the binary interfaces straight on and ignore the platform tooling. That's how I got my executables to run on seven operating systems. See https://justine.lol/ape.html https://justine.lol/ape.html