Why are lots of typedefs not defined unless __STDC__ == 0 on Solaris 2.6?

Why are lots of typedefs not defined unless __STDC__ == 0 on Solaris 2.6?

Post by R. Bernste » Fri, 05 Feb 1999 04:00:00



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
by "sys/procfs.h").

In /usr/include/sys/int_types.h we have
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
typedef unsigned long long      uint64_t;
#endif

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?

 
 
 

1. Why are lots of typedefs not defined unless __STDC__ == 0 on 2.6?

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
by "sys/procfs.h").

In /usr/include/sys/int_types.h we have
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
typedef unsigned long long      uint64_t;
#endif

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?

2. [Fwd: Eh, bug in info viewer!]

3. why isn't __STDC__ being defined?

4. ANNON CVS in CHROOT environment

5. Why Wont X Run Unless I am Root?

6. Window Maker on Sol Sparc - What version to use?

7. Xnest why not shiped in Solaris 2.6?

8. operating system Y2K readiness

9. Solaris 2.6: lot of Ierrs

10. Lots of input errors hme Solaris 2.6

11. Why am I using lots of swap with plenty of RAM free?

12. Solaris 2.6 X86 spends a lot of time recognizing the configuration

13. Solaris 2.6 #define