Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ppu/crt/crt1.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ extern long int __librt_telldir_r(struct _reent *r,DIR *dirp);
extern void __librt_rewinddir_r(struct _reent *r,DIR *dirp);
extern void __librt_seekdir_r(struct _reent *r,DIR *dirp,long int loc);
extern int __librt_rmdir_r(struct _reent *r,const char *dirname);
extern int __librt_unlink_r(struct _reent *r,const char *path);

extern int __librt_usleep_r(struct _reent *r,useconds_t usec);
extern unsigned int __librt_sleep_r(struct _reent *r,unsigned int seconds);
Expand Down Expand Up @@ -76,6 +77,7 @@ static void __syscalls_init(void)
__syscalls.rewinddir_r = __librt_rewinddir_r;
__syscalls.seekdir_r = __librt_seekdir_r;
__syscalls.rmdir_r = __librt_rmdir_r;
__syscalls.unlink_r = __librt_unlink_r;

__syscalls.sleep_r = __librt_sleep_r;
__syscalls.usleep_r = __librt_usleep_r;
Expand Down
2 changes: 1 addition & 1 deletion ppu/librt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ VPATH := $(BASEDIR)
OBJS := \
sbrk.o exit.o close.o lseek.o read.o open.o sleep.o write.o fstat.o \
socket.o lock.o dirent.o mkdir.o times.o umask.o lv2errno.o heap.o \
chmod.o rename.o rmdir.o isatty.o gettod.o settod.o
chmod.o rename.o rmdir.o isatty.o gettod.o settod.o unlink.o

all: ppu

Expand Down
18 changes: 18 additions & 0 deletions ppu/librt/unlink.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <stdio.h>
#include <fcntl.h>
#include <_ansi.h>
#include <_syslist.h>
#include <sys/reent.h>
#include <sys/errno.h>
#include <sys/types.h>
#include <sys/lv2errno.h>

#include <sys/file.h>

int
_DEFUN(__librt_unlink_r,(r,path),
struct _reent *r _AND
const char *path)
{
return lv2errno_r(r,sysLv2FsUnlink(path));
}