[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/NEWLIB PATCH v2 4/5] Add missing stubs needed by CPython2
Reviewed-by: Costin Lupu <costin.lupu@xxxxxxxxx> On 6/2/19 7:13 PM, Vlad-Andrei BĂDOIU (78692) wrote: > This patch adds a number of stubs needed by CPython2 to compile. > > Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> > --- > console.c | 10 ++++++ > file.c | 23 ++++++++++++++ > process.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > pty.c | 8 +++++ > resource.c | 5 +++ > 5 files changed, 139 insertions(+) > > diff --git a/console.c b/console.c > index 4fd33cd..7016957 100644 > --- a/console.c > +++ b/console.c > @@ -41,3 +41,13 @@ int isatty(int file __unused) > { > return 1; > } > + > +char *ttyname(int fd __unused) > +{ > + return 0; > +} > + > +char *ctermid(char *s __unused) > +{ > + return 0; > +} > diff --git a/file.c b/file.c > index ab1cdbe..3fdf99a 100644 > --- a/file.c > +++ b/file.c > @@ -94,3 +94,26 @@ int select(int nfds, fd_set *readfds __unused, fd_set > *writefds __unused, > return -1; > } > #endif /* !CONFIG_LWIP_SOCKET */ > + > +int fchown(int fd __unused, uid_t owner __unused, gid_t group __unused) > +{ > + return 0; > +} > + > +int lchown(const char *pathname __unused, uid_t owner __unused, > + gid_t group __unused) > +{ > + return 0; > +} > + > + > +int utimes(const char *filename __unused, > + const struct timeval times[2] __unused) > +{ > + return 0; > +} > + > +int pipe(int pipefd[2] __unused) > +{ > + return 0; > +} > diff --git a/process.c b/process.c > index 096a12b..c4e3664 100644 > --- a/process.c > +++ b/process.c > @@ -37,6 +37,9 @@ > > #include <time.h> > #include <errno.h> > +#include <stdlib.h> > +#include <stdio.h> > +#include <sys/resource.h> > #undef errno > extern int errno; > > @@ -46,6 +49,26 @@ int execve(char *name __unused, char **argv __unused, char > **env __unused) > return -1; > } > > +int execv(const char *path __unused, char *const argv[] __unused) > +{ > + return 0; > +} > + > +int system(const char *command __unused) > +{ > + return 0; > +} > + > +FILE *popen(const char *command __unused, const char *type __unused) > +{ > + return NULL; > +} > + > +int pclose(FILE *stream __unused) > +{ > + return 0; > +} > + > int fork(void) > { > errno = EAGAIN; > @@ -57,6 +80,11 @@ int getpid(void) > return 1; > } > > +pid_t getppid(void) > +{ > + return 0; > +} > + > int kill(int pid __unused, int sig __unused) > { > errno = EINVAL; > @@ -73,3 +101,68 @@ int wait(int *status __unused) > errno = ECHILD; > return -1; > } > + > +int setpgrp(void) > +{ > + return 0; > +} > + > + > +int killpg(int pgrp __unused, int sig __unused) > +{ > + return 0; > +} > + > + > +pid_t wait3(int *wstatus __unused, int options __unused, > + struct rusage *rusage __unused) > +{ > + return 0; > +} > + > +pid_t wait4(pid_t pid __unused, int *wstatus __unused, int options __unused, > + struct rusage *rusage __unused) > +{ > + return 0; > +} > + > +pid_t waitpid(pid_t pid __unused, int *wstatus __unused, int options > __unused) > +{ > + return 0; > +} > + > +pid_t setsid(void) > +{ > + return 0; > +} > + > +pid_t getsid(pid_t pid __unused) > +{ > + return 0; > +} > + > +int setpgid(pid_t pid __unused, pid_t pgid __unused) > +{ > + return 0; > +} > + > +pid_t getpgid(pid_t pid) > +{ > + return 0; > +} > + > + > +int tcsetpgrp(int fd __unused, pid_t pgrp __unused) > +{ > + return 0; > +} > + > +pid_t tcgetpgrp(int fd __unused) > +{ > + return 0; > +} > + > +int nice(int inc __unused) > +{ > + return 0; > +} > diff --git a/pty.c b/pty.c > index 46b554a..009688d 100644 > --- a/pty.c > +++ b/pty.c > @@ -36,6 +36,7 @@ > */ > > #include <pty.h> > +#include <sys/types.h> > #include <uk/essentials.h> > > int openpty(int *amaster __unused, int *aslave __unused, char *name __unused, > @@ -44,3 +45,10 @@ int openpty(int *amaster __unused, int *aslave __unused, > char *name __unused, > { > return 0; > } > + > +pid_t forkpty(int *amaster __unused, char *name __unused, > + const struct termios *termp __unused, > + const struct winsize *winp __unused) > +{ > + return 0; > +} > diff --git a/resource.c b/resource.c > index ae112f2..30d0028 100644 > --- a/resource.c > +++ b/resource.c > @@ -46,3 +46,8 @@ int setrlimit(int resource __unused, const struct rlimit > *rlim __unused) > { > return 0; > } > + > +int getrusage(int who __unused, struct rusage *usage __unused) > +{ > + return 0; > +} > _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |