/* Utility to update paths from internal to external forms.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2007 Free Software Foundation, Inc.
+ 2007, 2011 Free Software Foundation, Inc.
This file is part of GCC.
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
#if defined(_WIN32) && defined(ENABLE_WIN32_REGISTRY)
#include <windows.h>
#endif
#include "prefix.h"
+#include "common/common-target.h"
static const char *std_prefix = PREFIX;
if (prefix == 0)
prefix = std_prefix;
- if (temp)
- free (temp);
+ free (temp);
return prefix;
}
char *result, *p;
const int len = strlen (std_prefix);
- if (! strncmp (path, std_prefix, len)
+ if (! filename_ncmp (path, std_prefix, len)
&& (IS_DIR_SEPARATOR(path[len])
|| path[len] == '\0')
&& key != 0)
result = concat (key, &path[len], NULL);
if (free_key)
- free (CONST_CAST (key));
+ free (CONST_CAST (char *, key));
result = translate_name (result);
}
else
result = xstrdup (path);
-#ifndef ALWAYS_STRIP_DOTDOT
-#define ALWAYS_STRIP_DOTDOT 0
-#endif
-
p = result;
while (1)
{
&& (p != result && IS_DIR_SEPARATOR (p[-1])))
{
*p = 0;
- if (!ALWAYS_STRIP_DOTDOT && access (result, X_OK) == 0)
+ if (!targetm_common.always_strip_dotdot
+ && access (result, X_OK) == 0)
{
*p = '.';
break;