Преглед изворни кода

implement getuid and getpid

Meco Man пре 4 година
родитељ
комит
d06420e1d7

+ 3 - 0
components/libc/compilers/armlibc/sys/unistd.h

@@ -73,4 +73,7 @@ char *  ttyname     (int desc);
 unsigned int sleep(unsigned int seconds);
 int usleep(useconds_t usec);
 
+uid_t getuid(void);
+pid_t getpid(void);
+
 #endif /* _SYS_UNISTD_H */

+ 12 - 0
components/libc/compilers/common/unistd.c

@@ -49,3 +49,15 @@ int usleep(useconds_t usec)
     return 0;
 }
 RTM_EXPORT(usleep);
+
+uid_t getuid(void)
+{
+    return -1;
+}
+RTM_EXPORT(getuid);
+
+pid_t getpid(void)
+{
+    return -1;
+}
+RTM_EXPORT(getuid);

+ 3 - 0
components/libc/compilers/dlib/sys/unistd.h

@@ -47,4 +47,7 @@ char *  ttyname     (int desc);
 unsigned int sleep(unsigned int seconds);
 int usleep(useconds_t usec);
 
+uid_t getuid(void);
+pid_t getpid(void);
+
 #endif /* _SYS_UNISTD_H */