On Saturday 03 September 2005 19:33, Kyle Moffett wrote: > On Sep 3, 2005, at 11:36:22, Denis Vlasenko wrote: > > Is this an exercise in academia? Userspace app which defines > > uint32_t to anything different than 'typedef <appropriate int type>' > > deserves the punishment, and one which does have such typedef > > instead of #include stdint.h will not notice. > > That's not the issue. Say I do this (which is perfectly valid on > most platforms): > > typedef unsigned int uint32_t; > #include <linux/loop.h> > > What exactly should happen? If linux/loop.h includes stdint.h to get > uint32_t, then I'll get duplicate definition errors. If it omits > stdint.h, then uint16_t won't be defined (because the userspace app > doesn't think that it needs it) and I'll get undefined type errors.
I vote for a second choice. Do not #include stdint.h from the loop.h (i.e. loop.h assumes that it is included (or unit32_t typedef'ed), but doesn't do it itself). -- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/