Skip to content
Permalink
Browse files
More Windows patches.
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 30, 2008
1 parent 638aeaa commit 745168fb2b47aef9b7fc70e52828a3b2aed321af
Showing with 17 additions and 0 deletions.
  1. +5 −0 CMakeLists.txt
  2. +4 −0 finderrors.c
  3. +5 −0 mojoshader_opengl.c
  4. +3 −0 testparse.c
@@ -8,6 +8,11 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
# testparse uses this when I'm looking at memory usage patterns.
#ADD_DEFINITIONS(-DMOJOSHADER_DEBUG_MALLOC=1)

IF(MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS=1)
ADD_DEFINITIONS(-TP) # force .c files to compile as C++.
ENDIF(MSVC)

FIND_PACKAGE(SDL)
IF(SDL_FOUND)
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
@@ -24,6 +24,10 @@
#include "SDL.h"
#endif

#ifdef _MSC_VER
#define snprintf _snprintf
#endif

#define report printf

static int do_dir(const char *dname, const char *profile)
@@ -13,6 +13,11 @@
#include <stdarg.h>
#include <assert.h>

#ifdef _MSC_VER
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h> // GL headers need this for WINGDIAPI definition.
#endif

#include "mojoshader.h"
#define GL_GLEXT_LEGACY 1
#include "GL/gl.h"
@@ -11,6 +11,9 @@
#include <stdlib.h>
#include "mojoshader.h"

#ifdef _MSC_VER
#define snprintf _snprintf
#endif

#if MOJOSHADER_DEBUG_MALLOC
static void *Malloc(int len)

0 comments on commit 745168f

Please sign in to comment.