On Mon, Dec 15, 2008 at 10:26:27PM +0100, Thomas Hellström wrote: > Hi! > > Sam Ravnborg wrote: > >On Sun, Dec 14, 2008 at 04:57:34PM +0100, Thomas Hellström wrote: > > > >>Hi! > >> > >>The intention is for via_drm.h to be self-containing when included both > >>for a kernel build and for a user-space build. In this particular case, > >>via_drmclient.h lives in the user-space clients and includes stdint.h to > >>get access to uint32_t and friends. > >> > >>Of course, the user-space clients could > >>#include "uint32.h" > >>#include "via_drm.h" > >> > >>but shouldn't really the tools be mimicing what the compiler does in > >>this case? > >> > > > >The kernel headers and thus the kernel ABI is separate and ideally > >they should not depend on any other header files to provide anything. > > > >This is why __u32, __u64 etc are preferred in the kernel ABI > >and not uint32_t as used by the drm headers. > > > >We do not adhere to this as a strict rule (yet). > >But if you do: > > > >grep -l uint32_t usr/include/linux > > > >then you will only see 7 hits. Out of 368 files. > >So we are not bad in this respect. > > > >For drm the fix seems simple - just replace all of uint32_t with __u32. > >likewise for the other 32 bit and the 64 bit variants. > > > I'm not sure that's possible, as these header files are shared with *BSD > (and possibly Solaris). I dunno about *BSD and solaris.
But other linux ABI header files do: #include <linux/types.h> To get access to these basic types. And we could do the same for drm if the other systems does not prevent it. Sam ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel