]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gprof/gmon_io.h
* elflink.c (elf_link_add_object_symbols): Return via
[thirdparty/binutils-gdb.git] / gprof / gmon_io.h
CommitLineData
ef368dac 1/* gmon_io.h
0eee5820 2
d6a39701 3 Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
ef368dac
NC
4
5This file is part of GNU Binutils.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
44eb1801 19Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
ef368dac 20\f
252b5132
RH
21#ifndef gmon_io_h
22#define gmon_io_h
23
5af11cab
AM
24/* Some platforms need to put stdin into binary mode, to read
25 binary files. */
26#include "sysdep.h"
27#ifdef HAVE_SETMODE
28#ifndef O_BINARY
29#ifdef _O_BINARY
30#define O_BINARY _O_BINARY
31#define setmode _setmode
32#else
33#define O_BINARY 0
34#endif
35#endif
36#if O_BINARY
37#include <io.h>
38#define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0)
39#endif
40#endif
41
ef368dac
NC
42#define INPUT_HISTOGRAM (1 << 0)
43#define INPUT_CALL_GRAPH (1 << 1)
44#define INPUT_BB_COUNTS (1 << 2)
252b5132 45
ef368dac
NC
46extern int gmon_input; /* What input did we see? */
47extern int gmon_file_version; /* File version are we dealing with. */
252b5132 48
3e8f6abf
BE
49extern int gmon_io_read_vma (FILE *ifp, bfd_vma *valp);
50extern int gmon_io_read_32 (FILE *ifp, unsigned int *valp);
51extern int gmon_io_read (FILE *ifp, char *buf, size_t n);
52extern int gmon_io_write_vma (FILE *ifp, bfd_vma val);
53extern int gmon_io_write_32 (FILE *ifp, unsigned int val);
54extern int gmon_io_write_8 (FILE *ifp, unsigned int val);
55extern int gmon_io_write (FILE *ifp, char *buf, size_t n);
56
57extern void gmon_out_read (const char *);
58extern void gmon_out_write (const char *);
252b5132
RH
59
60#endif /* gmon_io_h */