[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Can't find MQ_PRIO_MAX in include



Hello,

I'm trying to use some POSIX MQ on Debian.
I tried my code on Debian, FreeBSD and Cygwin, and it went well.
I encountered a problem on FreeBSD about the maximum priority, then I searched about a fixed maximum, and I found MQ_PRIO_MAX.
On FreeBSD and Cygwin it works properly, but on Debian, I can't find the macro MQ_PRIO_MAX.

Precisely :
I included <mqueue.h> for the mq_attr definition, mq_open function, ...
And MQ_PRIO_MAX seems to be defined in <limits.h> in POSIX explanations.
So, I included <limits.h>, and Debian still can't find MQ_PRIO_MAX.
I googled a little, and found it in <linux/mqueue.h> !
But if I put "only" <linux/mqueue.h>, mq_open, mq_close... are undefined.
If I put <linux/mqueue.h> and <mqueue.h>, mq_attr is redefined.
If I put only <mqueue.h>, MQ_PRIO_MAX is undefined.

How should I found MQ_PRIO_MAX correctly on Debian ?
My CFLAGS are : -W -Wall -Werror -ansi -pedantic
My LDFLAGS are : -lrt
I'm working on a Debian Squeeze (2.6.32-042stab076.8 #1 SMP Tue May 14 20:38:14 MSK 2013 x86_64), with ldd (Debian EGLIBC 2.11.3-4) 2.11.3.

Shouldn't MQ_PRIO_MAX be define in <limits.h> in the next releases ?

Thank you in advance !

--
Fabrice BOISSIER // Metalman

Reply to: