2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00
Files
build/jam_src/pwd.c
Dave Abrahams 8af7a4bd84 <dir.h> -> <direct.h>
[SVN r13125]
2002-03-07 22:59:24 +00:00

29 lines
390 B
C

#include "jam.h"
#include "lists.h"
#include "newstr.h"
#ifdef NT
#include <direct.h>
#define PATH_MAX _MAX_PATH
#else
#include <unistd.h>
#endif
#include <limits.h>
LIST*
pwd(void)
{
char buffer[PATH_MAX];
if (getcwd(buffer, sizeof(buffer)) == NULL)
{
perror("can not get current directory");
return L0;
}
else
{
return list_new(L0, newstr(buffer));
}
}