Sign in
googlers
/
maze
/
klibc
/
4122764ace9a7548677a28ae921a592727a6345a
/
.
/
getcwd.c
blob: 350ec69a6356edbcd7c7f2ac53766dbb43597962 [
file
] [
log
] [
blame
]
/*
* getcwd.c
*/
#include
<unistd.h>
#include
<sys/syscall.h>
#define
__NR___getcwd __NR_getcwd
static
inline
_syscall2
(
int
,
__getcwd
,
char
*,
buf
,
size_t
,
size
);
char
*
getcwd
(
char
*
buf
,
size_t
size
)
{
return
(
__getcwd
(
buf
,
size
)
<
0
)
?
NULL
:
buf
;
}