diff --git a/bin/xbps-checkvers/main.c b/bin/xbps-checkvers/main.c index ab1f56f3..5ecdd958 100644 --- a/bin/xbps-checkvers/main.c +++ b/bin/xbps-checkvers/main.c @@ -26,18 +26,20 @@ * */ +#include + +#include +#include +#include +#include #include +#include #include -#include #include +#include #include #include -#include -#include -#include -#include -#include -#include +#include #include diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c index a9a902ba..b187b22d 100644 --- a/bin/xbps-create/main.c +++ b/bin/xbps-create/main.c @@ -22,25 +22,30 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include + +#include #include #include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include #include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include + +#include +#include #include #include "queue.h" diff --git a/bin/xbps-install/fetch_cb.c b/bin/xbps-install/fetch_cb.c index 5e440b4a..aa0e878d 100644 --- a/bin/xbps-install/fetch_cb.c +++ b/bin/xbps-install/fetch_cb.c @@ -31,14 +31,16 @@ */ #include -#include #include #include +#include + +#include +#include #include #include #include -#include -#include +#include #include #include "defs.h" diff --git a/bin/xbps-install/util.c b/bin/xbps-install/util.c index 510f9835..d0eadf2c 100644 --- a/bin/xbps-install/util.c +++ b/bin/xbps-install/util.c @@ -23,15 +23,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include -#include +#include + +#include #include #include +#include +#include +#include #include #include -#include -#include +#include #include #include "defs.h" diff --git a/bin/xbps-query/show-info-files.c b/bin/xbps-query/show-info-files.c index 06f27aaa..24799bad 100644 --- a/bin/xbps-query/show-info-files.c +++ b/bin/xbps-query/show-info-files.c @@ -23,15 +23,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include +#include +#include +#include +#include #include +#include #include #include -#include -#include -#include -#include -#include +#include #include #include "defs.h" diff --git a/bin/xbps-rindex/index-add.c b/bin/xbps-rindex/index-add.c index 0c3d2782..00b3132c 100644 --- a/bin/xbps-rindex/index-add.c +++ b/bin/xbps-rindex/index-add.c @@ -24,15 +24,17 @@ */ #include -#include + +#include +#include +#include +#include +#include #include +#include #include #include -#include -#include -#include -#include -#include +#include #include #include "defs.h" diff --git a/bin/xbps-rindex/index-clean.c b/bin/xbps-rindex/index-clean.c index 9e33e409..2226e19f 100644 --- a/bin/xbps-rindex/index-clean.c +++ b/bin/xbps-rindex/index-clean.c @@ -24,18 +24,21 @@ */ #include -#include -#include -#include -#include -#include + +#include #include +#include +#include #include -#include #include -#include +#include +#include +#include +#include +#include #include + #include "defs.h" static xbps_dictionary_t dest; diff --git a/bin/xbps-rindex/remove-obsoletes.c b/bin/xbps-rindex/remove-obsoletes.c index 913c0429..41c38e9d 100644 --- a/bin/xbps-rindex/remove-obsoletes.c +++ b/bin/xbps-rindex/remove-obsoletes.c @@ -24,14 +24,16 @@ */ #include -#include + +#include +#include +#include +#include #include +#include #include #include -#include -#include -#include -#include +#include #include #include "defs.h" diff --git a/bin/xbps-rindex/repoflush.c b/bin/xbps-rindex/repoflush.c index be7bd770..010c2591 100644 --- a/bin/xbps-rindex/repoflush.c +++ b/bin/xbps-rindex/repoflush.c @@ -24,17 +24,22 @@ */ #include -#include + +#include +#include +#include +#include +#include #include +#include #include #include -#include -#include -#include -#include -#include + +#include +#include #include + #include "defs.h" bool diff --git a/include/xbps.h.in b/include/xbps.h.in index 74d51cbe..5ccd51e9 100644 --- a/include/xbps.h.in +++ b/include/xbps.h.in @@ -40,9 +40,6 @@ #include #include -#include -#include - #define XBPS_MAXPATH 512 #define XBPS_NAME_SIZE 64 diff --git a/include/xbps_api_impl.h b/include/xbps_api_impl.h index 66ffc3c1..aac5b11b 100644 --- a/include/xbps_api_impl.h +++ b/include/xbps_api_impl.h @@ -44,13 +44,6 @@ #include "queue.h" #include "compat.h" -#define EXTRACT_FLAGS ARCHIVE_EXTRACT_SECURE_NODOTDOT | \ - ARCHIVE_EXTRACT_SECURE_SYMLINKS | \ - ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS | \ - ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | \ - ARCHIVE_EXTRACT_UNLINK -#define FEXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | EXTRACT_FLAGS - #ifndef __UNCONST #define __UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) #endif @@ -59,6 +52,8 @@ #define __arraycount(x) (sizeof(x) / sizeof(*x)) #endif +struct archive_entry; + /** * @private */ diff --git a/lib/archive.c b/lib/archive.c index 94cba292..7193355c 100644 --- a/lib/archive.c +++ b/lib/archive.c @@ -29,6 +29,9 @@ #include #include +#include +#include + #include "xbps_api_impl.h" char HIDDEN * diff --git a/lib/download.c b/lib/download.c index 9005efc2..a9a52533 100644 --- a/lib/download.c +++ b/lib/download.c @@ -29,18 +29,20 @@ * From FreeBSD fetch(8): * $FreeBSD: src/usr.bin/fetch/fetch.c,v 1.84.2.1 2009/08/03 08:13:06 kensmith Exp $ */ - #include -#include #include #include -#include -#include -#include +#include +#include + #include #include -#include #include +#include +#include +#include +#include +#include #include diff --git a/lib/external/fexec.c b/lib/external/fexec.c index 57e1de74..787d2827 100644 --- a/lib/external/fexec.c +++ b/lib/external/fexec.c @@ -27,14 +27,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #include -#include - #include + #include #include #include #include +#include #include "xbps_api_impl.h" diff --git a/lib/initend.c b/lib/initend.c index 70ee26cb..547db6a9 100644 --- a/lib/initend.c +++ b/lib/initend.c @@ -23,12 +23,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include + #include #include #include #include +#include #include "xbps_api_impl.h" diff --git a/lib/package_alternatives.c b/lib/package_alternatives.c index 7d3cddb6..2856b604 100644 --- a/lib/package_alternatives.c +++ b/lib/package_alternatives.c @@ -24,12 +24,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include + +#include +#include #include +#include #include #include -#include -#include +#include #include "xbps_api_impl.h" diff --git a/lib/package_config_files.c b/lib/package_config_files.c index bc7f7995..ea089866 100644 --- a/lib/package_config_files.c +++ b/lib/package_config_files.c @@ -29,6 +29,8 @@ #include #include +#include + #include "xbps_api_impl.h" /* diff --git a/lib/package_configure.c b/lib/package_configure.c index 709ed128..0caccc1b 100644 --- a/lib/package_configure.c +++ b/lib/package_configure.c @@ -23,12 +23,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include #include #include #include #include "xbps_api_impl.h" + /** * @file lib/package_configure.c * @brief Package configuration routines @@ -45,6 +48,7 @@ member, the package (or packages) will be reconfigured even if its * state is XBPS_PKG_STATE_INSTALLED. */ + int xbps_configure_packages(struct xbps_handle *xhp, xbps_array_t ignpkgs) { diff --git a/lib/package_remove.c b/lib/package_remove.c index 686a844f..fff06a8f 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -23,6 +23,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include #include #include diff --git a/lib/package_script.c b/lib/package_script.c index f34ba32f..57fea3e9 100644 --- a/lib/package_script.c +++ b/lib/package_script.c @@ -23,11 +23,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include + +#include #include +#include #include #include -#include +#include #include "xbps_api_impl.h" diff --git a/lib/package_unpack.c b/lib/package_unpack.c index 1d205210..d3b98fce 100644 --- a/lib/package_unpack.c +++ b/lib/package_unpack.c @@ -35,8 +35,19 @@ #include #include +#include +#include + #include "xbps_api_impl.h" +#define EXTRACT_FLAGS ARCHIVE_EXTRACT_SECURE_NODOTDOT | \ + ARCHIVE_EXTRACT_SECURE_SYMLINKS | \ + ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS | \ + ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | \ + ARCHIVE_EXTRACT_UNLINK +#define FEXTRACT_FLAGS ARCHIVE_EXTRACT_OWNER | EXTRACT_FLAGS + + static int set_extract_flags(uid_t euid) { diff --git a/lib/pkgdb.c b/lib/pkgdb.c index dae1acbe..8c0efa8f 100644 --- a/lib/pkgdb.c +++ b/lib/pkgdb.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "xbps_api_impl.h" diff --git a/lib/plist.c b/lib/plist.c index 5a06dd81..b6f307a0 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -23,12 +23,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include +#include #include +#include #include #include -#include -#include +#include #include "xbps_api_impl.h" diff --git a/lib/plist_fetch.c b/lib/plist_fetch.c index efeb0de7..d4f25ec2 100644 --- a/lib/plist_fetch.c +++ b/lib/plist_fetch.c @@ -26,10 +26,13 @@ * From: $NetBSD: pkg_io.c,v 1.9 2009/08/16 21:10:15 joerg Exp $ */ +#include #include #include #include -#include + +#include +#include #include "xbps_api_impl.h" #include "fetch.h" diff --git a/lib/repo.c b/lib/repo.c index 7f9a401b..8d2aa6bd 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -23,13 +23,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include +#include +#include #include +#include #include #include -#include -#include -#include + +#include +#include #include #include diff --git a/lib/repo_sync.c b/lib/repo_sync.c index dc161239..2f803a0c 100644 --- a/lib/repo_sync.c +++ b/lib/repo_sync.c @@ -23,10 +23,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + +#include #include #include #include -#include +#include #include "xbps_api_impl.h" #include "fetch.h" diff --git a/lib/transaction_files.c b/lib/transaction_files.c index 693e3c98..890b447a 100644 --- a/lib/transaction_files.c +++ b/lib/transaction_files.c @@ -31,6 +31,9 @@ #include #include +#include +#include + #include "xbps_api_impl.h" #include "uthash.h" diff --git a/lib/transaction_internalize.c b/lib/transaction_internalize.c index 1db75e08..db3df460 100644 --- a/lib/transaction_internalize.c +++ b/lib/transaction_internalize.c @@ -28,6 +28,9 @@ #include #include +#include +#include + #include "xbps_api_impl.h" static int diff --git a/lib/util.c b/lib/util.c index 659a37ca..06974efb 100644 --- a/lib/util.c +++ b/lib/util.c @@ -25,6 +25,7 @@ #include "compat.h" +#include #include #include @@ -37,6 +38,7 @@ #include #include #include +#include #include "xbps_api_impl.h" diff --git a/lib/util_hash.c b/lib/util_hash.c index 4b1de715..3ed38c52 100644 --- a/lib/util_hash.c +++ b/lib/util_hash.c @@ -22,14 +22,18 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include -#include -#include -#include -#include +#include + #include #include #include +#include +#include +#include +#include +#include #include