aboutsummaryrefslogtreecommitdiff
path: root/libcpp/init.c
diff options
context:
space:
mode:
authorKai Tietz <ktietz@redhat.com>2011-03-25 20:11:26 +0100
committerKai Tietz <ktietz@gcc.gnu.org>2011-03-25 20:11:26 +0100
commit4489800d000d008d3bf47ffcdc85349eff1aec14 (patch)
tree3c0770ee3a7ff6a848c29032309a198598258211 /libcpp/init.c
parent75f6ec9afdb6457f7a728a4360b0a37160b88c4b (diff)
downloadgcc-4489800d000d008d3bf47ffcdc85349eff1aec14.zip
gcc-4489800d000d008d3bf47ffcdc85349eff1aec14.tar.gz
gcc-4489800d000d008d3bf47ffcdc85349eff1aec14.tar.bz2
files.c (file_hash_eq): Use filename_cmp instead of strcmp.
2011-03-25 Kai Tietz <ktietz@redhat.com> * files.c (file_hash_eq): Use filename_cmp instead of strcmp. (nonexistent_file_hash_eq): Likewise. (remap_filename): Likewise. Handle absolute DOS-path, (append_file_to_dir): Check for IS_DIR_SEPARATOR instead of slash. (read_name_map): Likewise. * linemap.c (linemap_add): Use filename_cmp instead of strcmp. * mkdeps.c (apply_vpath): Use filename_ncmp instead of strncmp. (deps_restore): Use filename_cmp instead of strcmp. * init.c (read_original_directory): Use IS_DIR_SEPARATOR instead of checking for slash. From-SVN: r171521
Diffstat (limited to 'libcpp/init.c')
-rw-r--r--libcpp/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcpp/init.c b/libcpp/init.c
index cfc16e8..5c6dacf 100644
--- a/libcpp/init.c
+++ b/libcpp/init.c
@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
#include "internal.h"
#include "mkdeps.h"
#include "localedir.h"
+#include "filenames.h"
static void init_library (void);
static void mark_named_operators (cpp_reader *, int);
@@ -640,8 +641,8 @@ read_original_directory (cpp_reader *pfile)
if (token->type != CPP_STRING
|| ! (token->val.str.len >= 5
- && token->val.str.text[token->val.str.len-2] == '/'
- && token->val.str.text[token->val.str.len-3] == '/'))
+ && IS_DIR_SEPARATOR (token->val.str.text[token->val.str.len-2])
+ && IS_DIR_SEPARATOR (token->val.str.text[token->val.str.len-3])))
{
_cpp_backup_tokens (pfile, 3);
return;