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

sd_is_mq() should return -ENOSYS #146

Closed
markhindley opened this issue Jan 6, 2020 · 1 comment
Closed

sd_is_mq() should return -ENOSYS #146

markhindley opened this issue Jan 6, 2020 · 1 comment
Assignees

Comments

@markhindley
Copy link
Contributor

@markhindley markhindley commented Jan 6, 2020

Hi,

I think it would be more consistent if sd_is_mq() returned -ENOSYS, since we don't actually know (or care!) if the argument is a message queue.

Suggested patch:

https://git.devuan.org/LeePen/elogind/commit/cb3ab75b31098d3bc69c674376fd82a14281f10a

Mark

@Yamakuzure
Copy link
Collaborator

@Yamakuzure Yamakuzure commented Jan 6, 2020

Good idea! As I have retracted the release to get building via travis fixed, first, I'll add this before the re-release.

@Yamakuzure Yamakuzure self-assigned this Jan 6, 2020
Yamakuzure added a commit that referenced this issue Jan 12, 2020
It would be more consistent if sd_is_mq() returned -ENOSYS, since we
don't actually know (or care!) if the argument is a message queue.

Picked from:
https://git.devuan.org/LeePen/elogind/commit/cb3ab75b31098d3bc69c674376fd82a14281f10a

Thanks to @markhindley for pointing this out. (again!)

Bug: #146
Closes: #146
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
enometh pushed a commit to enometh/elogind that referenced this issue Aug 3, 2022
the goal here to mark functions and variables not used outside the
translation unit as static. main reason for this is cleanliness. however
as a side-effect this can help compilers optimize better as it now has
guarantee that a certain function won't be called outside of that
translation unit.

one other side-effect of this is that accessing these vars/function from
config.h is now different.

if one wants to access a static var/func from different translation unit
in config.h, he would have to create a wrapper function under the right
ifdef. for static functions one would also need to forward declare it.
here's a dummy example of accessing the function `run_key_handler` from
config.h under _MAPPINGS_CONFIG

```
static void run_key_handler(const char *, unsigned);
bool send_with_ctrl(arg_t key) {
	run_key_handler(XKeysymToString(key), ControlMask);
	return false;
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants