From 1347bf9b48770d85aaa4847bb25557791f7a4d12 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 5 Jun 2019 12:35:57 +0300 Subject: [PATCH] posix: mqueue.h: Move O_CREAT and friends to fcntl.h That's the header which is supposed to define them, there was even FIXME on that in mqueue.h. Signed-off-by: Paul Sokolovsky --- include/posix/mqueue.h | 16 +--------------- lib/libc/minimal/include/fcntl.h | 2 ++ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/include/posix/mqueue.h b/include/posix/mqueue.h index 3bb9a0e6640..44c97932905 100644 --- a/include/posix/mqueue.h +++ b/include/posix/mqueue.h @@ -9,6 +9,7 @@ #include #include +#include #include "posix_types.h" #include "sys/stat.h" @@ -25,21 +26,6 @@ typedef struct mq_attr { long mq_curmsgs; /* Number of messages currently queued. */ } mq_attr; -/* FIXME: below should be defined into fcntl.h file. - * This is temporarily put here. - */ - -#ifndef _SYS_FCNTL_H_ -#define O_CREAT_POS 9 -#define O_CREAT (1 << O_CREAT_POS) - -#define O_EXCL_POS 11 -#define O_EXCL (1 << O_EXCL_POS) - -#define O_NONBLOCK_POS 14 -#define O_NONBLOCK (1 << O_NONBLOCK_POS) -#endif /* _SYS_FCNTL_H_ */ - mqd_t mq_open(const char *name, int oflags, ...); int mq_close(mqd_t mqdes); int mq_unlink(const char *name); diff --git a/lib/libc/minimal/include/fcntl.h b/lib/libc/minimal/include/fcntl.h index 453442d44c9..23028f35239 100644 --- a/lib/libc/minimal/include/fcntl.h +++ b/lib/libc/minimal/include/fcntl.h @@ -7,6 +7,8 @@ #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_FCNTL_H_ #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_FCNTL_H_ +#define O_CREAT 0x0200 +#define O_EXCL 0x0800 #define O_NONBLOCK 0x4000 #define F_DUPFD 0