aboutsummaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-02-10 18:52:00 +0000
committerDaniel Jacobowitz <drow@false.org>2002-02-10 18:52:00 +0000
commit5f05c726686190244857e8ed95a756d5c50af06c (patch)
treea36ece05b6c93e65986e8588e513b1684f0f5dc7 /gprof
parented7efe67dd4870c6b52f026ae4a0d9476d7ba683 (diff)
downloadgdb-5f05c726686190244857e8ed95a756d5c50af06c.zip
gdb-5f05c726686190244857e8ed95a756d5c50af06c.tar.gz
gdb-5f05c726686190244857e8ed95a756d5c50af06c.tar.bz2
2002-02-10 Daniel Jacobowitz <drow@mvista.com>
* gprof.c: Include "getopt.h" after other includes, so that the proper macros are defined. * gen-c-prog.awk: Emit a prototype for the generated function.
Diffstat (limited to 'gprof')
-rw-r--r--gprof/ChangeLog6
-rw-r--r--gprof/gen-c-prog.awk2
-rw-r--r--gprof/gprof.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index 9369e24..f7f5fae 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-10 Daniel Jacobowitz <drow@mvista.com>
+
+ * gprof.c: Include "getopt.h" after other includes, so that
+ the proper macros are defined.
+ * gen-c-prog.awk: Emit a prototype for the generated function.
+
2002-02-01 Alan Modra <amodra@bigpond.net.au>
* configure.in (build_warnings): Add -Wstrict-prototypes
diff --git a/gprof/gen-c-prog.awk b/gprof/gen-c-prog.awk
index b59c1f8..b235a64 100644
--- a/gprof/gen-c-prog.awk
+++ b/gprof/gen-c-prog.awk
@@ -3,6 +3,7 @@ NR == 1 {
print "/* ==> Do not modify this file!! It is created automatically"
printf " from %s using the gen-c-prog.awk script. <== */\n\n", FILE
print "#include <stdio.h>"
+ print "#include \"ansidecl.h\""
}
{
@@ -12,6 +13,7 @@ NR == 1 {
print "}"
curfun = FUNCTION
print ""
+ print "void ", FUNCTION, "PARAMS ((FILE *));"
print "void";
printf "%s (file)\n", FUNCTION
print " FILE *file;";
diff --git a/gprof/gprof.c b/gprof/gprof.c
index db6dd9a..f73a503 100644
--- a/gprof/gprof.c
+++ b/gprof/gprof.c
@@ -16,7 +16,6 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include "getopt.h"
#include "libiberty.h"
#include "gprof.h"
#include "search_list.h"
@@ -32,6 +31,7 @@
#include "hist.h"
#include "sym_ids.h"
#include "demangle.h"
+#include "getopt.h"
static void usage PARAMS ((FILE *, int)) ATTRIBUTE_NORETURN;
int main PARAMS ((int, char **));