Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Side by Side Diff: third_party/re2/patches/re2-msvc9-chrome.patch

Issue 12033058: Updated to most recent version RE2 and remove upstreamed patches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 diff --git a/third_party/re2/AUTHORS b/third_party/re2/AUTHORS 1 diff --git a/AUTHORS b/AUTHORS
2 index 3c0f928..e17d9bf 100644 2 index 3c0f928..e17d9bf 100644
3 --- a/third_party/re2/AUTHORS 3 --- a/AUTHORS
4 +++ b/third_party/re2/AUTHORS 4 +++ b/AUTHORS
5 @@ -8,5 +8,6 @@ 5 @@ -8,5 +8,6 @@
6 6
7 # Please keep the list sorted. 7 # Please keep the list sorted.
8 8
9 +Brian Gunlogson <unixman83@gmail.com> 9 +Brian Gunlogson <unixman83@gmail.com>
10 Google Inc. 10 Google Inc.
11 Stefano Rivera <stefano.rivera@gmail.com> 11 Stefano Rivera <stefano.rivera@gmail.com>
12 diff --git a/third_party/re2/CONTRIBUTORS b/third_party/re2/CONTRIBUTORS 12 diff --git a/CONTRIBUTORS b/CONTRIBUTORS
13 index ac64332..15053eb 100644 13 index 7b44e04..7f6a93d 100644
14 --- a/third_party/re2/CONTRIBUTORS 14 --- a/CONTRIBUTORS
15 +++ b/third_party/re2/CONTRIBUTORS 15 +++ b/CONTRIBUTORS
16 @@ -26,6 +26,7 @@ 16 @@ -26,6 +26,7 @@
17 17
18 # Please keep the list sorted. 18 # Please keep the list sorted.
19 19
20 +Brian Gunlogson <unixman83@gmail.com> 20 +Brian Gunlogson <unixman83@gmail.com>
21 Dominic Battré <battre@chromium.org> 21 Dominic Battré <battre@chromium.org>
22 John Millikin <jmillikin@gmail.com>
22 Rob Pike <r@google.com> 23 Rob Pike <r@google.com>
23 Russ Cox <rsc@swtch.com> 24 diff --git a/mswin/stdint.h b/mswin/stdint.h
24 diff --git a/third_party/re2/mswin/stdint.h b/third_party/re2/mswin/stdint.h
25 new file mode 100644 25 new file mode 100644
26 index 0000000..d02608a 26 index 0000000..d02608a
27 --- /dev/null 27 --- /dev/null
28 +++ b/third_party/re2/mswin/stdint.h 28 +++ b/mswin/stdint.h
29 @@ -0,0 +1,247 @@ 29 @@ -0,0 +1,247 @@
30 +// ISO C9x compliant stdint.h for Microsoft Visual Studio 30 +// ISO C9x compliant stdint.h for Microsoft Visual Studio
31 +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 31 +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
32 +// 32 +//
33 +// Copyright (c) 2006-2008 Alexander Chemeris 33 +// Copyright (c) 2006-2008 Alexander Chemeris
34 +// 34 +//
35 +// Redistribution and use in source and binary forms, with or without 35 +// Redistribution and use in source and binary forms, with or without
36 +// modification, are permitted provided that the following conditions are met: 36 +// modification, are permitted provided that the following conditions are met:
37 +// 37 +//
38 +// 1. Redistributions of source code must retain the above copyright notice, 38 +// 1. Redistributions of source code must retain the above copyright notice,
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 +#define UINT64_C(val) val##ui64 267 +#define UINT64_C(val) val##ui64
268 + 268 +
269 +// 7.18.4.2 Macros for greatest-width integer constants 269 +// 7.18.4.2 Macros for greatest-width integer constants
270 +#define INTMAX_C INT64_C 270 +#define INTMAX_C INT64_C
271 +#define UINTMAX_C UINT64_C 271 +#define UINTMAX_C UINT64_C
272 + 272 +
273 +#endif // __STDC_CONSTANT_MACROS ] 273 +#endif // __STDC_CONSTANT_MACROS ]
274 + 274 +
275 + 275 +
276 +#endif // _MSC_STDINT_H_ ] 276 +#endif // _MSC_STDINT_H_ ]
277 diff --git a/third_party/re2/re2/compile.cc b/third_party/re2/re2/compile.cc 277 diff --git a/re2/compile.cc b/re2/compile.cc
278 index 9cddb71..adb45fd 100644 278 index 9cddb71..adb45fd 100644
279 --- a/third_party/re2/re2/compile.cc 279 --- a/re2/compile.cc
280 +++ b/third_party/re2/re2/compile.cc 280 +++ b/re2/compile.cc
281 @@ -502,7 +502,7 @@ int Compiler::RuneByteSuffix(uint8 lo, uint8 hi, bool foldca se, int next) { 281 @@ -502,7 +502,7 @@ int Compiler::RuneByteSuffix(uint8 lo, uint8 hi, bool foldca se, int next) {
282 return UncachedRuneByteSuffix(lo, hi, foldcase, next); 282 return UncachedRuneByteSuffix(lo, hi, foldcase, next);
283 } 283 }
284 284
285 - uint64 key = ((uint64)next << 17) | (lo<<9) | (hi<<1) | foldcase; 285 - uint64 key = ((uint64)next << 17) | (lo<<9) | (hi<<1) | foldcase;
286 + uint64 key = ((uint64)next << 17) | (lo<<9) | (hi<<1) | (foldcase ? 1ULL : 0U LL); 286 + uint64 key = ((uint64)next << 17) | (lo<<9) | (hi<<1) | (foldcase ? 1ULL : 0U LL);
287 map<uint64, int>::iterator it = rune_cache_.find(key); 287 map<uint64, int>::iterator it = rune_cache_.find(key);
288 if (it != rune_cache_.end()) 288 if (it != rune_cache_.end())
289 return it->second; 289 return it->second;
290 diff --git a/third_party/re2/re2/prefilter_tree.cc b/third_party/re2/re2/prefilt er_tree.cc 290 diff --git a/re2/prefilter_tree.cc b/re2/prefilter_tree.cc
291 index d8bc37a..cdcf77e 100644 291 index d8bc37a..cdcf77e 100644
292 --- a/third_party/re2/re2/prefilter_tree.cc 292 --- a/re2/prefilter_tree.cc
293 +++ b/third_party/re2/re2/prefilter_tree.cc 293 +++ b/re2/prefilter_tree.cc
294 @@ -8,6 +8,11 @@ 294 @@ -8,6 +8,11 @@
295 #include "re2/prefilter_tree.h" 295 #include "re2/prefilter_tree.h"
296 #include "re2/re2.h" 296 #include "re2/re2.h"
297 297
298 +#ifdef WIN32 298 +#ifdef WIN32
299 +#include <stdio.h> 299 +#include <stdio.h>
300 +#define snprintf _snprintf 300 +#define snprintf _snprintf
301 +#endif 301 +#endif
302 + 302 +
303 DEFINE_int32(filtered_re2_min_atom_len, 303 DEFINE_int32(filtered_re2_min_atom_len,
304 3, 304 3,
305 "Strings less than this length are not stored as atoms"); 305 "Strings less than this length are not stored as atoms");
306 diff --git a/third_party/re2/re2/re2.cc b/third_party/re2/re2/re2.cc 306 diff --git a/re2/re2.cc b/re2/re2.cc
307 index 3cc3dd4..989add6 100644 307 index 8d1d468..0da886d 100644
308 --- a/third_party/re2/re2/re2.cc 308 --- a/re2/re2.cc
309 +++ b/third_party/re2/re2/re2.cc 309 +++ b/re2/re2.cc
310 @@ -11,7 +11,13 @@ 310 @@ -11,7 +11,13 @@
311 311
312 #include <stdio.h> 312 #include <stdio.h>
313 #include <string> 313 #include <string>
314 +#ifdef WIN32 314 +#ifdef WIN32
315 +#define strtoll _strtoi64 315 +#define strtoll _strtoi64
316 +#define strtoull _strtoui64 316 +#define strtoull _strtoui64
317 +#define strtof strtod 317 +#define strtof strtod
318 +#else 318 +#else
319 #include <pthread.h> 319 #include <pthread.h>
(...skipping 21 matching lines...) Expand all
341 + never_nl_(false), 341 + never_nl_(false),
342 + never_capture_(false), 342 + never_capture_(false),
343 + case_sensitive_(true), 343 + case_sensitive_(true),
344 + perl_classes_(false), 344 + perl_classes_(false),
345 + word_boundary_(false), 345 + word_boundary_(false),
346 + one_line_(false) { 346 + one_line_(false) {
347 +} 347 +}
348 348
349 RE2::Options::Options(RE2::CannedOptions opt) 349 RE2::Options::Options(RE2::CannedOptions opt)
350 : encoding_(opt == RE2::Latin1 ? EncodingLatin1 : EncodingUTF8), 350 : encoding_(opt == RE2::Latin1 ? EncodingLatin1 : EncodingUTF8),
351 diff --git a/third_party/re2/re2/re2.h b/third_party/re2/re2/re2.h 351 diff --git a/re2/re2.h b/re2/re2.h
352 index 9f5b66d..98b06b8 100644 352 index 272028b..c509853 100644
353 --- a/third_party/re2/re2/re2.h 353 --- a/re2/re2.h
354 +++ b/third_party/re2/re2/re2.h 354 +++ b/re2/re2.h
355 @@ -552,28 +552,16 @@ class RE2 { 355 @@ -552,28 +552,16 @@ class RE2 {
356 // If this happens too often, RE2 falls back on the NFA implementation. 356 // If this happens too often, RE2 falls back on the NFA implementation.
357 357
358 // For now, make the default budget something close to Code Search. 358 // For now, make the default budget something close to Code Search.
359 +#ifndef WIN32 359 +#ifndef WIN32
360 static const int kDefaultMaxMem = 8<<20; 360 static const int kDefaultMaxMem = 8<<20;
361 +#endif 361 +#endif
362 362
363 enum Encoding { 363 enum Encoding {
364 EncodingUTF8 = 1, 364 EncodingUTF8 = 1,
(...skipping 12 matching lines...) Expand all
377 - case_sensitive_(true), 377 - case_sensitive_(true),
378 - perl_classes_(false), 378 - perl_classes_(false),
379 - word_boundary_(false), 379 - word_boundary_(false),
380 - one_line_(false) { 380 - one_line_(false) {
381 - } 381 - }
382 - 382 -
383 + Options(); 383 + Options();
384 /*implicit*/ Options(CannedOptions); 384 /*implicit*/ Options(CannedOptions);
385 385
386 Encoding encoding() const { return encoding_; } 386 Encoding encoding() const { return encoding_; }
387 diff --git a/third_party/re2/re2/stringpiece.h b/third_party/re2/re2/stringpiece .h 387 diff --git a/re2/stringpiece.h b/re2/stringpiece.h
388 index ab9297c..38a5150 100644 388 index ab9297c..38a5150 100644
389 --- a/third_party/re2/re2/stringpiece.h 389 --- a/re2/stringpiece.h
390 +++ b/third_party/re2/re2/stringpiece.h 390 +++ b/re2/stringpiece.h
391 @@ -23,6 +23,9 @@ 391 @@ -23,6 +23,9 @@
392 #include <cstddef> 392 #include <cstddef>
393 #include <iosfwd> 393 #include <iosfwd>
394 #include <string> 394 #include <string>
395 +#ifdef WIN32 395 +#ifdef WIN32
396 +#include <algorithm> 396 +#include <algorithm>
397 +#endif 397 +#endif
398 398
399 namespace re2 { 399 namespace re2 {
400 400
401 diff --git a/third_party/re2/re2/testing/re2_test.cc b/third_party/re2/re2/testi ng/re2_test.cc 401 diff --git a/re2/testing/re2_test.cc b/re2/testing/re2_test.cc
402 index b99cacf..911e868 100644 402 index b99cacf..911e868 100644
403 --- a/third_party/re2/re2/testing/re2_test.cc 403 --- a/re2/testing/re2_test.cc
404 +++ b/third_party/re2/re2/testing/re2_test.cc 404 +++ b/re2/testing/re2_test.cc
405 @@ -6,7 +6,9 @@ 405 @@ -6,7 +6,9 @@
406 // TODO: Test extractions for PartialMatch/Consume 406 // TODO: Test extractions for PartialMatch/Consume
407 407
408 #include <sys/types.h> 408 #include <sys/types.h>
409 +#ifndef WIN32 409 +#ifndef WIN32
410 #include <sys/mman.h> 410 #include <sys/mman.h>
411 +#endif 411 +#endif
412 #include <sys/stat.h> 412 #include <sys/stat.h>
413 #include <errno.h> 413 #include <errno.h>
414 #include <vector> 414 #include <vector>
(...skipping 18 matching lines...) Expand all
433 // the number being parsed. 433 // the number being parsed.
434 TEST(RE2, NULTerminated) { 434 TEST(RE2, NULTerminated) {
435 @@ -678,6 +686,7 @@ TEST(RE2, NULTerminated) { 435 @@ -678,6 +686,7 @@ TEST(RE2, NULTerminated) {
436 CHECK(RE2::FullMatch(StringPiece(v + pagesize - 1, 1), "(.*)", &x)); 436 CHECK(RE2::FullMatch(StringPiece(v + pagesize - 1, 1), "(.*)", &x));
437 CHECK_EQ(x, 1); 437 CHECK_EQ(x, 1);
438 } 438 }
439 +#endif 439 +#endif
440 440
441 TEST(RE2, FullMatchTypeTests) { 441 TEST(RE2, FullMatchTypeTests) {
442 // Type tests 442 // Type tests
443 diff --git a/third_party/re2/util/logging.h b/third_party/re2/util/logging.h 443 diff --git a/util/logging.h b/util/logging.h
444 index 734e7a1..7302ea6 100644 444 index 4443f7c..d0a2d87 100644
445 --- a/third_party/re2/util/logging.h 445 --- a/util/logging.h
446 +++ b/third_party/re2/util/logging.h 446 +++ b/util/logging.h
447 @@ -7,8 +7,13 @@ 447 @@ -7,8 +7,13 @@
448 #ifndef RE2_UTIL_LOGGING_H__ 448 #ifndef RE2_UTIL_LOGGING_H__
449 #define RE2_UTIL_LOGGING_H__ 449 #define RE2_UTIL_LOGGING_H__
450 450
451 +#ifndef WIN32 451 +#ifndef WIN32
452 #include <unistd.h> /* for write */ 452 #include <unistd.h> /* for write */
453 +#endif 453 +#endif
454 #include <sstream> 454 #include <sstream>
455 +#ifdef WIN32 455 +#ifdef WIN32
456 +#include <io.h> 456 +#include <io.h>
457 +#endif 457 +#endif
458 458
459 // Debug-only checking. 459 // Debug-only checking.
460 #define DCHECK(condition) assert(condition) 460 #define DCHECK(condition) assert(condition)
461 diff --git a/third_party/re2/util/mutex.h b/third_party/re2/util/mutex.h 461 diff --git a/util/mutex.h b/util/mutex.h
462 index 9787bfb..e321fae 100644 462 index 9787bfb..e321fae 100644
463 --- a/third_party/re2/util/mutex.h 463 --- a/util/mutex.h
464 +++ b/third_party/re2/util/mutex.h 464 +++ b/util/mutex.h
465 @@ -12,8 +12,10 @@ 465 @@ -12,8 +12,10 @@
466 466
467 namespace re2 { 467 namespace re2 {
468 468
469 +#ifndef WIN32 469 +#ifndef WIN32
470 #define HAVE_PTHREAD 1 470 #define HAVE_PTHREAD 1
471 #define HAVE_RWLOCK 1 471 #define HAVE_RWLOCK 1
472 +#endif 472 +#endif
473 473
474 #if defined(NO_THREADS) 474 #if defined(NO_THREADS)
475 typedef int MutexType; // to keep a lock-count 475 typedef int MutexType; // to keep a lock-count
476 @@ -32,7 +34,9 @@ namespace re2 { 476 @@ -32,7 +34,9 @@ namespace re2 {
477 # include <pthread.h> 477 # include <pthread.h>
478 typedef pthread_mutex_t MutexType; 478 typedef pthread_mutex_t MutexType;
479 #elif defined(WIN32) 479 #elif defined(WIN32)
480 -# define WIN32_LEAN_AND_MEAN // We only need minimal includes 480 -# define WIN32_LEAN_AND_MEAN // We only need minimal includes
481 +# ifndef WIN32_LEAN_AND_MEAN 481 +# ifndef WIN32_LEAN_AND_MEAN
482 +# define WIN32_LEAN_AND_MEAN // We only need minimal includes 482 +# define WIN32_LEAN_AND_MEAN // We only need minimal includes
483 +# endif 483 +# endif
484 # ifdef GMUTEX_TRYLOCK 484 # ifdef GMUTEX_TRYLOCK
485 // We need Windows NT or later for TryEnterCriticalSection(). If you 485 // We need Windows NT or later for TryEnterCriticalSection(). If you
486 // don't need that functionality, you can remove these _WIN32_WINNT 486 // don't need that functionality, you can remove these _WIN32_WINNT
487 diff --git a/third_party/re2/util/pcre.cc b/third_party/re2/util/pcre.cc 487 diff --git a/util/pcre.cc b/util/pcre.cc
488 index 5e67e1f..1602133 100644 488 index 5e67e1f..1602133 100644
489 --- a/third_party/re2/util/pcre.cc 489 --- a/util/pcre.cc
490 +++ b/third_party/re2/util/pcre.cc 490 +++ b/util/pcre.cc
491 @@ -11,6 +11,11 @@ 491 @@ -11,6 +11,11 @@
492 #include "util/flags.h" 492 #include "util/flags.h"
493 #include "util/pcre.h" 493 #include "util/pcre.h"
494 494
495 +#ifdef WIN32 495 +#ifdef WIN32
496 +#define strtoll _strtoi64 496 +#define strtoll _strtoi64
497 +#define strtoull _strtoui64 497 +#define strtoull _strtoui64
498 +#endif 498 +#endif
499 + 499 +
500 #define PCREPORT(level) LOG(level) 500 #define PCREPORT(level) LOG(level)
501 501
502 // Default PCRE limits. 502 // Default PCRE limits.
503 diff --git a/third_party/re2/util/pcre.h b/third_party/re2/util/pcre.h 503 diff --git a/util/pcre.h b/util/pcre.h
504 index 4dda95d..771ac91 100644 504 index 4dda95d..771ac91 100644
505 --- a/third_party/re2/util/pcre.h 505 --- a/util/pcre.h
506 +++ b/third_party/re2/util/pcre.h 506 +++ b/util/pcre.h
507 @@ -180,9 +180,15 @@ struct pcre_extra { int flags, match_limit, match_limit_rec ursion; }; 507 @@ -180,9 +180,15 @@ struct pcre_extra { int flags, match_limit, match_limit_rec ursion; };
508 #define PCRE_ERROR_MATCHLIMIT 2 508 #define PCRE_ERROR_MATCHLIMIT 2
509 #define PCRE_ERROR_RECURSIONLIMIT 3 509 #define PCRE_ERROR_RECURSIONLIMIT 3
510 #define PCRE_INFO_CAPTURECOUNT 0 510 #define PCRE_INFO_CAPTURECOUNT 0
511 +#ifndef WIN32 511 +#ifndef WIN32
512 #define pcre_compile(a,b,c,d,e) ({ (void)(a); (void)(b); *(c)=""; *(d)=0; (void )(e); ((pcre*)0); }) 512 #define pcre_compile(a,b,c,d,e) ({ (void)(a); (void)(b); *(c)=""; *(d)=0; (void )(e); ((pcre*)0); })
513 #define pcre_exec(a, b, c, d, e, f, g, h) ({ (void)(a); (void)(b); (void)(c); ( void)(d); (void)(e); (void)(f); (void)(g); (void)(h); 0; }) 513 #define pcre_exec(a, b, c, d, e, f, g, h) ({ (void)(a); (void)(b); (void)(c); ( void)(d); (void)(e); (void)(f); (void)(g); (void)(h); 0; })
514 #define pcre_fullinfo(a, b, c, d) ({ (void)(a); (void)(b); (void)(c); *(d) = 0; 0; }) 514 #define pcre_fullinfo(a, b, c, d) ({ (void)(a); (void)(b); (void)(c); *(d) = 0; 0; })
515 +#else 515 +#else
516 +#define pcre_compile(a,b,c,d,e) NULL 516 +#define pcre_compile(a,b,c,d,e) NULL
517 +#define pcre_exec(a, b, c, d, e, f, g, h) NULL 517 +#define pcre_exec(a, b, c, d, e, f, g, h) NULL
518 +#define pcre_fullinfo(a, b, c, d) NULL 518 +#define pcre_fullinfo(a, b, c, d) NULL
519 +#endif 519 +#endif
520 } // namespace re2 520 } // namespace re2
521 #endif 521 #endif
522 522
523 diff --git a/third_party/re2/util/stringprintf.cc b/third_party/re2/util/stringp rintf.cc 523 diff --git a/util/stringprintf.cc b/util/stringprintf.cc
524 index c908181..d4691d1 100644 524 index c908181..d4691d1 100644
525 --- a/third_party/re2/util/stringprintf.cc 525 --- a/util/stringprintf.cc
526 +++ b/third_party/re2/util/stringprintf.cc 526 +++ b/util/stringprintf.cc
527 @@ -4,6 +4,10 @@ 527 @@ -4,6 +4,10 @@
528 528
529 #include "util/util.h" 529 #include "util/util.h"
530 530
531 +#ifndef va_copy 531 +#ifndef va_copy
532 +#define va_copy(d,s) ((d) = (s)) //KLUGE: for MS compilers 532 +#define va_copy(d,s) ((d) = (s)) //KLUGE: for MS compilers
533 +#endif 533 +#endif
534 + 534 +
535 namespace re2 { 535 namespace re2 {
536 536
537 static void StringAppendV(string* dst, const char* format, va_list ap) { 537 static void StringAppendV(string* dst, const char* format, va_list ap) {
538 diff --git a/third_party/re2/util/test.cc b/third_party/re2/util/test.cc 538 diff --git a/util/test.cc b/util/test.cc
539 index 0644829..2fe1bfa 100644 539 index 0644829..2fe1bfa 100644
540 --- a/third_party/re2/util/test.cc 540 --- a/util/test.cc
541 +++ b/third_party/re2/util/test.cc 541 +++ b/util/test.cc
542 @@ -3,7 +3,9 @@ 542 @@ -3,7 +3,9 @@
543 // license that can be found in the LICENSE file. 543 // license that can be found in the LICENSE file.
544 544
545 #include <stdio.h> 545 #include <stdio.h>
546 +#ifndef WIN32 546 +#ifndef WIN32
547 #include <sys/resource.h> 547 #include <sys/resource.h>
548 +#endif 548 +#endif
549 #include "util/test.h" 549 #include "util/test.h"
550 550
551 DEFINE_string(test_tmpdir, "/var/tmp", "temp directory"); 551 DEFINE_string(test_tmpdir, "/var/tmp", "temp directory");
552 @@ -23,9 +25,13 @@ void RegisterTest(void (*fn)(void), const char *name) { 552 @@ -23,9 +25,13 @@ void RegisterTest(void (*fn)(void), const char *name) {
553 553
554 namespace re2 { 554 namespace re2 {
555 int64 VirtualProcessSize() { 555 int64 VirtualProcessSize() {
556 +#ifndef WIN32 556 +#ifndef WIN32
557 struct rusage ru; 557 struct rusage ru;
558 getrusage(RUSAGE_SELF, &ru); 558 getrusage(RUSAGE_SELF, &ru);
559 return (int64)ru.ru_maxrss*1024; 559 return (int64)ru.ru_maxrss*1024;
560 +#else 560 +#else
561 + return 0; 561 + return 0;
562 +#endif 562 +#endif
563 } 563 }
564 } // namespace re2 564 } // namespace re2
565 565
566 diff --git a/third_party/re2/util/util.h b/third_party/re2/util/util.h 566 diff --git a/util/util.h b/util/util.h
567 index 63a9c6f..dab7e16 100644 567 index c46ab1b..17ef824 100644
568 --- a/third_party/re2/util/util.h 568 --- a/util/util.h
569 +++ b/third_party/re2/util/util.h 569 +++ b/util/util.h
570 @@ -12,7 +12,9 @@ 570 @@ -12,7 +12,9 @@
571 #include <stddef.h> // For size_t 571 #include <stddef.h> // For size_t
572 #include <assert.h> 572 #include <assert.h>
573 #include <stdarg.h> 573 #include <stdarg.h>
574 +#ifndef WIN32 574 +#ifndef WIN32
575 #include <sys/time.h> 575 #include <sys/time.h>
576 +#endif 576 +#endif
577 #include <time.h> 577 #include <time.h>
578 #include <ctype.h> // For isdigit, isalpha.
578 579
579 // C++ 580 @@ -51,7 +53,11 @@ using std::tr1::unordered_set;
580 @@ -50,7 +52,11 @@ using std::tr1::unordered_set;
581 #else 581 #else
582 582
583 #include <unordered_set> 583 #include <unordered_set>
584 +#ifdef WIN32 584 +#ifdef WIN32
585 +using std::tr1::unordered_set; 585 +using std::tr1::unordered_set;
586 +#else 586 +#else
587 using std::unordered_set; 587 using std::unordered_set;
588 +#endif 588 +#endif
589 589
590 #endif 590 #endif
591 591
592 diff --git a/third_party/re2/util/valgrind.h b/third_party/re2/util/valgrind.h 592 diff --git a/util/valgrind.h b/util/valgrind.h
593 index ca10b1a..d097b0c 100644 593 index ca10b1a..d097b0c 100644
594 --- a/third_party/re2/util/valgrind.h 594 --- a/util/valgrind.h
595 +++ b/third_party/re2/util/valgrind.h 595 +++ b/util/valgrind.h
596 @@ -4064,6 +4064,7 @@ typedef 596 @@ -4064,6 +4064,7 @@ typedef
597 #endif /* PLAT_ppc64_aix5 */ 597 #endif /* PLAT_ppc64_aix5 */
598 598
599 599
600 +#ifndef WIN32 600 +#ifndef WIN32
601 /* ------------------------------------------------------------------ */ 601 /* ------------------------------------------------------------------ */
602 /* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS. */ 602 /* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS. */
603 /* */ 603 /* */
604 @@ -4170,7 +4171,7 @@ typedef 604 @@ -4170,7 +4171,7 @@ typedef
605 VG_USERREQ__DISCARD_TRANSLATIONS, \ 605 VG_USERREQ__DISCARD_TRANSLATIONS, \
606 _qzz_addr, _qzz_len, 0, 0, 0); \ 606 _qzz_addr, _qzz_len, 0, 0, 0); \
607 } 607 }
608 - 608 -
609 +#endif 609 +#endif
610 610
611 /* These requests are for getting Valgrind itself to print something. 611 /* These requests are for getting Valgrind itself to print something.
612 Possibly with a backtrace. This is a really ugly hack. The return value 612 Possibly with a backtrace. This is a really ugly hack. The return value
OLDNEW
« no previous file with comments | « third_party/re2/patches/re2-android.patch ('k') | third_party/re2/patches/remove-static-initializers.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698