Including QNX OS-specific code
QNX SDP8.0Programmer's GuideDeveloper
If you need to include QNX OS-specific code in your
application, you can wrap it in an #ifdef
to make the program more portable.
The qcc utility defines the __QNX__ preprocessor symbol (or manifest constant) to allow you to specify QNX OS-specific code. Starting with QNX OS 8.0, its value represents the API released version with the decimal points removed (e.g., 801 represents version 8.0.1).
For example:
#if defined(__QNX__)
#if __QNX__ >= 800
// QNX 8 or later
#else
// QNX 7.x or earlier
#endif
#endif
For information about other preprocessor symbols that you might find useful, see the Manifests chapter of the QNX OS C Library Reference.
Page updated: