As someone who builds libdrm with a non-gcc compiler, this bit
of drm.h fills my build logs with lots of noise - is it still
needed in the post-libc-unwrapped X server world?   Can it just
become a simple #define DRM_SIZE_T size_t now?   (Is that the
"real fix" referred to in the comment?  If not, what is?)

/* This is beyond ugly, and only works on GCC.  However, it allows me to use
 * drm.h in places (i.e., in the X-server) where I can't use size_t.  The real
 * fix is to use uint32_t instead of size_t, but that fix will break existing
 * LP64 (i.e., PowerPC64, SPARC64, IA-64, Alpha, etc.) systems.  That *will*
 * eventually happen, though.  I chose 'unsigned long' to be the fallback type
 * because that works on all the platforms I know about.  Hopefully, the
 * real fix will happen before that bites us.
 */

#ifdef __SIZE_TYPE__
# define DRM_SIZE_T __SIZE_TYPE__
#else
# warning "__SIZE_TYPE__ not defined.  Assuming sizeof(size_t) ==
sizeof(unsigned long)!"
# define DRM_SIZE_T unsigned long
#endif

-- 
        -Alan Coopersmith-           [EMAIL PROTECTED]
         Sun Microsystems, Inc. - X Window System Engineering


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to