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

@Zer0-One Zer0-One commented Jan 21, 2017

: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

@Zer0-One Zer0-One commented Jan 21, 2017

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

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

@endoffile78 endoffile78 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 iphydf:vla-compat branch 2 times, most recently from a30d4ee to 622af37 Jan 22, 2017
@robinlinden
Copy link
Member

@robinlinden robinlinden commented Jan 23, 2017

: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 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 force-pushed the iphydf:vla-compat branch from 622af37 to 7851212 Jan 25, 2017
@iphydf iphydf force-pushed the iphydf:vla-compat branch from 7851212 to 6ae33c1 Jan 28, 2017
@iphydf iphydf merged commit 6ae33c1 into TokTok:master Jan 28, 2017
2 of 5 checks passed
2 of 5 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
ci/circleci CircleCI is running your tests
Details
coverage/coveralls Coverage pending from Coveralls.io
Details
code-review/reviewable 2/2 LGTMs, 1 stale
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@isotoxin
Copy link

@isotoxin 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

@isotoxin isotoxin commented Jan 30, 2017

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 iphydf:vla-compat branch Jan 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.