Declare why certain headers are included

This commit is contained in:
Nathan Fisher 2023-08-07 19:15:20 -04:00
parent 5138f3ed6d
commit 5d410cb7d3
4 changed files with 11 additions and 14 deletions

View file

@ -34,8 +34,8 @@
#define HAGGIS_H #define HAGGIS_H
#include "linklist.h" #include "linklist.h"
#include <stdint.h> #include <stdint.h> // uint<x>_t
#include <stdio.h> #include <stdio.h> // FILE
typedef uint8_t u8; typedef uint8_t u8;

View file

@ -34,8 +34,6 @@
#define JOBQ_H #define JOBQ_H
#include <pthread.h> #include <pthread.h>
#include <stddef.h>
#include <stdlib.h>
#include "haggis.h" #include "haggis.h"

View file

@ -30,10 +30,9 @@
* other than his own. * other than his own.
*/ */
#include <fcntl.h> #include <limits.h> // PATH_MAX
#include <limits.h>
#include <md5.h> #include <md5.h>
#include <stdint.h> #include <stdint.h> // uint<x>_t
#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__FreeBSD__) || defined(__DragonFly__)
#include <sha.h> #include <sha.h>
@ -48,13 +47,12 @@
#include <sha2.h> #include <sha2.h>
#endif /* if defined (__FreeBSD__) */ #endif /* if defined (__FreeBSD__) */
#include <stddef.h> #include <stdio.h> // fopen, fread, fwrite, FILE
#include <stdio.h> #include <stdlib.h> // free, malloc
#include <stdlib.h> #include <string.h> // memcpy, strlen
#include <string.h> #include <unistd.h> // readlink
#include <unistd.h> #include <sys/stat.h> // stat
#include <sys/stat.h> #include <sys/sysmacros.h> // major, minor, dev_t
#include <sys/sysmacros.h>
#include "bytes.h" #include "bytes.h"
#include "haggis.h" #include "haggis.h"

View file

@ -29,6 +29,7 @@
* as such so that the author does not get blamed for bugs * as such so that the author does not get blamed for bugs
* other than his own. * other than his own.
*/ */
#include <stdlib.h> // free, malloc
#include "jobq.h" #include "jobq.h"