2 * Mesa 3-D graphics library
4 * Copyright (C) 1995-2004 Brian Paul
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * This file allows the GLU code to be compiled either with the Mesa
24 * headers or with the real OpenGL headers.
37 #if defined(_WIN32) && !defined(__WIN32__)
41 #if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
42 # pragma warning( disable : 4068 ) /* unknown pragma */
43 # pragma warning( disable : 4710 ) /* function 'foo' not inlined */
44 # pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
45 # pragma warning( disable : 4127 ) /* conditional expression is constant */
46 # if defined(MESA_MINWARN)
47 # pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
48 # pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
49 # pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
50 # pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
51 # pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
53 # define GLCALLBACK __stdcall
54 # if defined(__CYGWIN__)
55 # define GLCALLBACKPCAST *
57 # define GLCALLBACKPCAST __stdcall *
60 /* non-Windows compilation */
62 # define GLCALLBACKPCAST *
63 #endif /* WIN32 / CYGWIN bracket */
65 /* compatability guard so we don't need to change client code */
67 #if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
68 # define CALLBACK GLCALLBACK
73 #ifndef GLU_TESS_ERROR9
74 /* If we're using the real OpenGL header files... */
75 # define GLU_TESS_ERROR9 100159
79 #define GLU_NO_ERROR GL_NO_ERROR
84 #define MEMCPY( DST, SRC, BYTES) \
85 memcpy( (char *) (DST), (char *) (SRC), (int) (BYTES) )
87 #define MEMCPY( DST, SRC, BYTES) \
88 memcpy( (void *) (DST), (void *) (SRC), (size_t) (BYTES) )