From 3500dd283b8e5d8a4916423855514cdbfee36eac Mon Sep 17 00:00:00 2001 From: "Albert ARIBAUD (3ADEV)" Date: Wed, 6 Sep 2017 10:00:42 +0200 Subject: Y2038: add _TIME_BITS support This makes all previously defined Y2038-proof API types, functions and implementations the default when _TIME_BITS==64 and __WORDSIZE==32 (so that 64-bit architectures are unaffected). Note: it is assumed that the API is consistent, i.e. for each API type which is enabled here, all API functions which depend on this type are enabled and mapped to Y2038-proof implementations. --- rt/mqueue.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'rt/mqueue.h') diff --git a/rt/mqueue.h b/rt/mqueue.h index 5f354b4d76..710b11169b 100644 --- a/rt/mqueue.h +++ b/rt/mqueue.h @@ -73,6 +73,17 @@ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len, #ifdef __USE_XOPEN2K /* Receive the oldest from highest priority messages in message queue MQDES, stop waiting if ABS_TIMEOUT expires. */ +# ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT) +extern ssize_t __REDIRECT (mq_timedreceive, (mqd_t __mqdes, + char *__restrict __msg_ptr, size_t __msg_len, + unsigned int *__restrict __msg_prio, + const struct timespec *__restrict __abs_timeout), + __mq_timedreceive64) __nonnull((2, 5)); +# else +# define mq_timedreceive __mq_timedreceive64 +# endif +# endif extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr, size_t __msg_len, unsigned int *__restrict __msg_prio, @@ -81,6 +92,17 @@ extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr, /* Add message pointed by MSG_PTR to message queue MQDES, stop blocking on full message queue if ABS_TIMEOUT expires. */ +# ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT) +extern int __REDIRECT (mq_timedsend, (mqd_t __mqdes, + const char *__msg_ptr, size_t __msg_len, + unsigned int __msg_prio, + const struct timespec *__abs_timeout), + __mq_timedsend64) __nonnull((2, 5)); +# else +# define mq_timedsend __mq_timedsend64 +# endif +# endif extern int mq_timedsend (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len, unsigned int __msg_prio, const struct timespec *__abs_timeout) -- cgit v1.2.3