diff mbox series

[v10,49/65] linux-user: Add target_fcntl.h header for nanoMIPS

Message ID 1534514633-13725-50-git-send-email-aleksandar.markovic@rt-rk.com
State New
Headers show
Series [v10,01/65] target/mips: Add preprocessor constants for nanoMIPS | expand

Commit Message

Aleksandar Markovic Aug. 17, 2018, 2:03 p.m. UTC
From: Aleksandar Rikalo <arikalo@wavecomp.com>

Add fcntl-related constants and structures for nanoMIPS.

Signed-off-by: Aleksandar Rikalo <arikalo@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Stefan Markovic <smarkovic@wavecomp.com>
---
 linux-user/nanomips/target_fcntl.h | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 linux-user/nanomips/target_fcntl.h
diff mbox series

Patch

diff --git a/linux-user/nanomips/target_fcntl.h b/linux-user/nanomips/target_fcntl.h
new file mode 100644
index 0000000..4203825
--- /dev/null
+++ b/linux-user/nanomips/target_fcntl.h
@@ -0,0 +1,38 @@ 
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation, or (at your option) any
+ * later version. See the COPYING file in the top-level directory.
+ */
+
+#ifndef NANOMIPS_TARGET_FCNTL_H
+#define NANOMIPS_TARGET_FCNTL_H
+
+#define TARGET_O_APPEND         0x000400
+#define TARGET_O_DSYNC          0x001000
+#define TARGET_O_NONBLOCK       0x000800
+#define TARGET_O_CREAT          0x000040
+#define TARGET_O_TRUNC          0x000200
+#define TARGET_O_EXCL           0x000080
+#define TARGET_O_NOCTTY         0x000100
+#define TARGET_FASYNC           0x002000
+#define TARGET_O_LARGEFILE      0x008000
+#define TARGET___O_SYNC         0x101000
+#define TARGET_O_DIRECT         0x004000
+#define TARGET_O_CLOEXEC        0x080000
+
+#define TARGET_F_GETLK         5
+#define TARGET_F_SETLK         6
+#define TARGET_F_SETLKW        7
+#define TARGET_F_SETOWN        8       /*  for sockets. */
+#define TARGET_F_GETOWN        9       /*  for sockets. */
+
+#define TARGET_ARCH_FLOCK_PAD abi_long pad[4];
+#define TARGET_ARCH_FLOCK64_PAD
+
+#define TARGET_F_GETLK64       12      /*  using 'struct flock64' */
+#define TARGET_F_SETLK64       13
+#define TARGET_F_SETLKW64      14
+
+#include "../generic/fcntl.h"
+#endif