From 869e81e1cf115e835040d0ecadb6108880103abe Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 5 Mar 2007 22:13:33 +0000 Subject: This commit looks much more monumental than it is. Almost all just #include reordering and adding ones that were forgotten (noticed when trying to compile after reordering). * Updated the HACKING file to include information on #include usage. * print -> vprint in "making dir" function in pactest. --- HACKING | 34 ++++++++++++++++++++++++++++++++-- lib/libalpm/add.c | 6 ++++-- lib/libalpm/alpm.c | 10 ++++++---- lib/libalpm/alpm_list.c | 3 ++- lib/libalpm/backup.c | 7 +++++-- lib/libalpm/be_files.c | 7 +++++-- lib/libalpm/cache.c | 8 +++++--- lib/libalpm/conflict.c | 15 ++++++++------- lib/libalpm/conflict.h | 3 ++- lib/libalpm/db.c | 16 +++++++++------- lib/libalpm/deps.c | 9 ++++++--- lib/libalpm/error.c | 6 ++++++ lib/libalpm/group.c | 8 +++++--- lib/libalpm/handle.c | 8 +++++--- lib/libalpm/handle.h | 4 +++- lib/libalpm/log.c | 6 ++++-- lib/libalpm/md5.c | 1 + lib/libalpm/md5driver.c | 4 ++++ lib/libalpm/package.c | 6 ++++-- lib/libalpm/provide.c | 8 +++++--- lib/libalpm/remove.c | 19 ++++++++++--------- lib/libalpm/server.c | 5 ++++- lib/libalpm/sha1.c | 16 +++++++--------- lib/libalpm/sync.c | 8 +++++--- lib/libalpm/trans.c | 7 +++++-- lib/libalpm/util.c | 18 +++++++++--------- lib/libalpm/versioncmp.c | 8 +++++--- pactest/util.py | 2 +- src/pacman/add.c | 5 ++++- src/pacman/conf.c | 5 ++++- src/pacman/deptest.c | 4 +++- src/pacman/downloadprog.c | 4 +++- src/pacman/log.c | 2 ++ src/pacman/package.c | 5 ++++- src/pacman/pacman.c | 2 ++ src/pacman/query.c | 5 ++++- src/pacman/remove.c | 5 ++++- src/pacman/sync.c | 12 ++++++------ src/pacman/trans.c | 4 +++- src/pacman/upgrade.c | 7 ++++--- src/pacman/util.c | 5 +++-- src/util/testpkg.c | 2 ++ src/util/vercmp.c | 4 ++++ 43 files changed, 219 insertions(+), 104 deletions(-) diff --git a/HACKING b/HACKING index 9d8681cc..ea8936db 100644 --- a/HACKING +++ b/HACKING @@ -1,8 +1,8 @@ Contributing to pacman ====================== -Please read 'submitting-patches' and 'translation-help' in the same directory as -this file. +Please read 'submitting-patches' and 'translation-help' in the same directory +as this file. Coding style ------------ @@ -62,4 +62,34 @@ Coding style NOT sizeof(*mylist); +Other Concerns +-------------- + +Currently our #include usage is in messy shape, but this is no reason to +continue down this messy path. When adding an include to a file, follow this +general pattern, including blank lines: + +#include "config.h" + +#include +#include +#include <...> + +Follow this with some more headers, depending on whether the file is in libalpm +or pacman proper. For libalpm: + +/* libalpm */ +#include "yourfile.h" +#include "alpm_list.h" +#include "anythingelse.h" + +For pacman: + +#include +#include + +/* pacman */ +#include "yourfile.h" +#include "anythingelse.h" + vim: set ts=2 sw=2 et: diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 97d1ea72..450b9c16 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -31,6 +31,7 @@ #endif #include "config.h" + #include #include #include @@ -38,7 +39,9 @@ #include #include #include -/* pacman */ + +/* libalpm */ +#include "add.h" #include "alpm_list.h" #include "trans.h" #include "util.h" @@ -54,7 +57,6 @@ #include "provide.h" #include "conflict.h" #include "deps.h" -#include "add.h" #include "remove.h" #include "handle.h" diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 8553c558..d4833199 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -22,6 +22,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -36,14 +38,15 @@ #include /* PATH_MAX */ #include #include -/* pacman */ -#include "config.h" + +/* libalpm */ +#include "alpm.h" +#include "alpm_list.h" #include "log.h" #include "error.h" #include "versioncmp.h" #include "md5.h" #include "sha1.h" -#include "alpm_list.h" #include "package.h" #include "group.h" #include "util.h" @@ -58,7 +61,6 @@ #include "handle.h" #include "provide.h" #include "server.h" -#include "alpm.h" #define min(X, Y) ((X) < (Y) ? (X) : (Y)) diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 0737fc89..324c7d08 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -20,11 +20,12 @@ */ #include "config.h" + #include #include #include -#include +/* libalpm */ #include "alpm_list.h" #include "util.h" diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c index 751d0937..aeb0dea7 100644 --- a/lib/libalpm/backup.c +++ b/lib/libalpm/backup.c @@ -23,11 +23,14 @@ */ #include "config.h" + #include #include -/* pacman */ -#include "log.h" + +/* libalpm */ #include "backup.h" +#include "alpm_list.h" +#include "log.h" #include "util.h" /* Look for a filename in a pmpkg_t.backup list. If we find it, diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index f8e73fbb..6e2f4c4f 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -21,6 +21,7 @@ */ #include "config.h" + #include #include #include @@ -36,10 +37,12 @@ #ifdef CYGWIN #include /* PATH_MAX */ #endif -/* pacman */ + +/* libalpm */ +#include "db.h" +#include "alpm_list.h" #include "log.h" #include "util.h" -#include "db.h" #include "alpm.h" #include "error.h" #include "handle.h" diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c index 75100283..f441af31 100644 --- a/lib/libalpm/cache.c +++ b/lib/libalpm/cache.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -27,16 +28,17 @@ #include #include #include -/* pacman */ + +/* libalpm */ +#include "cache.h" +#include "alpm_list.h" #include "log.h" #include "alpm.h" -#include "alpm_list.h" #include "util.h" #include "error.h" #include "package.h" #include "group.h" #include "db.h" -#include "cache.h" /* Returns a new package cache from db. * It frees the cache if it already exists. diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 76e76901..80490233 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -23,28 +23,29 @@ * USA. */ -#if defined(__APPLE__) || defined(__OpenBSD__) -#include -#endif - #include "config.h" + #include #include #include #include #include +#if defined(__APPLE__) || defined(__OpenBSD__) +#include +#endif #include #include -/* pacman */ -#include "handle.h" + +/* libalpm */ +#include "conflict.h" #include "alpm_list.h" +#include "handle.h" #include "trans.h" #include "util.h" #include "error.h" #include "log.h" #include "cache.h" #include "deps.h" -#include "conflict.h" /** See if potential conflict 'name' matches package 'pkg'. diff --git a/lib/libalpm/conflict.h b/lib/libalpm/conflict.h index 44507f72..8928de86 100644 --- a/lib/libalpm/conflict.h +++ b/lib/libalpm/conflict.h @@ -21,8 +21,9 @@ #ifndef _ALPM_CONFLICT_H #define _ALPM_CONFLICT_H -#include "db.h" #include "alpm.h" +#include "db.h" +#include "package.h" #define CONFLICT_FILE_LEN 512 diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index a6ef0528..451f40d6 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -23,30 +23,32 @@ * USA. */ -#if defined(__APPLE__) || defined(__OpenBSD__) -#include -#include -#endif - #include "config.h" + #include #include #include #include #include #include +#if defined(__APPLE__) || defined(__OpenBSD__) +#include +#include +#endif #include #include #include #ifdef CYGWIN #include /* PATH_MAX */ #endif -/* pacman */ + +/* libalpm */ +#include "db.h" +#include "alpm_list.h" #include "log.h" #include "util.h" #include "error.h" #include "server.h" -#include "db.h" #include "handle.h" #include "cache.h" #include "alpm.h" diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c index a84d8b2a..247d9ff3 100644 --- a/lib/libalpm/deps.c +++ b/lib/libalpm/deps.c @@ -21,6 +21,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -29,16 +31,17 @@ #endif #include #include -/* pacman */ + +/* libalpm */ +#include "deps.h" +#include "alpm_list.h" #include "util.h" #include "log.h" #include "error.h" -#include "alpm_list.h" #include "package.h" #include "db.h" #include "cache.h" #include "provide.h" -#include "deps.h" #include "versioncmp.h" #include "handle.h" diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index 8befd560..ece8a521 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -22,10 +22,16 @@ * USA. */ +#include "config.h" + #include + +/* libalpm */ +#include "error.h" #include "util.h" #include "alpm.h" +/* TODO does this really need a file all on its own? */ char SYMEXPORT *alpm_strerror(int err) { switch(err) { diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c index 98b331f3..cce05213 100644 --- a/lib/libalpm/group.c +++ b/lib/libalpm/group.c @@ -20,16 +20,18 @@ */ #include "config.h" + #include #include #include #include -/* pacman */ + +/* libalpm */ +#include "group.h" +#include "alpm_list.h" #include "util.h" #include "error.h" #include "log.h" -#include "group.h" -#include "alpm_list.h" #include "alpm.h" pmgrp_t *_alpm_grp_new() diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index b044adcb..417339dc 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -22,6 +22,7 @@ */ #include "config.h" + #include #include #include @@ -30,15 +31,16 @@ #include #include #include -/* pacman */ + +/* libalpm */ +#include "handle.h" +#include "alpm_list.h" #include "util.h" #include "log.h" -#include "alpm_list.h" #include "error.h" #include "trans.h" #include "alpm.h" #include "server.h" -#include "handle.h" pmhandle_t *_alpm_handle_new() { diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index bd75a370..35e5eb23 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -21,9 +21,11 @@ #ifndef _ALPM_HANDLE_H #define _ALPM_HANDLE_H +#include + +#include "alpm_list.h" #include "db.h" #include "log.h" -#include "alpm_list.h" #include "alpm.h" #include "trans.h" diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c index c1d2aa6a..b59ec64e 100644 --- a/lib/libalpm/log.c +++ b/lib/libalpm/log.c @@ -20,12 +20,14 @@ */ #include "config.h" + #include #include #include -/* pacman */ -#include "alpm.h" + +/* libalpm */ #include "log.h" +#include "alpm.h" void _alpm_log(pmloglevel_t flag, char *fmt, ...) { diff --git a/lib/libalpm/md5.c b/lib/libalpm/md5.c index 7e4fd677..6d5aa6a3 100644 --- a/lib/libalpm/md5.c +++ b/lib/libalpm/md5.c @@ -24,6 +24,7 @@ documentation and/or software. */ #include + #include "md5.h" /* Constants for MD5Transform routine. diff --git a/lib/libalpm/md5driver.c b/lib/libalpm/md5driver.c index 968caed8..60144fee 100644 --- a/lib/libalpm/md5driver.c +++ b/lib/libalpm/md5driver.c @@ -19,10 +19,14 @@ documentation and/or software. */ #define MD MD5 +#include "config.h" + #include #include #include #include + +/* libalpm */ #include "alpm.h" #include "log.h" #include "util.h" diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 1faf2f2d..340dc525 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -23,6 +23,7 @@ */ #include "config.h" + #include #include #include @@ -33,12 +34,13 @@ #include #include #include -/* pacman */ + +/* libalpm */ #include "package.h" +#include "alpm_list.h" #include "log.h" #include "util.h" #include "error.h" -#include "alpm_list.h" #include "db.h" #include "cache.h" #include "provide.h" diff --git a/lib/libalpm/provide.c b/lib/libalpm/provide.c index 3b563365..df600be7 100644 --- a/lib/libalpm/provide.c +++ b/lib/libalpm/provide.c @@ -20,14 +20,16 @@ */ #include "config.h" + #include #include -/* pacman */ -#include "cache.h" + +/* libalpm */ +#include "provide.h" #include "alpm_list.h" +#include "cache.h" #include "db.h" #include "log.h" -#include "provide.h" /* return a alpm_list_t of packages in "db" that provide "package" */ diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index 9c57334b..fed86b0c 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -23,24 +23,26 @@ * USA. */ -#if defined(__APPLE__) || defined(__OpenBSD__) -#include -#endif -#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__) -#include -#endif - #include "config.h" + #include #include #include #include #include #include +#if defined(__APPLE__) || defined(__OpenBSD__) +#include +#endif +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__) +#include +#endif #include #include #include -/* pacman */ + +/* libalpm */ +#include "remove.h" #include "alpm_list.h" #include "trans.h" #include "util.h" @@ -55,7 +57,6 @@ #include "cache.h" #include "deps.h" #include "provide.h" -#include "remove.h" #include "handle.h" #include "alpm.h" diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c index b426ccb5..fb3c4147 100644 --- a/lib/libalpm/server.c +++ b/lib/libalpm/server.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -29,8 +31,9 @@ #include #include -/* pacman */ +/* libalpm */ #include "server.h" +#include "alpm_list.h" #include "error.h" #include "log.h" #include "alpm.h" diff --git a/lib/libalpm/sha1.c b/lib/libalpm/sha1.c index 956e87a9..d9a9118d 100644 --- a/lib/libalpm/sha1.c +++ b/lib/libalpm/sha1.c @@ -22,20 +22,18 @@ Robert Klep -- Expansion function fix */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include "config.h" + +#include +#include +#include #include +/* libalpm */ +#include "sha1.h" #include "alpm.h" #include "log.h" #include "util.h" -#include "sha1.h" - -#include - -#include -#include /* Not-swap is a macro that does an endian swap on architectures that are diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 337e350a..f3a0ee06 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -23,6 +23,7 @@ */ #include "config.h" + #include #include #include @@ -33,10 +34,12 @@ #endif #include #include -/* pacman */ + +/* libalpm */ +#include "sync.h" +#include "alpm_list.h" #include "log.h" #include "error.h" -#include "alpm_list.h" #include "package.h" #include "db.h" #include "cache.h" @@ -45,7 +48,6 @@ #include "provide.h" #include "trans.h" #include "util.h" -#include "sync.h" #include "versioncmp.h" #include "handle.h" #include "util.h" diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index b4677079..f22697dd 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -23,16 +23,19 @@ */ #include "config.h" + #include #include #include #include -/* pacman */ + +/* libalpm */ +#include "trans.h" +#include "alpm_list.h" #include "error.h" #include "package.h" #include "util.h" #include "log.h" -#include "alpm_list.h" #include "handle.h" #include "add.h" #include "remove.h" diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index c526ed8e..be9eeb31 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -23,14 +23,8 @@ * USA. */ -#if defined(__APPLE__) || defined(__OpenBSD__) -#include -#endif -#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__) -#include -#endif - #include "config.h" + #include #include #ifdef __sun__ @@ -45,6 +39,12 @@ #include #include #include +#if defined(__APPLE__) || defined(__OpenBSD__) +#include +#endif +#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__sun__) +#include +#endif #include #ifdef CYGWIN #include /* PATH_MAX */ @@ -54,12 +54,12 @@ #include #endif -/* pacman */ +/* libalpm */ +#include "util.h" #include "alpm_list.h" #include "log.h" #include "trans.h" #include "sync.h" -#include "util.h" #include "error.h" #include "package.h" #include "alpm.h" diff --git a/lib/libalpm/versioncmp.c b/lib/libalpm/versioncmp.c index ad628866..67fe5ba4 100644 --- a/lib/libalpm/versioncmp.c +++ b/lib/libalpm/versioncmp.c @@ -22,17 +22,19 @@ */ #include "config.h" + #include #include #include #include #include -/* pacman */ + +/* libalpm */ +#include "versioncmp.h" +#include "alpm_list.h" #include "alpm.h" #include "log.h" #include "util.h" -#include "alpm_list.h" -#include "versioncmp.h" #ifndef HAVE_STRVERSCMP /* GNU's strverscmp() function, taken from glibc 2.3.2 sources diff --git a/pactest/util.py b/pactest/util.py index 1cdb4018..e445605e 100755 --- a/pactest/util.py +++ b/pactest/util.py @@ -255,7 +255,7 @@ def mkdir(dir): else: parent, thisdir = os.path.split(dir) if parent: mkdir(parent) #recurse to make all parents - print "making dir %s" % thisdir + vprint("making dir %s" % thisdir) if thisdir: os.mkdir(dir) if __name__ == "__main__": diff --git a/src/pacman/add.c b/src/pacman/add.c index 40a4bc2d..2adf8681 100644 --- a/src/pacman/add.c +++ b/src/pacman/add.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -26,11 +28,12 @@ #include #include + /* pacman */ +#include "add.h" #include "log.h" #include "downloadprog.h" #include "trans.h" -#include "add.h" #include "conf.h" #include "util.h" diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 4c0381cf..a770fd47 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -26,12 +28,13 @@ #include #include + /* pacman */ +#include "conf.h" #include "util.h" #include "log.h" #include "sync.h" #include "downloadprog.h" -#include "conf.h" config_t *config_new() { diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c index f8bf513d..a7c913d9 100644 --- a/src/pacman/deptest.c +++ b/src/pacman/deptest.c @@ -25,14 +25,16 @@ #include #include #include + #include #include + /* pacman */ +#include "deptest.h" #include "util.h" #include "conf.h" #include "log.h" #include "sync.h" -#include "deptest.h" extern config_t *config; diff --git a/src/pacman/downloadprog.c b/src/pacman/downloadprog.c index 0d5a9b22..6ce8e2f5 100644 --- a/src/pacman/downloadprog.c +++ b/src/pacman/downloadprog.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -32,10 +33,11 @@ #include #include + /* pacman */ +#include "downloadprog.h" #include "util.h" #include "log.h" -#include "downloadprog.h" #include "conf.h" /* progress bar */ diff --git a/src/pacman/log.c b/src/pacman/log.c index 501f32d2..1b65e28d 100644 --- a/src/pacman/log.c +++ b/src/pacman/log.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -28,6 +29,7 @@ #include #include + /* pacman */ #include "log.h" #include "conf.h" diff --git a/src/pacman/package.c b/src/pacman/package.c index d5a3d04e..091ed9ed 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -28,10 +30,11 @@ #include #include + /* pacman */ +#include "package.h" #include "log.h" #include "util.h" -#include "package.h" /* Display the content of an installed package * diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index e2a5eec9..a26d34c7 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -44,6 +45,7 @@ #include #include + /* pacman */ #include "util.h" #include "log.h" diff --git a/src/pacman/query.c b/src/pacman/query.c index 2ce36ac4..2964a7cb 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -28,9 +30,10 @@ #include #include + /* pacman */ -#include "package.h" #include "query.h" +#include "package.h" #include "log.h" #include "conf.h" #include "sync.h" diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 0b48410c..9989f8e5 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -26,11 +28,12 @@ #include #include + /* pacman */ +#include "remove.h" #include "util.h" #include "log.h" #include "trans.h" -#include "remove.h" #include "conf.h" extern config_t *config; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 8db1d9ac..4245b964 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -19,16 +19,15 @@ * USA. */ -#if defined(__APPLE__) || defined(__OpenBSD__) -#include -#include -#endif - #include "config.h" + #include #include #include #include +#if defined(__APPLE__) || defined(__OpenBSD__) +#include +#endif #include #include #include @@ -41,13 +40,14 @@ #include /* downloadLastErrString */ /* TODO remove above download.h inclusion once we abstract more, and also * remove it from Makefile.am on the pacman side */ + /* pacman */ +#include "sync.h" #include "util.h" #include "log.h" #include "downloadprog.h" #include "package.h" #include "trans.h" -#include "sync.h" #include "conf.h" extern config_t *config; diff --git a/src/pacman/trans.c b/src/pacman/trans.c index 55b40413..23efadf6 100644 --- a/src/pacman/trans.c +++ b/src/pacman/trans.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -30,10 +31,11 @@ #include #include + /* pacman */ +#include "trans.h" #include "util.h" #include "log.h" -#include "trans.h" #include "conf.h" #define LOG_STR_LEN 256 diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 5b803353..a4c94bb7 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -19,15 +19,16 @@ * USA. */ +#include "config.h" + #include -#include -#include #include #include + /* pacman */ -#include "add.h" #include "upgrade.h" +#include "add.h" #include "conf.h" extern config_t *config; diff --git a/src/pacman/util.c b/src/pacman/util.c index 96eb621e..76bbc189 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -19,16 +19,16 @@ * USA. */ +#include "config.h" + #if defined(__APPLE__) || defined(__OpenBSD__) #include #include #endif - #include #include #include -#include "config.h" #include #include #include @@ -44,6 +44,7 @@ #include #include + /* pacman */ #include "util.h" #include "conf.h" diff --git a/src/util/testpkg.c b/src/util/testpkg.c index fdee6708..a64e6b34 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include diff --git a/src/util/vercmp.c b/src/util/vercmp.c index 75972532..cc951988 100644 --- a/src/util/vercmp.c +++ b/src/util/vercmp.c @@ -19,14 +19,18 @@ * USA. */ +#include "config.h" + #include #include #include #include #include +/* TODO this is probably not the best way to do this */ #ifndef PATH_MAX #define PATH_MAX 1024 #endif + #include int main(int argc, char *argv[]) -- cgit v1.2.3-70-g09d2