This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] to gprof: obvious portability fix


Hi there,

The patch below fixes an obvious portability bug in gprof. OK to commit?

-- 
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force

1351 VINE AVE APT 27		Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA	(home office)

E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)

P.S. Is there an "obviously correct" rule in Binutils like there is in GCC for
this sort of thing?

2001-01-27  Michael Sokolov  <msokolov@ivan.Harhan.ORG>

	* basic_blocks.c: #include <unistd.h> only if it exists.

Index: basic_blocks.c
===================================================================
RCS file: /cvs/src/src/gprof/basic_blocks.c,v
retrieving revision 1.3
diff -p -r1.3 basic_blocks.c
*** basic_blocks.c	2000/07/24 20:59:03	1.3
--- basic_blocks.c	2001/01/27 08:42:55
***************
*** 22,28 ****
     02111-1307, USA.  */
  
  #include <stdio.h>
- #include <unistd.h>
  #include "basic_blocks.h"
  #include "corefile.h"
  #include "gmon_io.h"
--- 22,27 ----
***************
*** 31,36 ****
--- 30,38 ----
  #include "libiberty.h"
  #include "source.h"
  #include "sym_ids.h"
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
  
  /* Default option values:  */
  bool bb_annotate_all_lines = FALSE;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]