[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#182750: libc6-dev: errno.h and unistd.h are empty except for reincluding themselves?



Hello!

I think, that it is a gcc-3.2 bug, not a libc6-dev bug.

Anyway, here is my little program:
#include <unistd.h>

int main()
{
        return 0;
}

And here is the probes:
errge@lisa:~/proba$ gcc -Wall alma.c
errge@lisa:~/proba$ gcc -Wall -I/usr/include alma.c
errge@lisa:~/proba$ gcc -Wall -I/usr/include/sys -I/usr/include alma.c
In file included from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
.
.
.
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from alma.c:1:
/usr/include/sys/unistd.h:1:10: #include nested too deeply
errge@lisa:~/proba$ gcc -Wall -I/usr/include -I/usr/include/sys alma.c
In file included from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
.
.
.
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from /usr/include/sys/unistd.h:1,
                 from alma.c:1:
/usr/include/sys/unistd.h:1:10: #include nested too deeply

I think that the first, second and third is normal. The first and
second is OK.  In the third we say, that /usr/include/sys is more
important then /usr/include, so the recursion is OK. But in the fourth
case it is wrong, because the /usr/include/unistd.h should be included
instead of /usr/include/sys/unistd.h.

I probed it out with woody, and woody's gcc and gcc-3.0 works ok, so
it compiles the first, second and fourth case, but not the third. But
gcc-3.2 in sid is wrong.

If you also think, that it is a gcc bug and agrees with me, please
reassign this bug, so it can be fixed.

Oh, and a fast workaround for openafs:
cd /usr/include/sys
for i in signal errno unistd ; do mv $i.h $i.old.h ; ln -s /usr/include/$i.h $i.h ; done

I also had to modify openafs/include/afs/afsutil.h slightly, but it is
another (openafs) story...

Thanks,
Gergely



Reply to: