Is there a way to get cc to set __STDC__?
On the internet, nobody knows you're a jerk.
I've been working on a program to display process trees dynamically to
work non-suid for Solaris 2.6 and up. I've been getting compiler
errors with egcs (the only compiler I have and have tried) because
lots of typedefs are missing such as for sigset_t and uint64_t (used
In /usr/include/sys/int_types.h we have
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
typedef unsigned long long uint64_t;
Looking at /usr/include/sys/signal.h we have:
#if defined(__EXTENSIONS__) || (__STDC__ - 0 == 0) || ...
Actually, the C-Preprocssor logic for sigset_t in sys/signal.h is
so complicated that I really have a hard time pinpointing why it is
not defined, other than knowing that you can #define __EXTENSIONS__ or
#define __STDC__ 0 and that will work.
Anyway, the question is what are the various meanings of the values of
__STDC__? Is this documented somewhere?