summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/_timespec.h2
-rw-r--r--newlib/libc/include/sys/_timeval.h2
-rw-r--r--newlib/libc/include/sys/_types.h21
-rw-r--r--newlib/libc/include/sys/config.h1
-rw-r--r--newlib/libc/include/sys/timeb.h2
-rw-r--r--newlib/libc/include/sys/times.h2
-rw-r--r--newlib/libc/include/sys/types.h8
7 files changed, 28 insertions, 10 deletions
diff --git a/newlib/libc/include/sys/_timespec.h b/newlib/libc/include/sys/_timespec.h
index bd66dfc71..4a7aabcb1 100644
--- a/newlib/libc/include/sys/_timespec.h
+++ b/newlib/libc/include/sys/_timespec.h
@@ -34,7 +34,7 @@
#ifndef _SYS__TIMESPEC_H_
#define _SYS__TIMESPEC_H_
-#include <machine/types.h>
+#include <sys/_types.h>
#ifndef __time_t_defined
typedef _TIME_T_ time_t;
diff --git a/newlib/libc/include/sys/_timeval.h b/newlib/libc/include/sys/_timeval.h
index 0a4c539d9..d813d1f5b 100644
--- a/newlib/libc/include/sys/_timeval.h
+++ b/newlib/libc/include/sys/_timeval.h
@@ -29,7 +29,7 @@
#ifndef _SYS__TIMEVAL_H_
#define _SYS__TIMEVAL_H_
-#include <machine/types.h>
+#include <sys/_types.h>
#ifndef _SUSECONDS_T_DECLARED
typedef __suseconds_t suseconds_t;
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 07bc27675..b38a1617b 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -16,6 +16,12 @@
typedef long _off_t;
#endif
+#if defined(__XMK__)
+typedef signed char __pid_t;
+#else
+typedef int __pid_t;
+#endif
+
#ifndef __dev_t_defined
typedef short __dev_t;
#endif
@@ -31,6 +37,14 @@ typedef unsigned short __gid_t;
__extension__ typedef long long _off64_t;
#endif
+#ifdef __CYGWIN__
+typedef _off64_t __off_t;
+#else
+typedef _off_t __off_t;
+#endif
+
+typedef _off64_t __loff_t;
+
/*
* We need fpos_t for the following, but it doesn't have a leading "_",
* so we use _fpos_t instead.
@@ -88,4 +102,11 @@ typedef _LOCK_RECURSIVE_T _flock_t;
typedef void *_iconv_t;
#endif
+#define _CLOCK_T_ unsigned long /* clock() */
+#define _TIME_T_ long /* time() */
+#define _CLOCKID_T_ unsigned long
+#define _TIMER_T_ unsigned long
+
+typedef long __suseconds_t; /* microseconds (signed) */
+
#endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
index c53669823..555239f8b 100644
--- a/newlib/libc/include/sys/config.h
+++ b/newlib/libc/include/sys/config.h
@@ -92,7 +92,6 @@
/* we want the reentrancy structure to be returned by a function */
#define __DYNAMIC_REENT__
#define HAVE_GETDATE
-#define _HAVE_SYSTYPES
#define _READ_WRITE_RETURN_TYPE _ssize_t
#define __LARGE64_FILES 1
/* we use some glibc header files so turn on glibc large file feature */
diff --git a/newlib/libc/include/sys/timeb.h b/newlib/libc/include/sys/timeb.h
index 0a2c3de8b..264783050 100644
--- a/newlib/libc/include/sys/timeb.h
+++ b/newlib/libc/include/sys/timeb.h
@@ -15,7 +15,7 @@ extern "C" {
#define _SYS_TIMEB_H
#include <_ansi.h>
-#include <machine/types.h>
+#include <sys/_types.h>
#ifndef __time_t_defined
typedef _TIME_T_ time_t;
diff --git a/newlib/libc/include/sys/times.h b/newlib/libc/include/sys/times.h
index 927812cb8..dc072f464 100644
--- a/newlib/libc/include/sys/times.h
+++ b/newlib/libc/include/sys/times.h
@@ -5,7 +5,7 @@ extern "C" {
#define _SYS_TIMES_H
#include <_ansi.h>
-#include <machine/types.h>
+#include <sys/_types.h>
#ifndef __clock_t_defined
typedef _CLOCK_T_ clock_t;
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index f8808308e..c0b579623 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -66,7 +66,6 @@ typedef quad_t * qaddr_t;
#endif
# include <stddef.h>
-# include <machine/types.h>
/* To ensure the stat struct's layout doesn't change when sizeof(int), etc.
changes, we assume sizeof short and long never change and have all types
@@ -175,10 +174,9 @@ typedef __uid_t uid_t;
typedef __gid_t gid_t;
#endif
-#if defined(__XMK__)
-typedef signed char pid_t;
-#else
-typedef int pid_t;
+#ifndef _PID_T_DECLARED
+typedef __pid_t pid_t; /* process id */
+#define _PID_T_DECLARED
#endif
#if defined(__rtems__)