Skip to contentSkip to conversation

stubdom: add functions for caml runtime

PATCH New Samuel Thibault 1 participant 1 message Jul 17, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stubdom: add functions for caml runtime

stubdom: add functions for caml runtime

extras/mini-os/include/posix/unistd.h +1 -3
diff -r 530efcde6203 extras/mini-os/include/posix/unistd.h
@@ -2,10 +2,8 @@
 #define _POSIX_UNISTD_H
 
 #include_next <unistd.h>
-#include <mini-os/arch_limits.h>
 
-#define getpagesize() __PAGE_SIZE
-
+size_t getpagesize(void);
 int ftruncate(int fd, off_t length);
 
 #endif /* _POSIX_UNISTD_H */
extras/mini-os/lib/sys.c +7 -0
diff -r 530efcde6203 extras/mini-os/lib/sys.c
@@ -1095,6 +1095,11 @@
     return 0;
 }
 
+size_t getpagesize(void)
+{
+    return PAGE_SIZE;
+}
+
 void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)
 {
     unsigned long n = (length + PAGE_SIZE - 1) / PAGE_SIZE;
@@ -1213,7 +1218,9 @@
 unsupported_function_crash(pipe);
 unsupported_function_crash(fork);
 unsupported_function_crash(execv);
+unsupported_function_crash(execve);
 unsupported_function_crash(waitpid);
+unsupported_function_crash(wait);
 unsupported_function_crash(lockf);
 unsupported_function_crash(sysconf);
 unsupported_function(int, tcsetattr, -1);