diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-04-13 21:00:17 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-04-13 21:00:17 +0200 |
commit | 7b391244009ebca831aa8f8dac82112a9daa9023 (patch) | |
tree | 86bddf8c69af8681a14f9d62f2cc7e0f325348d5 /newlib/libc/include | |
parent | de51829c1747c0dd220f720ca84a51a818315b27 (diff) | |
download | newlib-7b391244009ebca831aa8f8dac82112a9daa9023.zip newlib-7b391244009ebca831aa8f8dac82112a9daa9023.tar.gz newlib-7b391244009ebca831aa8f8dac82112a9daa9023.tar.bz2 |
Get rid of some special cases for Cygwin in sys/types.h
Remove off_t typedef from cygwin/types.h thus relying on sys/types.h.
Introduce winsup/cygwin/machine/_types.h and move some types shared
with newlib into it. Get rid of their definition in cygwin/types.h.
Add same handling for __key_t/key_t as for the other types.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/sys/_types.h | 4 | ||||
-rw-r--r-- | newlib/libc/include/sys/types.h | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h index b38a161..c12eca3 100644 --- a/newlib/libc/include/sys/_types.h +++ b/newlib/libc/include/sys/_types.h @@ -45,6 +45,10 @@ typedef _off_t __off_t; typedef _off64_t __loff_t; +#ifndef __key_t_defined +typedef long __key_t; +#endif + /* * We need fpos_t for the following, but it doesn't have a leading "_", * so we use _fpos_t instead. diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 496c2ae..316ee9a 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -167,7 +167,6 @@ typedef int32_t register_t; * how the file was compiled (e.g. -mint16 vs -mint32, etc.). */ -#ifndef __CYGWIN__ /* which defines these types in it's own types.h. */ #ifndef _OFF_T_DECLARED typedef __off_t off_t; /* file offset */ #define _OFF_T_DECLARED @@ -184,7 +183,6 @@ typedef __uid_t uid_t; /* user id */ typedef __gid_t gid_t; /* group id */ #define _GID_T_DECLARED #endif -#endif /* !__CYGWIN__ */ #ifndef _PID_T_DECLARED typedef __pid_t pid_t; /* process id */ @@ -195,8 +193,9 @@ typedef __pid_t pid_t; /* process id */ typedef _mode_t mode_t; #endif -#ifndef __CYGWIN__ -typedef long key_t; +#ifndef _KEY_T_DECLARED +typedef __key_t key_t; /* IPC key */ +#define _KEY_T_DECLARED #endif #ifndef _SSIZE_T_DECLARED |