Browse Source

Windows: MSVC compatibility

pull/21/merge
Dave Cottlehuber 13 years ago
committed by Paul J. Davis
parent
commit
3958170fd7
2 changed files with 8 additions and 0 deletions
  1. +4
    -0
      c_src/decoder.c
  2. +4
    -0
      c_src/encoder.c

+ 4
- 0
c_src/decoder.c View File

@ -16,6 +16,10 @@
#define STACK_SIZE_INC 64 #define STACK_SIZE_INC 64
#define NUM_BUF_LEN 32 #define NUM_BUF_LEN 32
#ifdef WINDOWS || WIN32
#define snprintf _snprintf
#endif
enum { enum {
st_value=0, st_value=0,
st_object, st_object,

+ 4
- 0
c_src/encoder.c View File

@ -20,6 +20,10 @@ do { \
} \ } \
} while(0) } while(0)
#ifdef WINDOWS || WIN32
#define inline __inline
#define snprintf _snprintf
#endif
typedef struct { typedef struct {
ErlNifEnv* env; ErlNifEnv* env;

Loading…
Cancel
Save