summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/sys
diff options
context:
space:
mode:
authorsheltonyu <[email protected]>2021-04-13 11:37:46 +0800
committerGitHub <[email protected]>2021-04-13 11:37:46 +0800
commit46c5ba9225702bf473646ec2f4200c9560e2db90 (patch)
treea7fe59ac9ce9a6a1c90d9c81324a4a6bb91b38a4 /components/libc/compilers/dlib/sys
parent35ef1f9e0fcf1ae881a83558dbf7334ab08c598e (diff)
parentc44e5165bef5b7b069eb99a4f027454f417a726b (diff)
Merge branch 'master' into developer
Diffstat (limited to 'components/libc/compilers/dlib/sys')
-rw-r--r--components/libc/compilers/dlib/sys/errno.h2
-rw-r--r--components/libc/compilers/dlib/sys/mman.h2
-rw-r--r--components/libc/compilers/dlib/sys/signal.h2
-rw-r--r--components/libc/compilers/dlib/sys/stat.h2
-rw-r--r--components/libc/compilers/dlib/sys/types.h12
-rw-r--r--components/libc/compilers/dlib/sys/unistd.h41
6 files changed, 38 insertions, 23 deletions
diff --git a/components/libc/compilers/dlib/sys/errno.h b/components/libc/compilers/dlib/sys/errno.h
index 1ad4c8acc0..54a1d33cd0 100644
--- a/components/libc/compilers/dlib/sys/errno.h
+++ b/components/libc/compilers/dlib/sys/errno.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/libc/compilers/dlib/sys/mman.h b/components/libc/compilers/dlib/sys/mman.h
index 8c61b32b7c..6a260ccd70 100644
--- a/components/libc/compilers/dlib/sys/mman.h
+++ b/components/libc/compilers/dlib/sys/mman.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/libc/compilers/dlib/sys/signal.h b/components/libc/compilers/dlib/sys/signal.h
index 22adb1228b..a30235f2b2 100644
--- a/components/libc/compilers/dlib/sys/signal.h
+++ b/components/libc/compilers/dlib/sys/signal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/libc/compilers/dlib/sys/stat.h b/components/libc/compilers/dlib/sys/stat.h
index ce95230e88..c4b42083c4 100644
--- a/components/libc/compilers/dlib/sys/stat.h
+++ b/components/libc/compilers/dlib/sys/stat.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
diff --git a/components/libc/compilers/dlib/sys/types.h b/components/libc/compilers/dlib/sys/types.h
index 7dbeddcaa9..6e2d1ce839 100644
--- a/components/libc/compilers/dlib/sys/types.h
+++ b/components/libc/compilers/dlib/sys/types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -14,7 +14,9 @@
typedef int32_t clockid_t;
typedef int32_t key_t; /* Used for interprocess communication. */
-typedef int32_t pid_t; /* Used for process IDs and process group IDs. */
+typedef int pid_t; /* Used for process IDs and process group IDs. */
+typedef unsigned short uid_t;
+typedef unsigned short gid_t;
#ifndef ARCH_CPU_64BIT
typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */
#else
@@ -22,4 +24,10 @@ typedef long signed int ssize_t; /* Used for a count of bytes or an error
#endif
typedef unsigned long useconds_t; /* microseconds (unsigned) */
+typedef unsigned long dev_t;
+
+typedef unsigned int u_int;
+typedef unsigned char u_char;
+typedef unsigned long u_long;
+
#endif
diff --git a/components/libc/compilers/dlib/sys/unistd.h b/components/libc/compilers/dlib/sys/unistd.h
index 6d99cd6c55..14966a2bad 100644
--- a/components/libc/compilers/dlib/sys/unistd.h
+++ b/components/libc/compilers/dlib/sys/unistd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -21,22 +21,22 @@
#include <dfs_posix.h>
#else
-#define _FREAD 0x0001 /* read enabled */
-#define _FWRITE 0x0002 /* write enabled */
-#define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
-#define _FMARK 0x0010 /* internal; mark during gc() */
-#define _FDEFER 0x0020 /* internal; defer for next gc pass */
-#define _FASYNC 0x0040 /* signal pgrp when data ready */
-#define _FSHLOCK 0x0080 /* BSD flock() shared lock present */
-#define _FEXLOCK 0x0100 /* BSD flock() exclusive lock present */
-#define _FCREAT 0x0200 /* open with file create */
-#define _FTRUNC 0x0400 /* open with truncation */
-#define _FEXCL 0x0800 /* error on open if file exists */
-#define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */
-#define _FSYNC 0x2000 /* do all writes synchronously */
-#define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */
-#define _FNDELAY _FNONBLOCK /* non blocking I/O (4.2 style) */
-#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
+#define _FREAD 0x0001 /* read enabled */
+#define _FWRITE 0x0002 /* write enabled */
+#define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
+#define _FMARK 0x0010 /* internal; mark during gc() */
+#define _FDEFER 0x0020 /* internal; defer for next gc pass */
+#define _FASYNC 0x0040 /* signal pgrp when data ready */
+#define _FSHLOCK 0x0080 /* BSD flock() shared lock present */
+#define _FEXLOCK 0x0100 /* BSD flock() exclusive lock present */
+#define _FCREAT 0x0200 /* open with file create */
+#define _FTRUNC 0x0400 /* open with truncation */
+#define _FEXCL 0x0800 /* error on open if file exists */
+#define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */
+#define _FSYNC 0x2000 /* do all writes synchronously */
+#define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */
+#define _FNDELAY _FNONBLOCK /* non blocking I/O (4.2 style) */
+#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
#endif
@@ -47,4 +47,11 @@ char * ttyname (int desc);
unsigned int sleep(unsigned int seconds);
int usleep(useconds_t usec);
+pid_t getpid(void);
+pid_t getppid(void);
+uid_t getuid(void);
+uid_t geteuid(void);
+gid_t getgid(void);
+gid_t getegid(void);
+
#endif /* _SYS_UNISTD_H */