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
path: root/newlib
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-13 14:10:16 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-04-13 14:54:39 +0300
commitde51829c1747c0dd220f720ca84a51a818315b27 (patch)
tree9b2ec52d3db78feaba22f4d1bf2ee310818617cc /newlib
parent477463a2011ba81907a753df9ce7a71b6563db54 (diff)
Add BSD guards for off_t, dev_t, uid_t, and gid_t
Copy definitions of off_t, dev_t, uid_t, and gid_t verbatim from latest FreeBSD <sys/types.h>. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/include/sys/types.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index c0b579623..496c2ae0c 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -168,11 +168,23 @@ typedef int32_t register_t;
*/
#ifndef __CYGWIN__ /* which defines these types in it's own types.h. */
-typedef _off_t off_t;
-typedef __dev_t dev_t;
-typedef __uid_t uid_t;
-typedef __gid_t gid_t;
+#ifndef _OFF_T_DECLARED
+typedef __off_t off_t; /* file offset */
+#define _OFF_T_DECLARED
#endif
+#ifndef _DEV_T_DECLARED
+typedef __dev_t dev_t; /* device number or struct cdev */
+#define _DEV_T_DECLARED
+#endif
+#ifndef _UID_T_DECLARED
+typedef __uid_t uid_t; /* user id */
+#define _UID_T_DECLARED
+#endif
+#ifndef _GID_T_DECLARED
+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 */