lib: only include fetch.h where required

This results in a lot of places where limits.h was missing, so
this diff is larger than necessary.
This commit is contained in:
Duncan Overbruck 2022-12-22 16:46:55 +01:00
parent be7e532c3c
commit 2deb156beb
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35
11 changed files with 40 additions and 28 deletions

View File

@ -42,7 +42,6 @@
#endif #endif
#include "queue.h" #include "queue.h"
#include "fetch.h"
#include "compat.h" #include "compat.h"
#define EXTRACT_FLAGS ARCHIVE_EXTRACT_SECURE_NODOTDOT | \ #define EXTRACT_FLAGS ARCHIVE_EXTRACT_SECURE_NODOTDOT | \

View File

@ -29,16 +29,17 @@
#ifdef __FreeBSD__ #ifdef __FreeBSD__
#define _WITH_GETLINE /* getline() */ #define _WITH_GETLINE /* getline() */
#endif #endif
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <glob.h>
#include <libgen.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <strings.h> #include <strings.h>
#include <errno.h>
#include <stdarg.h>
#include <dirent.h>
#include <ctype.h>
#include <glob.h>
#include <libgen.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"

View File

@ -23,10 +23,11 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <errno.h>
#include <limits.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"

View File

@ -23,14 +23,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h> #include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
#include <limits.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <dirent.h>
#include <libgen.h>
#include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"

View File

@ -23,14 +23,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"

View File

@ -32,6 +32,7 @@
#include <errno.h> #include <errno.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"
#include "fetch.h"
/** /**
* @file lib/plist_fetch.c * @file lib/plist_fetch.c

View File

@ -32,6 +32,7 @@
#include <errno.h> #include <errno.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"
#include "fetch.h"
struct rpool_fpkg { struct rpool_fpkg {
xbps_array_t revdeps; xbps_array_t revdeps;

View File

@ -24,12 +24,14 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <errno.h>
#include <limits.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <unistd.h> #include <unistd.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"
#include "fetch.h"
static int static int
verify_binpkg(struct xbps_handle *xhp, xbps_dictionary_t pkgd) verify_binpkg(struct xbps_handle *xhp, xbps_dictionary_t pkgd)

View File

@ -27,6 +27,7 @@
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <limits.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -33,16 +33,18 @@
#include "compat.h" #include "compat.h"
#include <stdio.h> #include <sys/utsname.h>
#include <stdbool.h>
#include <stdlib.h> #include <ctype.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h> #include <errno.h>
#include <fnmatch.h> #include <fnmatch.h>
#include <ctype.h>
#include <libgen.h> #include <libgen.h>
#include <sys/utsname.h> #include <limits.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"

View File

@ -56,9 +56,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <string.h>
#include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "xbps_api_impl.h" #include "xbps_api_impl.h"