commit: d6d33b2ef60f3700702e59f8cdf718b7dd3fb886 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Wed Dec 28 22:33:45 2016 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Wed Dec 28 22:33:45 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d6d33b2e
move system headers to porting.h to avoid duplication porting.h | 3 +++ qcache.c | 10 ---------- qmerge.c | 3 --- qpkg.c | 2 -- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/porting.h b/porting.h index 28b6317..b166bc1 100644 --- a/porting.h +++ b/porting.h @@ -30,7 +30,10 @@ #include <ctype.h> #include <dirent.h> #include <errno.h> +#include <fcntl.h> +#include <fnmatch.h> #include <getopt.h> +#include <glob.h> #include <inttypes.h> #include <libgen.h> #include <limits.h> diff --git a/qcache.c b/qcache.c index 535d7a2..c5421c7 100644 --- a/qcache.c +++ b/qcache.c @@ -7,16 +7,6 @@ #ifdef APPLET_qcache -#include <dirent.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <time.h> -#include <unistd.h> - /********************************************************************/ /* Required portage-utils stuff */ /********************************************************************/ diff --git a/qmerge.c b/qmerge.c index 68459c9..4ef156b 100644 --- a/qmerge.c +++ b/qmerge.c @@ -8,9 +8,6 @@ #ifdef APPLET_qmerge -#include <fnmatch.h> -#include <glob.h> -#include <sys/stat.h> /* This is a GNUlib hack, because GNUlib doesn't provide st_mtim members * of struct stat, but instead provides wrappers to retrieve the time * fields (stat-time module). We just define a macro in case people are diff --git a/qpkg.c b/qpkg.c index 2cc658e..1c18edc 100644 --- a/qpkg.c +++ b/qpkg.c @@ -8,8 +8,6 @@ #ifdef APPLET_qpkg -#include <fnmatch.h> - #define QPKG_FLAGS "cEpP:" COMMON_FLAGS static struct option const qpkg_long_opts[] = { {"clean", no_argument, NULL, 'c'},