Skip to content

Commit

Permalink
Fix MSVC builds
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed May 16, 2018
1 parent b8c4346 commit 612e10f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Codec/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#ifdef _WIN32
#include <windows.h>
#define PATH_MAX MAX_PATH
#endif

#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion Codec/demosaicframes.c
Original file line number Diff line number Diff line change
Expand Up @@ -5022,7 +5022,7 @@ float *LoadCube64_3DLUT(DECODER *decoder, CFHDDATA *cfhddata, int *lutsize)
bool useLUT = false;
CFLook_Header CFLKhdr;
char crcname[256];
FILE *fp;
FILE *fp = NULL;
int err = 0;

if (cfhddata->user_look_CRC != 0 && decoder)
Expand Down
1 change: 1 addition & 0 deletions Codec/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#ifdef _WIN32
#include <windows.h>
#define PATH_MAX MAX_PATH
#elif __APPLE__
#include <Carbon/Carbon.h>
#include "macdefs.h"
Expand Down
4 changes: 4 additions & 0 deletions Codec/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#include "macdefs.h"
#endif

#if _WIN32
#define PATH_MAX MAX_PATH
#endif

#if !defined(_WIN32)
#define min(x,y) (((x) < (y)) ? (x) : (y))
#define max(x,y) (((x) > (y)) ? (x) : (y))
Expand Down
1 change: 1 addition & 0 deletions Codec/wavelet.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#ifdef _WIN32
#include <windows.h>
#define PATH_MAX MAX_PATH
#elif __APPLE__
#include "macdefs.h"
#endif
Expand Down

0 comments on commit 612e10f

Please sign in to comment.