summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-08-07 09:12:55 +0100
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-08-12 13:00:18 +0100
commit3b5ee3d6de2c08faf69c701bf05d8f33ccd01502 (patch)
treebdba208232556589f964981fb9bd12730e359a11 /src
parentcf16285d1bcb9f172a930f9d4f3402e379b53c33 (diff)
gallium: Allow compilation inside X.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_string.h12
-rw-r--r--src/gallium/include/pipe/p_compiler.h5
2 files changed, 11 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h
index abc3232b49..08c89bbf77 100644
--- a/src/gallium/auxiliary/util/u_string.h
+++ b/src/gallium/auxiliary/util/u_string.h
@@ -28,14 +28,14 @@
/**
* @file
* Platform independent functions for string manipulation.
- *
+ *
* @author Jose Fonseca <jrfonseca@tungstengraphics.com>
*/
#ifndef U_STRING_H_
#define U_STRING_H_
-#ifndef WIN32
+#if !defined(WIN32) && !defined(XF86_LIBC_H)
#include <stdio.h>
#endif
#include <stddef.h>
@@ -48,19 +48,19 @@
extern "C" {
#endif
-
+
#ifdef WIN32
-
+
int util_vsnprintf(char *, size_t, const char *, va_list);
int util_snprintf(char *str, size_t size, const char *format, ...);
-static INLINE void
+static INLINE void
util_vsprintf(char *str, const char *format, va_list ap)
{
util_vsnprintf(str, (size_t)-1, format, ap);
}
-static INLINE void
+static INLINE void
util_sprintf(char *str, const char *format, ...)
{
va_list ap;
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 2afb8464c7..4d64c74a4a 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -31,8 +31,13 @@
#include "p_config.h"
+#ifndef XFree86Server
#include <stdlib.h>
#include <string.h>
+#else
+#include "xf86_ansic.h"
+#include "xf86_libc.h"
+#endif
#if defined(_WIN32) && !defined(__WIN32__)