Skip to content

Commit

Permalink
[Fix] Linking error on some platforms using VS2015.
Browse files Browse the repository at this point in the history
Fixes issue microsoftarchive#454. Credits to @fangguanya for the fix.
  • Loading branch information
enricogior committed May 2, 2016
1 parent 737b568 commit cc6ce27
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Win32_Interop/win32fixes.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,21 @@
#endif
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/* strtod does not handle Inf and Nan, we need to do the check before calling strtod */
#undef strtod
#define strtod(nptr, eptr) wstrtod((nptr), (eptr))

double wstrtod(const char *nptr, char **eptr);

#ifdef __cplusplus
}
#endif

// access check for executable uses X_OK. For Windows use READ access.
#ifndef X_OK
#define X_OK 4
Expand Down

0 comments on commit cc6ce27

Please sign in to comment.