Drop paths.h include

We include the file in plenty of places. This is mostly due to
historical reasons. The only place that needs something from the
header file is storage_backend_fs which opens _PATH_MOUNTED. But
it gets the file included indirectly via mntent.h. At no other
place in our code we need _PATH_.*. Drop the include and
configure check then.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2016-03-17 11:44:01 +01:00
parent 9a0c7f5f83
commit 865764de06
11 changed files with 1 additions and 22 deletions

View File

@ -323,7 +323,7 @@ fi
LIBS=$old_libs LIBS=$old_libs
dnl Availability of various common headers (non-fatal if missing). dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/un.h \ AC_CHECK_HEADERS([pwd.h regex.h sys/un.h \
sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \ sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \
sys/un.h sys/syscall.h sys/sysctl.h netinet/tcp.h ifaddrs.h \ sys/un.h sys/syscall.h sys/sysctl.h netinet/tcp.h ifaddrs.h \
libtasn1.h sys/ucred.h sys/mount.h]) libtasn1.h sys/ucred.h sys/mount.h])

View File

@ -31,7 +31,6 @@
#include <sys/un.h> #include <sys/un.h>
#include <sys/personality.h> #include <sys/personality.h>
#include <unistd.h> #include <unistd.h>
#include <paths.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <signal.h> #include <signal.h>

View File

@ -36,7 +36,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <signal.h> #include <signal.h>
#include <paths.h>
#include <pwd.h> #include <pwd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@ -39,7 +39,6 @@
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <paths.h>
#include <pwd.h> #include <pwd.h>
#include <sys/wait.h> #include <sys/wait.h>

View File

@ -37,7 +37,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <signal.h> #include <signal.h>
#include <paths.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/un.h> #include <sys/un.h>

View File

@ -36,7 +36,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <signal.h> #include <signal.h>
#include <paths.h>
#include <pwd.h> #include <pwd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@ -35,10 +35,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <signal.h> #include <signal.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
#include "internal.h" #include "internal.h"
#include "datatypes.h" #include "datatypes.h"
#include "virbitmap.h" #include "virbitmap.h"

View File

@ -35,10 +35,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h> #include <sys/wait.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
#include "internal.h" #include "internal.h"
#include "viriptables.h" #include "viriptables.h"
#include "vircommand.h" #include "vircommand.h"

View File

@ -45,9 +45,6 @@
# include <libdevmapper.h> # include <libdevmapper.h>
#endif #endif
#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
#include <netdb.h> #include <netdb.h>
#ifdef HAVE_GETPWUID_R #ifdef HAVE_GETPWUID_R
# include <pwd.h> # include <pwd.h>

View File

@ -34,7 +34,6 @@
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <paths.h>
#include <pwd.h> #include <pwd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/time.h> #include <sys/time.h>

View File

@ -54,10 +54,6 @@
# endif # endif
#endif #endif
#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
VIR_LOG_INIT("tests.testutils"); VIR_LOG_INIT("tests.testutils");