Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/config.h18
-rw-r--r--newlib/libc/include/sys/dirent.h8
-rw-r--r--newlib/libc/include/sys/fcntl.h6
-rw-r--r--newlib/libc/include/sys/features.h1
-rw-r--r--newlib/libc/include/sys/time.h6
-rw-r--r--newlib/libc/include/sys/types.h12
-rw-r--r--newlib/libc/include/sys/unistd.h2
7 files changed, 24 insertions, 29 deletions
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
index c4e4dba9a..1dd045498 100644
--- a/newlib/libc/include/sys/config.h
+++ b/newlib/libc/include/sys/config.h
@@ -59,7 +59,7 @@
/* in other words, go32 */
#define _FLOAT_RET double
#endif
-#if defined(__linux__) || defined(__RDOS__)
+#ifdef __linux__
/* we want the reentrancy structure to be returned by a function */
#define __DYNAMIC_REENT__
#define HAVE_GETDATE
@@ -105,22 +105,6 @@
#define __BUFSIZ__ 16
#define _REENT_SMALL
#endif
-#ifdef __m32c__
-#define __SMALL_BITFIELDS
-#undef INT_MAX
-#undef UINT_MAX
-#define INT_MAX __INT_MAX__
-#define UINT_MAX (__INT_MAX__ * 2U + 1)
-#define MALLOC_ALIGNMENT 8
-#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
-#define _POINTER_INT short
-#else
-#define _POINTER_INT long
-#endif
-#define __BUFSIZ__ 16
-#define _REENT_SMALL
-#endif /* __m32c__ */
-
/* This block should be kept in sync with GCC's limits.h. The point
of having these definitions here is to not include limits.h, which
diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h
index a3fb5c02c..f2f2342d5 100644
--- a/newlib/libc/include/sys/dirent.h
+++ b/newlib/libc/include/sys/dirent.h
@@ -1,13 +1,15 @@
/* <dirent.h> includes <sys/dirent.h>, which is this file. On a
system which supports <dirent.h>, this file is overridden by
dirent.h in the libc/sys/.../sys directory. On a system which does
- not support <dirent.h>, we will get this file which uses #error to force
- an error. */
+ not support <dirent.h>, we will get this file which tries to find
+ any other <dirent.h> which may be lurking around. If there isn't
+ one, the user will get an error indicating that there is no
+ <dirent.h>. */
#ifdef __cplusplus
extern "C" {
#endif
-#error "<dirent.h> not supported"
+#include_next <dirent.h>
#ifdef __cplusplus
}
#endif
diff --git a/newlib/libc/include/sys/fcntl.h b/newlib/libc/include/sys/fcntl.h
index fd8917d1e..0a680a1da 100644
--- a/newlib/libc/include/sys/fcntl.h
+++ b/newlib/libc/include/sys/fcntl.h
@@ -37,9 +37,9 @@ extern "C" {
#define O_CREAT _FCREAT
#define O_TRUNC _FTRUNC
#define O_EXCL _FEXCL
-#define O_SYNC _FSYNC
+/* O_SYNC _FSYNC not posix, defined below */
/* O_NDELAY _FNDELAY set in include/fcntl.h */
-/* O_NDELAY _FNBIO set in include/fcntl.h */
+/* O_NDELAY _FNBIO set in 5include/fcntl.h */
#define O_NONBLOCK _FNONBLOCK
#define O_NOCTTY _FNOCTTY
/* For machines which care - */
@@ -68,6 +68,8 @@ extern "C" {
#ifndef _POSIX_SOURCE
+#define O_SYNC _FSYNC
+
/*
* Flags that work for fcntl(fd, F_SETFL, FXXXX)
*/
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h
index 6754f1e9d..af31ce670 100644
--- a/newlib/libc/include/sys/features.h
+++ b/newlib/libc/include/sys/features.h
@@ -88,7 +88,6 @@ extern "C" {
# define _POSIX_THREAD_ATTR_STACKSIZE 1
# define _POSIX_SEMAPHORES 1
# define _POSIX_TIMERS 1
-# define _POSIX_MEMLOCK_RANGE 1
#endif
#ifdef __cplusplus
diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h
index df3164941..4771f5798 100644
--- a/newlib/libc/include/sys/time.h
+++ b/newlib/libc/include/sys/time.h
@@ -14,8 +14,8 @@ extern "C" {
#ifndef _WINSOCK_H
struct timeval {
- time_t tv_sec;
- suseconds_t tv_usec;
+ long tv_sec;
+ long tv_usec;
};
struct timezone {
@@ -24,7 +24,7 @@ struct timezone {
};
#ifdef __CYGWIN__
-#include <cygwin/sys_time.h>
+#include <sys/select.h>
#endif /* __CYGWIN__ */
#endif /* _WINSOCK_H */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index bf08616ab..5c288bfc0 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -251,6 +251,11 @@ typedef struct _types_fd_set {
#undef __MS_types__
#undef _ST_INT32
+/* The following are actually standard POSIX 1003.1b-1993 threads, mutexes,
+ condition variables, and keys. But since RTEMS is currently the only
+ newlib user of these, the ifdef is just on RTEMS. */
+
+#if defined(__rtems__) || defined(__CYGWIN__)
#ifndef __clockid_t_defined
typedef _CLOCKID_T_ clockid_t;
@@ -262,8 +267,9 @@ typedef _TIMER_T_ timer_t;
#define __timer_t_defined
#endif
-typedef unsigned long useconds_t;
-typedef long suseconds_t;
+#if defined(__CYGWIN__) || defined(__rtems__)
+typedef long useconds_t;
+#endif
#include <sys/features.h>
@@ -374,6 +380,8 @@ typedef struct {
#endif
#endif /* defined(_POSIX_THREADS) */
+#endif /* defined(__rtems__) */
+
#endif /* !__need_inttypes */
#undef __need_inttypes
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index a670dd735..e9215e24d 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -211,9 +211,9 @@ void _EXFUN(sync, (void));
#else /* defined(__rtems__) */
int _EXFUN(sync, (void));
#endif
-#endif
int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
int _EXFUN(symlink, (const char *__name1, const char *__name2));
+#endif
#define F_OK 0
#define R_OK 4