diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-01 20:06:57 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-06-01 20:06:57 +0000 |
commit | 5b1b3ffb2dc4dc42c27708b5ca31e5b5ea2fdd49 (patch) | |
tree | f453ae8daad4bc2e728ee46239aaa1feccfd364b /gcc/cppfiles.c | |
parent | 21c00a5ad6ef7590e0028e870259cb93561bb72f (diff) | |
download | gcc-5b1b3ffb2dc4dc42c27708b5ca31e5b5ea2fdd49.tar.gz |
2000-06-01 Zack Weinberg <zack@wolery.cumb.org>
* cpplex.c (maybe_macroexpand): Use CPP_WTRADITIONAL. Improve
error message.
* cpplib.c (parse_include): Remove support for VAX-C
"#include starlet" misfeature.
* gcc.dg/cpp-tradwarn2.c: Update egrep pattern.
2000-05-31 Laurynas Biveinis <lauras@softhome.net>
* cppfiles.c: conditionally define O_BINARY.
(open_include_file): pass O_BINARY to open().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34344 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 676c9d56c4a..71bb657c685 100644 --- a/gcc/cppfiles.c +++ b/gcc/cppfiles.c @@ -39,6 +39,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # define MMAP_THRESHOLD 0 #endif +#ifndef O_BINARY +# define O_BINARY 0 +#endif + static IHASH *redundant_include_p PARAMS ((IHASH *, struct file_name_list *)); static IHASH *make_IHASH PARAMS ((const char *, const char *, struct file_name_list *, @@ -216,14 +220,18 @@ make_IHASH (name, fname, path, hash, slot) paranoia is a virtue). Use the three-argument form of open even though we aren't - specifying O_CREAT, to defend against broken system headers. */ + specifying O_CREAT, to defend against broken system headers. + + O_BINARY tells some runtime libraries (notably DJGPP) not to do + newline translation; we can handle DOS line breaks just fine + ourselves. */ static inline int open_include_file (pfile, filename) cpp_reader *pfile ATTRIBUTE_UNUSED; const char *filename; { - return open (filename, O_RDONLY|O_NOCTTY, 0666); + return open (filename, O_RDONLY|O_NOCTTY|O_BINARY, 0666); } /* Search for include file FNAME in the include chain starting at |