mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
OS-independent way to detect presence of dirent.d_type - suggested by Bill Oliver
This commit is contained in:
parent
64abfb8edb
commit
9e6c5f0b90
@ -700,6 +700,10 @@ AC_CHECK_TYPES([struct XDR::xdr_ops],,,[#include <rpc/rpc.h>
|
||||
AC_CHECK_TYPES([struct xdr_ops],,,[#include <rpc/rpc.h>
|
||||
#include <rpc/xdr.h>])
|
||||
|
||||
dnl AC_STRUCT_DIRENT_D_TYPE
|
||||
AC_CHECK_MEMBER([struct dirent.d_type],
|
||||
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE,1,[Define this if struct dirent has d_type]),,
|
||||
[#include <dirent.h>])
|
||||
|
||||
dnl EKU: try to determine the alignment of long and double
|
||||
dnl replaces FB_ALIGNMENT and FB_DOUBLE_ALIGN in src/jrd/common.h
|
||||
|
@ -146,16 +146,11 @@ bool ScanDir::match(const char *pattern, const char *name)
|
||||
|
||||
bool ScanDir::isDirectory()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
return (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
#elif defined(HAVE_STRUCT_DIRENT_D_TYPE)
|
||||
return (data->d_type == DT_DIR);
|
||||
#else
|
||||
#ifndef SOLARIS
|
||||
#ifndef HPUX
|
||||
if (data->d_type == DT_DIR)
|
||||
return true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct stat buf;
|
||||
|
||||
if (stat (getFilePath(), &buf))
|
||||
|
Loading…
Reference in New Issue
Block a user