Rename _mesa_IsProgram() to _mesa_IsProgramARB() to avoid collision with the
[mesa.git] / src / mesa / main / glheader.h
index ee34076fb747515b96fb64a4c94a7d443d1c4b3a..e37499e4be7eb17117ac3371bf458350577b922a 100644 (file)
@@ -20,7 +20,7 @@
 
 /*
  * Mesa 3-D graphics library
- * Version:  6.3
+ * Version:  6.5
  *
  * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
  *
 #ifndef GLHEADER_H
 #define GLHEADER_H
 
+#ifdef HAVE_DIX_CONFIG_H
+#include "dix-config.h"
+#endif
 
-#if defined(XFree86LOADER) && defined(IN_MODULE)
+#if defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER)
 #include "xf86_ansic.h"
 #else
 #include <assert.h>
 
 
 /* Get typedefs for uintptr_t and friends */
-#if defined(_WIN32)
-#include <BaseTsd.h>
-#if _MSC_VER == 1200
-typedef UINT_PTR uintptr_t;
-#endif 
-#if defined(__MINGW32__)
-#include <stdint.h>
-#endif
+#if defined(__MINGW32__) || defined(__NetBSD__)
+#  include <stdint.h>
+#elif defined(_WIN32)
+#  include <BaseTsd.h>
+#  if _MSC_VER == 1200
+     typedef UINT_PTR uintptr_t;
+#  endif 
 #else
-#include <inttypes.h>
+#  include <inttypes.h>
 #endif
 
 #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
@@ -118,32 +120,6 @@ typedef UINT_PTR uintptr_t;
 #endif /* WIN32 / CYGWIN bracket */
 
 
-#ifndef __MINGW32__
-/* XXX why is this here?
- * It should probaby be somewhere in src/mesa/drivers/windows/
- */
-#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_WINGDI_H) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(BUILD_FOR_SNAP) 
-#      define WGL_FONT_LINES      0
-#      define WGL_FONT_POLYGONS   1
-#ifndef _GNU_H_WINDOWS32_FUNCTIONS
-#      ifdef UNICODE
-#              define wglUseFontBitmaps  wglUseFontBitmapsW
-#              define wglUseFontOutlines  wglUseFontOutlinesW
-#      else
-#              define wglUseFontBitmaps  wglUseFontBitmapsA
-#              define wglUseFontOutlines  wglUseFontOutlinesA
-#      endif /* !UNICODE */
-#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
-typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
-typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
-typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
-#if !defined(GLX_USE_MESA)
-#include <GL/mesa_wgl.h>
-#endif
-#endif
-#endif /* !__MINGW32__ */
-
-
 /*
  * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN.
  * Do not use them unless absolutely necessary!
@@ -173,7 +149,6 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
 #if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP)
 #define CAPI _cdecl
 #endif
-#include <GL/internal/glcore.h>
 
 
 /* This is a macro on IRIX */
@@ -267,28 +242,17 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
 #  define __builtin_expect(x, y) x
 #endif
 
-/* Windows does not have the ffs() function */
-#if defined(_WIN32) && !defined(__MINGW32__)
-int INLINE ffs(int value)
-{
-    int bit;
-    if (value == 0)
-       return 0;
-    for (bit=1; !(value & 1); bit++)
-       value >>= 1;
-    return bit;
-}
-#endif
-
-
 /* The __FUNCTION__ gcc variable is generally only used for debugging.
  * If we're not using gcc, define __FUNCTION__ as a cpp symbol here.
  * Don't define it if using a newer Windows compiler.
  */
 #if defined(__VMS)
-#define __FUNCTION__ "VMS$NL:"
-#elif !(defined(__GNUC__) && __GNUC__ >= 2) && !(defined(_MSC_VER) && _MSC_VER >= 1300)
-#define __FUNCTION__ "unknown"
+# define __FUNCTION__ "VMS$NL:"
+#elif __STDC_VERSION__ < 199901L
+# if ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \
+      (!defined(_MSC_VER) || _MSC_VER < 1300)
+#  define __FUNCTION__ "<unknown>"
+# endif
 #endif