swrast: fix glDrawBuffer(GL_FRONT_AND_BACK)
[mesa.git] / include / GL / glut.h
index f574f1d61c7f4f9aef2bb8d8e873a76d9ef06859..9fdb9cfdfa976adb3fee0db777fa2d5166c852bd 100644 (file)
@@ -25,7 +25,7 @@ extern "C" {
 
 /* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA
    in your compile preprocessor options. */
-# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA)
+# if defined(_MSC_VER) && !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA)
 #  pragma comment (lib, "winmm.lib")      /* link with Windows MultiMedia lib */
 /* To enable automatic SGI OpenGL for Windows library usage for GLUT,
    define GLUT_USE_SGI_OPENGL in your compile preprocessor options.  */
@@ -74,23 +74,9 @@ extern "C" {
 #  define __cdecl
 #  define GLUT_DEFINED___CDECL
 # endif
-# ifndef _CRTIMP
-#  ifdef _NTSDK
-    /* Definition compatible with NT SDK */
-#   define _CRTIMP
-#  else
-    /* Current definition */
-#   ifdef _DLL
-#    define _CRTIMP __declspec(dllimport)
-#   else
-#    define _CRTIMP
-#   endif
-#  endif
-#  define GLUT_DEFINED__CRTIMP
-# endif
-# ifndef GLUT_BUILDING_LIB
-extern _CRTIMP void __cdecl exit(int);
-# endif
+#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
+#include <stdlib.h>
+#endif
 
 /* GLUT callback calling convention for Win32. */
 # define GLUTCALLBACK __cdecl
@@ -122,7 +108,7 @@ extern _CRTIMP void __cdecl exit(int);
 #  define GLUTAPIENTRY
 #  define GLUTAPIENTRYV
 #  define GLUTCALLBACK
-#  define GLUTAPI __attribute__((visibility("default")))
+#  define GLUTAPI extern __attribute__((visibility("default")))
 
 #else