--- vtdata/ORIG/directory.h Wed Nov 11 04:06:14 1998 +++ vtdata/directory.h Tue Apr 3 12:33:38 2001 @@ -24,9 +24,13 @@ #include #include -#include +#if defined(sgi) && !defined(__GNUG__) +# include +#else +# include +#endif #include -#include +#define BOOST_DECL #if defined(unix) || defined(__unix) || defined(__unix__) #include @@ -40,7 +44,7 @@ { class dir_it; -#if defined(__GNUG__) +#if defined(__GNUG__) || defined(sgi) template typename Property::value_type get(dir_it const &); template @@ -50,9 +54,13 @@ template class set; #endif +#if defined(__GNUG__) + class BOOST_DECL dir_it: public input_iterator +#else class BOOST_DECL dir_it: public std::iterator +#endif { -#if defined(__GNUG__) +#if defined(__GNUG__) || defined(sgi) template friend typename Property::value_type get(dir_it const &); template @@ -90,7 +98,7 @@ bool operator== (dir_it const &) const; bool operator!= (dir_it const &) const; -#if defined(__GNUG__) +#if defined(__GNUG__) || defined(sgi) private: #endif representation *rep; @@ -107,7 +115,7 @@ struct user_write { typedef bool value_type; }; struct user_execute { typedef bool value_type; }; -#if defined(__GNUG__) +#if defined(__GNUG__) || defined(sgi) template <> size::value_type get(dir_it const &); template <> mtime::value_type get(dir_it const &); template <> bool get(dir_it const &); @@ -263,6 +271,9 @@ template <> bool get(dir_it const &); template <> void set(dir_it const &, bool); +#ifdef __unix__ + typedef mode_t umode_t; +#endif struct mode { typedef umode_t value_type; }; template <> umode_t get(dir_it const &); template <> void set(dir_it const &, umode_t); @@ -285,19 +296,22 @@ struct uid { typedef uid_t value_type; }; template<> uid_t get(dir_it const &); template<> void set(dir_it const &, uid_t); - class unknown_uname: public invalid_argument + class unknown_uname: public std::invalid_argument { public: - unknown_uname(string u): std::invalid_argument("unknown user name"), m_uname(u) {} - string uname() const { return m_uname; } + unknown_uname(std::string u): std::invalid_argument("unknown user name"), m_uname(u) {} + std::string uname() const { return m_uname; } private: - string m_uname; + std::string m_uname; }; - struct uname { typedef string value_type; }; - template<> string get(dir_it const &); + struct uname { typedef std::string value_type; }; + template<> std::string get(dir_it const &); +#ifdef BUGGY_CODE + // This does not match the __GNUG__ set template above template<> void set(dir_it const &, string const &); +#endif - class unknown_gid: public invalid_argument + class unknown_gid: public std::invalid_argument { public: unknown_gid(gid_t g): std::invalid_argument("unknown group ID"), m_gid(g) {} @@ -308,17 +322,20 @@ struct gid { typedef gid_t value_type; }; template<> gid_t get(dir_it const &); template<> void set(dir_it const &, gid_t); - class unknown_gname: public invalid_argument + class unknown_gname: public std::invalid_argument { public: - unknown_gname(string g): std::invalid_argument("unknown group name"), m_gname(g) {} - string gname() const { return m_gname; } + unknown_gname(std::string g): std::invalid_argument("unknown group name"), m_gname(g) {} + std::string gname() const { return m_gname; } private: - string m_gname; + std::string m_gname; }; - struct gname { typedef string value_type; }; - template<> string get(dir_it const &); - template<> void set(dir_it const &, string const &); + struct gname { typedef std::string value_type; }; + template<> std::string get(dir_it const &); +#ifdef BUGGY_CODE + // This does not match the __GNUG__ set template above + template<> void set(dir_it const &, std::string const &); +#endif #endif