From 3df85f4a9bb9f2a35d0337ebabaafb8a67a450a5 Mon Sep 17 00:00:00 2001 From: ikits Date: Tue, 27 Jan 2004 19:55:29 +0000 Subject: [PATCH] added ptrdiff_t definition on windows git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@197 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/src/glew_gl.c | 1 + auto/src/glew_pre.h | 22 +++++++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/auto/src/glew_gl.c b/auto/src/glew_gl.c index 071d53e..a4a29ca 100644 --- a/auto/src/glew_gl.c +++ b/auto/src/glew_gl.c @@ -70,6 +70,7 @@ static GLuint _glewInit () GLEW_VERSION_1_2 = GL_TRUE; GLEW_VERSION_1_3 = GL_TRUE; GLEW_VERSION_1_4 = GL_TRUE; + GLEW_VERSION_1_5 = GL_TRUE; } if (s[2] == '4') { diff --git a/auto/src/glew_pre.h b/auto/src/glew_pre.h index f659b54..957f4e7 100644 --- a/auto/src/glew_pre.h +++ b/auto/src/glew_pre.h @@ -124,19 +124,15 @@ # define _WCHAR_T_DEFINED # endif #endif - -/* - * FIXME: the definition of ptrdiff_t is needed here, it's found in - * stddef.h. - * - * Since Windows doesn't actually _run_ on anything but PCs this will do - * for now. - * - * What does the compiler define when the target is a 64 bit platform - * anyway? WIN64? - */ - -typedef int ptrdiff_t; +/* */ +#ifndef _PTRDIFF_T_DEFINED +# ifdef _WIN64 +typedef __int64 ptrdiff_t; +# else +typedef _W64 int ptrdiff_t; +# endif +# define _PTRDIFF_T_DEFINED +#endif #ifndef GLAPI # if defined(__CYGWIN__) || defined(__MINGW32__)