From 40f522eb3a7d7a2362d19a3cb001239fea877a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 2 Mar 2005 22:03:08 +0000 Subject: [PATCH] some fixes for solaris --- mrw/file.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mrw/file.hpp b/mrw/file.hpp index 96b6be0..ebfc8fe 100644 --- a/mrw/file.hpp +++ b/mrw/file.hpp @@ -9,6 +9,9 @@ @license LGPL, see file COPYING $Log$ + Revision 1.5 2005/03/02 22:03:08 marc + some fixes for solaris + Revision 1.4 2005/02/28 07:17:24 marc Dir is now usable and compilable, also added fixes for Solaris @@ -253,13 +256,12 @@ namespace mrw { #ifdef _DIRENT_HAVE_D_TYPE return FileType(_dirent.d.d_type); #else - return UNKNOWN: + return UNKNOWN; #endif } /// Get the type of the actual file as string. const std::string& typestr() const throw() { -#ifdef _DIRENT_HAVE_D_TYPE static const std::string UNKNOWN_("UNKNOWN"); static const std::string REGULAR_("REGULAR"); static const std::string DIR_("DIR"); @@ -267,6 +269,7 @@ namespace mrw { static const std::string SOCKET_("SOCKET"); static const std::string CHAR_("CHAR"); static const std::string BLOCK_("BLOCK"); +#ifdef _DIRENT_HAVE_D_TYPE switch (_dirent.d.d_type) { case UNKNOWN: return UNKNOWN_; case REGULAR: return REGULAR_; @@ -278,7 +281,7 @@ namespace mrw { } abort(); // this line is never reached #else - return "UNKNOWN"; + return UNKNOWN_; #endif } //.......................................................... variables