#include "defs.h"
#include <fcntl.h>
-extern void printmqattr(struct tcb *tcp, const long addr);
-
SYS_FUNC(mq_open)
{
printpath(tcp, tcp->u_arg[0]);
if (tcp->u_arg[1] & O_CREAT) {
/* mode */
tprintf(", %#lo, ", tcp->u_arg[2]);
- printmqattr(tcp, tcp->u_arg[3]);
+ MPERS_PRINTER_NAME(printmqattr)(tcp, tcp->u_arg[3]);
}
return RVAL_DECODED;
}
{
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
- printmqattr(tcp, tcp->u_arg[1]);
+ MPERS_PRINTER_NAME(printmqattr)(tcp, tcp->u_arg[1]);
tprints(", ");
} else
- printmqattr(tcp, tcp->u_arg[2]);
+ MPERS_PRINTER_NAME(printmqattr)(tcp, tcp->u_arg[2]);
return 0;
}
#include "defs.h"
+#include DEF_MPERS_TYPE(mq_attr_t)
#ifdef HAVE_MQUEUE_H
# include <mqueue.h>
+typedef struct mq_attr mq_attr_t;
#endif
+#include MPERS_DEFS
-void
-printmqattr(struct tcb *tcp, const long addr)
+MPERS_PRINTER_DECL(void, printmqattr)(struct tcb *tcp, const long addr)
{
# ifndef HAVE_MQUEUE_H
printaddr(addr);
# else
- struct mq_attr attr;
+ mq_attr_t attr;
if (umove_or_printaddr(tcp, addr, &attr))
return;
tprints("{mq_flags=");