Navigation Menu

Skip to content

Commit

Permalink
More Windows patches.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 30, 2008
1 parent 638aeaa commit 745168f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -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})
Expand Down
4 changes: 4 additions & 0 deletions finderrors.c
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions mojoshader_opengl.c
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions testparse.c
Expand Up @@ -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)
Expand Down

0 comments on commit 745168f

Please sign in to comment.