summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/cp_annotate.cc6
-rw-r--r--src/base/cp_annotate.hh6
-rw-r--r--src/base/cprintf.hh2
-rw-r--r--src/base/debug.cc3
-rw-r--r--src/base/fast_alloc.hh4
-rw-r--r--src/base/fenv.c2
-rw-r--r--src/base/hostinfo.cc8
-rw-r--r--src/base/inet.hh1
-rw-r--r--src/base/inifile.cc2
-rw-r--r--src/base/loader/aout_object.cc2
-rw-r--r--src/base/loader/elf_object.cc5
-rw-r--r--src/base/loader/elf_object.hh3
-rwxr-xr-xsrc/base/loader/hex_file.cc2
-rw-r--r--src/base/loader/object_file.cc18
-rw-r--r--src/base/loader/symtab.cc2
-rw-r--r--src/base/misc.cc3
-rw-r--r--src/base/mysql.hh7
-rw-r--r--src/base/output.cc6
-rw-r--r--src/base/pollevent.cc3
-rw-r--r--src/base/pollevent.hh4
-rw-r--r--src/base/range_map.hh4
-rw-r--r--src/base/remote_gdb.cc4
-rw-r--r--src/base/remote_gdb.hh5
-rw-r--r--src/base/socket.cc11
-rw-r--r--src/base/statistics.cc2
-rw-r--r--src/base/statistics.hh8
-rw-r--r--src/base/stats/info.hh2
-rw-r--r--src/base/stats/mysql.cc6
-rw-r--r--src/base/stats/output.cc2
-rw-r--r--src/base/stats/text.cc12
-rw-r--r--src/base/stats/text.hh2
-rw-r--r--src/base/str.hh3
-rw-r--r--src/base/time.hh1
-rw-r--r--src/base/trace.cc2
-rw-r--r--src/base/vnc/convert.cc2
-rw-r--r--src/base/vnc/vncserver.cc8
-rw-r--r--src/base/vnc/vncserver.hh4
37 files changed, 84 insertions, 83 deletions
diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc
index 69b926b29..118c6bf36 100644
--- a/src/base/cp_annotate.cc
+++ b/src/base/cp_annotate.cc
@@ -28,11 +28,11 @@
* Authors: Ali Saidi
*/
-#include "arch/utility.hh"
#include "arch/alpha/linux/threadinfo.hh"
-#include "base/cp_annotate.hh"
-#include "base/callback.hh"
+#include "arch/utility.hh"
#include "base/loader/object_file.hh"
+#include "base/callback.hh"
+#include "base/cp_annotate.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
diff --git a/src/base/cp_annotate.hh b/src/base/cp_annotate.hh
index fb955a380..3e4597ba8 100644
--- a/src/base/cp_annotate.hh
+++ b/src/base/cp_annotate.hh
@@ -31,13 +31,13 @@
#ifndef __BASE__CP_ANNOTATE_HH__
#define __BASE__CP_ANNOTATE_HH__
-#include <string>
#include <list>
-#include <vector>
#include <map>
+#include <string>
+#include <vector>
-#include "base/hashmap.hh"
#include "base/loader/symtab.hh"
+#include "base/hashmap.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "config/cp_annotate.hh"
diff --git a/src/base/cprintf.hh b/src/base/cprintf.hh
index cd5d642c1..6124d8c73 100644
--- a/src/base/cprintf.hh
+++ b/src/base/cprintf.hh
@@ -37,8 +37,8 @@
#include <list>
#include <string>
-#include "base/varargs.hh"
#include "base/cprintf_formats.hh"
+#include "base/varargs.hh"
namespace cp {
diff --git a/src/base/debug.cc b/src/base/debug.cc
index de201af18..1d7be5a9a 100644
--- a/src/base/debug.cc
+++ b/src/base/debug.cc
@@ -29,9 +29,10 @@
*/
#include <sys/types.h>
-#include <signal.h>
#include <unistd.h>
+#include <csignal>
+
#include "base/cprintf.hh"
void
diff --git a/src/base/fast_alloc.hh b/src/base/fast_alloc.hh
index 58043e51e..d6dc593d4 100644
--- a/src/base/fast_alloc.hh
+++ b/src/base/fast_alloc.hh
@@ -62,9 +62,9 @@
// collapse the destructor call chain back up the inheritance
// hierarchy.
-#include "config/no_fast_alloc.hh"
-#include "config/force_fast_alloc.hh"
#include "config/fast_alloc_stats.hh"
+#include "config/force_fast_alloc.hh"
+#include "config/no_fast_alloc.hh"
// By default, we want to enable FastAlloc in any build other than
// m5.debug. (FastAlloc's reuse policies can mask allocation bugs, so
diff --git a/src/base/fenv.c b/src/base/fenv.c
index 2ec2f796f..ed06e220d 100644
--- a/src/base/fenv.c
+++ b/src/base/fenv.c
@@ -29,8 +29,8 @@
*/
#include <assert.h>
-#include <stdlib.h>
#include <fenv.h>
+#include <stdlib.h>
void m5_fesetround(int rm);
int m5_fegetround();
diff --git a/src/base/hostinfo.cc b/src/base/hostinfo.cc
index ffc2f93ff..5ff34e603 100644
--- a/src/base/hostinfo.cc
+++ b/src/base/hostinfo.cc
@@ -28,12 +28,12 @@
* Authors: Nathan Binkert
*/
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
#include <unistd.h>
-#include <stdio.h>
+#include <cctype>
+#include <cerrno>
+#include <cmath>
+#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
diff --git a/src/base/inet.hh b/src/base/inet.hh
index ecb088289..a957b8a71 100644
--- a/src/base/inet.hh
+++ b/src/base/inet.hh
@@ -42,7 +42,6 @@
#include "base/range.hh"
#include "base/types.hh"
#include "dev/etherpkt.hh"
-
#include "dnet/os.h"
#include "dnet/eth.h"
#include "dnet/ip.h"
diff --git a/src/base/inifile.cc b/src/base/inifile.cc
index 24d0013c4..451198033 100644
--- a/src/base/inifile.cc
+++ b/src/base/inifile.cc
@@ -31,8 +31,8 @@
#include <fstream>
#include <iostream>
-#include <vector>
#include <string>
+#include <vector>
#include "base/inifile.hh"
#include "base/str.hh"
diff --git a/src/base/loader/aout_object.cc b/src/base/loader/aout_object.cc
index fe435a599..31a6a2868 100644
--- a/src/base/loader/aout_object.cc
+++ b/src/base/loader/aout_object.cc
@@ -31,9 +31,9 @@
#include <string>
#include "base/loader/aout_object.hh"
+#include "base/loader/exec_aout.h"
#include "base/loader/symtab.hh"
#include "base/trace.hh"
-#include "base/loader/exec_aout.h"
using namespace std;
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index a550d9765..22316c0d6 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -32,14 +32,13 @@
#include <cassert>
#include <string>
-#include "gelf.h"
-
-#include "base/bitfield.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/symtab.hh"
+#include "base/bitfield.hh"
#include "base/misc.hh"
#include "base/trace.hh"
#include "sim/byteswap.hh"
+#include "gelf.h"
using namespace std;
diff --git a/src/base/loader/elf_object.hh b/src/base/loader/elf_object.hh
index a19e82b28..fe75927c5 100644
--- a/src/base/loader/elf_object.hh
+++ b/src/base/loader/elf_object.hh
@@ -31,10 +31,11 @@
#ifndef __ELF_OBJECT_HH__
#define __ELF_OBJECT_HH__
-#include "base/loader/object_file.hh"
#include <set>
#include <vector>
+#include "base/loader/object_file.hh"
+
class ElfObject : public ObjectFile
{
protected:
diff --git a/src/base/loader/hex_file.cc b/src/base/loader/hex_file.cc
index 61d6c8009..854834b2b 100755
--- a/src/base/loader/hex_file.cc
+++ b/src/base/loader/hex_file.cc
@@ -33,9 +33,9 @@
#include <list>
#include <string>
-#include "base/cprintf.hh"
#include "base/loader/hex_file.hh"
#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "mem/translating_port.hh"
using namespace std;
diff --git a/src/base/loader/object_file.cc b/src/base/loader/object_file.cc
index 2273b6c4e..9dcbd7936 100644
--- a/src/base/loader/object_file.cc
+++ b/src/base/loader/object_file.cc
@@ -29,24 +29,22 @@
* Steve Reinhardt
*/
-#include <list>
-#include <string>
-
-#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/types.h>
#include <fcntl.h>
-#include <stdio.h>
#include <unistd.h>
-#include "base/cprintf.hh"
-#include "base/loader/object_file.hh"
-#include "base/loader/symtab.hh"
+#include <cstdio>
+#include <list>
+#include <string>
-#include "base/loader/ecoff_object.hh"
#include "base/loader/aout_object.hh"
+#include "base/loader/ecoff_object.hh"
#include "base/loader/elf_object.hh"
+#include "base/loader/object_file.hh"
#include "base/loader/raw_object.hh"
-
+#include "base/loader/symtab.hh"
+#include "base/cprintf.hh"
#include "mem/translating_port.hh"
using namespace std;
diff --git a/src/base/loader/symtab.cc b/src/base/loader/symtab.cc
index 7163260ec..2c868a9b1 100644
--- a/src/base/loader/symtab.cc
+++ b/src/base/loader/symtab.cc
@@ -28,8 +28,8 @@
* Authors: Nathan Binkert
*/
-#include <iostream>
#include <fstream>
+#include <iostream>
#include <string>
#include <vector>
diff --git a/src/base/misc.cc b/src/base/misc.cc
index 94336c647..66896103f 100644
--- a/src/base/misc.cc
+++ b/src/base/misc.cc
@@ -28,10 +28,11 @@
* Authors: Nathan Binkert
*/
+#include <zlib.h>
+
#include <cstdlib>
#include <iostream>
#include <string>
-#include <zlib.h>
#include "base/cprintf.hh"
#include "base/hostinfo.hh"
diff --git a/src/base/mysql.hh b/src/base/mysql.hh
index c9051bd2b..c8ffba733 100644
--- a/src/base/mysql.hh
+++ b/src/base/mysql.hh
@@ -33,12 +33,13 @@
#define TO_BE_INCLUDED_LATER 0
+#include <mysql.h>
+#include <mysql_version.h>
+
#include <cassert>
#include <iosfwd>
-#include <mysql_version.h>
-#include <mysql.h>
-#include <string>
#include <sstream>
+#include <string>
namespace MySQL {
diff --git a/src/base/output.cc b/src/base/output.cc
index ea13e23d4..020247152 100644
--- a/src/base/output.cc
+++ b/src/base/output.cc
@@ -28,12 +28,12 @@
* Authors: Nathan Binkert
*/
-#include <errno.h>
-#include <limits.h>
-#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <cerrno>
+#include <climits>
+#include <cstdlib>
#include <fstream>
#include <gzstream.hh>
diff --git a/src/base/pollevent.cc b/src/base/pollevent.cc
index 7dcaa094d..67708c129 100644
--- a/src/base/pollevent.cc
+++ b/src/base/pollevent.cc
@@ -35,9 +35,10 @@
#endif
#include <fcntl.h>
-#include <signal.h>
#include <unistd.h>
+#include <csignal>
+
#include "base/misc.hh"
#include "base/pollevent.hh"
#include "base/types.hh"
diff --git a/src/base/pollevent.hh b/src/base/pollevent.hh
index ecaeb94ce..b9c833c8a 100644
--- a/src/base/pollevent.hh
+++ b/src/base/pollevent.hh
@@ -31,8 +31,10 @@
#ifndef __POLLEVENT_H__
#define __POLLEVENT_H__
-#include <vector>
#include <poll.h>
+
+#include <vector>
+
#include "sim/core.hh"
class Checkpoint;
diff --git a/src/base/range_map.hh b/src/base/range_map.hh
index 0ffc28ed9..7714a0049 100644
--- a/src/base/range_map.hh
+++ b/src/base/range_map.hh
@@ -31,10 +31,10 @@
#ifndef __BASE_RANGE_MAP_HH__
#define __BASE_RANGE_MAP_HH__
-#include "base/range.hh"
-
#include <map>
+#include "base/range.hh"
+
template <class T,class V>
class range_map
{
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index abc5f4ec0..02ee8e331 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -117,10 +117,10 @@
*/
#include <sys/signal.h>
+#include <unistd.h>
#include <cstdio>
#include <string>
-#include <unistd.h>
#include "config/full_system.hh"
@@ -134,8 +134,8 @@
#include "base/socket.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "cpu/thread_context.hh"
#include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
#include "mem/port.hh"
#include "mem/translating_port.hh"
#include "sim/system.hh"
diff --git a/src/base/remote_gdb.hh b/src/base/remote_gdb.hh
index 92e599585..7c1228e59 100644
--- a/src/base/remote_gdb.hh
+++ b/src/base/remote_gdb.hh
@@ -31,13 +31,14 @@
#ifndef __REMOTE_GDB_HH__
#define __REMOTE_GDB_HH__
-#include <map>
#include <sys/signal.h>
+#include <map>
+
#include "arch/types.hh"
-#include "cpu/pc_event.hh"
#include "base/pollevent.hh"
#include "base/socket.hh"
+#include "cpu/pc_event.hh"
class System;
class ThreadContext;
diff --git a/src/base/socket.cc b/src/base/socket.cc
index 4ad8f5c93..0c8903084 100644
--- a/src/base/socket.cc
+++ b/src/base/socket.cc
@@ -28,18 +28,17 @@
* Authors: Nathan Binkert
*/
-#include <sys/types.h>
-#include <sys/socket.h>
-
#include <netinet/in.h>
#include <netinet/tcp.h>
-
-#include <errno.h>
+#include <sys/socket.h>
+#include <sys/types.h>
#include <unistd.h>
-#include "base/types.hh"
+#include <cerrno>
+
#include "base/misc.hh"
#include "base/socket.hh"
+#include "base/types.hh"
using namespace std;
diff --git a/src/base/statistics.cc b/src/base/statistics.cc
index 95402a221..5ee018b1c 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -28,8 +28,8 @@
* Authors: Nathan Binkert
*/
-#include <iomanip>
#include <fstream>
+#include <iomanip>
#include <list>
#include <map>
#include <string>
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 579a7908e..bf2139caa 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -50,7 +50,7 @@
#include <algorithm>
#include <cassert>
#ifdef __SUNPRO_CC
-#include <math.h>
+#include <cmath>
#endif
#include <cmath>
#include <functional>
@@ -59,13 +59,13 @@
#include <string>
#include <vector>
+#include "base/stats/info.hh"
+#include "base/stats/types.hh"
+#include "base/stats/visit.hh"
#include "base/cast.hh"
#include "base/cprintf.hh"
#include "base/intmath.hh"
#include "base/refcnt.hh"
-#include "base/stats/info.hh"
-#include "base/stats/types.hh"
-#include "base/stats/visit.hh"
#include "base/str.hh"
#include "base/types.hh"
diff --git a/src/base/stats/info.hh b/src/base/stats/info.hh
index b1c05eed1..9c81442ee 100644
--- a/src/base/stats/info.hh
+++ b/src/base/stats/info.hh
@@ -31,8 +31,8 @@
#ifndef __BASE_STATS_INFO_HH__
#define __BASE_STATS_INFO_HH__
-#include "base/flags.hh"
#include "base/stats/types.hh"
+#include "base/flags.hh"
namespace Stats {
diff --git a/src/base/stats/mysql.cc b/src/base/stats/mysql.cc
index af13582b4..c08394605 100644
--- a/src/base/stats/mysql.cc
+++ b/src/base/stats/mysql.cc
@@ -35,13 +35,13 @@
#include <string>
#include <vector>
-#include "base/misc.hh"
-#include "base/mysql.hh"
-#include "base/statistics.hh"
#include "base/stats/info.hh"
#include "base/stats/mysql.hh"
#include "base/stats/mysql_run.hh"
#include "base/stats/types.hh"
+#include "base/misc.hh"
+#include "base/mysql.hh"
+#include "base/statistics.hh"
#include "base/str.hh"
#include "base/types.hh"
#include "base/userinfo.hh"
diff --git a/src/base/stats/output.cc b/src/base/stats/output.cc
index d3cb9da61..6e1ba1c3b 100644
--- a/src/base/stats/output.cc
+++ b/src/base/stats/output.cc
@@ -30,8 +30,8 @@
#include <list>
-#include "base/statistics.hh"
#include "base/stats/output.hh"
+#include "base/statistics.hh"
#include "base/types.hh"
#include "sim/eventq.hh"
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index 385b92a1a..05bad04bf 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -33,25 +33,25 @@
#endif
#if defined(__sun)
-#include <math.h>
+#include <cmath>
#endif
#include <cassert>
#ifdef __SUNPRO_CC
-#include <math.h>
+#include <cmath>
#endif
#include <cmath>
+#include <fstream>
#include <iostream>
#include <sstream>
-#include <fstream>
#include <string>
-#include "base/cast.hh"
-#include "base/misc.hh"
-#include "base/str.hh"
#include "base/stats/info.hh"
#include "base/stats/text.hh"
#include "base/stats/visit.hh"
+#include "base/cast.hh"
+#include "base/misc.hh"
+#include "base/str.hh"
using namespace std;
diff --git a/src/base/stats/text.hh b/src/base/stats/text.hh
index ab8512859..de2bf9401 100644
--- a/src/base/stats/text.hh
+++ b/src/base/stats/text.hh
@@ -34,8 +34,8 @@
#include <iosfwd>
#include <string>
-#include "base/output.hh"
#include "base/stats/output.hh"
+#include "base/output.hh"
namespace Stats {
diff --git a/src/base/str.hh b/src/base/str.hh
index 08953caf3..6d617df72 100644
--- a/src/base/str.hh
+++ b/src/base/str.hh
@@ -32,12 +32,11 @@
#ifndef __STR_HH__
#define __STR_HH__
+#include <cctype>
#include <sstream>
#include <string>
#include <vector>
-#include <ctype.h>
-
template<class> class Hash;
template<>
class Hash<std::string> {
diff --git a/src/base/time.hh b/src/base/time.hh
index 20b1c6d35..f2107d78f 100644
--- a/src/base/time.hh
+++ b/src/base/time.hh
@@ -33,7 +33,6 @@
#define __BASE_TIME_HH__
#include <sys/time.h>
-
#include <inttypes.h>
#include <cmath>
diff --git a/src/base/trace.cc b/src/base/trace.cc
index 22e05e664..7783b6d42 100644
--- a/src/base/trace.cc
+++ b/src/base/trace.cc
@@ -29,7 +29,7 @@
* Steve Reinhardt
*/
-#include <ctype.h>
+#include <cctype>
#include <fstream>
#include <iostream>
#include <list>
diff --git a/src/base/vnc/convert.cc b/src/base/vnc/convert.cc
index ea7a9b1c5..cd1502ce6 100644
--- a/src/base/vnc/convert.cc
+++ b/src/base/vnc/convert.cc
@@ -40,8 +40,8 @@
#include <cassert>
-#include "base/misc.hh"
#include "base/vnc/convert.hh"
+#include "base/misc.hh"
/** @file
* This file provides conversion functions for a variety of video modes
diff --git a/src/base/vnc/vncserver.cc b/src/base/vnc/vncserver.cc
index 8936fa67b..84e1a20e1 100644
--- a/src/base/vnc/vncserver.cc
+++ b/src/base/vnc/vncserver.cc
@@ -42,19 +42,19 @@
* Implementiation of a VNC server
*/
-#include <cstdio>
-
#include <sys/ioctl.h>
#include <sys/termios.h>
-#include <errno.h>
#include <poll.h>
#include <unistd.h>
+#include <cerrno>
+#include <cstdio>
+
+#include "base/vnc/vncserver.hh"
#include "base/atomicio.hh"
#include "base/misc.hh"
#include "base/socket.hh"
#include "base/trace.hh"
-#include "base/vnc/vncserver.hh"
#include "sim/byteswap.hh"
using namespace std;
diff --git a/src/base/vnc/vncserver.hh b/src/base/vnc/vncserver.hh
index 23b097b11..96dbdedda 100644
--- a/src/base/vnc/vncserver.hh
+++ b/src/base/vnc/vncserver.hh
@@ -47,13 +47,13 @@
#include <iostream>
+#include "base/vnc/convert.hh"
#include "base/circlebuf.hh"
#include "base/pollevent.hh"
#include "base/socket.hh"
-#include "base/vnc/convert.hh"
#include "cpu/intr_control.hh"
-#include "sim/sim_object.hh"
#include "params/VncServer.hh"
+#include "sim/sim_object.hh"
/**
* A device that expects to receive input from the vnc server should derrive