Fixed compilation on windows #1

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

Hello, I'm using this library for my programming language to generate report from the compilation process, and I noticed it does not work on Windows.

I used the fix proposed here https://bugs.webkit.org/show_bug.cgi?id=5311 Which implements localtime_r and removed unistd inclusion on Windows platform.

By the way, this is my first PR on github 😺 .

Cheers!

Update: Fixed compilation error for visual studio below 2015. The issue was, inline is C99 keyword which was not fully supported. Visual Studio 2013 and below uses __inline instead.

Owner

AndreRenaud commented Jan 4, 2017

Thanks - I've merged them in a slightly different way, but hopefully this has the same effect for you. I moved the inline statement into the .c file, since it doesn't have anything to do with the external API, and I just inlined the localtime_r stuff, since we only call it once. Hope this is sufficient - thanks for the feedback, always nice to hear from people using this.

@AndreRenaud AndreRenaud closed this Jan 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment