Skip to content

Commit

Permalink
Make IWYU happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Theldus committed Aug 7, 2024
1 parent 40c6355 commit 25bc29f
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 33 deletions.
10 changes: 0 additions & 10 deletions alertik.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,9 @@
*/

#define _POSIX_C_SOURCE 200809L
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <pthread.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include <netdb.h>

#include "alertik.h"
#include "events.h"
Expand Down
2 changes: 0 additions & 2 deletions alertik.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef ALERTIK_H
#define ALERTIK_H

#include <stdarg.h>
#include <stdlib.h>
#include <time.h>

#define MIN(a,b) (((a)<(b))?(a):(b))
Expand Down
3 changes: 3 additions & 0 deletions env_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "log.h"
#include "env_events.h"
#include "alertik.h"
#include "notifiers.h"
Expand Down
2 changes: 0 additions & 2 deletions env_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef ENV_EVENTS_H
#define ENV_EVENTS_H

#include "events.h"

#define MAX_ENV_EVENTS 16

struct env_event {
Expand Down
5 changes: 1 addition & 4 deletions log.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
* This is free and unencumbered software released into the public domain.
*/

#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>

#include "events.h"
#include "log.h"
Expand Down
5 changes: 4 additions & 1 deletion log.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
#ifndef LOG_H
#define LOG_H

#include "events.h"
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
struct log_event;

/* Uncomment/comment to enable/disable the following settings. */
// #define USE_FILE_AS_LOG /* stdout if commented. */
Expand Down
8 changes: 3 additions & 5 deletions notifiers.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
* This is free and unencumbered software released into the public domain.
*/

#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>

#include <stdlib.h>
#include <time.h>
#include <curl/curl.h>

#include "log.h"
#include "notifiers.h"
#include "alertik.h"

Expand Down
11 changes: 2 additions & 9 deletions syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,15 @@
* This is free and unencumbered software released into the public domain.
*/

#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <time.h>


#include "events.h"
#include "log.h"
#include "syslog.h"

Expand Down
2 changes: 2 additions & 0 deletions syslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef SYSLOG_H
#define SYSLOG_H

struct log_event;

#define FIFO_MAX 64
#define SYSLOG_PORT 5140

Expand Down

0 comments on commit 25bc29f

Please sign in to comment.