Skip to content

Commit 22e7788

Browse files
committed
Shaved off duplicated headers.
1 parent c7f2a99 commit 22e7788

File tree

16 files changed

+32
-44
lines changed

16 files changed

+32
-44
lines changed

src/Common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ using namespace std;
88

99
// commonly used libs
1010
#include <cerrno>
11+
#include <cstring>
1112
#include <cstdlib>
1213

1314
#endif /* SRC_COMMON_H_ */

src/Config.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#include "Config.h"
22
#include "Logger.h"
3+
4+
#include <fcntl.h>
5+
#include <map>
6+
#include <unistd.h>
7+
#include <vector>
8+
9+
#define CONFIG_SIZE 500
10+
311
/*
412
* config - loads config file on demand, keeps the config in shared RO memory for fast access
513
*/

src/Config.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44
#include "Common.h"
55
#include "globals.h"
66

7-
#include <fcntl.h>
8-
#include <fstream>
9-
#include <map>
10-
#include <signal.h>
11-
#include <sstream>
12-
#include <unistd.h>
13-
#include <vector>
14-
15-
#define CONFIG_SIZE 500
16-
177
class Config {
188
private:
199
int queue_size;

src/DataHandler.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
#include <cstring>
2-
#include <fcntl.h>
3-
#include <unistd.h>
4-
#include <linux/limits.h>
5-
#include <cctype>
6-
#include <clocale>
7-
81
#include "DataHandler.h"
92

3+
#include <linux/limits.h>
4+
#include <unistd.h>
5+
106
/*
117
* handlers - currently two are planned: static file handler, cgi script handler
128
* 1. cgi handler - fires given script and returns it's output

src/DataHandler/Exec.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "../DataHandler.h"
22

3+
#include <unistd.h>
4+
35
/*
46
* handlers - currently two are planned: static file handler, cgi script handler
57
* 1. cgi handler - fires given script and returns it's output

src/DataHandler/Static.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include "../DataHandler.h"
22

3+
#include <fcntl.h>
4+
#include <unistd.h>
5+
36
/*
47
* handlers - currently two are planned: static file handler, cgi script handler
58
* 1. cgi handler - fires given script and returns it's output

src/Logger.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define SRC_LOGGER_H_
33
#include "Config.h"
44

5-
#include <cstring>
65
#define QUIET 0
76
#define WARNINGS 1
87
#define INFO 2

src/LoggingSingleton.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//
44

55
#include "LoggingSingleton.h"
6+
#include <unistd.h>
67

78
LoggingSingleton::LoggingSingleton() {}
89
LoggingSingleton* LoggingSingleton::GetInstance() {

src/LoggingSingleton.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
#ifndef HACKTTP_LOGGINGSINGLETON_H
66
#define HACKTTP_LOGGINGSINGLETON_H
77

8-
#include <mutex>
9-
#include <unistd.h>
108
#include "Logger.h"
9+
#include <mutex>
1110

1211
class LoggingSingleton {
1312
private:

src/Manager.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
#include <cstring>
2-
#include <mutex>
3-
#include <pthread.h>
4-
5-
#include "Config.h"
61
#include "Manager.h"
72
#include "Worker.h"
3+
4+
#include <pthread.h>
85
/*
96
* manager - keeps track of workers, their current status, should handle zombies (number of workers comes from config)
107
*/

0 commit comments

Comments
 (0)