Why does the C preprocessor interpret the word “linux” as the constant “1”?
1–10 of 60 posts
Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#2Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#3While I can't imagine much discussion here that couldn't occur on SO, I did want to say thank you for posting this. I found it quite interesting.
Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#4Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#5Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#6Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#7While I can't imagine much discussion here that couldn't occur on SO, I did want to say thank you for posting this. I found it quite interesting.
+1, I love those interesting Stack Overflow (and Stack Exchange) posts that started to appear here every other week. I always learn something new/interesting from them. Thank you dcro :).
Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#8Earlier quoted context omitted.
+1, I love those interesting Stack Overflow (and Stack Exchange) posts that started to appear here every other week. I always learn something new/interesting from them. Thank you dcro :).
no doubt the SO question will soon be closed as "not a question" or "too interesting" or some other draconian response :(
Re: Why does the C preprocessor interpret the word “linux” as the constant “1”?
#9If 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.