diff --git a/src/kernel/libroot/posix/stdio/Jamfile b/src/kernel/libroot/posix/stdio/Jamfile index e8784baf94..a6237dcce8 100644 --- a/src/kernel/libroot/posix/stdio/Jamfile +++ b/src/kernel/libroot/posix/stdio/Jamfile @@ -1,6 +1,9 @@ SubDir OBOS_TOP src kernel libroot posix stdio ; -# KernelMergeObject posix_stdio.o : +KernelMergeObject posix_stdio.o : + <$(SOURCE_GRIST)>remove.c + <$(SOURCE_GRIST)>rename.c +# The other files are superseded by the glibc libio/stdio stuff # <$(SOURCE_GRIST)>fclose.c # <$(SOURCE_GRIST)>feof.c # <$(SOURCE_GRIST)>fflush.c @@ -45,9 +48,9 @@ SubDir OBOS_TOP src kernel libroot posix stdio ; # <$(SOURCE_GRIST)>vsprintf.c # <$(SOURCE_GRIST)>wbuf.c # <$(SOURCE_GRIST)>wsetup.c -# : -# -fPIC -DPIC -# ; + : + -fPIC -DPIC + ; KernelMergeObject kernel_posix_stdio.o : <$(SOURCE_GRIST)>kernel_vsprintf.c diff --git a/src/kernel/libroot/posix/stdio/remove.c b/src/kernel/libroot/posix/stdio/remove.c new file mode 100644 index 0000000000..55805db807 --- /dev/null +++ b/src/kernel/libroot/posix/stdio/remove.c @@ -0,0 +1,23 @@ +/* +** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the Haiku License. +*/ + + +#include +#include +#include + + +int +remove(const char *path) +{ + int status = _kern_unlink(path); + if (status < B_OK) { + errno = status; + return -1; + } + + return status; +} + diff --git a/src/kernel/libroot/posix/stdio/rename.c b/src/kernel/libroot/posix/stdio/rename.c new file mode 100644 index 0000000000..df6b7080d6 --- /dev/null +++ b/src/kernel/libroot/posix/stdio/rename.c @@ -0,0 +1,23 @@ +/* +** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the Haiku License. +*/ + + +#include +#include +#include + + +int +rename(const char *from, const char *to) +{ + int status = _kern_rename(from, to); + if (status < B_OK) { + errno = status; + return -1; + } + + return status; +} +