I grabbed Xorg's 7.X beta-1. Got as far as xorg-server when something like the following appeared:
Code:
/usr/include/linux/agpart.h: 55: parse error before __u16
/usr/include/linux/agpart.h: 61: parse error before __u32
Naturaly, I assumed its a problem with Xorg7, especially being Beta! However, looking at the file that was giving the problem
xorg-server-*/hw/xfree86/os-support/linux/lnx_agp.c, where the following was declared:
Code:
struct _agp_info agpinf;
I could not find anything wrong here, so I looked into the <linux/agpart.h> file. Nothing seemed wrong here. Further searching I found myself inside <linux/types.h> where __u16 and __u32 are declared. And found that I had to go to <stdint.h> to find where u_int16_t and u_int32_t are defined.
I found those simply mean:
unsigned short int for 16-bit unsigned integer, and the
unsigned int for the 32-bit unsigned integer.
I then changed all occurances of
__u16 to
unsigned short int and
__u32 to
unsigned int in
/usr/include/linux/agpart.h.
I tried make again under the xorg-server tree, and this time it went through without any errors.
The following Defines seem to be of possible importance:
__int8_t_defined from <stdint.h>
__KERNEL_STRICT_NAMES from <linux/types.h>
__BIT_TYPES_DEFINED__ from <linux/types.h>
I also noticed that
__u16 and
__u32 are declared twice in this file. Once under the
__BIT_TYPES_DEFINED__ and then a second time immediately under the endif of
__BIT_TYPES_DEFINED__, and
__BIT_TYPES_DEFINED__ has no #else declared.
The
__BIT_TYPES_DEFINED__ declares
__u16 and
__u32 to different typedefs that can be found in <sys/types.h>, which end up being the same structure as those in <stdint.h>
What is going on here?
Does Xorg have to include a certain #define?
Almost forgot, kernel version: 2.6.13.4
- Kevin Day