Browse Source

centralize some #includes

these are used (almost) everywhere, so put them in common.h.
wip/maildir-path-under-inbox
Oswald Buddenhagen 3 years ago
parent
commit
1a0255c566
  1. 6
      src/common.h
  2. 7
      src/config.c
  3. 3
      src/driver.c
  4. 8
      src/drv_imap.c
  5. 7
      src/drv_maildir.c
  6. 4
      src/drv_proxy.c
  7. 5
      src/main.c
  8. 5
      src/socket.c
  9. 8
      src/sync.c
  10. 4
      src/tst_timers.c
  11. 5
      src/util.c

6
src/common.h

@ -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;

7
src/config.c

@ -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 = ';';

3
src/driver.c

@ -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

8
src/drv_imap.c

@ -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

7
src/drv_maildir.c

@ -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

4
src/drv_proxy.c

@ -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 {

5
src/main.c

@ -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>

5
src/socket.c

@ -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>

8
src/sync.c

@ -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>

4
src/tst_timers.c

@ -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;

5
src/util.c

@ -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>

Loading…
Cancel
Save