summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-02 17:57:44 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-02 17:57:44 +0000
commit9793dd8e5c16b287e2df6d1665de384e3fafeb16 (patch)
tree75e807be3339d262f3f6f7fe144d0b033fe4062d /libcpp
parent1e5412404d23cd6981800a2ec2999a83ccd5de31 (diff)
downloadgcc-9793dd8e5c16b287e2df6d1665de384e3fafeb16.tar.gz
2011-05-29 John Tytgat <John.Tytgat@aaug.net>
* files.c (read_file_guts): Add test on non-zero value of S_ISREG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174571 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog4
-rw-r--r--libcpp/files.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 2630138b6e4..485d66e8285 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-29 John Tytgat <John.Tytgat@aaug.net>
+
+ * files.c (read_file_guts): Add test on non-zero value of S_ISREG.
+
2011-05-22 Uros Bizjak <ubizjak@gmail.com>
PR target/49104
diff --git a/libcpp/files.c b/libcpp/files.c
index cd0bc4847b2..d2c6b8bdecf 100644
--- a/libcpp/files.c
+++ b/libcpp/files.c
@@ -1,6 +1,6 @@
/* Part of CPP library. File handling.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Written by Per Bothner, 1994.
Based on CCCP program by Paul Rubin, June 1986
@@ -595,7 +595,7 @@ read_file_guts (cpp_reader *pfile, _cpp_file *file)
return false;
}
- regular = S_ISREG (file->st.st_mode);
+ regular = S_ISREG (file->st.st_mode) != 0;
if (regular)
{
/* off_t might have a wider range than ssize_t - in other words,