Jeremy C. Reed wrote:
On Fri, 25 Nov 2005, Brian Paul wrote:

I received the following failure when building latest X.org from CVS. This is on NetBSD/i386 2.0.2 with GCC 3.3.3. It has the same error seven times when attempting to build different "mesa" parts for the Xserver.


In file included from /usr/include/wchar.h:73,
                 from /usr/include/inttypes.h:44,
                 from glheader.h:83,
                 from dispatch.c:42:
/usr/include/stdio.h:63: error: conflicting types for `XF86fpos_t'
../../../../../programs/Xserver/include/xf86_libc.h:71: error: previous declaration of `XF86fpos_t'


The update of Mesa from 6.2 to 6.4 in X.org a while back is probably the difference.

I suspect the #include of "inttypes.h" is the culprit. Though, I have no idea how the XF86fpos_t type factors into this. Does stdio.h really define XF86fpos_t??? I'd be curious to see your stdio.h file.


It is not defined in it. My stdio.h is at
 http://cvsweb.netbsd.org/bsdweb.cgi/src/include/stdio.h
It is revision 1.53.2.1.

Anyway, Mesa includes inttypes.h to get the uintptr_t type. uintptr_t is defined to be an integer type large enough to hold a pointer. Looks like Karl Schultz added this back in May to get things to work on Win64.

The simplest solution might be to use something like this in glheader.h:

#ifdef BSD
typedef unsigned long int uintptr_t;
#else
#incldude <inttypes.h>
#endif


Thank you Brian. The above did not work (even without typo) as I got a:

../../../extras/Mesa/src/mesa/main/glheader.h:84: error: conflicting types for `
__uintptr_t'
/usr/include/machine/int_types.h:64: error: previous declaration of `__uintptr_t
'

But the following did work for me:

--- extras/Mesa/src/mesa/main/glheader.h 9 Nov 2005 01:14:47 -0000 1.1.1.5
+++ extras/Mesa/src/mesa/main/glheader.h    27 Nov 2005 02:44:50 -0000
@@ -80,8 +80,12 @@
 #include <stdint.h>
 #endif
 #else
+#if defined(__NetBSD__)
+#include <stdint.h>
+#else
 #include <inttypes.h>
 #endif
+#endif

#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
 #  define __WIN32__


Can someone please check this and commit as appropriate?

I'm checking in a variation of what you showed above.

-Brian



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to