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:
parent
f3e0a5e9a5
commit
e5948ee29a
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue