13. Headers

This section describes how QNX Neutrino conforms to POSIX in header files.

<fenv.h>

The default state of the FENV_ACCESS pragma is off. Note that gcc doesn't currently support this pragma.

<float.h>

The accuracy of of floating point operations and the library functions in <math.h> and <complex.h> is unknown.

The default rounding mode for floating-point addition (FLT_ROUNDS) is 1. No additional values beyond those specified are implemented.

The evaluation format mode (FLT_EVAL_METHOD) is -1 (indeterminable). There are no additional implementation-defined values beyond those specified.

The values of floating-point constants are as follows:

Constant Value
FLT_RADIX 2
FLT_MANT_DIG 24
DBL_MANT_DIG 53
LDBL_MANT_DIG 64
DECIMAL_DIG 21
FLT_DIG 6
DBL_DIG 15
LDBL_DIG 18
FLT_MIN_EXP -125
DBL_MIN_EXP -1021
LDBL_MIN_EXP -16381
FLT_MIN_10_EXP -37
DBL_MIN_10_EXP -307
LDBL_MIN_10_EXP -4931
FLT_MAX_EXP 128
DBL_MAX_EXP 1024
LDBL_MAX_EXP 16384
FLT_MAX_10_EXP 38
DBL_MAX_10_EXP 308
LDBL_MAX_10_EXP 4932
FLT_MAX 3.40282347e+38
DBL_MAX 1.7976931348623157e308
LDBL_MAX 1.189731495357231765e+4932
FLT_EPSILON 1.1920929e-07
DBL_EPSILON 2.2204460492503131e-16
LDBL_EPSILON 1.084202172485504434e-19
FLT_MIN 1.17549435e-38
DBL_MIN 2.2250738585072014e-308
LDBL_MIN 3.362103143112093506e-4932

<limits.h>

The limit values in <limits.h> are implemented as follows:

Limit Value
AIO_LISTIO_MAX Indeterminate
AIO_MAX Indeterminate
AIO_PRIO_DELTA_MAX Indeterminate
ARG_MAX 61440
ATEXIT_MAX 32
CHILD_MAX Indeterminate
DELAYTIMER_MAX 1048576
HOST_NAME_MAX Indeterminate
IOV_MAX Indeterminate
LOGIN_NAME_MAX Indeterminate
OPEN_MAX Determined by the maximum number of file descriptors available to a process.

The default limit is 1000, but this can be altered using a configuration option to the kernel when building the system image.

The minimum value that can be supplied is 100, with no imposed maximum.

A lower limit may be imposed by the process RLIMIT_NOFILE limit.

PAGESIZE 4096
PAGE_SIZE 4096
PTHREAD_DESTRUCTOR_ITERATIONS 4
PTHREAD_KEYS_MAX 128
PTHREAD_STACK_MIN 256
PTHREAD_THREADS_MAX 32767
RE_DUP_MAX 255
RTSIG_MAX 16
SEM_NSEMS_MAX For unnamed semaphores, this is indeterminate.

For named semaphores, the limit is determined by the mqueue server. The maximum is set to 4096, but a lower limit may be imposed by the process RLIMIT_NOFILE limit, as the implementation is via file descriptors.

SEM_VALUE_MAX 1073741824
SIGQUEUE_MAX Indeterminate
SS_REPL_MAX 65535
STREAM_MAX Indeterminate
SYMLOOP_MAX Indeterminate
TIMER_MAX Indeterminate
TTY_NAME_NAME Indeterminate
TZNAME_MAX 30
FILESIZEBITS Depends on the filesystem implementation.

The value for all currently supported filesystems is 32.

LINK_MAX 65535
MAX_CANON Depends on the character device driver.

The default is 256, but may be changed by the -C driver command-line option.

MAX_INPUT Depends on the character device driver.

The default is 256, but may be changed by the -C driver command-line option.

NAME_MAX Depends on the filesystem implementation.

Most filesystems impose a limit of 255; the ETFS filesystem imposes a limit of 91.

PATH_MAX Depends on the filesystem implementation.

Most filesystems impose a limit of 1024; the ETFS filesystem imposes a limit of 255.

PIPE_BUF 512
SYMLINK_MAX Depends on the filesystem implementation.

Most filesystems impose a limit of 1024; the ETFS filesystem imposes a limit of 256.

BC_BASE_MAX 99
BC_DIM_MAX 2048
BC_SCALE_MAX 99
BC_STRING_MAX 1000
CHARCLASS_NAME_MAX 14
COLL_WEIGHTS_MAX 2
EXPR_NEST_MAX 32
LINE_MAX 2048
NGROUPS_MAX 8
RE_DUP_MAX 255
CHAR_BIT 8
CHAR_MAX 127
CHAR_MIN -128
INT_MAX 2147483647
LONG_BIT 32
LONG_MAX 2147483647
MB_LEN_MAX 8
SCHAR_MAX 127
SHRT_MAX 32767
SSIZE_MAX 2147483647
UCHAR_MAX 255
UINT_MAX 4294967295
ULONG_MAX 4294967295
USHRT_MAX 65535
WORD_BIT 32
INT_MIN -2147383648
LONG_MIN -2147383648
SCHAR_MIN -128
SHRT_MIN -32768
LLONG_MIN -9223372036854775808
LLONG_MAX 9223372036854775807
ULLONG_MAX 18446744073709551615

<math.h>

If FLT_EVAL_METHOD has a value other than 0, 1 or 2, the type definitions for float_t and double_t are float and double, respectively.

No implementation-defined floating-point classification macros are defined.

The default state of the FP_CONTRACT pragma is off. Note that gcc doesn't currently support this pragma.

<signal.h>

Realtime signal behavior is supported for signals outside of the range SIGRTMIN through SIGRTMAX.

The following additional signals are defined in <signal.h>:

  • SIGIOT
  • SIGEMT
  • SIGDEADLK
  • SIGCLD (same signal number as SIGCHLD)
  • SIGPWR
  • SIGWINCH
  • SIGIO (same signal number as SIGPOLL)

For more information, see Summary of signals in the Interprocess Communication (IPC) chapter of the System Architecture guide.

<stdint.h>

The limits for specified-width integer types are as follows:

Limit Value
INT8_MIN -128
INT16_MIN -32768
INT32_MIN -2147483648
INT64_MIN -9223372036854775808
INT8_MAX 127
INT16_MAX 32767
INT32_MAX 2147483647
INT64_MAX 9223372036854775807
UINT8_MAX 255
UINT16_MAX 65535
UINT32_MAX 4294967295
UINT64_MAX 18446744073709551615
INT_LEAST8_MIN -128
INT_LEAST16_MIN -32768
INT_LEAST32_MIN -2147483648
INT_LEAST64_MIN -9223372036854775808
INT_LEAST8_MAX 127
INT_LEAST16_MAX 32767
INT_LEAST32_MAX 2147483647
INT_LEAST64_MAX 9223372036854775807
UINT_LEAST8_MAX 255
UINT_LEAST16_MAX 65535
UINT_LEAST32_MAX 4294967295
UINT_LEAST64_MAX 18446744073709551615
INT_FAST8_MIN -128
INT_FAST16_MIN -32768
INT_FAST32_MIN -2147483648
INT_FAST64_MIN -9223372036854775808
INT_FAST8_MAX 127
INT_FAST16_MAX 32767
INT_FAST32_MAX 2147483647
INT_FAST64_MAX 9223372036854775807
UINT_FAST8_MAX 255
UINT_FAST16_MAX 65536
UINT_FAST32_MAX 4294967295
UINT_FAST64_MAX 18446744073709551615
INTPTR_MIN -2147483648
INTPTR_MAX 2147483647
UINTPTR_MAX 4284967295

The values of other integer types are as follows:

Constant Value
PTRDIFF_MIN -2147483648
PTRDIFF_MAX 2147483647
SIG_ATOMIC_MIN -2147483648
SIG_ATOMIC_MAX 2147483647
SIZE_MAX 4284967295

<sys/stat.h>

There are no additional implementation-defined bits that can be ORed into S_IRWXU, S_IRWXG, and S_IRWXO.

<time.h>

The maximum possible clock jump for the system-wide monotonic clock is the same as the system clock resolution:

  • for CPU targets operating at less than 40 MHz, this is 10 milliseconds
  • for CPU targets operating at more than 40 Mhz, this is 1 millisecond

The system clock resolution can be set using the QNX-specific ClockPeriod() kernel call using the CLOCK_REALTIME clock.