source: trunk/src/binutils/gprof/gmon_io.h@ 597

Last change on this file since 597 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1/* gmon_io.h
2
3 Copyright 2000, 2001 Free Software Foundation, Inc.
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
19Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20
21
22#ifndef gmon_io_h
23#define gmon_io_h
24
25#include "bfd.h"
26#include "gmon.h"
27
28/* Some platforms need to put stdin into binary mode, to read
29 binary files. */
30#include "sysdep.h"
31#ifdef HAVE_SETMODE
32#ifndef O_BINARY
33#ifdef _O_BINARY
34#define O_BINARY _O_BINARY
35#define setmode _setmode
36#else
37#define O_BINARY 0
38#endif
39#endif
40#if O_BINARY
41#include <io.h>
42#define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0)
43#endif
44#endif
45
46#define INPUT_HISTOGRAM (1 << 0)
47#define INPUT_CALL_GRAPH (1 << 1)
48#define INPUT_BB_COUNTS (1 << 2)
49
50extern int gmon_input; /* What input did we see? */
51extern int gmon_file_version; /* File version are we dealing with. */
52
53extern int gmon_io_read_vma PARAMS ((FILE *ifp, bfd_vma *valp));
54extern int gmon_io_read_32 PARAMS ((FILE *ifp, unsigned int *valp));
55extern int gmon_io_read PARAMS ((FILE *ifp, char *buf, size_t n));
56extern int gmon_io_write_vma PARAMS ((FILE *ifp, bfd_vma val));
57extern int gmon_io_write_32 PARAMS ((FILE *ifp, unsigned int val));
58extern int gmon_io_write_8 PARAMS ((FILE *ifp, unsigned char val));
59extern int gmon_io_write PARAMS ((FILE *ifp, char *buf, size_t n));
60
61extern void gmon_out_read PARAMS ((const char *));
62extern void gmon_out_write PARAMS ((const char *));
63
64#endif /* gmon_io_h */
Note: See TracBrowser for help on using the repository browser.