This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 091/114] Add <sys/types.h> header for Phoenix.
- From: Jakub Sejdak <jakub dot sejdak at phoesys dot com>
- To: newlib at sourceware dot org
- Cc: Kuba Sejdak <jakub dot sejdak at phoesys dot com>
- Date: Mon, 11 Apr 2016 12:21:49 +0200
- Subject: [PATCH 091/114] Add <sys/types.h> header for Phoenix.
- Authentication-results: sourceware.org; auth=none
- References: <1460370132-4880-1-git-send-email-jakub dot sejdak at phoesys dot com>
From: Kuba Sejdak <jakub.sejdak@phoesys.com>
---
newlib/libc/sys/phoenix/sys/types.h | 106 ++++++++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 newlib/libc/sys/phoenix/sys/types.h
diff --git a/newlib/libc/sys/phoenix/sys/types.h b/newlib/libc/sys/phoenix/sys/types.h
new file mode 100644
index 0000000..a819931
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/types.h
@@ -0,0 +1,106 @@
+/* Copyright (C) 2012-2016 Phoenix Systems (http://www.phoesys.com/).
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_TYPES_H
+#define _SYS_TYPES_H
+
+#include <machine/types.h> /* libc/include/machine/types.h */
+#include <machine/_types.h> /* libc/include/sys/_types.h */
+#include <stdint.h>
+#include <sys/_types.h>
+#include <sys/_null.h>
+
+#include <phoenix/types.h>
+
+typedef __uint32_t __ino_t ;
+typedef __uint64_t __ino64_t;
+typedef __uint64_t __off64_t;
+typedef __uint32_t __key_t;
+typedef __uint32_t __useconds_t;
+typedef __uint32_t __daddr_t;
+typedef __uint32_t __nlink_t;
+typedef __uint8_t __u_char;
+typedef unsigned short __u_short;
+typedef unsigned __u_int;
+typedef unsigned long __u_long;
+
+typedef _CLOCK_T_ clock_t;
+typedef _ssize_t ssize_t;
+typedef __ino_t ino_t;
+typedef __ino64_t ino64_t;
+typedef __off64_t off64_t;
+typedef __off_t off_t;
+typedef __loff_t loff_t;
+typedef __key_t key_t;
+typedef __suseconds_t suseconds_t;
+typedef __useconds_t useconds_t;
+typedef __daddr_t daddr_t;
+typedef char * caddr_t;
+typedef __nlink_t nlink_t;
+typedef pid_t id_t;
+typedef __u_char u_char;
+typedef __u_short u_short;
+typedef __u_int u_int;
+typedef __u_long u_long;
+typedef __uint8_t u_int8_t;
+typedef __uint16_t u_int16_t;
+typedef __uint32_t u_int32_t;
+typedef __uint64_t u_int64_t;
+typedef __uint8_t uint8_t;
+typedef __uint16_t uint16_t;
+typedef __uint32_t uint32_t;
+typedef __uint64_t uint64_t;
+typedef __int8_t int8_t;
+typedef __int16_t int16_t;
+typedef __int32_t int32_t;
+typedef __int64_t int64_t;
+
+typedef __uint32_t __blksize_t;
+typedef __int64_t __blkcnt_t;
+typedef __int64_t sbintime_t;
+typedef __blkcnt_t blkcnt_t;
+
+#define __time_t_defined
+#define __gid_t_defined
+#define __uid_t_defined
+#define __ssize_t_defined
+#define __key_t_defined
+#define __off_t_defined
+#define __off64_t_defined
+
+static inline unsigned int dev_major (unsigned long int dev)
+{
+ return ((dev >> 16) & 0xffff);
+}
+
+static inline unsigned int dev_minor (unsigned long int dev)
+{
+ return (dev & 0xffff);
+}
+
+static inline unsigned long int dev_makedev (unsigned int major, unsigned int minor)
+{
+ return (minor & 0xffff) | ((major & 0xffff) << 16);
+}
+
+/* Access the functions with their traditional names. */
+# define major(dev) dev_major(dev)
+# define minor(dev) dev_minor(dev)
+# define makedev(maj, min) dev_makedev(maj, min)
+
+#endif
--
2.5.0