diff --git a/config.h.in b/config.h.in index f7c8937..184a9f7 100644 --- a/config.h.in +++ b/config.h.in @@ -24,6 +24,12 @@ /* Has /dev/urandom */ #undef HAVE_DEV_URANDOM +/* Define to 1 if you have the `door_create' function. */ +#undef HAVE_DOOR_CREATE + +/* Define to 1 if you have the header file. */ +#undef HAVE_DOOR_H + /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H @@ -63,6 +69,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SHA_H +/* Define to 1 if you have the `port_create' function. */ +#undef HAVE_PORT_CREATE + +/* Define to 1 if you have the header file. */ +#undef HAVE_PORT_H + /* Define to 1 if you have the `posix_fadvise' function. */ #undef HAVE_POSIX_FADVISE diff --git a/configure b/configure index 2e91224..5c6690e 100755 --- a/configure +++ b/configure @@ -6214,6 +6214,52 @@ done fi +for ac_header in door.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "door.h" "ac_cv_header_door_h" "$ac_includes_default" +if test "x$ac_cv_header_door_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DOOR_H 1 +_ACEOF + for ac_func in door_create +do : + ac_fn_c_check_func "$LINENO" "door_create" "ac_cv_func_door_create" +if test "x$ac_cv_func_door_create" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DOOR_CREATE 1 +_ACEOF + +fi +done + +fi + +done + + +for ac_header in port.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "port.h" "ac_cv_header_port_h" "$ac_includes_default" +if test "x$ac_cv_header_port_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PORT_H 1 +_ACEOF + for ac_func in port_create +do : + ac_fn_c_check_func "$LINENO" "port_create" "ac_cv_func_port_create" +if test "x$ac_cv_func_port_create" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PORT_CREATE 1 +_ACEOF + +fi +done + +fi + +done + + if test -c "/dev/random"; then diff --git a/configure.ac b/configure.ac index 8c0d96a..8b995a8 100644 --- a/configure.ac +++ b/configure.ac @@ -150,6 +150,12 @@ then AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h) fi +dnl check for door support (Solaris) +AC_CHECK_HEADERS(door.h, [AC_CHECK_FUNCS(door_create)]) + +dnl check for event port support (Solaris) +AC_CHECK_HEADERS(port.h, [AC_CHECK_FUNCS(port_create)]) + dnl ############################################## dnl check for various RNG/PRNG devices dnl ############################################## diff --git a/src/core/unixfsservices.cpp b/src/core/unixfsservices.cpp index 0f91d1e..92ba8e8 100644 --- a/src/core/unixfsservices.cpp +++ b/src/core/unixfsservices.cpp @@ -365,10 +365,12 @@ void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const #ifdef S_ISSOCK else if(S_ISSOCK(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_SOCK; #endif -#ifdef S_IFDOOR + +#if HAVE_DOOR_CREATE else if(S_ISDOOR(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_DOOR; #endif -#ifdef S_ISPORT + +#if HAVE_PORT_CREATE else if(S_ISPORT(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_PORT; #endif @@ -594,12 +596,14 @@ void cUnixFSServices::ConvertModeToString( uint64 perm, TSTRING& tstrPerm ) cons case S_IFLNK: szPerm[0] = _T('l'); break; -#ifdef S_IFDOOR + +#if HAVE_DOOR_CREATE // Solaris doors case S_IFDOOR: szPerm[0] = _T('D'); break; #endif -#ifdef S_ISPORT + +#if HAVE_PORT_CREATE // Solaris event ports case S_IFPORT: szPerm[0] = _T('P'); break;