This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Fix inclusion order in gprof


Many source files in gprof include other headers before gprof.h.  This
is wrong because gprof.h is the one that triggers the inclusion of
config.h via bfd/sysdep.h, and no system include should be included
before that.

Installed as obvious.

Andreas.

2008-06-19  Andreas Schwab  <schwab@suse.de>

	* basic_blocks.c: Always include "gprof.h" first.
	* cg_arcs.c: Likewise.
	* cg_dfn.c: Likewise.
	* cg_print.c: Likewise.
	* corefile.c: Likewise.
	* gprof.c: Likewise.
	* hist.c: Likewise.
	* search_list.c: Likewise.
	* sym_ids.c: Likewise.
	* utils.c: Likewise.

--- gprof/basic_blocks.c.~1.16.~	2007-07-08 12:50:26.000000000 +0200
+++ gprof/basic_blocks.c	2008-06-19 18:16:04.000000000 +0200
@@ -22,8 +22,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "basic_blocks.h"
 #include "corefile.h"
 #include "gmon_io.h"
--- gprof/cg_arcs.c.~1.8.~	2004-05-27 12:07:50.000000000 +0200
+++ gprof/cg_arcs.c	2008-06-19 17:52:41.000000000 +0200
@@ -26,8 +26,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
--- gprof/cg_dfn.c.~1.8.~	2004-05-27 12:07:50.000000000 +0200
+++ gprof/cg_dfn.c	2008-06-19 17:53:46.000000000 +0200
@@ -26,8 +26,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
--- gprof/cg_print.c.~1.15.~	2007-09-26 11:33:01.000000000 +0200
+++ gprof/cg_print.c	2008-06-19 17:57:45.000000000 +0200
@@ -19,8 +19,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
--- gprof/corefile.c.~1.29.~	2007-07-08 12:50:26.000000000 +0200
+++ gprof/corefile.c	2008-06-19 17:58:09.000000000 +0200
@@ -20,8 +20,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
--- gprof/gprof.c.~1.31.~	2007-04-20 12:41:23.000000000 +0200
+++ gprof/gprof.c	2008-06-19 17:58:34.000000000 +0200
@@ -27,8 +27,8 @@
  * SUCH DAMAGE.
  */
 
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "bfdver.h"
 #include "search_list.h"
 #include "source.h"
--- gprof/hist.c.~1.20.~	2007-07-12 11:15:22.000000000 +0200
+++ gprof/hist.c	2008-06-19 17:58:47.000000000 +0200
@@ -20,8 +20,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
--- gprof/search_list.c.~1.10.~	2007-07-08 12:50:26.000000000 +0200
+++ gprof/search_list.c	2008-06-19 17:58:59.000000000 +0200
@@ -19,8 +19,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "libiberty.h"
 #include "gprof.h"
+#include "libiberty.h"
 #include "search_list.h"
 
 
--- gprof/sym_ids.c.~1.18.~	2007-07-08 12:50:26.000000000 +0200
+++ gprof/sym_ids.c	2008-06-19 17:59:13.000000000 +0200
@@ -19,9 +19,9 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
+#include "gprof.h"
 #include "libiberty.h"
 #include "safe-ctype.h"
-#include "gprof.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
--- gprof/utils.c.~1.8.~	2007-04-20 12:41:23.000000000 +0200
+++ gprof/utils.c	2008-06-19 17:59:25.000000000 +0200
@@ -26,8 +26,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-#include "demangle.h"
 #include "gprof.h"
+#include "demangle.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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