ubase/libutil/agetcwd.c

19 lines
237 B
C
Raw Normal View History

2013-08-14 10:38:43 -04:00
/* See LICENSE file for copyright and license details. */
#include <unistd.h>
#include "../util.h"
char *
agetcwd(void)
{
char *buf;
long size;
apathmax(&buf, &size);
2014-07-09 11:39:32 -04:00
if (!getcwd(buf, size))
2013-08-14 10:38:43 -04:00
eprintf("getcwd:");
return buf;
}