468,513 Members | 975 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,513 developers. It's quick & easy.

Does "#ifdef __unix__" execute on linux? c++

I'm working on a proof of concept application, and I have a line that reads
Expand|Select|Wrap|Line Numbers
  1. #ifdef __APPLE__ || __unix__
__APPLE__ is for MaxcOS X
__unix__ is for unix

Will the lines of code after this and before #endif execute under linux too? (This is inside of my main() )
Nov 20 '07 #1
1 4942
weaknessforcats
9,207 Expert Mod 8TB
These are preprocessor symbols: __APPLE__ and __unix__ .

They have nothing to do with the operating system. If you #define either of these, the code below is included.
Nov 20 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Berthold Hoellmann | last post: by
9 posts views Thread by /* frank */ | last post: by
10 posts views Thread by Rick Anderson | last post: by
2 posts views Thread by alok | last post: by
35 posts views Thread by Sunil | last post: by
17 posts views Thread by William Pursell | last post: by
4 posts views Thread by junky_fellow | last post: by
1 post views Thread by lovecreatesbeauty | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.