summaryrefslogtreecommitdiff
path: root/graphics/vterrain-sdk/files/patch-ac
blob: 52274ab837a4f357984637eb082a9578341499e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
--- 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 <iterator>
 #include <string>
-#include <ctime>
+#if defined(sgi) && !defined(__GNUG__)
+#  include <time.h>
+#else
+#  include <ctime>
+#endif
 #include <stdexcept>
-#include <boost/boost.h>
+#define BOOST_DECL
 
 #if defined(unix) || defined(__unix) || defined(__unix__)
 #include <sys/types.h>
@@ -40,7 +44,7 @@
 	{
 		class dir_it;
 
-#if defined(__GNUG__)
+#if defined(__GNUG__) || defined(sgi)
 		template <class Property>
 			typename Property::value_type get(dir_it const &);
 		template <class Property>
@@ -50,9 +54,13 @@
 		template <class Property> class set;
 #endif
 
+#if defined(__GNUG__)
+		class BOOST_DECL dir_it: public input_iterator<std::string, ptrdiff_t>
+#else
 		class BOOST_DECL dir_it: public std::iterator<std::input_iterator_tag, std::string>
+#endif
 		{
-#if defined(__GNUG__)
+#if defined(__GNUG__) || defined(sgi)
 			template <class Property>
 			friend typename Property::value_type get(dir_it const &);
 			template <class Property>
@@ -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<size>(dir_it const &);
 		template <> mtime::value_type get<mtime>(dir_it const &);
 		template <> bool get<is_directory>(dir_it const &);
@@ -263,6 +271,9 @@
 		template <> bool get<sticky>(dir_it const &);
 		template <> void set<sticky>(dir_it const &, bool);
 
+#ifdef __unix__
+		typedef mode_t umode_t;
+#endif
 		struct mode { typedef umode_t value_type; };
 		template <> umode_t get<mode>(dir_it const &);
 		template <> void set<mode>(dir_it const &, umode_t);
@@ -285,19 +296,22 @@
 		struct uid { typedef uid_t value_type; };
 		template<> uid_t get<uid>(dir_it const &);
 		template<> void set<uid>(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<uname>(dir_it const &);
+		struct uname { typedef std::string value_type; };
+		template<> std::string get<uname>(dir_it const &);
+#ifdef BUGGY_CODE
+		// This does not match the __GNUG__ set template above
 		template<> void set<uname>(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<gid>(dir_it const &);
 		template<> void set<gid>(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<gname>(dir_it const &);
-		template<> void set<gname>(dir_it const &, string const &);
+		struct gname { typedef std::string value_type; };
+		template<> std::string get<gname>(dir_it const &);
+#ifdef BUGGY_CODE
+		// This does not match the __GNUG__ set template above
+		template<> void set<gname>(dir_it const &, std::string const &);
+#endif
 
 #endif