dirent usage cleanup
We were including the header in a lot of places it is no longer used. Additionally, use the correct autoconf macro for determining whether d_type is available as a member: HAVE_STRUCT_DIRENT_D_TYPE. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
8e9a69e8f6
commit
fc74ef93b6
|
@ -179,6 +179,7 @@ AC_TYPE_PID_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
AC_TYPE_UID_T
|
AC_TYPE_UID_T
|
||||||
|
AC_STRUCT_DIRENT_D_TYPE
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_FUNC_FORK
|
AC_FUNC_FORK
|
||||||
|
|
|
@ -340,7 +340,7 @@ static int checkdbdir(pmdb_t *db)
|
||||||
|
|
||||||
static int is_dir(const char *path, struct dirent *entry)
|
static int is_dir(const char *path, struct dirent *entry)
|
||||||
{
|
{
|
||||||
#ifdef DT_DIR
|
#ifdef HAVE_STRUCT_DIRENT_D_TYPE
|
||||||
return(entry->d_type == DT_DIR);
|
return(entry->d_type == DT_DIR);
|
||||||
#else
|
#else
|
||||||
char buffer[PATH_MAX];
|
char buffer[PATH_MAX];
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include <stdint.h> /* intmax_t */
|
#include <stdint.h> /* intmax_t */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
/* libalpm */
|
/* libalpm */
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h> /* off_t */
|
#include <sys/types.h> /* off_t */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
#include <alpm.h>
|
#include <alpm.h>
|
||||||
|
|
Loading…
Reference in New Issue