/* Libiberty realpath. Like realpath, but more consistent behavior.
Based on gdb_realpath from GDB.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2018 Free Software Foundation, Inc.
This file is part of the libiberty library.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/*
#endif
char *
-lrealpath (filename)
- const char *filename;
+lrealpath (const char *filename)
{
/* Method 1: The system has a compile time upper bound on a filename
path. Use that and realpath() to canonicalize the name. This is
{
/* PATH_MAX is bounded. */
char *buf, *rp, *ret;
- buf = malloc (path_max);
+ buf = (char *) malloc (path_max);
if (buf == NULL)
return NULL;
rp = realpath (filename, buf);