News for hackers. Stuff that matters.
Re:Why does the C preprocessor interpret the word “linux” as... by anttiok on Wednesday October 09, 2013 @10:03AM (#6521257)
If you're in the habit of writing "struct sockaddr_in sin;", you'll probably be tempted to write "struct sockaddr_un sun;". Just don't expect that code to compile on Solaris.
Re:Why does the C preprocessor interpret the word “linux” as... by robmcm1982 on Wednesday October 09, 2013 @10:14AM (#6521327)
Is that just hardcoded into the preprocessor itself? Or is part of ANSI C. Wondering if the MS C++ compiler will do this well.
Re:Why does the C preprocessor interpret the word “linux” as... by simias on Wednesday October 09, 2013 @12:35PM (#6522271)
It's not and can be tuned using compiler options as mentioned in TFA. Definitely not standard.