Skip to content

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented Jun 1, 2017

This fixes compile problems on Windows. Uses some ideas hinted by @russelltg. As it comes for system includes, the solution is radical - there's one include file that gets all required system headers in appropriate set and appropriate order. This may still required further testing; I have successfully compiled this on MSVS 2013 and then on Cygwin (to test if Linux isn't broken). There are some problems on MSVS 2015, also the OpenSSL in the version as described won't work with this compiler (requires manually compiled OpenSSL).

@russelltg russelltg mentioned this pull request Jun 1, 2017
@rndi
Copy link
Collaborator

rndi commented Jun 1, 2017

Thanks @ethouris!

I looked through the changes quickly and I think to the very least they can use some cosmetic clean up before the merge (please don't mix tabs and spaces for indentation, - that makes the diffs look horrible on machines that use different ident view settings). Give me a bit of time for that.

Also I noticed that srtcore/csrtcc.cpp contains some logic changes to CSRTCC::sendSrtMsg() that do not look pertinent to Windows compilation. I think these need to be moved out into a separate pull request.

@ethouris
Copy link
Collaborator Author

ethouris commented Jun 2, 2017

Ok, I'll look throgh this tab problems again.

There are no logic changes in CSRTCC::sendSrtMsg(). This was only changing checking by 'switch' into checking by 'if'. The compiler on Windows was complaining about a "default only switch", which it was indeed, provided that the other parts of the switch were turned off by undefined macros. There was actually no other way to silence this warning without changing any logic of the existing solution.

@ethouris
Copy link
Collaborator Author

ethouris commented Jun 2, 2017

Ok, so you were right, there was some extra logics in csrtcc.cpp, I have removed it. This time I have also tested that on Cygwin.

@ethouris
Copy link
Collaborator Author

ethouris commented Jun 2, 2017

Ok, yet another one. Strangely gcc on Linux has reported an additional warning. I tried to be too nice for the rules and preinitialize an object - but could only either make 12 zeros inside the braces or better leave it uninitialized. :)

@rndi rndi merged commit 9db4761 into Haivision:master Jun 5, 2017
@rndi
Copy link
Collaborator

rndi commented Jun 5, 2017

Merged. Thank you!

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.

2 participants