mescc: getcwd: Move to libc.
* lib/linux/libc.c (getcwd): New function. * lib/linux/tcc.c (getcwd): Remove.
This commit is contained in:
parent
68441476e0
commit
6e2f941573
|
@ -150,6 +150,15 @@ fsync (int filedes)
|
||||||
return _sys_call1 (SYS_fsync, (int)filedes);
|
return _sys_call1 (SYS_fsync, (int)filedes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
getcwd (char *buffer, size_t size)
|
||||||
|
{
|
||||||
|
int r = _sys_call2 (SYS_getcwd, (long)buffer, (long)size);
|
||||||
|
if (r >= 0)
|
||||||
|
return buffer;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#include "linux/clock_gettime.c"
|
#include "linux/clock_gettime.c"
|
||||||
#include "linux/gettimeofday.c"
|
#include "linux/gettimeofday.c"
|
||||||
#include "linux/time.c"
|
#include "linux/time.c"
|
||||||
|
|
|
@ -54,9 +54,3 @@ stat (char const *file_name, struct stat *statbuf)
|
||||||
{
|
{
|
||||||
return _sys_call2 (SYS_stat, (long)file_name, (long)statbuf);
|
return _sys_call2 (SYS_stat, (long)file_name, (long)statbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
|
||||||
getcwd (char *buffer, size_t size)
|
|
||||||
{
|
|
||||||
return _sys_call2 (SYS_getcwd, (long)buffer, (long)size);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue