Bug? Inconsistency between multiple versions of "limits.h"

The QNX 2.60 distribution has multiple versions
of “limits.h”, and there are some inconsistencies
between them. There’s one in

/usr/lib/gcc-lib/ntox86/2.95.3/include

(which is the only place in /usr that has “new” and “new.h”),
and there’s the main one in

/usr/include/sys

They’re different, which isn’t unreasonable, since one
is machine-specific.

The problem is that if I have

/usr/lib/gcc-lib/ntox86/2.95.3/include

in my search path, the “limits.h” from there is pulled
in by “sys/neutrino.h”. But that “limits.h”
doesn’t define “NGROUPS_MAX”, which “neutrino.h” needs.

The Standard Template Library requires “new.h”.
So using the STL and Neutrino calls in the same program
seems to yield an include conflict.

A workaround is to copy “new”, “new.h”, and
“exception” from

/usr/lib/gcc-lib/ntox86/2.95.3/include

to some place in the current project. There are
no machine dependencies in those files; they don’t
need to be per-platform includes.

Is this is a bug, or am I missing something?

John Nagle
Animats

John Nagle wrote:

The QNX 2.60 distribution has multiple versions

Correction, 6.20. Sorry