Mailinglist Archive: radeonhd (290 mails)
| < Previous | Next > |
Re: [radeonhd] Non-DRI build broken by 2cc9378e ("DRI/2D: Fix build for --disable-dri.")
- From: "Alex Deucher" <alexdeucher@xxxxxxxxx>
- Date: Wed, 6 Aug 2008 10:42:54 -0400
- Message-id: <a728f9f90808060742h1473332coa2dd743e1778dca2@xxxxxxxxxxxxxx>
On Wed, Jul 30, 2008 at 5:43 PM, Egbert Eich <eich@xxxxxxx> wrote:
I can't reproduce any build problems here, but why not just include stdint.h?
Alex
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 5ab4a45..d5ffb8f 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -56,6 +56,7 @@
#include <errno.h>
#include <string.h>
+#include <stdint.h>
/* Driver data structures */
#ifdef USE_XAA
#include "xaa.h"
@@ -73,10 +74,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_accel.h"
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index c8bd434..ac5bc8d 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -33,6 +33,8 @@
#include "config.h"
#endif
+#include <stdint.h>
+
#ifdef USE_XAA
#include "xaa.h"
#endif
@@ -48,10 +50,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_accel.h"
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 46c2f45..79651a1 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -30,6 +30,7 @@
#endif
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
@@ -54,9 +55,6 @@
#ifdef USE_DRI
# include "rhd_cp.h"
#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#include "damage.h"
#endif
diff --git a/src/radeon_video.c b/src/radeon_video.c
index d09144c..5921a95 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -3,6 +3,7 @@
#endif
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
@@ -24,10 +25,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_reg.h"
diff --git a/src/radeon_xaa.c b/src/radeon_xaa.c
index c3325ac..1f9c381 100644
--- a/src/radeon_xaa.c
+++ b/src/radeon_xaa.c
@@ -66,6 +66,7 @@
#include <errno.h>
#include <string.h>
+#include <stdint.h>
/* Driver data structures */
#ifdef USE_XAA
#include "xaa.h"
@@ -83,10 +84,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_accel.h"
Hans Ulrich Niedermann writes:
> Hi,
>
> 2cc9378e contains changes like the following
>
> -#include "rhd_dri.h"
> -#include "rhd_cp.h"
> +#ifdef USE_DRI
> +# include "rhd_dri.h"
> +# include "rhd_cp.h"
> +#else
> +typedef CARD8 uint8_t;
> +typedef CARD16 uint16_t;
> +typedef CARD32 uint32_t;
> +#endif
>
> without checking that uintNN_t are actually undefined.
>
> This makes a build after "configure --disable-dri" fail as
> follows (on my Fedora 9 system), just like IRC user "rbmorse"
> reported about his system:
>
> src/radeon_accel.c:67: error: conflicting types for 'uint32_t'
> /usr/include/stdint.h:52: error: previous declaration of 'uint32_t' was
here
>
> Egbert, for what kinds of systems were those typedefs required,
> and could there be a different way to define uintNN_t for these
> systems?
Honestly I don't know. I've checked the header file which normally includes
/usr/include/stdint.h. It does quite some voodoo to find out on which system
which file is required. I wanted to stay away from this so I wrote up those
simple typedefs.
I don't know if there is a configure rule to test this and frankly I don't
have the time to do any research on this.
I personally would do a string replacement on all those types and replace
them with well known X types.
I can't reproduce any build problems here, but why not just include stdint.h?
Alex
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 5ab4a45..d5ffb8f 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -56,6 +56,7 @@
#include <errno.h>
#include <string.h>
+#include <stdint.h>
/* Driver data structures */
#ifdef USE_XAA
#include "xaa.h"
@@ -73,10 +74,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_accel.h"
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index c8bd434..ac5bc8d 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -33,6 +33,8 @@
#include "config.h"
#endif
+#include <stdint.h>
+
#ifdef USE_XAA
#include "xaa.h"
#endif
@@ -48,10 +50,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_accel.h"
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 46c2f45..79651a1 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -30,6 +30,7 @@
#endif
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
@@ -54,9 +55,6 @@
#ifdef USE_DRI
# include "rhd_cp.h"
#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#include "damage.h"
#endif
diff --git a/src/radeon_video.c b/src/radeon_video.c
index d09144c..5921a95 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -3,6 +3,7 @@
#endif
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
@@ -24,10 +25,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_reg.h"
diff --git a/src/radeon_xaa.c b/src/radeon_xaa.c
index c3325ac..1f9c381 100644
--- a/src/radeon_xaa.c
+++ b/src/radeon_xaa.c
@@ -66,6 +66,7 @@
#include <errno.h>
#include <string.h>
+#include <stdint.h>
/* Driver data structures */
#ifdef USE_XAA
#include "xaa.h"
@@ -83,10 +84,6 @@
#ifdef USE_DRI
# include "rhd_dri.h"
# include "rhd_cp.h"
-#else
-typedef CARD8 uint8_t;
-typedef CARD16 uint16_t;
-typedef CARD32 uint32_t;
#endif
#include "radeon_accel.h"
| < Previous | Next > |