DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using the UDK

Release-specific development system macros

If you need to differentiate between different development systems in your source code, you can test for the manifest constants shown in the code fragment below. These constants are all pre-defined by the native compilers on the respective systems indicated:

   #if defined(_SCO_DS)
      printf("OpenServer standard compiler\n");
   #elif defined(__USLC__)
      printf("UnixWare UDK 7 compiler\n");
   #elif defined(__UNIXWARE__)
      printf("UnixWare GNU compiler\n");
   #elif defined(M_UNIX)
      printf("ODT 3 or earlier compiler\n");
   #else
      printf("Other compiler\n");
   #endif

For UnixWare 7, a new constant has been added, __SCO_VERSION__, which contains a constructed integer value: major (1+ digit), minor (2 digits), year (4 digits), month (2 digits). For example, the UnixWare 7 C compiler has a __SCO_VERSION__ value of 302199801.


Next topic: cc command options
Previous topic: UDK compilation modes

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004