Răsfoiți Sursa

Moooore fixes :|

jD91mZM2 6 ani în urmă
părinte
comite
1fd9a5f249
3 a modificat fișierele cu 13 adăugiri și 6 ștergeri
  1. 7 0
      include/bits/unistd.h
  2. 4 4
      src/c/unistd.c
  3. 2 2
      src/unistd/cbindgen.toml

+ 7 - 0
include/bits/unistd.h

@@ -0,0 +1,7 @@
+#ifndef _BITS_UNISTD_H
+#define _BITS_UNISTD_H
+
+int execl(const char *path, const char* argv0, ...);
+int execle(const char *path, const char* argv0, ...);
+
+#endif

+ 4 - 4
include/bits/exec.h → src/c/unistd.c

@@ -1,7 +1,7 @@
-#ifndef _BITS_EXEC_H
-#define _BITS_EXEC_H
+#include <stdarg.h>
+#include <stddef.h>
 
-extern int execv(const char *path, char *const *argv);
+int execv(const char *path, char *const *argv);
 
 int execl(const char *path, const char* argv0, ...)
 {
@@ -24,7 +24,7 @@ int execl(const char *path, const char* argv0, ...)
 	}
 }
 
-extern int execve(const char *path, char *const *argv, char *const *envp);
+int execve(const char *path, char *const *argv, char *const *envp);
 
 int execle(const char *path, const char* argv0, ...)
 {

+ 2 - 2
src/unistd/cbindgen.toml

@@ -1,6 +1,6 @@
-sys_includes = ["stddef.h", "stdint.h", "sys/types.h", "stdarg.h", "bits/exec.h"]
+sys_includes = ["stddef.h", "stdint.h", "sys/types.h"]
 include_guard = "_UNISTD_H"
-trailer = "#include <bits/fcntl.h>"
+trailer = "#include <bits/fcntl.h>\n#include <bits/unistd.h>"
 language = "C"
 
 [enum]