Notes |
(0004537)
geoffclare (manager)
2019-08-23 16:41
|
The example code includes <pthread.h>, but it doesn't include <signal.h>.
If we don't change <mqueue.h> to require a complete definition of struct sigevent then we should add #include <signal.h> to the example. |
|
(0004539)
shware_systems (reporter)
2019-08-24 21:25
edited on: 2019-08-24 21:34
|
I think the sigevent reference as an incomplete type is so it is not material whether <mqueue.h> #include's <signal.h> or not, or which order an application may #include these headers separately. It would be a quality of implementation issue that these headers note whether the necessary types have been declared already, whichever is referenced first. If an application doesn't make use of mq_notify() it may not have to #include <signal.h> at all then.
What I see as missing, if <mqueue.h> is #include'd first, is that the sigval union should also be defined or declared, as the sigevent structure requires this type also.
|
|
(0005880)
geoffclare (manager)
2022-06-30 16:26
edited on: 2022-06-30 16:33
|
On page 297 line 10082 section <mqueue.h>, change:shall define the pthread_attr_t, size_t, and ssize_t types to:shall define the size_t and ssize_t types
On page 1353 line 45082 section mq_notify() EXAMPLES, after:#include <pthread.h> add:#include <signal.h>
On page 1355 line 45136 section mq_notify() APPLICATION USAGE, change:
None. to:Since the <mqueue.h> header is only required to declare the sigevent structure tag as naming an incomplete structure type, in order to use mq_notify() and pass it a pointer to a sigevent structure, applications need to include <signal.h> so that sigevent will be fully defined.
|
|