OhNoNotAgain
Programmer
Hello all,
I have developed a C program that needs to run on a HP-UX and Sun Solaris. Depending on the machine I set certain variable contents. To do this I use ifdef to check the machine type, on Sun it works a treat, on HP no joy. This is what I have...
#ifdef hpux
char cBox[] = "I am a HP";
#endif
#ifdef sun
char cBox[] = "I am a SUN";
#endif
Any idea how hpux is set and where it is set ?
I am using cc -g +DAportable as my compile options on the HP box as it needs to run on both 32 and 64 bit HP's.
Thanks
I have developed a C program that needs to run on a HP-UX and Sun Solaris. Depending on the machine I set certain variable contents. To do this I use ifdef to check the machine type, on Sun it works a treat, on HP no joy. This is what I have...
#ifdef hpux
char cBox[] = "I am a HP";
#endif
#ifdef sun
char cBox[] = "I am a SUN";
#endif
Any idea how hpux is set and where it is set ?
I am using cc -g +DAportable as my compile options on the HP box as it needs to run on both 32 and 64 bit HP's.
Thanks