centralize some #includes

these are used (almost) everywhere, so put them in common.h.
This commit is contained in:
Oswald Buddenhagen 2022-04-27 16:42:12 +02:00
parent 98f4fd4586
commit 1a0255c566
11 changed files with 6 additions and 56 deletions

View File

@ -11,8 +11,14 @@
#include <autodefs.h> #include <autodefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <assert.h>
#include <limits.h>
#include <stdarg.h> #include <stdarg.h>
#include <stddef.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h> #include <time.h>
typedef unsigned char uchar; typedef unsigned char uchar;

View File

@ -9,15 +9,8 @@
#include "sync.h" #include "sync.h"
#include <assert.h>
#include <unistd.h>
#include <limits.h>
#include <pwd.h> #include <pwd.h>
#include <sys/types.h>
#include <ctype.h> #include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__CYGWIN__) #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(__CYGWIN__)
char FieldDelimiter = ';'; char FieldDelimiter = ';';

View File

@ -7,9 +7,6 @@
#include "driver.h" #include "driver.h"
#include <stdlib.h>
#include <string.h>
driver_t *drivers[N_DRIVERS] = { &maildir_driver, &imap_driver }; driver_t *drivers[N_DRIVERS] = { &maildir_driver, &imap_driver };
uint uint

View File

@ -10,15 +10,7 @@
#include "socket.h" #include "socket.h"
#include <assert.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <limits.h>
#include <string.h>
#include <ctype.h> #include <ctype.h>
#include <time.h>
#include <sys/wait.h> #include <sys/wait.h>
#ifdef HAVE_LIBSASL #ifdef HAVE_LIBSASL

View File

@ -8,18 +8,11 @@
#include "driver.h" #include "driver.h"
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h> #include <ctype.h>
#include <dirent.h> #include <dirent.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#include <time.h>
#include <utime.h> #include <utime.h>
#if !defined(_POSIX_SYNCHRONIZED_IO) || _POSIX_SYNCHRONIZED_IO <= 0 #if !defined(_POSIX_SYNCHRONIZED_IO) || _POSIX_SYNCHRONIZED_IO <= 0

View File

@ -6,10 +6,6 @@
#include "driver.h" #include "driver.h"
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
typedef struct gen_cmd gen_cmd_t; typedef struct gen_cmd gen_cmd_t;
typedef union proxy_store { typedef union proxy_store {

View File

@ -7,13 +7,8 @@
#include "sync.h" #include "sync.h"
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <signal.h> #include <signal.h>
#include <time.h>
#include <sys/wait.h> #include <sys/wait.h>
#ifdef __linux__ #ifdef __linux__
# include <sys/prctl.h> # include <sys/prctl.h>

View File

@ -8,12 +8,7 @@
#include "socket.h" #include "socket.h"
#include <assert.h>
#include <unistd.h>
#include <stdlib.h>
#include <stddef.h>
#include <errno.h> #include <errno.h>
#include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@ -7,16 +7,8 @@
#include "sync.h" #include "sync.h"
#include <assert.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <time.h>
#include <fcntl.h> #include <fcntl.h>
#include <ctype.h> #include <ctype.h>
#include <string.h>
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>

View File

@ -6,10 +6,6 @@
#include "common.h" #include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
typedef struct { typedef struct {
int id; int id;
int first, other, morph_at, morph_to; int first, other, morph_at, morph_to;

View File

@ -7,13 +7,8 @@
#include "common.h" #include "common.h"
#include <assert.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
#include <string.h>
#include <ctype.h> #include <ctype.h>
#include <pwd.h> #include <pwd.h>