View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000223 | 1003.1(2008)/Issue 7 | System Interfaces | public | 2010-02-24 21:16 | 2010-03-04 16:52 |
Reporter | EdSchouten | Assigned To | ajosey | ||
Priority | normal | Severity | Editorial | Type | Enhancement Request |
Status | Resolved | Resolution | Rejected | ||
Name | Ed Schouten | ||||
Organization | |||||
User Reference | |||||
Section | <mqueue.h> | ||||
Page Number | 294 | ||||
Line Number | 9862-9869 | ||||
Interp Status | --- | ||||
Final Accepted Text | |||||
Summary | 0000223: mq_* routines use char * for data buffer | ||||
Description | The <mqueue.h> header provides the following functions: ssize_t mq_receive(mqd_t, char *, size_t, unsigned *); int mq_send(mqd_t, const char *, size_t, unsigned); int mq_setattr(mqd_t, const struct mq_attr *restrict, struct mq_attr *restrict); ssize_t mq_timedreceive(mqd_t, char *restrict, size_t, unsigned *restrict, const struct timespec *restrict); int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *); For some reason I've never understood why these routines use char *'s for data buffers, while functions like write() and send() use a void *. Message queues don't use strings. Message queues are binary safe. | ||||
Desired Action | Change the prototypes to use void * instead: ssize_t mq_receive(mqd_t, void *, size_t, unsigned *); int mq_send(mqd_t, const void *, size_t, unsigned); int mq_setattr(mqd_t, const struct mq_attr *restrict, struct mq_attr *restrict); ssize_t mq_timedreceive(mqd_t, void *restrict, size_t, unsigned *restrict, const struct timespec *restrict); int mq_timedsend(mqd_t, const void *, size_t, unsigned, const struct timespec *); I suspect this will break code that uses function pointers to refer to these functions, but code that just calls these functions will not be affected. | ||||
Tags | No tags attached. |
|
Although we agree that it would have been better if these functions had been designed this way to begin with, we believe that making the change now will break existing, conforming code with no real benefit. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-02-24 21:16 | EdSchouten | New Issue | |
2010-02-24 21:16 | EdSchouten | Status | New => Under Review |
2010-02-24 21:16 | EdSchouten | Assigned To | => ajosey |
2010-02-24 21:16 | EdSchouten | Name | => Ed Schouten |
2010-02-24 21:16 | EdSchouten | Section | => <mqueue.h> |
2010-02-24 21:16 | EdSchouten | Page Number | => n/a |
2010-02-24 21:16 | EdSchouten | Line Number | => n/a |
2010-03-04 16:48 | nick | Page Number | n/a => 294 |
2010-03-04 16:48 | nick | Line Number | n/a => 9862-9869 |
2010-03-04 16:48 | nick | Interp Status | => --- |
2010-03-04 16:52 | Don Cragun | Note Added: 0000395 | |
2010-03-04 16:52 | Don Cragun | Status | Under Review => Resolved |
2010-03-04 16:52 | Don Cragun | Resolution | Open => Rejected |