Back to index

cell-binutils  2.17cvs20070401
gmon_io.h
Go to the documentation of this file.
00001 /* gmon_io.h
00002 
00003    Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
00004 
00005 This file is part of GNU Binutils.
00006 
00007 This program is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation; either version 2 of the License, or
00010 (at your option) any later version.
00011 
00012 This program is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with this program; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00020 
00021 #ifndef gmon_io_h
00022 #define gmon_io_h
00023 
00024 /* Some platforms need to put stdin into binary mode, to read
00025    binary files.  */
00026 #include "sysdep.h"
00027 #ifdef HAVE_SETMODE
00028 #ifndef O_BINARY
00029 #ifdef _O_BINARY
00030 #define O_BINARY _O_BINARY
00031 #define setmode _setmode
00032 #else
00033 #define O_BINARY 0
00034 #endif
00035 #endif
00036 #if O_BINARY
00037 #include <io.h>
00038 #define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0)
00039 #endif
00040 #endif
00041 
00042 #define INPUT_HISTOGRAM            (1 << 0)
00043 #define INPUT_CALL_GRAPH    (1 << 1)
00044 #define INPUT_BB_COUNTS            (1 << 2)
00045 
00046 extern int gmon_input;             /* What input did we see?  */
00047 extern int gmon_file_version;      /* File version are we dealing with.  */
00048 
00049 extern int gmon_io_read_vma (FILE *ifp, bfd_vma *valp);
00050 extern int gmon_io_read_32 (FILE *ifp, unsigned int *valp);
00051 extern int gmon_io_read (FILE *ifp, char *buf, size_t n);
00052 extern int gmon_io_write_vma (FILE *ifp, bfd_vma val);
00053 extern int gmon_io_write_32 (FILE *ifp, unsigned int val);
00054 extern int gmon_io_write_8 (FILE *ifp, unsigned int val);
00055 extern int gmon_io_write (FILE *ifp, char *buf, size_t n);
00056 
00057 extern void gmon_out_read   (const char *);
00058 extern void gmon_out_write  (const char *);
00059 
00060 #endif /* gmon_io_h */