summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c5
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h5
-rw-r--r--src/mesa/drivers/dri/common/mmio.h10
-rw-r--r--src/mesa/drivers/dri/common/utils.c22
-rw-r--r--src/mesa/drivers/dri/common/utils.h2
5 files changed, 22 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 88caa34e94..33facbbf6c 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -27,13 +27,16 @@
#ifdef GLX_DIRECT_RENDERING
-#include <inttypes.h>
#include <assert.h>
#include <stdarg.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdio.h>
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+
#ifndef DRI_NEW_INTERFACE_ONLY
# include <X11/Xlibint.h>
# include <Xext.h>
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index f85a2fb68e..534a26785e 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -53,7 +53,6 @@
#define CAPI /* XXX this should be globally defined somewhere */
-#include <inttypes.h>
#ifdef DRI_NEW_INTERFACE_ONLY
# include <GL/gl.h>
#else
@@ -208,7 +207,7 @@ struct __DRIswapInfoRec {
/**
* Number of swapBuffers operations that have been *completed*.
*/
- uint64_t swap_count;
+ u_int64_t swap_count;
/**
* Unadjusted system time of the last buffer swap. This is the time
@@ -222,7 +221,7 @@ struct __DRIswapInfoRec {
* swap, it has missed its deadline. If swap_interval is 0, then the
* swap deadline is 1 frame after the previous swap.
*/
- uint64_t swap_missed_count;
+ u_int64_t swap_missed_count;
/**
* Amount of time used by the last swap that missed its deadline. This
diff --git a/src/mesa/drivers/dri/common/mmio.h b/src/mesa/drivers/dri/common/mmio.h
index 1418543dc5..a9bdce42bf 100644
--- a/src/mesa/drivers/dri/common/mmio.h
+++ b/src/mesa/drivers/dri/common/mmio.h
@@ -33,15 +33,13 @@
#ifndef MMIO_H
#define MMIO_H
-#include <inttypes.h>
-
#if defined( __powerpc__ )
-static __inline__ uint32_t
+static __inline__ u_int32_t
read_MMIO_LE32( volatile void * base, unsigned long offset )
{
volatile void * p = ((volatile char *) base) + offset;
- uint32_t val;
+ u_int32_t val;
__asm__ __volatile__( "lwbrx %0, %1, %2 ; eieio"
: "=r" (val)
@@ -51,10 +49,10 @@ read_MMIO_LE32( volatile void * base, unsigned long offset )
#else
-static __inline__ uint32_t
+static __inline__ u_int32_t
read_MMIO_LE32( volatile void * base, unsigned long offset )
{
- volatile uint32_t * p = (volatile uint32_t *) (((volatile char *) base) + offset);
+ volatile u_int32_t * p = (volatile u_int32_t *) (((volatile char *) base) + offset);
return LE32_TO_CPU( p[0] );
}
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 0e8e54a202..fcdd9f8377 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -415,12 +415,12 @@ GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
GLboolean
driFillInModes( __GLcontextModes ** ptr_to_modes,
GLenum fb_format, GLenum fb_type,
- const uint8_t * depth_bits, const uint8_t * stencil_bits,
+ const u_int8_t * depth_bits, const u_int8_t * stencil_bits,
unsigned num_depth_stencil_bits,
const GLenum * db_modes, unsigned num_db_modes,
int visType )
{
- static const uint8_t bits_table[3][4] = {
+ static const u_int8_t bits_table[3][4] = {
/* R G B A */
{ 5, 6, 5, 0 }, /* Any GL_UNSIGNED_SHORT_5_6_5 */
{ 8, 8, 8, 0 }, /* Any RGB with any GL_UNSIGNED_INT_8_8_8_8 */
@@ -431,7 +431,7 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
* Given the four supported fb_type values, this results in valid array
* indices of 3, 4, 5, and 7.
*/
- static const uint32_t masks_table_rgb[8][4] = {
+ static const u_int32_t masks_table_rgb[8][4] = {
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
@@ -442,7 +442,7 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 } /* 8_8_8_8_REV */
};
- static const uint32_t masks_table_rgba[8][4] = {
+ static const u_int32_t masks_table_rgba[8][4] = {
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
@@ -453,7 +453,7 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 }, /* 8_8_8_8_REV */
};
- static const uint32_t masks_table_bgr[8][4] = {
+ static const u_int32_t masks_table_bgr[8][4] = {
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
@@ -464,7 +464,7 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 }, /* 8_8_8_8_REV */
};
- static const uint32_t masks_table_bgra[8][4] = {
+ static const u_int32_t masks_table_bgra[8][4] = {
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
@@ -475,12 +475,12 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, /* 8_8_8_8_REV */
};
- static const uint8_t bytes_per_pixel[8] = {
+ static const u_int8_t bytes_per_pixel[8] = {
0, 0, 0, 2, 2, 4, 0, 4
};
- const uint8_t * bits;
- const uint32_t * masks;
+ const u_int8_t * bits;
+ const u_int32_t * masks;
const int index = fb_type & 0x07;
__GLcontextModes * modes = *ptr_to_modes;
unsigned i;
@@ -490,7 +490,7 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
if ( bytes_per_pixel[ index ] == 0 ) {
fprintf( stderr, "[%s:%u] Framebuffer type 0x%04x has 0 bytes per pixel.\n",
- __func__, __LINE__, fb_type );
+ __FUNCTION__, __LINE__, fb_type );
return GL_FALSE;
}
@@ -528,7 +528,7 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
default:
fprintf( stderr, "[%s:%u] Framebuffer format 0x%04x is not GL_RGB, GL_RGBA, GL_BGR, or GL_BGRA.\n",
- __func__, __LINE__, fb_format );
+ __FUNCTION__, __LINE__, fb_format );
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index 3eaf13f4ca..21d7ad269d 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -64,7 +64,7 @@ extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
extern GLboolean driFillInModes( __GLcontextModes ** modes,
GLenum fb_format, GLenum fb_type,
- const uint8_t * depth_bits, const uint8_t * stencil_bits,
+ const u_int8_t * depth_bits, const u_int8_t * stencil_bits,
unsigned num_depth_stencil_bits,
const GLenum * db_modes, unsigned num_db_modes, int visType );