files.c (read_file_guts): Add test on non-zero value of S_ISREG.

2011-05-29  John Tytgat  <John.Tytgat@aaug.net>

	* files.c (read_file_guts): Add test on non-zero value of S_ISREG.

From-SVN: r174571
This commit is contained in:
John Tytgat 2011-06-02 17:57:44 +00:00 committed by Tom Tromey
parent aad617322c
commit fc0993ac13
2 changed files with 6 additions and 2 deletions

View File

@ -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> 2011-05-22 Uros Bizjak <ubizjak@gmail.com>
PR target/49104 PR target/49104

View File

@ -1,6 +1,6 @@
/* Part of CPP library. File handling. /* Part of CPP library. File handling.
Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, 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. Free Software Foundation, Inc.
Written by Per Bothner, 1994. Written by Per Bothner, 1994.
Based on CCCP program by Paul Rubin, June 1986 Based on CCCP program by Paul Rubin, June 1986
@ -595,7 +595,7 @@ read_file_guts (cpp_reader *pfile, _cpp_file *file)
return false; return false;
} }
regular = S_ISREG (file->st.st_mode); regular = S_ISREG (file->st.st_mode) != 0;
if (regular) if (regular)
{ {
/* off_t might have a wider range than ssize_t - in other words, /* off_t might have a wider range than ssize_t - in other words,