/* Obsolete function to get current working directory.
- Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
return NULL;
}
- if (getcwd (tmpbuf, LOCAL_PATH_MAX) == NULL)
+ if (getcwd (tmpbuf, PATH_MAX) == NULL)
{
/* We use 1024 here since it should really be enough and because
- this is a save value. */
+ this is a safe value. */
__strerror_r (errno, buf, 1024);
return NULL;
}
/* This is completely unsafe. Nobody can say how big the user
provided buffer is. Perhaps the application and the libc
disagree about the value of PATH_MAX. */
- strcpy (buf, tmpbuf);
-
- return buf;
+ return strcpy (buf, tmpbuf);
}
link_warning (getwd,