Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #97 from juanjux/workaround_onlymsvc
Browse files Browse the repository at this point in the history
Only use the workaround with MSVC >= 15.0
  • Loading branch information
juanjux authored Dec 5, 2018
2 parents c2144f0 + e2fe9bc commit 055d557
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/libuast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@

// Workaround for linking libs cross-compiled with gcc vs VS2015 libs
// See: https://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2
#ifdef _WIN32
FILE _iob[] = {*stdin, *stdout, *stderr};
#ifdef _MSC_VER
#if _MSC_VER >= 1900
FILE _iob[] = {*stdin, *stdout, *stderr};

extern "C" FILE * __cdecl __iob_func(void)
{
return &(_iob[0]);
}
extern "C" FILE * __cdecl __iob_func(void)
{
return &(_iob[0]);
}
#endif
#endif

namespace uast {
Expand Down

0 comments on commit 055d557

Please sign in to comment.