Using qh.h

Updated: April 19, 2023

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().