Using qh.h
In most cases, you do not have to include qh.h because it is included by all other QNX helper headers.
QH_FILENAME definition
After qh.h is included, QH_FILENAME is available to the source file and contains the filename specified by__FILE__. If you are using a GNU compiler,
QH_FILENAME is FILE with the path removed and
QH_FILENAME_HAS_FULLPATH is false; otherwise,
QH_FILENAME is __FILE__ and
QH_FILENAME_HAS_FULLPATH is true. (Note that
qh.h doesn't include stdbool.h.) If
QH_FILENAME_HAS_FULLPATH is false,
QH_SHORT_FILENAME_DEFINED is defined.Forbidden functions
The qh.h header file prevents the use of the following functions, which are generally considered unsafe, and prompts you to use safer alternatives provided in libc: strtok(), strcpy(), strcat(), strncpy(), strncat(), gets(), and mktemp().
It also prevents the use of the following functions because they cannot be used according to the QNX coding standard in addition to being unsafe: atoi(), atol(), atoll(), and atof().
- To allow the set of unsafe functions (strtok(), strcpy(), and so on) to be used, define QH_ALLOW_UNSAFE before you include any of the QNX helpers header files.
- To allow the set of functions forbidden by the QNX coding standard (atoi(), atol(),and so on) define QH_BYPASS_CS_RULES before you include any of the QNX helpers header files.
Page updated:
