Rename _mesa_IsProgram() to _mesa_IsProgramARB() to avoid collision with the
[mesa.git] / src / mesa / main / glheader.h
index 0b1c16d2444c7813bf34e228999150ddeab1f06c..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>
 #include <stdarg.h>
 
 
-/* This is no longer uses since we dumped autoconf/automake! */
-#ifdef HAVE_CONFIG_H
-#include "conf.h"
-#endif
-
-
 /* Get typedefs for uintptr_t and friends */
-#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
-#include <BaseTsd.h>
+#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)
 #endif /* WIN32 / CYGWIN bracket */
 
 
-#ifndef __MINGW32__
-/* XXX why is this here?
- * It should probaby be somewhere in src/mesa/drivers/windows/
- */
-/* compatibility guard so we don't need to change client code */
-#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_WINDEF_H) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
-typedef INT_PTR (GLAPIENTRY *PROC)();
-typedef unsigned long COLORREF;
-#endif
-
-
-/* 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!
@@ -183,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 */
@@ -277,6 +242,19 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
 #  define __builtin_expect(x, y) x
 #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 __STDC_VERSION__ < 199901L
+# if ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \
+      (!defined(_MSC_VER) || _MSC_VER < 1300)
+#  define __FUNCTION__ "<unknown>"
+# endif
+#endif
+
 
 #include "config.h"