diff options
author | Alan Modra <amodra@gmail.com> | 2000-05-26 13:11:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-05-26 13:11:57 +0000 |
commit | 5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e (patch) | |
tree | 43c01869523de4ad682493e6674e5e8a9fed1804 /gprof/gmon_io.h | |
parent | 010c70e10fb422ae6151a8808215a122f461fce8 (diff) | |
download | gdb-5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e.zip gdb-5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e.tar.gz gdb-5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e.tar.bz2 |
Eli Zaretskii's DOSish file name patches.
Diffstat (limited to 'gprof/gmon_io.h')
-rw-r--r-- | gprof/gmon_io.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gprof/gmon_io.h b/gprof/gmon_io.h index bf257a4..06bca37 100644 --- a/gprof/gmon_io.h +++ b/gprof/gmon_io.h @@ -4,6 +4,24 @@ #include "bfd.h" #include "gmon.h" +/* Some platforms need to put stdin into binary mode, to read + binary files. */ +#include "sysdep.h" +#ifdef HAVE_SETMODE +#ifndef O_BINARY +#ifdef _O_BINARY +#define O_BINARY _O_BINARY +#define setmode _setmode +#else +#define O_BINARY 0 +#endif +#endif +#if O_BINARY +#include <io.h> +#define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0) +#endif +#endif + #define INPUT_HISTOGRAM (1<<0) #define INPUT_CALL_GRAPH (1<<1) #define INPUT_BB_COUNTS (1<<2) |