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

uid/gid crendential types on QNX 7.1 wot v3.4.9 #574

Closed
kheaactua opened this issue Nov 14, 2023 · 3 comments
Closed

uid/gid crendential types on QNX 7.1 wot v3.4.9 #574

kheaactua opened this issue Nov 14, 2023 · 3 comments

Comments

@kheaactua
Copy link
Contributor

I see that 3.4.9 has started integrating QNX 7.1 support. The source seems to be specifiying [wrong] types for the uid/gid though. For instance, in

#if defined(_WIN32) || defined(__QNX__)
typedef std::uint32_t uid_t;
typedef std::uint32_t gid_t;
#else
typedef ::uid_t uid_t;
typedef ::uid_t gid_t;
#endif

This type is defined by QNX already in $QNX_TARGET/usr/include/sys/target_nto.h, for me it's:

❯ rg UID_T $QNX_TARGET/usr/include/sys/target_nto.h
49:#undef __UID_T
50:#define __UID_T              _INT32

There are then many includes (stat.h, types.h, etc) that do:

#if defined(__UID_T)
typedef __UID_T              uid_t;
#undef __UID_T
#endif

By contrast, capicxx-core-runtime does this properly: https://github.com/COVESA/capicxx-core-runtime/blob/c4351ee6972890b225ec9d4984c8f4fa9dd09ae8/include/CommonAPI/Types.hpp#L92-L98

Is there any reason vsomeip is attempting to change the type? I think sticking to the platform defined type is much safer. I've also prepared #561 to use the types more consistently throughout vsomeip. I haven't removed the lines in primitive_types.hpp yet but will probably do so - I just wanted to first ask if there was a reason.

@fcmonteiro
Copy link
Collaborator

Regarding the first part, the QNX support was added by the community, see #447
Also, your PR #561 is being analysed internaly.

@kheaactua
Copy link
Contributor Author

Thanks for the reply. I wish I had have known about that PR while it was under development. My group has been maintaining QNX ports for a few years now and likely had a lot to contribute.

About the uid being a bad type though, how to you suggest I pursue this? Just open a PR and cite #447 ?

@fcmonteiro
Copy link
Collaborator

You can still contribute to the QNX support and vSomeIP, if you have suggestions to improve the current QNX implementation please create a PR with the changes.
Regarding the uid stuff, is probably easier if you update your PR #561, or close that one and create a new one.

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

No branches or pull requests

3 participants