=== src/modules/lib/posix/misc.c ================================================================== --- src/modules/lib/posix/misc.c (revision 1407) +++ src/modules/lib/posix/misc.c (local) @@ -35,6 +35,7 @@ #include #include +#include #ifndef CONFIG_LIBC_NO_STUBS /** @@ -44,5 +45,23 @@ { return 0; } + +/** + * Prozess klonen + */ +pid_t fork() +{ + errno = EAGAIN; + return -1; +} + +/** + * Pipe einrichten + */ +int pipe(int mode[2]) +{ + errno = ENFILE; + return -1; +} #endif === src/modules/lib/posix/posix_files.c ================================================================== --- src/modules/lib/posix/posix_files.c (revision 1407) +++ src/modules/lib/posix/posix_files.c (local) @@ -39,6 +39,7 @@ #include #include #include +#include /// Ein Element das einen Unix-Dateideskriptor mit einem Normalen verknuepft struct fd_list_element { @@ -217,6 +218,7 @@ { return open(filename, O_CREAT | O_WRONLY | O_TRUNC, mode); } + /** * Aus einem Unix-Dateideskriptor lesen. * @@ -323,3 +325,25 @@ return 0; } + +#ifndef CONFIG_LIBC_NO_STUBS +/** + * Dateideskriptor duplizieren + */ +int dup(int fd) +{ + errno = EMFILE; + return -1; +} + +/** + * Dateideskriptor duplizieren + */ +int dup2(int fd, int newfd) +{ + errno = EMFILE; + return -1; +} + +#endif // ndef CONFIG_LIBC_NO_STUBS + === src/modules/lib/posix/signal.c ================================================================== --- src/modules/lib/posix/signal.c (revision 1407) +++ src/modules/lib/posix/signal.c (local) @@ -41,6 +41,7 @@ #include #include #include +#include /// Array mit Pointern auf die Signal-Handler static sighandler_t signal_handlers [_SIGNO_MAX]; @@ -258,3 +259,27 @@ return ((sigset->bitmask[signum / 8] & (1 <<(signum % 8))) != 0); } + +#ifndef CONFIG_LIBC_NO_STUBS +/** + * Timer setzen, der beim ablaufen ein SIGALARM sendet + */ +long alarm(long seconds) +{ + return 0; +} + +/** + * Warten bis zeit abgelaufen ist, oder Signal eintrifft + * + * @return 0 wenn die Zeit abgelaufen ist, oder die Zeit, die noch geschlafen + * werden sollte. + */ +unsigned int sleep(unsigned int seconds) +{ + // TODO: Unterbrechen durch Signale + msleep(seconds * 1000); + return 0; +} +#endif +