#include <stdio.h>
#include <stdlib.h>
#ifdef linux
#include <string.h>
#include <unistd.h>
#endif
int main()
{
#ifdef WIN32
printf("In Windows");
# else
#if defined(SOLARIS )
printf("Im in Solaris");
#endif
#ifdef linux
printf("In Linux");
#endif
#endif
}
what is wrong in my code?
environment :SunOS 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-V215
there is no compilation error while compiling and while executing it is not printing Im in Solaris.
if i change in my code #if defined(SOLARIS ) this to #if defined(__sun) it is working fine.
plz replay to this ?
Thanks in advance.....
#include <stdlib.h>
#ifdef linux
#include <string.h>
#include <unistd.h>
#endif
int main()
{
#ifdef WIN32
printf("In Windows");
# else
#if defined(SOLARIS )
printf("Im in Solaris");
#endif
#ifdef linux
printf("In Linux");
#endif
#endif
}
what is wrong in my code?
environment :SunOS 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-V215
there is no compilation error while compiling and while executing it is not printing Im in Solaris.
if i change in my code #if defined(SOLARIS ) this to #if defined(__sun) it is working fine.
plz replay to this ?
Thanks in advance.....
Comment