Skip to content

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

Merged
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:vla-compat
Jan 28, 2017
Merged

iphydf merged 1 commit into
TokTok:masterfrom
iphydf:vla-compat

Conversation

@iphydf

@iphydf iphydf commented Jan 20, 2017 •

Copy link
Copy Markdown
Member

This change is Reviewable

@iphydf

iphydf commented Jan 20, 2017

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
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
Copy Markdown
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
@e0ff

e0ff commented Jan 22, 2017

Copy link
Copy Markdown
Member

: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
Copy Markdown

: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

iphydf commented Jan 23, 2017

Copy link
Copy Markdown
Member Author

@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

isotoxin commented Jan 29, 2017 •

Copy link
Copy Markdown

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
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants