]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Uefi/StubFunctions.c
StdLib: Fix some build problems and obscure bugs.
[mirror_edk2.git] / StdLib / LibC / Uefi / StubFunctions.c
index da2eaf91487b754dbd9039a61507011a0854d745..806cf4ac2b7a4c270626d176df8c49c98210055b 100644 (file)
@@ -11,6 +11,7 @@
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
+#include  <LibConfig.h>\r
 #include  <sys/EfiCdefs.h>\r
 #include  <sys/featuretest.h>\r
 #include  <namespace.h>\r
 struct passwd *\r
 getpwuid (uid_t uid)\r
 {\r
-  uid;\r
   errno = EPERM;\r
   return NULL;\r
 }\r
 \r
-char *getlogin (void)\r
+char *\r
+getlogin (void)\r
 {\r
   errno = EPERM;\r
   return NULL;\r
@@ -35,45 +36,57 @@ char *getlogin (void)
 struct passwd *\r
 getpwnam (const char *name)\r
 {\r
-  name;\r
   errno = EPERM;\r
   return NULL;\r
 }\r
 \r
-uid_t getuid (void)\r
+uid_t\r
+getuid (void)\r
 {\r
   return 0;\r
 }\r
 \r
-pid_t fork (void)\r
+pid_t\r
+getpid(void)\r
+{\r
+  return 0;\r
+}\r
+\r
+pid_t\r
+fork (void)\r
 {\r
   errno = EPERM;\r
   return (-1);\r
 }\r
 \r
-int chmod (const char *c, mode_t m)\r
+int\r
+chmod (const char *c, mode_t m)\r
 {\r
   errno = EPERM;\r
   return (-1);\r
 }\r
 \r
-pid_t   wait(int *stat_loc) {\r
+pid_t\r
+wait(int *stat_loc) {\r
   return 0;\r
 }\r
 \r
-FILE *popen (const char *cmd, const char *type)\r
+FILE *\r
+popen (const char *cmd, const char *type)\r
 {\r
   errno = EPERM;\r
   return NULL;\r
 }\r
 \r
-int pclose (FILE *stream)\r
+int\r
+pclose (FILE *stream)\r
 {\r
   errno = EPERM;\r
   return -1;\r
 }\r
 \r
-int access (const char *path, int amode)\r
+mode_t\r
+umask(mode_t cmask)\r
 {\r
-  return 0;\r
+  return (mode_t)0;\r
 }\r