Red Hat Bugzilla – Bug 3020
bad define of pid_t in signal.h
Last modified: 2008-05-01 11:37:50 EDT
signal.h, from glibc-devel-2.1.1-6, has this around line 60:
#if defined __USE_XOPEN && !defined pid_t
typedef __pid_t pid_t;
# define pid_t pid_t
#endif /* Unix98 */
The "#define pid_t pid_t" causes an error "macro or
'#include' recursion too deep" when something tries to use
it (apparently with USE_XOPEN) is defined. I noticed this
when trying to build CFS (cryptographic file system).
Doing a grep for "define pid_t pid_t" shows that it also
happens in termios.h and unistd.h...
More things like this cause CFS compilation to break. I found more
recursive pid_t defines in sys/stat.h , sys/types.h, and sys/wait.h.
And, there is a similar problem with ssize_t, in unistd.h and
This seems to happen all over the header files with various types. Is
this a glibc header problem or a compiler problem? Seems like a
poorly thought out header problem even if they were assuming the
compiler wouldn't recusively interpret defines...
What are the compile flags used by those programs? ANSI C certainly
does not forbid
#define foo foo