473,378 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 5712
weaknessforcats
9,208 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

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

Similar topics

10
by: Berthold Hoellmann | last post by:
Hello, When I use ./configure --with-thread --with-fpectl --with-signal-module \ --with-pymalloc --enable-shared --with-cxx=g++ make test on 2.3.3 I get
9
by: /* frank */ | last post by:
I want system ("CLS") if the system is WINDOWS system ("CLEAR") is the OS is a UNIX like.
10
by: Rick Anderson | last post by:
All, I am receiving the following compilation error on LINUX (but not Solaris, HPUX, WIN32, etc): compiling osr.c LBFO.h(369): warning #64: declaration does not declare anything extern...
2
by: alok | last post by:
I am getting inconsistent behvior on Linux and Solaris platfors while computing doule ( 64 bit precision ) multiplications. I have following two double numbers whose integer representation is as...
35
by: Sunil | last post by:
Hi all, I am using gcc compiler in linux.I compiled a small program int main() { printf("char : %d\n",sizeof(char)); printf("unsigned char : ...
23
by: mahesh | last post by:
Hi all, I have following code that is supposed to increase the power by specified value. int main() { system("cls"); int i, exponent; double base; double new_base=0.0;
17
by: William Pursell | last post by:
I debated whether this belongs in comp.lang.c++, and finally decided that it belongs here, because it really is a C question... Suppose I have a perfectly friendly, harmless library, libfoo,...
4
by: junky_fellow | last post by:
guys, I need to write a program that should work on both windows and linux systems. I have to do lot of file handling (file creation, checking access permissions etc) and have to use lots of...
1
by: lovecreatesbeauty | last post by:
Are these macros defined in Makefile or by some environment which can detect the platform types? /* common code here */ #ifdef LINUX /* other os spefic code */ #elif defined VXWORKS
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.