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

Add VLA compatibility macro for C89-ish compilers. #452

Merged
merged 1 commit into from
Jan 28, 2017

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Jan 20, 2017

This change is Reviewable

@iphydf
Copy link
Member Author

iphydf commented Jan 20, 2017

@isotoxin can you review this change? It's one of the changes we need to make for MSVC compatibility. I believe this directly affects your use case.

@Zer0-One
Copy link
Member

:lgtm:


Reviewed 1 of 30 files at r1.
Review status: 1 of 30 files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@Zer0-One
Copy link
Member

It'll work, but afaik alloca() is non-portable.

@iphydf iphydf force-pushed the vla-compat branch 2 times, most recently from 2dc9681 to f0de2a8 Compare January 21, 2017 19:38
@iphydf iphydf modified the milestone: v0.1.7 Jan 22, 2017
@iphydf iphydf force-pushed the vla-compat branch 2 times, most recently from 1fff668 to 26c9a35 Compare January 22, 2017 11:16
@jhert0
Copy link
Member

jhert0 commented Jan 22, 2017

:lgtm_strong:


Reviewed 25 of 30 files at r1, 7 of 7 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@iphydf iphydf force-pushed the vla-compat branch 2 times, most recently from a30d4ee to 622af37 Compare January 22, 2017 23:01
@robinlinden
Copy link
Member

:lgtm_strong:


Reviewed 26 of 30 files at r1, 5 of 7 files at r2, 3 of 3 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@iphydf
Copy link
Member Author

iphydf commented Jan 23, 2017

@isotoxin is this something you're interested in reviewing or should we just go ahead and merge it?

By the way, yesterday I realised (after someone linked to it) that you've done this already, almost in the same way. Perhaps this change is useful for you to adopt so you have fewer custom changes to maintain.

For background: I'm doing this because I want to support Windows properly, and currently our tests run on Wine (on Linux) and always fail. I want to run the tests on Appveyor (a Windows CI platform), and although it's probably possible to use mingw32 on that, I'd like to take this opportunity to improve support for MSVC, probably benefitting the isotoxin client.

@iphydf iphydf merged commit 6ae33c1 into TokTok:master Jan 28, 2017
@isotoxin
Copy link

isotoxin commented Jan 29, 2017

Sorry guys. I dont know why I missed this PR... I was ill, probably so.
Of course I very interested in this patch. And I check it soon.
Btw, there are many places in code, where constantly allocated arrays should be much better then vla. May be later I make such PR.

@isotoxin
Copy link

Only one remark:
I get latest toktok sources and found sort_client_list function in DHT.c: cmp_list is dynamic.

This was referenced Feb 20, 2017
@iphydf iphydf deleted the vla-compat branch January 21, 2018 10:34
This pull request was closed.
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.

5 participants