forked from Juniper/contrail-third-party
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boost_time_utc.patch
334 lines (316 loc) · 13.2 KB
/
boost_time_utc.patch
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
diff -ru boost_1_48_0/boost/thread/xtime.hpp boost_1_48_0/boost/thread/xtime.hpp
--- boost_1_48_0/boost/thread/xtime.hpp 2008-06-18 06:01:08.000000000 -0700
+++ boost_1_48_0/boost/thread/xtime.hpp 2013-11-07 14:51:03.684304000 -0800
@@ -20,7 +20,7 @@
enum xtime_clock_types
{
- TIME_UTC=1
+ TIME_UTC_=1
// TIME_TAI,
// TIME_MONOTONIC,
// TIME_PROCESS,
@@ -68,7 +68,7 @@
inline int xtime_get(struct xtime* xtp, int clock_type)
{
- if (clock_type == TIME_UTC)
+ if (clock_type == TIME_UTC_)
{
*xtp=get_xtime(get_system_time());
return clock_type;
Only in boost_1_48_0/boost/thread: xtime.hpp.orig
diff -ru boost_1_48_0/libs/container/test/util.hpp boost_1_48_0/libs/container/test/util.hpp
--- boost_1_48_0/libs/container/test/util.hpp 2011-08-30 08:49:49.000000000 -0700
+++ boost_1_48_0/libs/container/test/util.hpp 2013-11-07 14:51:03.616304000 -0800
@@ -71,7 +71,7 @@
boost::xtime xsecs(int secs)
{
boost::xtime ret;
- boost::xtime_get(&ret, boost::TIME_UTC);
+ boost::xtime_get(&ret, boost::TIME_UTC_);
ret.sec += secs;
return ret;
}
Only in boost_1_48_0/libs/container/test: util.hpp.orig
diff -ru boost_1_48_0/libs/interprocess/test/condition_test_template.hpp boost_1_48_0/libs/interprocess/test/condition_test_template.hpp
--- boost_1_48_0/libs/interprocess/test/condition_test_template.hpp 2009-10-15 11:45:53.000000000 -0700
+++ boost_1_48_0/libs/interprocess/test/condition_test_template.hpp 2013-11-07 14:51:03.676304000 -0800
@@ -49,8 +49,8 @@
const int NANOSECONDS_PER_MILLISECOND = 1000000;
boost::xtime xt;
- int ret = boost::xtime_get(&xt, boost::TIME_UTC);
- assert(ret == static_cast<int>(boost::TIME_UTC));(void)ret;
+ int ret = boost::xtime_get(&xt, boost::TIME_UTC_);
+ assert(ret == static_cast<int>(boost::TIME_UTC_));(void)ret;
nsecs += xt.nsec;
msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
secs += msecs / MILLISECONDS_PER_SECOND;
Only in boost_1_48_0/libs/interprocess/test: condition_test_template.hpp.orig
diff -ru boost_1_48_0/libs/interprocess/test/util.hpp boost_1_48_0/libs/interprocess/test/util.hpp
--- boost_1_48_0/libs/interprocess/test/util.hpp 2011-08-30 08:50:42.000000000 -0700
+++ boost_1_48_0/libs/interprocess/test/util.hpp 2013-11-07 14:51:03.672304000 -0800
@@ -71,7 +71,7 @@
boost::xtime xsecs(int secs)
{
boost::xtime ret;
- boost::xtime_get(&ret, boost::TIME_UTC);
+ boost::xtime_get(&ret, boost::TIME_UTC_);
ret.sec += secs;
return ret;
}
Only in boost_1_48_0/libs/interprocess/test: util.hpp.orig
diff -ru boost_1_48_0/libs/spirit/classic/test/grammar_mt_tests.cpp boost_1_48_0/libs/spirit/classic/test/grammar_mt_tests.cpp
--- boost_1_48_0/libs/spirit/classic/test/grammar_mt_tests.cpp 2008-06-22 08:05:38.000000000 -0700
+++ boost_1_48_0/libs/spirit/classic/test/grammar_mt_tests.cpp 2013-11-07 14:51:03.620304000 -0800
@@ -70,7 +70,7 @@
{
static long const nanoseconds_per_second = 1000L*1000L*1000L;
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.nsec+=1000*1000*milliseconds;
while (xt.nsec > nanoseconds_per_second)
{
Only in boost_1_48_0/libs/spirit/classic/test: grammar_mt_tests.cpp.orig
diff -ru boost_1_48_0/libs/spirit/classic/test/owi_mt_tests.cpp boost_1_48_0/libs/spirit/classic/test/owi_mt_tests.cpp
--- boost_1_48_0/libs/spirit/classic/test/owi_mt_tests.cpp 2008-06-22 08:05:38.000000000 -0700
+++ boost_1_48_0/libs/spirit/classic/test/owi_mt_tests.cpp 2013-11-07 14:51:03.624304000 -0800
@@ -86,7 +86,7 @@
return test_size;
boost::xtime now;
- boost::xtime_get(&now, boost::TIME_UTC);
+ boost::xtime_get(&now, boost::TIME_UTC_);
unsigned long seconds = now.sec - start_time.sec;
if (seconds < 4)
{
@@ -187,7 +187,7 @@
void concurrent_creation_of_objects()
{
{
- boost::xtime_get(&start_time, boost::TIME_UTC);
+ boost::xtime_get(&start_time, boost::TIME_UTC_);
boost::thread thread1(callable_ref(test1));
boost::thread thread2(callable_ref(test2));
boost::thread thread3(callable_ref(test3));
Only in boost_1_48_0/libs/spirit/classic/test: owi_mt_tests.cpp.orig
diff -ru boost_1_48_0/libs/thread/example/starvephil.cpp boost_1_48_0/libs/thread/example/starvephil.cpp
--- boost_1_48_0/libs/thread/example/starvephil.cpp 2006-09-14 14:51:01.000000000 -0700
+++ boost_1_48_0/libs/thread/example/starvephil.cpp 2013-11-07 14:51:03.660304000 -0800
@@ -50,7 +50,7 @@
<< "very hot ..." << std::endl;
}
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 3;
boost::thread::sleep(xt);
m_chickens += value;
@@ -85,7 +85,7 @@
std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
}
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 2;
boost::thread::sleep(xt);
{
@@ -111,7 +111,7 @@
if (m_id > 0)
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 3;
boost::thread::sleep(xt);
}
Only in boost_1_48_0/libs/thread/example: starvephil.cpp.orig
diff -ru boost_1_48_0/libs/thread/example/tennis.cpp boost_1_48_0/libs/thread/example/tennis.cpp
--- boost_1_48_0/libs/thread/example/tennis.cpp 2009-10-19 02:18:13.000000000 -0700
+++ boost_1_48_0/libs/thread/example/tennis.cpp 2013-11-07 14:51:03.644304000 -0800
@@ -104,7 +104,7 @@
boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 1;
boost::thread::sleep(xt);
{
Only in boost_1_48_0/libs/thread/example: tennis.cpp.orig
diff -ru boost_1_48_0/libs/thread/example/thread.cpp boost_1_48_0/libs/thread/example/thread.cpp
--- boost_1_48_0/libs/thread/example/thread.cpp 2006-09-14 14:51:01.000000000 -0700
+++ boost_1_48_0/libs/thread/example/thread.cpp 2013-11-07 14:51:03.648304000 -0800
@@ -14,7 +14,7 @@
void operator()()
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += m_secs;
boost::thread::sleep(xt);
Only in boost_1_48_0/libs/thread/example: thread.cpp.orig
diff -ru boost_1_48_0/libs/thread/example/xtime.cpp boost_1_48_0/libs/thread/example/xtime.cpp
--- boost_1_48_0/libs/thread/example/xtime.cpp 2006-09-14 14:51:01.000000000 -0700
+++ boost_1_48_0/libs/thread/example/xtime.cpp 2013-11-07 14:51:03.652304000 -0800
@@ -10,7 +10,7 @@
int main(int argc, char* argv[])
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 1;
boost::thread::sleep(xt); // Sleep for 1 second
}
Only in boost_1_48_0/libs/thread/example: xtime.cpp.orig
diff -ru boost_1_48_0/libs/thread/src/pthread/thread.cpp boost_1_48_0/libs/thread/src/pthread/thread.cpp
--- boost_1_48_0/libs/thread/src/pthread/thread.cpp 2011-06-06 01:28:31.000000000 -0700
+++ boost_1_48_0/libs/thread/src/pthread/thread.cpp 2013-11-07 14:51:03.640304000 -0800
@@ -350,7 +350,7 @@
cond.timed_wait(lock, xt);
# endif
xtime cur;
- xtime_get(&cur, TIME_UTC);
+ xtime_get(&cur, TIME_UTC_);
if (xtime_cmp(xt, cur) <= 0)
return;
}
@@ -365,7 +365,7 @@
BOOST_VERIFY(!pthread_yield());
# else
xtime xt;
- xtime_get(&xt, TIME_UTC);
+ xtime_get(&xt, TIME_UTC_);
sleep(xt);
# endif
}
Only in boost_1_48_0/libs/thread/src/pthread: thread.cpp.orig
diff -ru boost_1_48_0/libs/thread/src/pthread/timeconv.inl boost_1_48_0/libs/thread/src/pthread/timeconv.inl
--- boost_1_48_0/libs/thread/src/pthread/timeconv.inl 2010-04-01 08:04:15.000000000 -0700
+++ boost_1_48_0/libs/thread/src/pthread/timeconv.inl 2013-11-07 14:51:03.636304000 -0800
@@ -20,8 +20,8 @@
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_);
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -57,8 +57,8 @@
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -88,8 +88,8 @@
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -110,8 +110,8 @@
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;
Only in boost_1_48_0/libs/thread/src/pthread: timeconv.inl.orig
diff -ru boost_1_48_0/libs/thread/src/win32/timeconv.inl boost_1_48_0/libs/thread/src/win32/timeconv.inl
--- boost_1_48_0/libs/thread/src/win32/timeconv.inl 2007-11-25 10:38:02.000000000 -0800
+++ boost_1_48_0/libs/thread/src/win32/timeconv.inl 2013-11-07 14:51:03.628304000 -0800
@@ -17,8 +17,8 @@
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -54,8 +54,8 @@
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -85,8 +85,8 @@
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -107,8 +107,8 @@
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;
Only in boost_1_48_0/libs/thread/src/win32: timeconv.inl.orig
diff -ru boost_1_48_0/libs/thread/test/test_xtime.cpp boost_1_48_0/libs/thread/test/test_xtime.cpp
--- boost_1_48_0/libs/thread/test/test_xtime.cpp 2008-07-08 00:44:55.000000000 -0700
+++ boost_1_48_0/libs/thread/test/test_xtime.cpp 2013-11-07 14:51:03.664304000 -0800
@@ -17,8 +17,8 @@
{
boost::xtime xt1, xt2, cur;
BOOST_CHECK_EQUAL(
- boost::xtime_get(&cur, boost::TIME_UTC),
- static_cast<int>(boost::TIME_UTC));
+ boost::xtime_get(&cur, boost::TIME_UTC_),
+ static_cast<int>(boost::TIME_UTC_));
xt1 = xt2 = cur;
xt1.nsec -= 1;
@@ -42,14 +42,14 @@
boost::xtime orig, cur, old;
BOOST_CHECK_EQUAL(
boost::xtime_get(&orig,
- boost::TIME_UTC), static_cast<int>(boost::TIME_UTC));
+ boost::TIME_UTC_), static_cast<int>(boost::TIME_UTC_));
old = orig;
for (int x=0; x < 100; ++x)
{
BOOST_CHECK_EQUAL(
- boost::xtime_get(&cur, boost::TIME_UTC),
- static_cast<int>(boost::TIME_UTC));
+ boost::xtime_get(&cur, boost::TIME_UTC_),
+ static_cast<int>(boost::TIME_UTC_));
BOOST_CHECK(boost::xtime_cmp(cur, orig) >= 0);
BOOST_CHECK(boost::xtime_cmp(cur, old) >= 0);
old = cur;
Only in boost_1_48_0/libs/thread/test: test_xtime.cpp.orig
diff -ru boost_1_48_0/libs/thread/test/util.inl boost_1_48_0/libs/thread/test/util.inl
--- boost_1_48_0/libs/thread/test/util.inl 2008-11-03 14:29:39.000000000 -0800
+++ boost_1_48_0/libs/thread/test/util.inl 2013-11-07 14:51:03.668304000 -0800
@@ -28,8 +28,8 @@
const int NANOSECONDS_PER_MILLISECOND = 1000000;
boost::xtime xt;
- if (boost::TIME_UTC != boost::xtime_get (&xt, boost::TIME_UTC))
- BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC");
+ if (boost::TIME_UTC_ != boost::xtime_get (&xt, boost::TIME_UTC_))
+ BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC_");
nsecs += xt.nsec;
msecs += nsecs / NANOSECONDS_PER_MILLISECOND;
Only in boost_1_48_0/libs/thread/test: util.inl.orig