Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Visual C++ fixes.
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 30, 2008
1 parent cce0ae4 commit 948a35e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
11 changes: 10 additions & 1 deletion mojoshader.c
Expand Up @@ -20,7 +20,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <assert.h>

Expand Down Expand Up @@ -52,9 +51,19 @@
// Get basic wankery out of the way here...

typedef unsigned int uint; // this is a printf() helper. don't use for code.

#ifdef _MSC_VER
#define snprintf _snprintf
typedef unsigned __int8 uint8;
typedef unsigned __int32 uint32;
typedef unsigned __int32 int32;
typedef
#else
#include <stdint.h>
typedef uint8_t uint8;
typedef uint32_t uint32;
typedef int32_t int32;
#endif

#ifdef __GNUC__
#define ISPRINTF(x,y) __attribute__((format (printf, x, y)))
Expand Down
15 changes: 12 additions & 3 deletions mojoshader_opengl.c
Expand Up @@ -10,7 +10,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <assert.h>

Expand All @@ -21,12 +20,22 @@

// Get basic wankery out of the way here...

#define STATICARRAYLEN(x) ( (sizeof ((x))) / (sizeof ((x)[0])) )

typedef unsigned int uint; // this is a printf() helper. don't use for code.

#ifdef _MSC_VER
#define snprintf _snprintf
typedef unsigned __int8 uint8;
typedef unsigned __int32 uint32;
typedef unsigned __int32 int32;
typedef
#else
#include <stdint.h>
typedef uint8_t uint8;
typedef uint32_t uint32;
typedef int32_t int32;
#endif

#define STATICARRAYLEN(x) ( (sizeof ((x))) / (sizeof ((x)[0])) )

struct MOJOSHADER_glShader
{
Expand Down

0 comments on commit 948a35e

Please sign in to comment.