Resurrected posix_stdio.o: it now contains additional stdio functions not

covered by glibc's libio/stdio.
Added rename() and remove().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8216 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-06-28 12:27:39 +00:00
parent f3e0a5e9a5
commit e5948ee29a
3 changed files with 53 additions and 4 deletions

View File

@ -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

View File

@ -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 <stdio.h>
#include <syscalls.h>
#include <errno.h>
int
remove(const char *path)
{
int status = _kern_unlink(path);
if (status < B_OK) {
errno = status;
return -1;
}
return status;
}

View File

@ -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 <stdio.h>
#include <syscalls.h>
#include <errno.h>
int
rename(const char *from, const char *to)
{
int status = _kern_rename(from, to);
if (status < B_OK) {
errno = status;
return -1;
}
return status;
}