Salome HOME
spns #32755 : TopIIVolMesh: move back to master branch
[tools/sat_salome.git] / products / patches / boost-1.49.0.patch
1 diff -pruN boost-1.49.0_orig/boost/thread/xtime.hpp boost-1.49.0_new/boost/thread/xtime.hpp
2 --- boost-1.49.0_orig/boost/thread/xtime.hpp    2008-06-18 15:01:08.000000000 +0200
3 +++ boost-1.49.0_new/boost/thread/xtime.hpp     2013-03-07 14:02:31.518463216 +0100
4 @@ -20,7 +20,7 @@ namespace boost {
5  
6  enum xtime_clock_types
7  {
8 -    TIME_UTC=1
9 +    TIME_UTC_=1
10  //    TIME_TAI,
11  //    TIME_MONOTONIC,
12  //    TIME_PROCESS,
13 @@ -68,7 +68,7 @@ inline xtime get_xtime(boost::system_tim
14  
15  inline int xtime_get(struct xtime* xtp, int clock_type)
16  {
17 -    if (clock_type == TIME_UTC)
18 +    if (clock_type == TIME_UTC_)
19      {
20          *xtp=get_xtime(get_system_time());
21          return clock_type;
22 diff -pruN boost-1.49.0_orig/libs/container/test/util.hpp boost-1.49.0_new/libs/container/test/util.hpp
23 --- boost-1.49.0_orig/libs/container/test/util.hpp      2011-08-26 20:26:44.000000000 +0200
24 +++ boost-1.49.0_new/libs/container/test/util.hpp       2013-03-07 14:13:49.056883734 +0100
25 @@ -71,7 +71,7 @@ inline bool in_range(const boost::posix_
26  boost::xtime xsecs(int secs)
27  {
28     boost::xtime ret;
29 -   boost::xtime_get(&ret, boost::TIME_UTC);
30 +   boost::xtime_get(&ret, boost::TIME_UTC_);
31     ret.sec += secs;
32     return ret;
33  }
34 diff -pruN boost-1.49.0_orig/libs/interprocess/test/condition_test_template.hpp boost-1.49.0_new/libs/interprocess/test/condition_test_template.hpp
35 --- boost-1.49.0_orig/libs/interprocess/test/condition_test_template.hpp        2011-12-26 18:39:43.000000000 +0100
36 +++ boost-1.49.0_new/libs/interprocess/test/condition_test_template.hpp 2013-03-07 14:16:06.196328748 +0100
37 @@ -47,8 +47,8 @@ inline boost::xtime delay(int secs, int
38      const int NANOSECONDS_PER_MILLISECOND = 1000000;
39  
40      boost::xtime xt;
41 -    int ret = boost::xtime_get(&xt, boost::TIME_UTC);
42 -    BOOST_INTERPROCES_CHECK(ret == static_cast<int>(boost::TIME_UTC));(void)ret;
43 +    int ret = boost::xtime_get(&xt, boost::TIME_UTC_);
44 +    BOOST_INTERPROCES_CHECK(ret == static_cast<int>(boost::TIME_UTC_));(void)ret;
45      nsecs += xt.nsec;
46      msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
47      secs += msecs / MILLISECONDS_PER_SECOND;
48 diff -pruN boost-1.49.0_orig/libs/interprocess/test/util.hpp boost-1.49.0_new/libs/interprocess/test/util.hpp
49 --- boost-1.49.0_orig/libs/interprocess/test/util.hpp   2011-12-26 18:39:43.000000000 +0100
50 +++ boost-1.49.0_new/libs/interprocess/test/util.hpp    2013-03-07 14:15:10.436555867 +0100
51 @@ -63,7 +63,7 @@ inline bool in_range(const boost::posix_
52  boost::xtime xsecs(int secs)
53  {
54     boost::xtime ret;
55 -   boost::xtime_get(&ret, boost::TIME_UTC);
56 +   boost::xtime_get(&ret, boost::TIME_UTC_);
57     ret.sec += secs;
58     return ret;
59  }
60 diff -pruN boost-1.49.0_orig/libs/spirit/classic/test/grammar_mt_tests.cpp boost-1.49.0_new/libs/spirit/classic/test/grammar_mt_tests.cpp
61 --- boost-1.49.0_orig/libs/spirit/classic/test/grammar_mt_tests.cpp     2008-06-22 17:05:38.000000000 +0200
62 +++ boost-1.49.0_new/libs/spirit/classic/test/grammar_mt_tests.cpp      2013-03-07 14:19:10.475634881 +0100
63 @@ -70,7 +70,7 @@ milli_sleep(unsigned long milliseconds)
64  {
65      static long const nanoseconds_per_second = 1000L*1000L*1000L;
66      boost::xtime xt;
67 -    boost::xtime_get(&xt, boost::TIME_UTC);
68 +    boost::xtime_get(&xt, boost::TIME_UTC_);
69      xt.nsec+=1000*1000*milliseconds;
70      while (xt.nsec > nanoseconds_per_second)
71      {
72 diff -pruN boost-1.49.0_orig/libs/spirit/classic/test/owi_mt_tests.cpp boost-1.49.0_new/libs/spirit/classic/test/owi_mt_tests.cpp
73 --- boost-1.49.0_orig/libs/spirit/classic/test/owi_mt_tests.cpp 2008-06-22 17:05:38.000000000 +0200
74 +++ boost-1.49.0_new/libs/spirit/classic/test/owi_mt_tests.cpp  2013-03-07 14:19:37.571527875 +0100
75 @@ -86,7 +86,7 @@ struct test_task
76              return test_size;
77  
78          boost::xtime now;
79 -        boost::xtime_get(&now, boost::TIME_UTC);
80 +        boost::xtime_get(&now, boost::TIME_UTC_);
81          unsigned long seconds = now.sec - start_time.sec;
82          if (seconds < 4)
83          {
84 @@ -187,7 +187,7 @@ check_not_contained_in(
85  void concurrent_creation_of_objects()
86  {
87      {
88 -        boost::xtime_get(&start_time, boost::TIME_UTC);
89 +        boost::xtime_get(&start_time, boost::TIME_UTC_);
90          boost::thread thread1(callable_ref(test1));
91          boost::thread thread2(callable_ref(test2));
92          boost::thread thread3(callable_ref(test3));
93 diff -pruN boost-1.49.0_orig/libs/thread/example/starvephil.cpp boost-1.49.0_new/libs/thread/example/starvephil.cpp
94 --- boost-1.49.0_orig/libs/thread/example/starvephil.cpp        2006-09-14 23:51:01.000000000 +0200
95 +++ boost-1.49.0_new/libs/thread/example/starvephil.cpp 2013-03-07 14:17:48.671959849 +0100
96 @@ -50,7 +50,7 @@ public:
97                        << "very hot ..." << std::endl;
98          }
99          boost::xtime xt;
100 -        boost::xtime_get(&xt, boost::TIME_UTC);
101 +        boost::xtime_get(&xt, boost::TIME_UTC_);
102          xt.sec += 3;
103          boost::thread::sleep(xt);
104          m_chickens += value;
105 @@ -85,7 +85,7 @@ void chef()
106              std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
107          }
108          boost::xtime xt;
109 -        boost::xtime_get(&xt, boost::TIME_UTC);
110 +        boost::xtime_get(&xt, boost::TIME_UTC_);
111          xt.sec += 2;
112          boost::thread::sleep(xt);
113          {
114 @@ -111,7 +111,7 @@ struct phil
115              if (m_id > 0)
116              {
117                  boost::xtime xt;
118 -                boost::xtime_get(&xt, boost::TIME_UTC);
119 +                boost::xtime_get(&xt, boost::TIME_UTC_);
120                  xt.sec += 3;
121                  boost::thread::sleep(xt);
122              }
123 diff -pruN boost-1.49.0_orig/libs/thread/example/tennis.cpp boost-1.49.0_new/libs/thread/example/tennis.cpp
124 --- boost-1.49.0_orig/libs/thread/example/tennis.cpp    2009-10-19 11:18:13.000000000 +0200
125 +++ boost-1.49.0_new/libs/thread/example/tennis.cpp     2013-03-07 14:18:16.191855733 +0100
126 @@ -104,7 +104,7 @@ int main(int argc, char* argv[])
127      boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
128  
129      boost::xtime xt;
130 -    boost::xtime_get(&xt, boost::TIME_UTC);
131 +    boost::xtime_get(&xt, boost::TIME_UTC_);
132      xt.sec += 1;
133      boost::thread::sleep(xt);
134      {
135 diff -pruN boost-1.49.0_orig/libs/thread/example/xtime.cpp boost-1.49.0_new/libs/thread/example/xtime.cpp
136 --- boost-1.49.0_orig/libs/thread/example/xtime.cpp     2006-09-14 23:51:01.000000000 +0200
137 +++ boost-1.49.0_new/libs/thread/example/xtime.cpp      2013-03-07 14:18:44.335741343 +0100
138 @@ -10,7 +10,7 @@
139  int main(int argc, char* argv[])
140  {
141      boost::xtime xt;
142 -    boost::xtime_get(&xt, boost::TIME_UTC);
143 +    boost::xtime_get(&xt, boost::TIME_UTC_);
144      xt.sec += 1;
145      boost::thread::sleep(xt); // Sleep for 1 second
146  }
147 diff -pruN boost-1.49.0_orig/libs/thread/src/pthread/thread.cpp boost-1.49.0_new/libs/thread/src/pthread/thread.cpp
148 --- boost-1.49.0_orig/libs/thread/src/pthread/thread.cpp        2012-01-03 18:31:50.000000000 +0100
149 +++ boost-1.49.0_new/libs/thread/src/pthread/thread.cpp 2013-03-07 14:17:25.457043685 +0100
150 @@ -354,7 +354,7 @@ namespace boost
151                      cond.timed_wait(lock, xt);
152  #   endif
153                      xtime cur;
154 -                    xtime_get(&cur, TIME_UTC);
155 +                    xtime_get(&cur, TIME_UTC_);
156                      if (xtime_cmp(xt, cur) <= 0)
157                          return;
158                  }
159 @@ -369,7 +369,7 @@ namespace boost
160              BOOST_VERIFY(!pthread_yield());
161  #   else
162              xtime xt;
163 -            xtime_get(&xt, TIME_UTC);
164 +            xtime_get(&xt, TIME_UTC_);
165              sleep(xt);
166  #   endif
167          }
168 diff -pruN boost-1.49.0_orig/libs/thread/src/pthread/timeconv.inl boost-1.49.0_new/libs/thread/src/pthread/timeconv.inl
169 --- boost-1.49.0_orig/libs/thread/src/pthread/timeconv.inl      2012-01-03 18:31:50.000000000 +0100
170 +++ boost-1.49.0_new/libs/thread/src/pthread/timeconv.inl       2013-03-07 14:07:58.805162006 +0100
171 @@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND =
172  inline void to_time(int milliseconds, boost::xtime& xt)
173  {
174      int res = 0;
175 -    res = boost::xtime_get(&xt, boost::TIME_UTC);
176 -    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
177 +    res = boost::xtime_get(&xt, boost::TIME_UTC_);
178 +    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
179  
180      xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
181      xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
182 @@ -56,8 +56,8 @@ inline void to_timespec_duration(const b
183  {
184      boost::xtime cur;
185      int res = 0;
186 -    res = boost::xtime_get(&cur, boost::TIME_UTC);
187 -    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
188 +    res = boost::xtime_get(&cur, boost::TIME_UTC_);
189 +    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
190  
191      if (boost::xtime_cmp(xt, cur) <= 0)
192      {
193 @@ -87,8 +87,8 @@ inline void to_duration(boost::xtime xt,
194  {
195      boost::xtime cur;
196      int res = 0;
197 -    res = boost::xtime_get(&cur, boost::TIME_UTC);
198 -    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
199 +    res = boost::xtime_get(&cur, boost::TIME_UTC_);
200 +    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
201  
202      if (boost::xtime_cmp(xt, cur) <= 0)
203          milliseconds = 0;
204 @@ -109,8 +109,8 @@ inline void to_microduration(boost::xtim
205  {
206      boost::xtime cur;
207      int res = 0;
208 -    res = boost::xtime_get(&cur, boost::TIME_UTC);
209 -    BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
210 +    res = boost::xtime_get(&cur, boost::TIME_UTC_);
211 +    BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
212  
213      if (boost::xtime_cmp(xt, cur) <= 0)
214          microseconds = 0;
215 diff -pruN boost-1.49.0_orig/libs/thread/test/test_xtime.cpp boost-1.49.0_new/libs/thread/test/test_xtime.cpp
216 --- boost-1.49.0_orig/libs/thread/test/test_xtime.cpp   2012-01-03 18:31:50.000000000 +0100
217 +++ boost-1.49.0_new/libs/thread/test/test_xtime.cpp    2013-03-07 14:16:32.014227186 +0100
218 @@ -17,8 +17,8 @@ void test_xtime_cmp()
219  {
220      boost::xtime xt1, xt2, cur;
221      BOOST_CHECK_EQUAL(
222 -        boost::xtime_get(&cur, boost::TIME_UTC),
223 -        static_cast<int>(boost::TIME_UTC));
224 +        boost::xtime_get(&cur, boost::TIME_UTC_),
225 +        static_cast<int>(boost::TIME_UTC_));
226  
227      xt1 = xt2 = cur;
228      xt1.nsec -= 1;
229 @@ -42,14 +42,14 @@ void test_xtime_get()
230      boost::xtime orig, cur, old;
231      BOOST_CHECK_EQUAL(
232          boost::xtime_get(&orig,
233 -            boost::TIME_UTC), static_cast<int>(boost::TIME_UTC));
234 +            boost::TIME_UTC_), static_cast<int>(boost::TIME_UTC_));
235      old = orig;
236  
237      for (int x=0; x < 100; ++x)
238      {
239          BOOST_CHECK_EQUAL(
240 -            boost::xtime_get(&cur, boost::TIME_UTC),
241 -            static_cast<int>(boost::TIME_UTC));
242 +            boost::xtime_get(&cur, boost::TIME_UTC_),
243 +            static_cast<int>(boost::TIME_UTC_));
244          BOOST_CHECK(boost::xtime_cmp(cur, orig) >= 0);
245          BOOST_CHECK(boost::xtime_cmp(cur, old) >= 0);
246          old = cur;
247 diff -pruN boost-1.49.0_orig/libs/thread/test/util.inl boost-1.49.0_new/libs/thread/test/util.inl
248 --- boost-1.49.0_orig/libs/thread/test/util.inl 2008-11-03 23:29:39.000000000 +0100
249 +++ boost-1.49.0_new/libs/thread/test/util.inl  2013-03-07 14:17:01.047124728 +0100
250 @@ -28,8 +28,8 @@ inline boost::xtime delay(int secs, int
251      const int NANOSECONDS_PER_MILLISECOND = 1000000;
252  
253      boost::xtime xt;
254 -    if (boost::TIME_UTC != boost::xtime_get (&xt, boost::TIME_UTC))
255 -        BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC");
256 +    if (boost::TIME_UTC_ != boost::xtime_get (&xt, boost::TIME_UTC_))
257 +        BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC_");
258  
259      nsecs += xt.nsec;
260      msecs += nsecs / NANOSECONDS_PER_MILLISECOND;