|
Szabolcs Nagy |
87b251 |
#include "options.h"
|
|
Szabolcs Nagy |
87b251 |
#ifdef POSIX_MESSAGE_PASSING
|
|
nsz |
d7c151 |
#include <mqueue.h>
|
|
nsz |
d7c151 |
#define T(t) (t*)0;
|
|
nsz |
d7c151 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
d7c151 |
static void f()
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
T(mqd_t)
|
|
nsz |
d7c151 |
T(pthread_attr_t)
|
|
nsz |
d7c151 |
T(size_t)
|
|
nsz |
d7c151 |
T(ssize_t)
|
|
nsz |
d7c151 |
T(struct timespec)
|
|
nsz |
d7c151 |
T(struct sigevent)
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
struct mq_attr x;
|
|
nsz |
d7c151 |
F(long, mq_flags)
|
|
nsz |
d7c151 |
F(long, mq_maxmsg)
|
|
nsz |
d7c151 |
F(long, mq_msgsize)
|
|
nsz |
d7c151 |
F(long, mq_curmsgs)
|
|
nsz |
d7c151 |
}
|
|
nsz |
0ef264 |
{int(*p)(mqd_t) = mq_close;}
|
|
nsz |
0ef264 |
{int(*p)(mqd_t,struct mq_attr*) = mq_getattr;}
|
|
nsz |
0ef264 |
{int(*p)(mqd_t,const struct sigevent*) = mq_notify;}
|
|
nsz |
0ef264 |
{mqd_t(*p)(const char*,int,...) = mq_open;}
|
|
nsz |
0ef264 |
{ssize_t(*p)(mqd_t,char*,size_t,unsigned*) = mq_receive;}
|
|
nsz |
0ef264 |
{int(*p)(mqd_t,const char*,size_t,unsigned) = mq_send;}
|
|
nsz |
0ef264 |
{int(*p)(mqd_t,const struct mq_attr*restrict,struct mq_attr*restrict) = mq_setattr;}
|
|
nsz |
0ef264 |
{int(*p)(const char*) = mq_unlink;}
|
|
nsz |
b80923 |
}
|
|
nsz |
d7c151 |
#include <time.h>
|
|
nsz |
b80923 |
static void g()
|
|
nsz |
b80923 |
{
|
|
nsz |
0ef264 |
{ssize_t(*p)(mqd_t,char*restrict,size_t,unsigned*restrict,const struct timespec*restrict) = mq_timedreceive;}
|
|
nsz |
0ef264 |
{int(*p)(mqd_t,const char*,size_t,unsigned,const struct timespec*) = mq_timedsend;}
|
|
nsz |
d7c151 |
}
|
|
Szabolcs Nagy |
87b251 |
#endif
|
|
Szabolcs Nagy |
87b251 |
|