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
This commit is contained in:
parent
75f6ec9afd
commit
4489800d00
5 changed files with 39 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue