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

net_mosq.c declaration issues #1622

Closed
mostafaimam opened this issue Mar 9, 2020 · 9 comments
Closed

net_mosq.c declaration issues #1622

mostafaimam opened this issue Mar 9, 2020 · 9 comments

Comments

@mostafaimam
Copy link

in the function net__socket_connect_tls
declaration of the variable long res; is under the function ERR_clear_error(); it suppose to be the opposite to be able to compile using old c compilers.
and the same issue in the same file in function net__init_ssl_ctx the variable EVP_PKEY *pkey the declaration suppose to be at the top of the function not in the middle.
thanks,

@karlp
Copy link
Contributor

karlp commented Mar 9, 2020

do you really still have a compiler that doesn't support c99 that you need to use?

@mostafaimam
Copy link
Author

if you are working with embedded systems, the answer is yes a lot of embedded system compiler can't support C99

@karlp
Copy link
Contributor

karlp commented Mar 9, 2020

You should complain to your vendor. Loudly.

@mostafaimam
Copy link
Author

I did already and they will not be able to support that for different reasons and it is also not supported by the INTEGRITY operating system which most of the drones and medical devices use.
However, currently I did those changes by myself to be able to compile and use. but it will be much better to apply it it master branch so, anyone else can use it.

@michaeliu
Copy link
Contributor

@karlp Compiler do not support C99 sound strange, but it's true in embedded system world. there are lots of vendor do not have plan to upgrade (It's sad...)

So, could you please consider to accept the suggestion and the PR.

@karlp
Copy link
Contributor

karlp commented Mar 10, 2020

They'll never lift a finger while their users keep being complicit and supporting them either :) I'm not a project owner here, just another user, so I'm not accepting or rejecting this PR. However, I'm not convinced it's even true for the case at hand, according to Green Hills themselves:

C++11 and C++14 support
Green Hills Compilers support ISO/IEC 14882:2011 (C++11) and ISO/IEC 14882:2014 (C++14) which offers a number of new language features and standard libraries. These includes standardized threading support for mutexes, atomics, future/promise, and the use of the thread_local keyword. These features are supported on the INTEGRITY RTOS and can be easily customized to work on other OS.

@mostafaimam
Copy link
Author

@karlp I am work with latest version of Green Hills compilers and believe me when I said it is not working and we arranged with them sever meetings to ask them to support it. and they support threading but not all threading are supported and also I am not here to convince you as well. I already did those changes but I was putting this as a isuess for other users.
thanks,

@michaeliu
Copy link
Contributor

They'll never lift a finger while their users keep being complicit and supporting them either :) I'm not a project owner here, just another user, so I'm not accepting or rejecting this PR. However, I'm not convinced it's even true for the case at hand, according to Green Hills themselves:

C++11 and C++14 support
Green Hills Compilers support ISO/IEC 14882:2011 (C++11) and ISO/IEC 14882:2014 (C++14) which offers a number of new language features and standard libraries. These includes standardized threading support for mutexes, atomics, future/promise, and the use of the thread_local keyword. These features are supported on the INTEGRITY RTOS and can be easily customized to work on other OS.

Thanks for reply and maybe mosquitto team will take care and consider this : )

ralight added a commit that referenced this issue Mar 12, 2020
@ralight
Copy link
Contributor

ralight commented Mar 12, 2020

Fixed as per the commit above. Supporting <C99 isn't something that is an express goal of the project, so there's no guarantees it won't break in the future.

@ralight ralight closed this as completed Mar 12, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
FranciscoKnebel pushed a commit to Open-Digital-Twin/mosquitto that referenced this issue Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants