Include headers as needed
Move #includes from .h to .c wherever possible.
This commit is contained in:
parent
d64b4046da
commit
df5ed19834
|
@ -1,5 +1,9 @@
|
|||
#include "owlps-client.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#define DEBUG
|
||||
|
||||
|
|
|
@ -5,6 +5,17 @@
|
|||
|
||||
#include "owlps.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
#include <iwlib.h>
|
||||
|
||||
#define DEBUG
|
||||
|
||||
|
|
|
@ -10,34 +10,9 @@ extern "C" {
|
|||
#endif // __cplusplus
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdint.h> // We'll use <cstdint> with C++ 0x
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <iwlib.h>
|
||||
#include <wireless.h>
|
||||
#include <net/ethernet.h>
|
||||
|
||||
|
||||
// Port on which the positioning request is sent by the mobile:
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include <owlps.h>
|
||||
|
||||
#include <confuse.h>
|
||||
|
||||
#define DEBUG
|
||||
|
||||
// Uncomment to output the timestamp on each line of the output file:
|
||||
|
|
|
@ -5,6 +5,16 @@
|
|||
|
||||
#include "owlps-aggregator.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <confuse.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,14 @@
|
|||
|
||||
#include <owlps-client.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#define DEBUG
|
||||
|
||||
/* Error codes */
|
||||
|
|
|
@ -19,14 +19,6 @@
|
|||
|
||||
#include <pcap.h>
|
||||
|
||||
#ifdef USE_CONFIG_FILE
|
||||
# include <confuse.h>
|
||||
#endif // USE_CONFIG_FILE
|
||||
|
||||
#ifdef USE_PTHREAD
|
||||
# include <pthread.h>
|
||||
#endif // USE_PTHREAD
|
||||
|
||||
#include <endian.h>
|
||||
/* <endian.h> defines le*toh only in glibc >= 2.9. If we use an older
|
||||
* version of glibc, or another libc (e.g. uClibc), we must define them
|
||||
|
@ -50,11 +42,6 @@
|
|||
# endif // __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#endif // le16toh
|
||||
|
||||
// Used by get_mac_addr():
|
||||
#include <netinet/if_ether.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/ip.h>
|
||||
|
||||
|
||||
/* Arguments & program configuration */
|
||||
#define OPTIONS "Aa:cd:D:f:hH:kl:m:n:p:P:qQr:t:vVw:" // getopt string
|
||||
|
|
|
@ -5,6 +5,28 @@
|
|||
|
||||
#include "owlps-listener.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#ifdef USE_CONFIG_FILE
|
||||
# include <confuse.h>
|
||||
#endif // USE_CONFIG_FILE
|
||||
|
||||
#ifdef USE_PTHREAD
|
||||
# include <pthread.h>
|
||||
#endif // USE_PTHREAD
|
||||
|
||||
// Used by get_mac_addr():
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/ip.h>
|
||||
|
||||
|
||||
char *program_name = NULL ;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <owlps.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdio> // For perror()
|
||||
#include <boost/tr1/unordered_map.hpp>
|
||||
|
||||
using namespace std ;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include <csignal>
|
||||
|
||||
using namespace std ;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue