Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to compile with mingw-w64 #396

Merged
merged 2 commits into from
May 16, 2019
Merged

Fix to compile with mingw-w64 #396

merged 2 commits into from
May 16, 2019

Conversation

zedxxx
Copy link
Contributor

@zedxxx zedxxx commented May 15, 2019

No description provided.

@nmoinvaz nmoinvaz changed the base branch from master to dev May 15, 2019 22:03
@Coeur
Copy link
Contributor

Coeur commented May 16, 2019

Just curious, if _MSC_VER is not defined, then if (_MSC_VER < 1900) two lines below will be a problem, isn't it?

@zedxxx
Copy link
Contributor Author

zedxxx commented May 16, 2019 via email

@zedxxx
Copy link
Contributor Author

zedxxx commented May 16, 2019

Will this way be more correct?

#if defined(_MSC_VER) || defined(__MINGW32__)
#  define localtime_r(t1,t2) (localtime_s(t2,t1) == 0 ? t1 : NULL)
#  if defined(_MSC_VER) && (_MSC_VER < 1900)
#    define snprintf _snprintf
#  endif 
#endif

@nmoinvaz
Copy link
Member

@zedxxx does this compile for you?

#if defined(_MSC_VER) || defined(__MINGW32__)
#  define localtime_r(t1,t2) (localtime_s(t2,t1) == 0 ? t1 : NULL)
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#  define snprintf _snprintf
#endif

@zedxxx
Copy link
Contributor Author

zedxxx commented May 16, 2019

Yes.

@nmoinvaz
Copy link
Member

Ok, if you update the pull request I can merge it in.

@nmoinvaz nmoinvaz merged commit 27687ef into zlib-ng:dev May 16, 2019
@nmoinvaz
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants