diff options
| -rw-r--r-- | config.h.in | 44 | ||||
| -rw-r--r-- | eio.c | 47 | ||||
| -rw-r--r-- | libeio.m4 | 12 | 
3 files changed, 3 insertions, 100 deletions
| diff --git a/config.h.in b/config.h.in index 1dedbb4..5149ce5 100644 --- a/config.h.in +++ b/config.h.in @@ -1,7 +1,4 @@ -/* config.h.in.  Generated from configure.ac by autoheader.  */ - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#undef HAVE_DLFCN_H +/* libeio/config.h.in.  Generated from configure.ac by autoheader.  */  /* fdatasync(2) is available */  #undef HAVE_FDATASYNC @@ -9,48 +6,15 @@  /* futimes(2) is available */  #undef HAVE_FUTIMES -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H -  /* pread(2) and pwrite(2) are available */  #undef HAVE_PREADWRITE  /* readahead(2) is available (linux) */  #undef HAVE_READAHEAD -/* readdir_r is available */ -#undef HAVE_READDIR_R -  /* sendfile(2) is available and supported */  #undef HAVE_SENDFILE -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Name of package */ -#undef PACKAGE -  /* Define to the address where bug reports for this package should be sent. */  #undef PACKAGE_BUGREPORT @@ -65,9 +29,3 @@  /* Define to the version of this package. */  #undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION @@ -316,16 +316,10 @@ static void etp_atfork_prepare (void)  #if !HAVE_PREADWRITE    X_LOCK (preadwritelock);  #endif -#if !HAVE_READDIR_R -  X_LOCK (readdirlock); -#endif  }  static void etp_atfork_parent (void)  { -#if !HAVE_READDIR_R -  X_UNLOCK (readdirlock); -#endif  #if !HAVE_PREADWRITE    X_UNLOCK (preadwritelock);  #endif @@ -803,37 +797,6 @@ eio__readahead (int fd, off_t offset, size_t count, worker *self)  #endif -#if !HAVE_READDIR_R -# define readdir_r eio__readdir_r - -static mutex_t readdirlock = X_MUTEX_INIT; -   -static int -eio__readdir_r (DIR *dirp, EIO_STRUCT_DIRENT *ent, EIO_STRUCT_DIRENT **res) -{ -  EIO_STRUCT_DIRENT *e; -  int errorno; - -  X_LOCK (readdirlock); - -  e = readdir (dirp); -  errorno = errno; - -  if (e) -    { -      *res = ent; -      strcpy (ent->d_name, e->d_name); -    } -  else -    *res = 0; - -  X_UNLOCK (readdirlock); - -  errno = errorno; -  return e ? 0 : -1; -} -#endif -  /* sendfile always needs emulation */  static ssize_t  eio__sendfile (int ofd, int ifd, off_t offset, size_t count, etp_worker *self) @@ -933,11 +896,6 @@ static void  eio__scandir (eio_req *req, etp_worker *self)  {    DIR *dirp; -  union -  {     -    EIO_STRUCT_DIRENT d; -    char b [offsetof (EIO_STRUCT_DIRENT, d_name) + NAME_MAX + 1]; -  } *u;    EIO_STRUCT_DIRENT *entp;    char *name, *names;    int memlen = 4096; @@ -946,16 +904,15 @@ eio__scandir (eio_req *req, etp_worker *self)    X_LOCK (wrklock);    self->dirp = dirp = opendir (req->ptr1); -  self->dbuf = u = malloc (sizeof (*u));    req->flags |= EIO_FLAG_PTR2_FREE;    req->ptr2 = names = malloc (memlen);    X_UNLOCK (wrklock); -  if (dirp && u && names) +  if (dirp && names)      for (;;)        {          errno = 0; -        readdir_r (dirp, &u->d, &entp); +        entp = readdir (dirp);          if (!entp)            break; @@ -60,18 +60,6 @@ int main(void)  ],ac_cv_preadwrite=yes,ac_cv_preadwrite=no)])  test $ac_cv_preadwrite = yes && AC_DEFINE(HAVE_PREADWRITE, 1, pread(2) and pwrite(2) are available) -AC_CACHE_CHECK(for readdir_r, ac_cv_readdir_r, [AC_LINK_IFELSE([ -#include <dirent.h> -int main(void) -{ -   DIR *dir = 0; -   struct dirent ent, *eres; -   int res = readdir_r (dir, &ent, &eres); -   return 0; -} -],ac_cv_readdir_r=yes,ac_cv_readdir_r=no)]) -test $ac_cv_readdir_r = yes && AC_DEFINE(HAVE_READDIR_R, 1, readdir_r is available) -  AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([  # include <sys/types.h>  #if __linux | 
