sbase/libutil/agetcwd.c

19 lines
239 B
C
Raw Normal View History

2011-05-26 03:01:20 +00:00
/* See LICENSE file for copyright and license details. */
#include <unistd.h>
2011-05-26 03:01:20 +00:00
#include "../util.h"
char *
agetcwd(void)
{
char *buf;
size_t size;
2011-05-26 03:01:20 +00:00
2011-06-25 16:26:44 +00:00
apathmax(&buf, &size);
if (!getcwd(buf, size))
2011-05-26 03:01:20 +00:00
eprintf("getcwd:");
2011-05-26 03:01:20 +00:00
return buf;
}