Duplicate definitions of __NFDBITS, __FDELT, __FDMASK

bgat@billgatliff.com bgat@billgatliff.com
Wed Jun 13 19:32:00 GMT 2001


> Bill, here's a good one for you....


> Unfortunately when I try to build up util-linux-2.11 to create the
> mount utilities and friends, the compiliation complains that
> __NFDBITS and __FDMASK() are being redefined.  It turns out that the
> <sys/select.h> in glibc-2.2.2 (misc/sys/select.h) doesn't check to
> see if they have been defined before, and in this case they were
> already defined because <linux/posix_type.h> defined them.  Now the
> big question is who should define them????

According to the comments at the top of posix_type.h, NFDBITS is the
bit size of the OS's file descriptor.  Since the OS must implement and
understand a file descriptor, it *seems* like glibc should defer to

Ooh!  I just glanced at your build log again (thanks very much for
including useful information with your question!), and noticed that it
mentions sys-include.  I always torch that directory after building a
linux/glibc setup, because I get all kinds of confusing behavior

(Does build-crossgcc.sh leave sys-include around?  Shame on me!)

I think the actual problem relates to the fixincludes confusion that
Kai has been describing lately.  See, Kai: I *do* read your posts!

Move sys-include out of the way, and try again.  I can't imagine that
such an error would have gone unnoticed in glibc, so I'm thinking that
sys-include is the culprit here.

HTH, anyone else have anything to add?

Bill Gatliff

Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

More information about the crossgcc mailing list