summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/atomicio.cc4
-rw-r--r--src/base/bigint.cc4
-rw-r--r--src/base/cp_annotate.cc5
-rw-r--r--src/base/cprintf.cc4
-rw-r--r--src/base/debug.cc3
-rw-r--r--src/base/hostinfo.cc4
-rw-r--r--src/base/inet.cc3
-rw-r--r--src/base/inifile.cc3
-rw-r--r--src/base/loader/aout_object.cc3
-rw-r--r--src/base/loader/dtb_object.cc2
-rw-r--r--src/base/loader/ecoff_object.cc3
-rwxr-xr-xsrc/base/loader/hex_file.cc5
-rw-r--r--src/base/loader/object_file.cc7
-rw-r--r--src/base/loader/raw_object.cc1
-rw-r--r--src/base/loader/symtab.cc3
-rw-r--r--src/base/match.cc1
-rw-r--r--src/base/misc.cc3
-rw-r--r--src/base/output.cc8
-rw-r--r--src/base/pollevent.cc5
-rw-r--r--src/base/random.cc3
-rw-r--r--src/base/remote_gdb.cc7
-rw-r--r--src/base/socket.cc3
-rw-r--r--src/base/statistics.cc3
-rw-r--r--src/base/stats/text.cc12
-rw-r--r--src/base/str.cc4
-rw-r--r--src/base/time.cc3
-rw-r--r--src/base/trace.cc3
-rw-r--r--src/base/vnc/vncinput.cc3
-rw-r--r--src/base/vnc/vncserver.cc2
29 files changed, 71 insertions, 43 deletions
diff --git a/src/base/atomicio.cc b/src/base/atomicio.cc
index 13eeca05b..2913221fc 100644
--- a/src/base/atomicio.cc
+++ b/src/base/atomicio.cc
@@ -28,11 +28,11 @@
* Authors: Nathan Binkert
*/
+#include "base/atomicio.hh"
+
#include <cerrno>
#include <cstdio>
-#include "base/atomicio.hh"
-
ssize_t
atomic_read(int fd, void *s, size_t n)
{
diff --git a/src/base/bigint.cc b/src/base/bigint.cc
index d741e1f7b..ce9942c9c 100644
--- a/src/base/bigint.cc
+++ b/src/base/bigint.cc
@@ -28,10 +28,10 @@
* Authors: Gabe Black
*/
-#include <iostream>
-
#include "base/bigint.hh"
+#include <iostream>
+
using namespace std;
ostream & operator << (ostream & os, const Twin64_t & t)
diff --git a/src/base/cp_annotate.cc b/src/base/cp_annotate.cc
index c62398def..9209ffdd3 100644
--- a/src/base/cp_annotate.cc
+++ b/src/base/cp_annotate.cc
@@ -28,11 +28,12 @@
* Authors: Ali Saidi
*/
+#include "base/cp_annotate.hh"
+
#include "arch/generic/linux/threadinfo.hh"
#include "arch/utility.hh"
-#include "base/loader/object_file.hh"
#include "base/callback.hh"
-#include "base/cp_annotate.hh"
+#include "base/loader/object_file.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
diff --git a/src/base/cprintf.cc b/src/base/cprintf.cc
index 2dd2ab486..5daf196f1 100644
--- a/src/base/cprintf.cc
+++ b/src/base/cprintf.cc
@@ -28,13 +28,13 @@
* Authors: Nathan Binkert
*/
+#include "base/cprintf.hh"
+
#include <cassert>
#include <iomanip>
#include <iostream>
#include <sstream>
-#include "base/cprintf.hh"
-
using namespace std;
namespace cp {
diff --git a/src/base/debug.cc b/src/base/debug.cc
index 6161c9e82..6be9cdff5 100644
--- a/src/base/debug.cc
+++ b/src/base/debug.cc
@@ -28,6 +28,8 @@
* Authors: Nathan Binkert
*/
+#include "base/debug.hh"
+
#include <sys/types.h>
#include <unistd.h>
@@ -35,7 +37,6 @@
#include <csignal>
#include "base/cprintf.hh"
-#include "base/debug.hh"
#include "base/misc.hh"
using namespace std;
diff --git a/src/base/hostinfo.cc b/src/base/hostinfo.cc
index e5a612c46..43999a5e5 100644
--- a/src/base/hostinfo.cc
+++ b/src/base/hostinfo.cc
@@ -34,8 +34,11 @@
#include <mach/mach_init.h>
#include <mach/shared_region.h>
#include <mach/task.h>
+
#endif
+#include "base/hostinfo.hh"
+
#include <cctype>
#include <cerrno>
#include <cmath>
@@ -44,7 +47,6 @@
#include <cstring>
#include <string>
-#include "base/hostinfo.hh"
#include "base/misc.hh"
#include "base/str.hh"
#include "base/types.hh"
diff --git a/src/base/inet.cc b/src/base/inet.cc
index 866b77fcf..57af0e56c 100644
--- a/src/base/inet.cc
+++ b/src/base/inet.cc
@@ -43,13 +43,14 @@
* Geoffrey Blake
*/
+#include "base/inet.hh"
+
#include <cstddef>
#include <cstdio>
#include <sstream>
#include <string>
#include "base/cprintf.hh"
-#include "base/inet.hh"
#include "base/types.hh"
using namespace std;
diff --git a/src/base/inifile.cc b/src/base/inifile.cc
index 80ed3eb06..b0ece2e94 100644
--- a/src/base/inifile.cc
+++ b/src/base/inifile.cc
@@ -29,13 +29,14 @@
* Steve Reinhardt
*/
+#include "base/inifile.hh"
+
#include <algorithm>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
-#include "base/inifile.hh"
#include "base/str.hh"
using namespace std;
diff --git a/src/base/loader/aout_object.cc b/src/base/loader/aout_object.cc
index 468b1b1f0..b731c9a83 100644
--- a/src/base/loader/aout_object.cc
+++ b/src/base/loader/aout_object.cc
@@ -28,9 +28,10 @@
* Authors: Steve Reinhardt
*/
+#include "base/loader/aout_object.hh"
+
#include <string>
-#include "base/loader/aout_object.hh"
#include "base/loader/exec_aout.h"
#include "base/loader/symtab.hh"
#include "base/trace.hh"
diff --git a/src/base/loader/dtb_object.cc b/src/base/loader/dtb_object.cc
index 986f6455d..fab6a762d 100644
--- a/src/base/loader/dtb_object.cc
+++ b/src/base/loader/dtb_object.cc
@@ -35,9 +35,9 @@
#include <cassert>
-#include "sim/byteswap.hh"
#include "fdt.h"
#include "libfdt.h"
+#include "sim/byteswap.hh"
ObjectFile *
DtbObject::tryFile(const std::string &fname, size_t len, uint8_t *data)
diff --git a/src/base/loader/ecoff_object.cc b/src/base/loader/ecoff_object.cc
index 1869efa13..4e94ecd1e 100644
--- a/src/base/loader/ecoff_object.cc
+++ b/src/base/loader/ecoff_object.cc
@@ -28,9 +28,10 @@
* Authors: Steve Reinhardt
*/
+#include "base/loader/ecoff_object.hh"
+
#include <string>
-#include "base/loader/ecoff_object.hh"
#include "base/loader/symtab.hh"
#include "base/misc.hh"
#include "base/trace.hh"
diff --git a/src/base/loader/hex_file.cc b/src/base/loader/hex_file.cc
index dac013d40..c80343961 100755
--- a/src/base/loader/hex_file.cc
+++ b/src/base/loader/hex_file.cc
@@ -28,14 +28,15 @@
* Authors: Jaidev Patwardhan
*/
+#include "base/loader/hex_file.hh"
+
#include <cctype>
#include <cstdio>
#include <list>
#include <string>
-#include "base/loader/hex_file.hh"
-#include "base/loader/symtab.hh"
#include "base/cprintf.hh"
+#include "base/loader/symtab.hh"
#include "mem/port_proxy.hh"
using namespace std;
diff --git a/src/base/loader/object_file.cc b/src/base/loader/object_file.cc
index 8bafd3c56..a82314e68 100644
--- a/src/base/loader/object_file.cc
+++ b/src/base/loader/object_file.cc
@@ -29,9 +29,11 @@
* Steve Reinhardt
*/
+#include "base/loader/object_file.hh"
+
+#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
-#include <fcntl.h>
#include <unistd.h>
#include <zlib.h>
@@ -39,14 +41,13 @@
#include <list>
#include <string>
+#include "base/cprintf.hh"
#include "base/loader/aout_object.hh"
#include "base/loader/dtb_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/port_proxy.hh"
using namespace std;
diff --git a/src/base/loader/raw_object.cc b/src/base/loader/raw_object.cc
index 35a952741..4a04f7dfc 100644
--- a/src/base/loader/raw_object.cc
+++ b/src/base/loader/raw_object.cc
@@ -29,6 +29,7 @@
*/
#include "base/loader/raw_object.hh"
+
#include "base/loader/symtab.hh"
#include "base/trace.hh"
#include "debug/Loader.hh"
diff --git a/src/base/loader/symtab.cc b/src/base/loader/symtab.cc
index 853d98cc4..ea7332114 100644
--- a/src/base/loader/symtab.cc
+++ b/src/base/loader/symtab.cc
@@ -28,12 +28,13 @@
* Authors: Nathan Binkert
*/
+#include "base/loader/symtab.hh"
+
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
-#include "base/loader/symtab.hh"
#include "base/misc.hh"
#include "base/str.hh"
#include "base/types.hh"
diff --git a/src/base/match.cc b/src/base/match.cc
index 65b740076..dc621b482 100644
--- a/src/base/match.cc
+++ b/src/base/match.cc
@@ -29,6 +29,7 @@
*/
#include "base/match.hh"
+
#include "base/str.hh"
using namespace std;
diff --git a/src/base/misc.cc b/src/base/misc.cc
index d95c2ff53..644545db2 100644
--- a/src/base/misc.cc
+++ b/src/base/misc.cc
@@ -41,13 +41,14 @@
* Andreas Sandberg
*/
+#include "base/misc.hh"
+
#include <cstdlib>
#include <cstring>
#include <string>
#include "base/cprintf.hh"
#include "base/hostinfo.hh"
-#include "base/misc.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "base/types.hh"
diff --git a/src/base/output.cc b/src/base/output.cc
index cb3c0b7f9..dc85c2a54 100644
--- a/src/base/output.cc
+++ b/src/base/output.cc
@@ -44,10 +44,13 @@
* Sascha Bischoff
*/
+#include "base/output.hh"
+
+#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <dirent.h>
#include <unistd.h>
+#include <zfstream.h>
#include <cassert>
#include <cerrno>
@@ -55,10 +58,7 @@
#include <cstdlib>
#include <fstream>
-#include <zfstream.h>
-
#include "base/misc.hh"
-#include "base/output.hh"
using namespace std;
diff --git a/src/base/pollevent.cc b/src/base/pollevent.cc
index a6c93c1f3..30edb65b6 100644
--- a/src/base/pollevent.cc
+++ b/src/base/pollevent.cc
@@ -30,17 +30,20 @@
#include <sys/ioctl.h>
#include <sys/types.h>
+
#if defined(__sun__) || defined(__SUNPRO_CC)
#include <sys/file.h>
+
#endif
+#include "base/pollevent.hh"
+
#include <fcntl.h>
#include <unistd.h>
#include <csignal>
#include "base/misc.hh"
-#include "base/pollevent.hh"
#include "base/types.hh"
#include "sim/async.hh"
#include "sim/core.hh"
diff --git a/src/base/random.cc b/src/base/random.cc
index 2eb60c6e5..0121581d6 100644
--- a/src/base/random.cc
+++ b/src/base/random.cc
@@ -42,10 +42,11 @@
* Andreas Hansson
*/
+#include "base/random.hh"
+
#include <sstream>
#include "base/misc.hh"
-#include "base/random.hh"
#include "sim/serialize.hh"
Random::Random()
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index a22ba9fbe..665dba8c5 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -119,16 +119,17 @@
* "Stub" to allow remote cpu to debug over a serial line using gdb.
*/
-#include <signal.h>
+#include "base/remote_gdb.hh"
+
#include <sys/signal.h>
#include <unistd.h>
+#include <csignal>
#include <cstdio>
#include <string>
#include "arch/vtophys.hh"
#include "base/intmath.hh"
-#include "base/remote_gdb.hh"
#include "base/socket.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
@@ -136,8 +137,8 @@
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "debug/GDBAll.hh"
-#include "mem/port.hh"
#include "mem/fs_translating_port_proxy.hh"
+#include "mem/port.hh"
#include "mem/se_translating_port_proxy.hh"
#include "sim/full_system.hh"
#include "sim/system.hh"
diff --git a/src/base/socket.cc b/src/base/socket.cc
index 01fb519b4..7a444373b 100644
--- a/src/base/socket.cc
+++ b/src/base/socket.cc
@@ -28,6 +28,8 @@
* Authors: Nathan Binkert
*/
+#include "base/socket.hh"
+
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
@@ -37,7 +39,6 @@
#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 b1b5c927e..96747f0a9 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -28,6 +28,8 @@
* Authors: Nathan Binkert
*/
+#include "base/statistics.hh"
+
#include <fstream>
#include <iomanip>
#include <list>
@@ -39,7 +41,6 @@
#include "base/debug.hh"
#include "base/hostinfo.hh"
#include "base/misc.hh"
-#include "base/statistics.hh"
#include "base/str.hh"
#include "base/time.hh"
#include "base/trace.hh"
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index ae09b9b8d..9403ed3ff 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -33,23 +33,27 @@
#endif
#if defined(__sun)
-#include <math.h>
+#include <cmath>
+
#endif
#include <cassert>
+
#ifdef __SUNPRO_CC
-#include <math.h>
+#include <cmath>
+
#endif
+#include "base/stats/text.hh"
+
#include <cmath>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
-#include "base/stats/info.hh"
-#include "base/stats/text.hh"
#include "base/cast.hh"
#include "base/misc.hh"
+#include "base/stats/info.hh"
#include "base/str.hh"
using namespace std;
diff --git a/src/base/str.cc b/src/base/str.cc
index 849bc8afa..87724a934 100644
--- a/src/base/str.cc
+++ b/src/base/str.cc
@@ -28,11 +28,11 @@
* Authors: Nathan Binkert
*/
+#include "base/str.hh"
+
#include <string>
#include <vector>
-#include "base/str.hh"
-
using namespace std;
bool
diff --git a/src/base/time.cc b/src/base/time.cc
index 86a31156c..5ee286b9c 100644
--- a/src/base/time.cc
+++ b/src/base/time.cc
@@ -28,12 +28,13 @@
* Authors: Nathan Binkert
*/
+#include "base/time.hh"
+
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
-#include "base/time.hh"
#include "config/use_posix_clock.hh"
#include "sim/core.hh"
#include "sim/serialize.hh"
diff --git a/src/base/trace.cc b/src/base/trace.cc
index ff1778249..dfd99686a 100644
--- a/src/base/trace.cc
+++ b/src/base/trace.cc
@@ -33,6 +33,8 @@
* Andrew Bardsley
*/
+#include "base/trace.hh"
+
#include <cctype>
#include <fstream>
#include <iostream>
@@ -43,7 +45,6 @@
#include "base/misc.hh"
#include "base/output.hh"
#include "base/str.hh"
-#include "base/trace.hh"
const std::string &name()
{
diff --git a/src/base/vnc/vncinput.cc b/src/base/vnc/vncinput.cc
index d97306f03..5021d407a 100644
--- a/src/base/vnc/vncinput.cc
+++ b/src/base/vnc/vncinput.cc
@@ -42,9 +42,10 @@
* Implementiation of a VNC input
*/
+#include "base/vnc/vncinput.hh"
+
#include <sys/types.h>
-#include "base/vnc/vncinput.hh"
#include "base/output.hh" //simout
#include "base/trace.hh"
#include "debug/VNC.hh"
diff --git a/src/base/vnc/vncserver.cc b/src/base/vnc/vncserver.cc
index 20f3bc8fe..216fa2fb4 100644
--- a/src/base/vnc/vncserver.cc
+++ b/src/base/vnc/vncserver.cc
@@ -60,8 +60,8 @@
#include <unistd.h>
#include <cerrno>
-#include <cstdio>
#include <cstddef>
+#include <cstdio>
#include "base/atomicio.hh"
#include "base/bitmap.hh"