OLD | NEW |
(Empty) | |
| 1 diff -r c79416ca4228 AUTHORS |
| 2 --- a/AUTHORS Tue May 29 11:50:48 2012 -0400 |
| 3 +++ b/AUTHORS Wed Jun 20 19:00:08 2012 +0200 |
| 4 @@ -8,5 +8,6 @@ |
| 5 |
| 6 # Please keep the list sorted. |
| 7 |
| 8 +Brian Gunlogson <unixman83@gmail.com> |
| 9 Google Inc. |
| 10 Stefano Rivera <stefano.rivera@gmail.com> |
| 11 diff -r c79416ca4228 CONTRIBUTORS |
| 12 --- a/CONTRIBUTORS Tue May 29 11:50:48 2012 -0400 |
| 13 +++ b/CONTRIBUTORS Wed Jun 20 19:00:08 2012 +0200 |
| 14 @@ -26,6 +26,7 @@ |
| 15 |
| 16 # Please keep the list sorted. |
| 17 |
| 18 +Brian Gunlogson <unixman83@gmail.com> |
| 19 Rob Pike <r@google.com> |
| 20 Russ Cox <rsc@swtch.com> |
| 21 Sanjay Ghemawat <sanjay@google.com> |
| 22 diff -r c79416ca4228 mswin/stdint.h |
| 23 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 24 +++ b/mswin/stdint.h Wed Jun 20 19:00:08 2012 +0200 |
| 25 @@ -0,0 +1,247 @@ |
| 26 +// ISO C9x compliant stdint.h for Microsoft Visual Studio |
| 27 +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 |
| 28 +// |
| 29 +// Copyright (c) 2006-2008 Alexander Chemeris |
| 30 +// |
| 31 +// Redistribution and use in source and binary forms, with or without |
| 32 +// modification, are permitted provided that the following conditions are met: |
| 33 +// |
| 34 +// 1. Redistributions of source code must retain the above copyright notice, |
| 35 +// this list of conditions and the following disclaimer. |
| 36 +// |
| 37 +// 2. Redistributions in binary form must reproduce the above copyright |
| 38 +// notice, this list of conditions and the following disclaimer in the |
| 39 +// documentation and/or other materials provided with the distribution. |
| 40 +// |
| 41 +// 3. The name of the author may be used to endorse or promote products |
| 42 +// derived from this software without specific prior written permission. |
| 43 +// |
| 44 +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
| 45 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 46 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
| 47 +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 48 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 49 +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 50 +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 51 +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 52 +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 53 +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 54 +// |
| 55 +/////////////////////////////////////////////////////////////////////////////// |
| 56 + |
| 57 +#ifndef _MSC_VER // [ |
| 58 +#error "Use this header only with Microsoft Visual C++ compilers!" |
| 59 +#endif // _MSC_VER ] |
| 60 + |
| 61 +#ifndef _MSC_STDINT_H_ // [ |
| 62 +#define _MSC_STDINT_H_ |
| 63 + |
| 64 +#if _MSC_VER > 1000 |
| 65 +#pragma once |
| 66 +#endif |
| 67 + |
| 68 +#include <limits.h> |
| 69 + |
| 70 +// For Visual Studio 6 in C++ mode and for many Visual Studio versions when |
| 71 +// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}' |
| 72 +// or compiler give many errors like this: |
| 73 +// error C2733: second C linkage of overloaded function 'wmemchr' not allowed |
| 74 +#ifdef __cplusplus |
| 75 +extern "C" { |
| 76 +#endif |
| 77 +# include <wchar.h> |
| 78 +#ifdef __cplusplus |
| 79 +} |
| 80 +#endif |
| 81 + |
| 82 +// Define _W64 macros to mark types changing their size, like intptr_t. |
| 83 +#ifndef _W64 |
| 84 +# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1
300 |
| 85 +# define _W64 __w64 |
| 86 +# else |
| 87 +# define _W64 |
| 88 +# endif |
| 89 +#endif |
| 90 + |
| 91 + |
| 92 +// 7.18.1 Integer types |
| 93 + |
| 94 +// 7.18.1.1 Exact-width integer types |
| 95 + |
| 96 +// Visual Studio 6 and Embedded Visual C++ 4 doesn't |
| 97 +// realize that, e.g. char has the same size as __int8 |
| 98 +// so we give up on __intX for them. |
| 99 +#if (_MSC_VER < 1300) |
| 100 + typedef signed char int8_t; |
| 101 + typedef signed short int16_t; |
| 102 + typedef signed int int32_t; |
| 103 + typedef unsigned char uint8_t; |
| 104 + typedef unsigned short uint16_t; |
| 105 + typedef unsigned int uint32_t; |
| 106 +#else |
| 107 + typedef signed __int8 int8_t; |
| 108 + typedef signed __int16 int16_t; |
| 109 + typedef signed __int32 int32_t; |
| 110 + typedef unsigned __int8 uint8_t; |
| 111 + typedef unsigned __int16 uint16_t; |
| 112 + typedef unsigned __int32 uint32_t; |
| 113 +#endif |
| 114 +typedef signed __int64 int64_t; |
| 115 +typedef unsigned __int64 uint64_t; |
| 116 + |
| 117 + |
| 118 +// 7.18.1.2 Minimum-width integer types |
| 119 +typedef int8_t int_least8_t; |
| 120 +typedef int16_t int_least16_t; |
| 121 +typedef int32_t int_least32_t; |
| 122 +typedef int64_t int_least64_t; |
| 123 +typedef uint8_t uint_least8_t; |
| 124 +typedef uint16_t uint_least16_t; |
| 125 +typedef uint32_t uint_least32_t; |
| 126 +typedef uint64_t uint_least64_t; |
| 127 + |
| 128 +// 7.18.1.3 Fastest minimum-width integer types |
| 129 +typedef int8_t int_fast8_t; |
| 130 +typedef int16_t int_fast16_t; |
| 131 +typedef int32_t int_fast32_t; |
| 132 +typedef int64_t int_fast64_t; |
| 133 +typedef uint8_t uint_fast8_t; |
| 134 +typedef uint16_t uint_fast16_t; |
| 135 +typedef uint32_t uint_fast32_t; |
| 136 +typedef uint64_t uint_fast64_t; |
| 137 + |
| 138 +// 7.18.1.4 Integer types capable of holding object pointers |
| 139 +#ifdef _WIN64 // [ |
| 140 + typedef signed __int64 intptr_t; |
| 141 + typedef unsigned __int64 uintptr_t; |
| 142 +#else // _WIN64 ][ |
| 143 + typedef _W64 signed int intptr_t; |
| 144 + typedef _W64 unsigned int uintptr_t; |
| 145 +#endif // _WIN64 ] |
| 146 + |
| 147 +// 7.18.1.5 Greatest-width integer types |
| 148 +typedef int64_t intmax_t; |
| 149 +typedef uint64_t uintmax_t; |
| 150 + |
| 151 + |
| 152 +// 7.18.2 Limits of specified-width integer types |
| 153 + |
| 154 +#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 2
20 at page 257 and footnote 221 at page 259 |
| 155 + |
| 156 +// 7.18.2.1 Limits of exact-width integer types |
| 157 +#define INT8_MIN ((int8_t)_I8_MIN) |
| 158 +#define INT8_MAX _I8_MAX |
| 159 +#define INT16_MIN ((int16_t)_I16_MIN) |
| 160 +#define INT16_MAX _I16_MAX |
| 161 +#define INT32_MIN ((int32_t)_I32_MIN) |
| 162 +#define INT32_MAX _I32_MAX |
| 163 +#define INT64_MIN ((int64_t)_I64_MIN) |
| 164 +#define INT64_MAX _I64_MAX |
| 165 +#define UINT8_MAX _UI8_MAX |
| 166 +#define UINT16_MAX _UI16_MAX |
| 167 +#define UINT32_MAX _UI32_MAX |
| 168 +#define UINT64_MAX _UI64_MAX |
| 169 + |
| 170 +// 7.18.2.2 Limits of minimum-width integer types |
| 171 +#define INT_LEAST8_MIN INT8_MIN |
| 172 +#define INT_LEAST8_MAX INT8_MAX |
| 173 +#define INT_LEAST16_MIN INT16_MIN |
| 174 +#define INT_LEAST16_MAX INT16_MAX |
| 175 +#define INT_LEAST32_MIN INT32_MIN |
| 176 +#define INT_LEAST32_MAX INT32_MAX |
| 177 +#define INT_LEAST64_MIN INT64_MIN |
| 178 +#define INT_LEAST64_MAX INT64_MAX |
| 179 +#define UINT_LEAST8_MAX UINT8_MAX |
| 180 +#define UINT_LEAST16_MAX UINT16_MAX |
| 181 +#define UINT_LEAST32_MAX UINT32_MAX |
| 182 +#define UINT_LEAST64_MAX UINT64_MAX |
| 183 + |
| 184 +// 7.18.2.3 Limits of fastest minimum-width integer types |
| 185 +#define INT_FAST8_MIN INT8_MIN |
| 186 +#define INT_FAST8_MAX INT8_MAX |
| 187 +#define INT_FAST16_MIN INT16_MIN |
| 188 +#define INT_FAST16_MAX INT16_MAX |
| 189 +#define INT_FAST32_MIN INT32_MIN |
| 190 +#define INT_FAST32_MAX INT32_MAX |
| 191 +#define INT_FAST64_MIN INT64_MIN |
| 192 +#define INT_FAST64_MAX INT64_MAX |
| 193 +#define UINT_FAST8_MAX UINT8_MAX |
| 194 +#define UINT_FAST16_MAX UINT16_MAX |
| 195 +#define UINT_FAST32_MAX UINT32_MAX |
| 196 +#define UINT_FAST64_MAX UINT64_MAX |
| 197 + |
| 198 +// 7.18.2.4 Limits of integer types capable of holding object pointers |
| 199 +#ifdef _WIN64 // [ |
| 200 +# define INTPTR_MIN INT64_MIN |
| 201 +# define INTPTR_MAX INT64_MAX |
| 202 +# define UINTPTR_MAX UINT64_MAX |
| 203 +#else // _WIN64 ][ |
| 204 +# define INTPTR_MIN INT32_MIN |
| 205 +# define INTPTR_MAX INT32_MAX |
| 206 +# define UINTPTR_MAX UINT32_MAX |
| 207 +#endif // _WIN64 ] |
| 208 + |
| 209 +// 7.18.2.5 Limits of greatest-width integer types |
| 210 +#define INTMAX_MIN INT64_MIN |
| 211 +#define INTMAX_MAX INT64_MAX |
| 212 +#define UINTMAX_MAX UINT64_MAX |
| 213 + |
| 214 +// 7.18.3 Limits of other integer types |
| 215 + |
| 216 +#ifdef _WIN64 // [ |
| 217 +# define PTRDIFF_MIN _I64_MIN |
| 218 +# define PTRDIFF_MAX _I64_MAX |
| 219 +#else // _WIN64 ][ |
| 220 +# define PTRDIFF_MIN _I32_MIN |
| 221 +# define PTRDIFF_MAX _I32_MAX |
| 222 +#endif // _WIN64 ] |
| 223 + |
| 224 +#define SIG_ATOMIC_MIN INT_MIN |
| 225 +#define SIG_ATOMIC_MAX INT_MAX |
| 226 + |
| 227 +#ifndef SIZE_MAX // [ |
| 228 +# ifdef _WIN64 // [ |
| 229 +# define SIZE_MAX _UI64_MAX |
| 230 +# else // _WIN64 ][ |
| 231 +# define SIZE_MAX _UI32_MAX |
| 232 +# endif // _WIN64 ] |
| 233 +#endif // SIZE_MAX ] |
| 234 + |
| 235 +// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h> |
| 236 +#ifndef WCHAR_MIN // [ |
| 237 +# define WCHAR_MIN 0 |
| 238 +#endif // WCHAR_MIN ] |
| 239 +#ifndef WCHAR_MAX // [ |
| 240 +# define WCHAR_MAX _UI16_MAX |
| 241 +#endif // WCHAR_MAX ] |
| 242 + |
| 243 +#define WINT_MIN 0 |
| 244 +#define WINT_MAX _UI16_MAX |
| 245 + |
| 246 +#endif // __STDC_LIMIT_MACROS ] |
| 247 + |
| 248 + |
| 249 +// 7.18.4 Limits of other integer types |
| 250 + |
| 251 +#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnot
e 224 at page 260 |
| 252 + |
| 253 +// 7.18.4.1 Macros for minimum-width integer constants |
| 254 + |
| 255 +#define INT8_C(val) val##i8 |
| 256 +#define INT16_C(val) val##i16 |
| 257 +#define INT32_C(val) val##i32 |
| 258 +#define INT64_C(val) val##i64 |
| 259 + |
| 260 +#define UINT8_C(val) val##ui8 |
| 261 +#define UINT16_C(val) val##ui16 |
| 262 +#define UINT32_C(val) val##ui32 |
| 263 +#define UINT64_C(val) val##ui64 |
| 264 + |
| 265 +// 7.18.4.2 Macros for greatest-width integer constants |
| 266 +#define INTMAX_C INT64_C |
| 267 +#define UINTMAX_C UINT64_C |
| 268 + |
| 269 +#endif // __STDC_CONSTANT_MACROS ] |
| 270 + |
| 271 + |
| 272 +#endif // _MSC_STDINT_H_ ] |
| 273 diff -r c79416ca4228 re2.sln |
| 274 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 275 +++ b/re2.sln Wed Jun 20 19:00:08 2012 +0200 |
| 276 @@ -0,0 +1,38 @@ |
| 277 + |
| 278 +Microsoft Visual Studio Solution File, Format Version 10.00 |
| 279 +# Visual Studio 2008 |
| 280 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2", "re2.vcproj", "{494B
D4B2-1ADD-4053-981D-BA14D6DF9219}" |
| 281 + ProjectSection(ProjectDependencies) = postProject |
| 282 + {AB36233A-643A-4D2E-93B3-0602DA52C8D5} = {AB36233A-643A-4D2E-93B
3-0602DA52C8D5} |
| 283 + EndProjectSection |
| 284 +EndProject |
| 285 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2_testing", "re2_testing
\re2_testing.vcproj", "{1B9A5974-DA06-4F57-BFFC-4DE19B968AE8}" |
| 286 + ProjectSection(ProjectDependencies) = postProject |
| 287 + {494BD4B2-1ADD-4053-981D-BA14D6DF9219} = {494BD4B2-1ADD-4053-981
D-BA14D6DF9219} |
| 288 + EndProjectSection |
| 289 +EndProject |
| 290 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "util\util.vcproj",
"{AB36233A-643A-4D2E-93B3-0602DA52C8D5}" |
| 291 +EndProject |
| 292 +Global |
| 293 + GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| 294 + Debug|Win32 = Debug|Win32 |
| 295 + Release|Win32 = Release|Win32 |
| 296 + EndGlobalSection |
| 297 + GlobalSection(ProjectConfigurationPlatforms) = postSolution |
| 298 + {494BD4B2-1ADD-4053-981D-BA14D6DF9219}.Debug|Win32.ActiveCfg = D
ebug|Win32 |
| 299 + {494BD4B2-1ADD-4053-981D-BA14D6DF9219}.Debug|Win32.Build.0 = Deb
ug|Win32 |
| 300 + {494BD4B2-1ADD-4053-981D-BA14D6DF9219}.Release|Win32.ActiveCfg =
Release|Win32 |
| 301 + {494BD4B2-1ADD-4053-981D-BA14D6DF9219}.Release|Win32.Build.0 = R
elease|Win32 |
| 302 + {1B9A5974-DA06-4F57-BFFC-4DE19B968AE8}.Debug|Win32.ActiveCfg = D
ebug|Win32 |
| 303 + {1B9A5974-DA06-4F57-BFFC-4DE19B968AE8}.Debug|Win32.Build.0 = Deb
ug|Win32 |
| 304 + {1B9A5974-DA06-4F57-BFFC-4DE19B968AE8}.Release|Win32.ActiveCfg =
Release|Win32 |
| 305 + {1B9A5974-DA06-4F57-BFFC-4DE19B968AE8}.Release|Win32.Build.0 = R
elease|Win32 |
| 306 + {AB36233A-643A-4D2E-93B3-0602DA52C8D5}.Debug|Win32.ActiveCfg = D
ebug|Win32 |
| 307 + {AB36233A-643A-4D2E-93B3-0602DA52C8D5}.Debug|Win32.Build.0 = Deb
ug|Win32 |
| 308 + {AB36233A-643A-4D2E-93B3-0602DA52C8D5}.Release|Win32.ActiveCfg =
Release|Win32 |
| 309 + {AB36233A-643A-4D2E-93B3-0602DA52C8D5}.Release|Win32.Build.0 = R
elease|Win32 |
| 310 + EndGlobalSection |
| 311 + GlobalSection(SolutionProperties) = preSolution |
| 312 + HideSolutionNode = FALSE |
| 313 + EndGlobalSection |
| 314 +EndGlobal |
| 315 diff -r c79416ca4228 re2.vcproj |
| 316 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 317 +++ b/re2.vcproj Wed Jun 20 19:00:08 2012 +0200 |
| 318 @@ -0,0 +1,327 @@ |
| 319 +<?xml version="1.0" encoding="Windows-1252"?> |
| 320 +<VisualStudioProject |
| 321 + ProjectType="Visual C++" |
| 322 + Version="9.00" |
| 323 + Name="re2" |
| 324 + ProjectGUID="{494BD4B2-1ADD-4053-981D-BA14D6DF9219}" |
| 325 + RootNamespace="re2" |
| 326 + Keyword="Win32Proj" |
| 327 + TargetFrameworkVersion="196613" |
| 328 + > |
| 329 + <Platforms> |
| 330 + <Platform |
| 331 + Name="Win32" |
| 332 + /> |
| 333 + </Platforms> |
| 334 + <ToolFiles> |
| 335 + </ToolFiles> |
| 336 + <Configurations> |
| 337 + <Configuration |
| 338 + Name="Debug|Win32" |
| 339 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
| 340 + IntermediateDirectory="$(ConfigurationName)" |
| 341 + ConfigurationType="4" |
| 342 + CharacterSet="1" |
| 343 + > |
| 344 + <Tool |
| 345 + Name="VCPreBuildEventTool" |
| 346 + /> |
| 347 + <Tool |
| 348 + Name="VCCustomBuildTool" |
| 349 + /> |
| 350 + <Tool |
| 351 + Name="VCXMLDataGeneratorTool" |
| 352 + /> |
| 353 + <Tool |
| 354 + Name="VCWebServiceProxyGeneratorTool" |
| 355 + /> |
| 356 + <Tool |
| 357 + Name="VCMIDLTool" |
| 358 + /> |
| 359 + <Tool |
| 360 + Name="VCCLCompilerTool" |
| 361 + Optimization="0" |
| 362 + AdditionalIncludeDirectories=".;.\mswin" |
| 363 + PreprocessorDefinitions="WIN32;NOMINMAX;DEBUG;_W
INDOWS;_UNICODE;NOPCH;WIN32_LEAN_AND_MEAN" |
| 364 + MinimalRebuild="true" |
| 365 + BasicRuntimeChecks="3" |
| 366 + RuntimeLibrary="3" |
| 367 + UsePrecompiledHeader="0" |
| 368 + WarningLevel="3" |
| 369 + DebugInformationFormat="4" |
| 370 + /> |
| 371 + <Tool |
| 372 + Name="VCManagedResourceCompilerTool" |
| 373 + /> |
| 374 + <Tool |
| 375 + Name="VCResourceCompilerTool" |
| 376 + /> |
| 377 + <Tool |
| 378 + Name="VCPreLinkEventTool" |
| 379 + /> |
| 380 + <Tool |
| 381 + Name="VCLibrarianTool" |
| 382 + AdditionalDependencies="$(TargetDir)\util.lib" |
| 383 + /> |
| 384 + <Tool |
| 385 + Name="VCALinkTool" |
| 386 + /> |
| 387 + <Tool |
| 388 + Name="VCXDCMakeTool" |
| 389 + /> |
| 390 + <Tool |
| 391 + Name="VCBscMakeTool" |
| 392 + /> |
| 393 + <Tool |
| 394 + Name="VCFxCopTool" |
| 395 + /> |
| 396 + <Tool |
| 397 + Name="VCPostBuildEventTool" |
| 398 + /> |
| 399 + </Configuration> |
| 400 + <Configuration |
| 401 + Name="Release|Win32" |
| 402 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
| 403 + IntermediateDirectory="$(ConfigurationName)" |
| 404 + ConfigurationType="4" |
| 405 + CharacterSet="1" |
| 406 + WholeProgramOptimization="1" |
| 407 + > |
| 408 + <Tool |
| 409 + Name="VCPreBuildEventTool" |
| 410 + /> |
| 411 + <Tool |
| 412 + Name="VCCustomBuildTool" |
| 413 + /> |
| 414 + <Tool |
| 415 + Name="VCXMLDataGeneratorTool" |
| 416 + /> |
| 417 + <Tool |
| 418 + Name="VCWebServiceProxyGeneratorTool" |
| 419 + /> |
| 420 + <Tool |
| 421 + Name="VCMIDLTool" |
| 422 + /> |
| 423 + <Tool |
| 424 + Name="VCCLCompilerTool" |
| 425 + Optimization="2" |
| 426 + EnableIntrinsicFunctions="true" |
| 427 + AdditionalIncludeDirectories=".;.\mswin" |
| 428 + PreprocessorDefinitions="WIN32;NOMINMAX;NDEBUG;_
WINDOWS;_UNICODE;NOPCH;WIN32_LEAN_AND_MEAN" |
| 429 + StringPooling="true" |
| 430 + RuntimeLibrary="2" |
| 431 + EnableFunctionLevelLinking="true" |
| 432 + UsePrecompiledHeader="0" |
| 433 + WarningLevel="3" |
| 434 + DebugInformationFormat="3" |
| 435 + /> |
| 436 + <Tool |
| 437 + Name="VCManagedResourceCompilerTool" |
| 438 + /> |
| 439 + <Tool |
| 440 + Name="VCResourceCompilerTool" |
| 441 + /> |
| 442 + <Tool |
| 443 + Name="VCPreLinkEventTool" |
| 444 + /> |
| 445 + <Tool |
| 446 + Name="VCLibrarianTool" |
| 447 + /> |
| 448 + <Tool |
| 449 + Name="VCALinkTool" |
| 450 + /> |
| 451 + <Tool |
| 452 + Name="VCXDCMakeTool" |
| 453 + /> |
| 454 + <Tool |
| 455 + Name="VCBscMakeTool" |
| 456 + /> |
| 457 + <Tool |
| 458 + Name="VCFxCopTool" |
| 459 + /> |
| 460 + <Tool |
| 461 + Name="VCPostBuildEventTool" |
| 462 + /> |
| 463 + </Configuration> |
| 464 + </Configurations> |
| 465 + <References> |
| 466 + </References> |
| 467 + <Files> |
| 468 + <Filter |
| 469 + Name="Source Files" |
| 470 + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" |
| 471 + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
" |
| 472 + > |
| 473 + <File |
| 474 + RelativePath=".\re2\bitstate.cc" |
| 475 + > |
| 476 + </File> |
| 477 + <File |
| 478 + RelativePath=".\re2\compile.cc" |
| 479 + > |
| 480 + </File> |
| 481 + <File |
| 482 + RelativePath=".\re2\dfa.cc" |
| 483 + > |
| 484 + </File> |
| 485 + <File |
| 486 + RelativePath=".\re2\filtered_re2.cc" |
| 487 + > |
| 488 + </File> |
| 489 + <File |
| 490 + RelativePath=".\re2\mimics_pcre.cc" |
| 491 + > |
| 492 + </File> |
| 493 + <File |
| 494 + RelativePath=".\re2\nfa.cc" |
| 495 + > |
| 496 + </File> |
| 497 + <File |
| 498 + RelativePath=".\re2\onepass.cc" |
| 499 + > |
| 500 + </File> |
| 501 + <File |
| 502 + RelativePath=".\re2\parse.cc" |
| 503 + > |
| 504 + </File> |
| 505 + <File |
| 506 + RelativePath=".\re2\perl_groups.cc" |
| 507 + > |
| 508 + </File> |
| 509 + <File |
| 510 + RelativePath=".\re2\prefilter.cc" |
| 511 + > |
| 512 + </File> |
| 513 + <File |
| 514 + RelativePath=".\re2\prefilter_tree.cc" |
| 515 + > |
| 516 + </File> |
| 517 + <File |
| 518 + RelativePath=".\re2\prog.cc" |
| 519 + > |
| 520 + </File> |
| 521 + <File |
| 522 + RelativePath=".\re2\re2.cc" |
| 523 + > |
| 524 + </File> |
| 525 + <File |
| 526 + RelativePath=".\re2\regexp.cc" |
| 527 + > |
| 528 + </File> |
| 529 + <File |
| 530 + RelativePath=".\util\rune.cc" |
| 531 + > |
| 532 + </File> |
| 533 + <File |
| 534 + RelativePath=".\re2\set.cc" |
| 535 + > |
| 536 + </File> |
| 537 + <File |
| 538 + RelativePath=".\re2\simplify.cc" |
| 539 + > |
| 540 + </File> |
| 541 + <File |
| 542 + RelativePath=".\util\strutil.cc" |
| 543 + > |
| 544 + </File> |
| 545 + <File |
| 546 + RelativePath=".\re2\tostring.cc" |
| 547 + > |
| 548 + </File> |
| 549 + <File |
| 550 + RelativePath=".\re2\unicode_casefold.cc" |
| 551 + > |
| 552 + </File> |
| 553 + <File |
| 554 + RelativePath=".\re2\unicode_groups.cc" |
| 555 + > |
| 556 + </File> |
| 557 + </Filter> |
| 558 + <Filter |
| 559 + Name="Header Files" |
| 560 + Filter="h;hpp;hxx;hm;inl;inc;xsd" |
| 561 + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}
" |
| 562 + > |
| 563 + <File |
| 564 + RelativePath=".\re2\filtered_re2.h" |
| 565 + > |
| 566 + </File> |
| 567 + <File |
| 568 + RelativePath=".\util\logging.h" |
| 569 + > |
| 570 + </File> |
| 571 + <File |
| 572 + RelativePath=".\util\mutex.h" |
| 573 + > |
| 574 + </File> |
| 575 + <File |
| 576 + RelativePath=".\re2\prefilter.h" |
| 577 + > |
| 578 + </File> |
| 579 + <File |
| 580 + RelativePath=".\re2\prefilter_tree.h" |
| 581 + > |
| 582 + </File> |
| 583 + <File |
| 584 + RelativePath=".\re2\prog.h" |
| 585 + > |
| 586 + </File> |
| 587 + <File |
| 588 + RelativePath=".\util\random.h" |
| 589 + > |
| 590 + </File> |
| 591 + <File |
| 592 + RelativePath=".\re2\re2.h" |
| 593 + > |
| 594 + </File> |
| 595 + <File |
| 596 + RelativePath=".\re2\regexp.h" |
| 597 + > |
| 598 + </File> |
| 599 + <File |
| 600 + RelativePath=".\re2\set.h" |
| 601 + > |
| 602 + </File> |
| 603 + <File |
| 604 + RelativePath=".\stdint.h" |
| 605 + > |
| 606 + </File> |
| 607 + <File |
| 608 + RelativePath=".\re2\unicode_casefold.h" |
| 609 + > |
| 610 + </File> |
| 611 + <File |
| 612 + RelativePath=".\re2\unicode_groups.h" |
| 613 + > |
| 614 + </File> |
| 615 + <File |
| 616 + RelativePath=".\util\utf.h" |
| 617 + > |
| 618 + </File> |
| 619 + <File |
| 620 + RelativePath=".\util\util.h" |
| 621 + > |
| 622 + </File> |
| 623 + <File |
| 624 + RelativePath=".\re2\variadic_function.h" |
| 625 + > |
| 626 + </File> |
| 627 + <File |
| 628 + RelativePath=".\re2\walker-inl.h" |
| 629 + > |
| 630 + </File> |
| 631 + </Filter> |
| 632 + <Filter |
| 633 + Name="Resource Files" |
| 634 + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;
jpe;resx;tiff;tif;png;wav" |
| 635 + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
" |
| 636 + > |
| 637 + </Filter> |
| 638 + <File |
| 639 + RelativePath=".\ClassDiagram1.cd" |
| 640 + > |
| 641 + </File> |
| 642 + </Files> |
| 643 + <Globals> |
| 644 + </Globals> |
| 645 +</VisualStudioProject> |
| 646 diff -r c79416ca4228 re2/compile.cc |
| 647 --- a/re2/compile.cc Tue May 29 11:50:48 2012 -0400 |
| 648 +++ b/re2/compile.cc Wed Jun 20 19:00:08 2012 +0200 |
| 649 @@ -501,7 +501,7 @@ |
| 650 return UncachedRuneByteSuffix(lo, hi, foldcase, next); |
| 651 } |
| 652 |
| 653 - uint64 key = ((uint64)next << 17) | (lo<<9) | (hi<<1) | foldcase; |
| 654 + uint64 key = ((uint64)next << 17) | (lo<<9) | (hi<<1) | (foldcase ? 1ULL : 0U
LL); |
| 655 map<uint64, int>::iterator it = rune_cache_.find(key); |
| 656 if (it != rune_cache_.end()) |
| 657 return it->second; |
| 658 diff -r c79416ca4228 re2/prefilter_tree.cc |
| 659 --- a/re2/prefilter_tree.cc Tue May 29 11:50:48 2012 -0400 |
| 660 +++ b/re2/prefilter_tree.cc Wed Jun 20 19:00:08 2012 +0200 |
| 661 @@ -8,6 +8,11 @@ |
| 662 #include "re2/prefilter_tree.h" |
| 663 #include "re2/re2.h" |
| 664 |
| 665 +#ifdef WIN32 |
| 666 +#include <stdio.h> |
| 667 +#define snprintf _snprintf |
| 668 +#endif |
| 669 + |
| 670 DEFINE_int32(filtered_re2_min_atom_len, |
| 671 3, |
| 672 "Strings less than this length are not stored as atoms"); |
| 673 diff -r c79416ca4228 re2/re2.cc |
| 674 --- a/re2/re2.cc Tue May 29 11:50:48 2012 -0400 |
| 675 +++ b/re2/re2.cc Wed Jun 20 19:00:08 2012 +0200 |
| 676 @@ -11,7 +11,13 @@ |
| 677 |
| 678 #include <stdio.h> |
| 679 #include <string> |
| 680 +#ifdef WIN32 |
| 681 +#define strtoll _strtoi64 |
| 682 +#define strtoull _strtoui64 |
| 683 +#define strtof strtod |
| 684 +#else |
| 685 #include <pthread.h> |
| 686 +#endif |
| 687 #include <errno.h> |
| 688 #include "util/util.h" |
| 689 #include "util/flags.h" |
| 690 @@ -31,8 +37,6 @@ |
| 691 const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::ConsumeN
> RE2::Consume; |
| 692 const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::FindAndC
onsumeN> RE2::FindAndConsume; |
| 693 |
| 694 -const int RE2::Options::kDefaultMaxMem; // initialized in re2.h |
| 695 - |
| 696 // Commonly-used option sets; arguments to constructor are: |
| 697 // utf8 input |
| 698 // posix syntax |
| 699 diff -r c79416ca4228 re2/re2.h |
| 700 --- a/re2/re2.h Tue May 29 11:50:48 2012 -0400 |
| 701 +++ b/re2/re2.h Wed Jun 20 19:00:08 2012 +0200 |
| 702 @@ -5,6 +5,8 @@ |
| 703 #ifndef RE2_RE2_H |
| 704 #define RE2_RE2_H |
| 705 |
| 706 +#define kDefaultMaxMem (8<<20) |
| 707 + |
| 708 // C++ interface to the re2 regular-expression library. |
| 709 // RE2 supports Perl-style regular expressions (with extensions like |
| 710 // \d, \w, \s, ...). |
| 711 @@ -517,9 +519,6 @@ |
| 712 // Once a DFA fills its budget, it flushes its cache and starts over. |
| 713 // If this happens too often, RE2 falls back on the NFA implementation. |
| 714 |
| 715 - // For now, make the default budget something close to Code Search. |
| 716 - static const int kDefaultMaxMem = 8<<20; |
| 717 - |
| 718 enum Encoding { |
| 719 EncodingUTF8 = 1, |
| 720 EncodingLatin1 |
| 721 diff -r c79416ca4228 re2/stringpiece.h |
| 722 --- a/re2/stringpiece.h Tue May 29 11:50:48 2012 -0400 |
| 723 +++ b/re2/stringpiece.h Wed Jun 20 19:00:08 2012 +0200 |
| 724 @@ -23,6 +23,9 @@ |
| 725 #include <cstddef> |
| 726 #include <iosfwd> |
| 727 #include <string> |
| 728 +#ifdef WIN32 |
| 729 +#include <algorithm> |
| 730 +#endif |
| 731 |
| 732 namespace re2 { |
| 733 |
| 734 diff -r c79416ca4228 re2/testing/re2_test.cc |
| 735 --- a/re2/testing/re2_test.cc Tue May 29 11:50:48 2012 -0400 |
| 736 +++ b/re2/testing/re2_test.cc Wed Jun 20 19:00:08 2012 +0200 |
| 737 @@ -6,7 +6,9 @@ |
| 738 // TODO: Test extractions for PartialMatch/Consume |
| 739 |
| 740 #include <sys/types.h> |
| 741 +#ifndef WIN32 |
| 742 #include <sys/mman.h> |
| 743 +#endif |
| 744 #include <sys/stat.h> |
| 745 #include <errno.h> |
| 746 #include <vector> |
| 747 @@ -14,6 +16,11 @@ |
| 748 #include "re2/re2.h" |
| 749 #include "re2/regexp.h" |
| 750 |
| 751 +#ifdef WIN32 |
| 752 +#include <stdio.h> |
| 753 +#define snprintf _snprintf |
| 754 +#endif |
| 755 + |
| 756 DECLARE_bool(logtostderr); |
| 757 |
| 758 namespace re2 { |
| 759 @@ -657,6 +664,7 @@ |
| 760 CHECK(!RE2::FullMatch("hello", "(.*)", (float*)NULL)); |
| 761 } |
| 762 |
| 763 +#ifndef WIN32 |
| 764 // Check that numeric parsing code does not read past the end of |
| 765 // the number being parsed. |
| 766 TEST(RE2, NULTerminated) { |
| 767 @@ -678,6 +686,7 @@ |
| 768 CHECK(RE2::FullMatch(StringPiece(v + pagesize - 1, 1), "(.*)", &x)); |
| 769 CHECK_EQ(x, 1); |
| 770 } |
| 771 +#endif |
| 772 |
| 773 TEST(RE2, FullMatchTypeTests) { |
| 774 // Type tests |
| 775 diff -r c79416ca4228 re2_testing/re2_testing.vcproj |
| 776 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 777 +++ b/re2_testing/re2_testing.vcproj Wed Jun 20 19:00:08 2012 +0200 |
| 778 @@ -0,0 +1,298 @@ |
| 779 +<?xml version="1.0" encoding="Windows-1252"?> |
| 780 +<VisualStudioProject |
| 781 + ProjectType="Visual C++" |
| 782 + Version="9.00" |
| 783 + Name="re2_testing" |
| 784 + ProjectGUID="{1B9A5974-DA06-4F57-BFFC-4DE19B968AE8}" |
| 785 + RootNamespace="re2_testing" |
| 786 + TargetFrameworkVersion="196613" |
| 787 + > |
| 788 + <Platforms> |
| 789 + <Platform |
| 790 + Name="Win32" |
| 791 + /> |
| 792 + </Platforms> |
| 793 + <ToolFiles> |
| 794 + </ToolFiles> |
| 795 + <Configurations> |
| 796 + <Configuration |
| 797 + Name="Debug|Win32" |
| 798 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
| 799 + IntermediateDirectory="$(ConfigurationName)" |
| 800 + ConfigurationType="1" |
| 801 + CharacterSet="2" |
| 802 + > |
| 803 + <Tool |
| 804 + Name="VCPreBuildEventTool" |
| 805 + /> |
| 806 + <Tool |
| 807 + Name="VCCustomBuildTool" |
| 808 + /> |
| 809 + <Tool |
| 810 + Name="VCXMLDataGeneratorTool" |
| 811 + /> |
| 812 + <Tool |
| 813 + Name="VCWebServiceProxyGeneratorTool" |
| 814 + /> |
| 815 + <Tool |
| 816 + Name="VCMIDLTool" |
| 817 + /> |
| 818 + <Tool |
| 819 + Name="VCCLCompilerTool" |
| 820 + Optimization="0" |
| 821 + AdditionalIncludeDirectories=""$(SolutionDi
r)";..\mswin" |
| 822 + PreprocessorDefinitions="WIN32;NOMINMAX;DEBUG;_W
INDOWS;_UNICODE;NOPCH;WIN32_LEAN_AND_MEAN;NOGDI" |
| 823 + MinimalRebuild="true" |
| 824 + BasicRuntimeChecks="3" |
| 825 + RuntimeLibrary="3" |
| 826 + WarningLevel="3" |
| 827 + DebugInformationFormat="4" |
| 828 + /> |
| 829 + <Tool |
| 830 + Name="VCManagedResourceCompilerTool" |
| 831 + /> |
| 832 + <Tool |
| 833 + Name="VCResourceCompilerTool" |
| 834 + /> |
| 835 + <Tool |
| 836 + Name="VCPreLinkEventTool" |
| 837 + /> |
| 838 + <Tool |
| 839 + Name="VCLinkerTool" |
| 840 + AdditionalDependencies="$(TargetDir)/re2.lib" |
| 841 + GenerateDebugInformation="true" |
| 842 + TargetMachine="1" |
| 843 + /> |
| 844 + <Tool |
| 845 + Name="VCALinkTool" |
| 846 + /> |
| 847 + <Tool |
| 848 + Name="VCManifestTool" |
| 849 + /> |
| 850 + <Tool |
| 851 + Name="VCXDCMakeTool" |
| 852 + /> |
| 853 + <Tool |
| 854 + Name="VCBscMakeTool" |
| 855 + /> |
| 856 + <Tool |
| 857 + Name="VCFxCopTool" |
| 858 + /> |
| 859 + <Tool |
| 860 + Name="VCAppVerifierTool" |
| 861 + /> |
| 862 + <Tool |
| 863 + Name="VCPostBuildEventTool" |
| 864 + /> |
| 865 + </Configuration> |
| 866 + <Configuration |
| 867 + Name="Release|Win32" |
| 868 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
| 869 + IntermediateDirectory="$(ConfigurationName)" |
| 870 + ConfigurationType="1" |
| 871 + CharacterSet="2" |
| 872 + WholeProgramOptimization="1" |
| 873 + > |
| 874 + <Tool |
| 875 + Name="VCPreBuildEventTool" |
| 876 + /> |
| 877 + <Tool |
| 878 + Name="VCCustomBuildTool" |
| 879 + /> |
| 880 + <Tool |
| 881 + Name="VCXMLDataGeneratorTool" |
| 882 + /> |
| 883 + <Tool |
| 884 + Name="VCWebServiceProxyGeneratorTool" |
| 885 + /> |
| 886 + <Tool |
| 887 + Name="VCMIDLTool" |
| 888 + /> |
| 889 + <Tool |
| 890 + Name="VCCLCompilerTool" |
| 891 + Optimization="2" |
| 892 + EnableIntrinsicFunctions="true" |
| 893 + AdditionalIncludeDirectories=""$(SolutionDi
r)";..\mswin" |
| 894 + PreprocessorDefinitions="WIN32;NOMINMAX;DEBUG;_W
INDOWS;_UNICODE;NOPCH;WIN32_LEAN_AND_MEAN;NOGDI" |
| 895 + RuntimeLibrary="2" |
| 896 + EnableFunctionLevelLinking="true" |
| 897 + WarningLevel="3" |
| 898 + DebugInformationFormat="3" |
| 899 + /> |
| 900 + <Tool |
| 901 + Name="VCManagedResourceCompilerTool" |
| 902 + /> |
| 903 + <Tool |
| 904 + Name="VCResourceCompilerTool" |
| 905 + /> |
| 906 + <Tool |
| 907 + Name="VCPreLinkEventTool" |
| 908 + /> |
| 909 + <Tool |
| 910 + Name="VCLinkerTool" |
| 911 + AdditionalDependencies="$(TargetDir)/re2.lib" |
| 912 + GenerateDebugInformation="true" |
| 913 + OptimizeReferences="2" |
| 914 + EnableCOMDATFolding="2" |
| 915 + TargetMachine="1" |
| 916 + /> |
| 917 + <Tool |
| 918 + Name="VCALinkTool" |
| 919 + /> |
| 920 + <Tool |
| 921 + Name="VCManifestTool" |
| 922 + /> |
| 923 + <Tool |
| 924 + Name="VCXDCMakeTool" |
| 925 + /> |
| 926 + <Tool |
| 927 + Name="VCBscMakeTool" |
| 928 + /> |
| 929 + <Tool |
| 930 + Name="VCFxCopTool" |
| 931 + /> |
| 932 + <Tool |
| 933 + Name="VCAppVerifierTool" |
| 934 + /> |
| 935 + <Tool |
| 936 + Name="VCPostBuildEventTool" |
| 937 + /> |
| 938 + </Configuration> |
| 939 + </Configurations> |
| 940 + <References> |
| 941 + </References> |
| 942 + <Files> |
| 943 + <Filter |
| 944 + Name="Source Files" |
| 945 + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" |
| 946 + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
" |
| 947 + > |
| 948 + <File |
| 949 + RelativePath="..\re2\testing\backtrack.cc" |
| 950 + > |
| 951 + </File> |
| 952 + <File |
| 953 + RelativePath="..\re2\testing\charclass_test.cc" |
| 954 + > |
| 955 + </File> |
| 956 + <File |
| 957 + RelativePath="..\re2\testing\compile_test.cc" |
| 958 + > |
| 959 + </File> |
| 960 + <File |
| 961 + RelativePath="..\re2\testing\dump.cc" |
| 962 + > |
| 963 + </File> |
| 964 + <File |
| 965 + RelativePath="..\re2\testing\exhaustive_tester.c
c" |
| 966 + > |
| 967 + </File> |
| 968 + <File |
| 969 + RelativePath="..\re2\testing\filtered_re2_test.c
c" |
| 970 + > |
| 971 + </File> |
| 972 + <File |
| 973 + RelativePath="..\re2\testing\mimics_pcre_test.cc
" |
| 974 + > |
| 975 + </File> |
| 976 + <File |
| 977 + RelativePath="..\re2\testing\null_walker.cc" |
| 978 + > |
| 979 + </File> |
| 980 + <File |
| 981 + RelativePath="..\re2\testing\parse_test.cc" |
| 982 + > |
| 983 + </File> |
| 984 + <File |
| 985 + RelativePath="..\re2\testing\possible_match_test
.cc" |
| 986 + > |
| 987 + </File> |
| 988 + <File |
| 989 + RelativePath="..\util\random.cc" |
| 990 + > |
| 991 + </File> |
| 992 + <File |
| 993 + RelativePath="..\re2\testing\re2_arg_test.cc" |
| 994 + > |
| 995 + </File> |
| 996 + <File |
| 997 + RelativePath="..\re2\testing\re2_test.cc" |
| 998 + > |
| 999 + </File> |
| 1000 + <File |
| 1001 + RelativePath="..\re2\testing\regexp_generator.cc
" |
| 1002 + > |
| 1003 + </File> |
| 1004 + <File |
| 1005 + RelativePath="..\re2\testing\regexp_test.cc" |
| 1006 + > |
| 1007 + </File> |
| 1008 + <File |
| 1009 + RelativePath="..\re2\testing\required_prefix_tes
t.cc" |
| 1010 + > |
| 1011 + </File> |
| 1012 + <File |
| 1013 + RelativePath="..\re2\testing\search_test.cc" |
| 1014 + > |
| 1015 + </File> |
| 1016 + <File |
| 1017 + RelativePath="..\re2\testing\set_test.cc" |
| 1018 + > |
| 1019 + </File> |
| 1020 + <File |
| 1021 + RelativePath="..\re2\testing\simplify_test.cc" |
| 1022 + > |
| 1023 + </File> |
| 1024 + <File |
| 1025 + RelativePath="..\re2\testing\string_generator.cc
" |
| 1026 + > |
| 1027 + </File> |
| 1028 + <File |
| 1029 + RelativePath="..\re2\testing\string_generator_te
st.cc" |
| 1030 + > |
| 1031 + </File> |
| 1032 + <File |
| 1033 + RelativePath="..\util\test.cc" |
| 1034 + > |
| 1035 + </File> |
| 1036 + <File |
| 1037 + RelativePath="..\re2\testing\tester.cc" |
| 1038 + > |
| 1039 + </File> |
| 1040 + </Filter> |
| 1041 + <Filter |
| 1042 + Name="Header Files" |
| 1043 + Filter="h;hpp;hxx;hm;inl;inc;xsd" |
| 1044 + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}
" |
| 1045 + > |
| 1046 + <File |
| 1047 + RelativePath="..\re2\testing\exhaustive_tester.h
" |
| 1048 + > |
| 1049 + </File> |
| 1050 + <File |
| 1051 + RelativePath="..\re2\testing\regexp_generator.h" |
| 1052 + > |
| 1053 + </File> |
| 1054 + <File |
| 1055 + RelativePath="..\re2\testing\string_generator.h" |
| 1056 + > |
| 1057 + </File> |
| 1058 + <File |
| 1059 + RelativePath="..\util\test.h" |
| 1060 + > |
| 1061 + </File> |
| 1062 + <File |
| 1063 + RelativePath="..\re2\testing\tester.h" |
| 1064 + > |
| 1065 + </File> |
| 1066 + </Filter> |
| 1067 + <Filter |
| 1068 + Name="Resource Files" |
| 1069 + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;
jpe;resx;tiff;tif;png;wav" |
| 1070 + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
" |
| 1071 + > |
| 1072 + </Filter> |
| 1073 + </Files> |
| 1074 + <Globals> |
| 1075 + </Globals> |
| 1076 +</VisualStudioProject> |
| 1077 diff -r c79416ca4228 util/logging.h |
| 1078 --- a/util/logging.h Tue May 29 11:50:48 2012 -0400 |
| 1079 +++ b/util/logging.h Wed Jun 20 19:00:08 2012 +0200 |
| 1080 @@ -7,8 +7,13 @@ |
| 1081 #ifndef RE2_UTIL_LOGGING_H__ |
| 1082 #define RE2_UTIL_LOGGING_H__ |
| 1083 |
| 1084 +#ifndef WIN32 |
| 1085 #include <unistd.h> /* for write */ |
| 1086 +#endif |
| 1087 #include <sstream> |
| 1088 +#ifdef WIN32 |
| 1089 +#include <io.h> |
| 1090 +#endif |
| 1091 |
| 1092 // Debug-only checking. |
| 1093 #define DCHECK(condition) assert(condition) |
| 1094 diff -r c79416ca4228 util/mutex.h |
| 1095 --- a/util/mutex.h Tue May 29 11:50:48 2012 -0400 |
| 1096 +++ b/util/mutex.h Wed Jun 20 19:00:08 2012 +0200 |
| 1097 @@ -12,8 +12,10 @@ |
| 1098 |
| 1099 namespace re2 { |
| 1100 |
| 1101 +#ifndef WIN32 |
| 1102 #define HAVE_PTHREAD 1 |
| 1103 #define HAVE_RWLOCK 1 |
| 1104 +#endif |
| 1105 |
| 1106 #if defined(NO_THREADS) |
| 1107 typedef int MutexType; // to keep a lock-count |
| 1108 @@ -32,7 +34,9 @@ |
| 1109 # include <pthread.h> |
| 1110 typedef pthread_mutex_t MutexType; |
| 1111 #elif defined(WIN32) |
| 1112 -# define WIN32_LEAN_AND_MEAN // We only need minimal includes |
| 1113 +# ifndef WIN32_LEAN_AND_MEAN |
| 1114 +# define WIN32_LEAN_AND_MEAN // We only need minimal includes |
| 1115 +# endif |
| 1116 # ifdef GMUTEX_TRYLOCK |
| 1117 // We need Windows NT or later for TryEnterCriticalSection(). If you |
| 1118 // don't need that functionality, you can remove these _WIN32_WINNT |
| 1119 diff -r c79416ca4228 util/pcre.cc |
| 1120 --- a/util/pcre.cc Tue May 29 11:50:48 2012 -0400 |
| 1121 +++ b/util/pcre.cc Wed Jun 20 19:00:08 2012 +0200 |
| 1122 @@ -11,6 +11,11 @@ |
| 1123 #include "util/flags.h" |
| 1124 #include "util/pcre.h" |
| 1125 |
| 1126 +#ifdef WIN32 |
| 1127 +#define strtoll _strtoi64 |
| 1128 +#define strtoull _strtoui64 |
| 1129 +#endif |
| 1130 + |
| 1131 #define PCREPORT(level) LOG(level) |
| 1132 |
| 1133 // Default PCRE limits. |
| 1134 diff -r c79416ca4228 util/pcre.h |
| 1135 --- a/util/pcre.h Tue May 29 11:50:48 2012 -0400 |
| 1136 +++ b/util/pcre.h Wed Jun 20 19:00:08 2012 +0200 |
| 1137 @@ -180,9 +180,15 @@ |
| 1138 #define PCRE_ERROR_MATCHLIMIT 2 |
| 1139 #define PCRE_ERROR_RECURSIONLIMIT 3 |
| 1140 #define PCRE_INFO_CAPTURECOUNT 0 |
| 1141 +#ifndef WIN32 |
| 1142 #define pcre_compile(a,b,c,d,e) ({ (void)(a); (void)(b); *(c)=""; *(d)=0; (void
)(e); ((pcre*)0); }) |
| 1143 #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; }) |
| 1144 #define pcre_fullinfo(a, b, c, d) ({ (void)(a); (void)(b); (void)(c); *(d) = 0;
0; }) |
| 1145 +#else |
| 1146 +#define pcre_compile(a,b,c,d,e) NULL |
| 1147 +#define pcre_exec(a, b, c, d, e, f, g, h) NULL |
| 1148 +#define pcre_fullinfo(a, b, c, d) NULL |
| 1149 +#endif |
| 1150 } // namespace re2 |
| 1151 #endif |
| 1152 |
| 1153 diff -r c79416ca4228 util/stringprintf.cc |
| 1154 --- a/util/stringprintf.cc Tue May 29 11:50:48 2012 -0400 |
| 1155 +++ b/util/stringprintf.cc Wed Jun 20 19:00:08 2012 +0200 |
| 1156 @@ -4,6 +4,10 @@ |
| 1157 |
| 1158 #include "util/util.h" |
| 1159 |
| 1160 +#ifndef va_copy |
| 1161 +#define va_copy(d,s) ((d) = (s)) //KLUGE: for MS compilers |
| 1162 +#endif |
| 1163 + |
| 1164 namespace re2 { |
| 1165 |
| 1166 static void StringAppendV(string* dst, const char* format, va_list ap) { |
| 1167 diff -r c79416ca4228 util/test.cc |
| 1168 --- a/util/test.cc Tue May 29 11:50:48 2012 -0400 |
| 1169 +++ b/util/test.cc Wed Jun 20 19:00:08 2012 +0200 |
| 1170 @@ -3,7 +3,9 @@ |
| 1171 // license that can be found in the LICENSE file. |
| 1172 |
| 1173 #include <stdio.h> |
| 1174 +#ifndef WIN32 |
| 1175 #include <sys/resource.h> |
| 1176 +#endif |
| 1177 #include "util/test.h" |
| 1178 |
| 1179 DEFINE_string(test_tmpdir, "/var/tmp", "temp directory"); |
| 1180 @@ -23,9 +25,13 @@ |
| 1181 |
| 1182 namespace re2 { |
| 1183 int64 VirtualProcessSize() { |
| 1184 +#ifndef WIN32 |
| 1185 struct rusage ru; |
| 1186 getrusage(RUSAGE_SELF, &ru); |
| 1187 return (int64)ru.ru_maxrss*1024; |
| 1188 +#else |
| 1189 + return 0; |
| 1190 +#endif |
| 1191 } |
| 1192 } // namespace re2 |
| 1193 |
| 1194 diff -r c79416ca4228 util/util.h |
| 1195 --- a/util/util.h Tue May 29 11:50:48 2012 -0400 |
| 1196 +++ b/util/util.h Wed Jun 20 19:00:08 2012 +0200 |
| 1197 @@ -12,7 +12,9 @@ |
| 1198 #include <stddef.h> // For size_t |
| 1199 #include <assert.h> |
| 1200 #include <stdarg.h> |
| 1201 +#ifndef WIN32 |
| 1202 #include <sys/time.h> |
| 1203 +#endif |
| 1204 #include <time.h> |
| 1205 |
| 1206 // C++ |
| 1207 @@ -48,7 +50,11 @@ |
| 1208 #else |
| 1209 |
| 1210 #include <unordered_set> |
| 1211 +#ifdef WIN32 |
| 1212 +using std::tr1::unordered_set; |
| 1213 +#else |
| 1214 using std::unordered_set; |
| 1215 +#endif |
| 1216 |
| 1217 #endif |
| 1218 |
| 1219 diff -r c79416ca4228 util/util.vcproj |
| 1220 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
| 1221 +++ b/util/util.vcproj Wed Jun 20 19:00:08 2012 +0200 |
| 1222 @@ -0,0 +1,253 @@ |
| 1223 +<?xml version="1.0" encoding="Windows-1252"?> |
| 1224 +<VisualStudioProject |
| 1225 + ProjectType="Visual C++" |
| 1226 + Version="9.00" |
| 1227 + Name="util" |
| 1228 + ProjectGUID="{AB36233A-643A-4D2E-93B3-0602DA52C8D5}" |
| 1229 + RootNamespace="util" |
| 1230 + Keyword="Win32Proj" |
| 1231 + TargetFrameworkVersion="196613" |
| 1232 + > |
| 1233 + <Platforms> |
| 1234 + <Platform |
| 1235 + Name="Win32" |
| 1236 + /> |
| 1237 + </Platforms> |
| 1238 + <ToolFiles> |
| 1239 + </ToolFiles> |
| 1240 + <Configurations> |
| 1241 + <Configuration |
| 1242 + Name="Debug|Win32" |
| 1243 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
| 1244 + IntermediateDirectory="$(ConfigurationName)" |
| 1245 + ConfigurationType="4" |
| 1246 + CharacterSet="1" |
| 1247 + > |
| 1248 + <Tool |
| 1249 + Name="VCPreBuildEventTool" |
| 1250 + /> |
| 1251 + <Tool |
| 1252 + Name="VCCustomBuildTool" |
| 1253 + /> |
| 1254 + <Tool |
| 1255 + Name="VCXMLDataGeneratorTool" |
| 1256 + /> |
| 1257 + <Tool |
| 1258 + Name="VCWebServiceProxyGeneratorTool" |
| 1259 + /> |
| 1260 + <Tool |
| 1261 + Name="VCMIDLTool" |
| 1262 + /> |
| 1263 + <Tool |
| 1264 + Name="VCCLCompilerTool" |
| 1265 + Optimization="0" |
| 1266 + AdditionalIncludeDirectories=""$(SolutionDi
r)";..\mswin" |
| 1267 + PreprocessorDefinitions="WIN32;NOMINMAX;DEBUG;_W
INDOWS;_UNICODE;NOPCH;WIN32_LEAN_AND_MEAN;NOGDI" |
| 1268 + MinimalRebuild="true" |
| 1269 + BasicRuntimeChecks="3" |
| 1270 + RuntimeLibrary="3" |
| 1271 + UsePrecompiledHeader="0" |
| 1272 + WarningLevel="3" |
| 1273 + DebugInformationFormat="4" |
| 1274 + /> |
| 1275 + <Tool |
| 1276 + Name="VCManagedResourceCompilerTool" |
| 1277 + /> |
| 1278 + <Tool |
| 1279 + Name="VCResourceCompilerTool" |
| 1280 + /> |
| 1281 + <Tool |
| 1282 + Name="VCPreLinkEventTool" |
| 1283 + /> |
| 1284 + <Tool |
| 1285 + Name="VCLibrarianTool" |
| 1286 + /> |
| 1287 + <Tool |
| 1288 + Name="VCALinkTool" |
| 1289 + /> |
| 1290 + <Tool |
| 1291 + Name="VCXDCMakeTool" |
| 1292 + /> |
| 1293 + <Tool |
| 1294 + Name="VCBscMakeTool" |
| 1295 + /> |
| 1296 + <Tool |
| 1297 + Name="VCFxCopTool" |
| 1298 + /> |
| 1299 + <Tool |
| 1300 + Name="VCPostBuildEventTool" |
| 1301 + /> |
| 1302 + </Configuration> |
| 1303 + <Configuration |
| 1304 + Name="Release|Win32" |
| 1305 + OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
| 1306 + IntermediateDirectory="$(ConfigurationName)" |
| 1307 + ConfigurationType="4" |
| 1308 + CharacterSet="1" |
| 1309 + WholeProgramOptimization="1" |
| 1310 + > |
| 1311 + <Tool |
| 1312 + Name="VCPreBuildEventTool" |
| 1313 + /> |
| 1314 + <Tool |
| 1315 + Name="VCCustomBuildTool" |
| 1316 + /> |
| 1317 + <Tool |
| 1318 + Name="VCXMLDataGeneratorTool" |
| 1319 + /> |
| 1320 + <Tool |
| 1321 + Name="VCWebServiceProxyGeneratorTool" |
| 1322 + /> |
| 1323 + <Tool |
| 1324 + Name="VCMIDLTool" |
| 1325 + /> |
| 1326 + <Tool |
| 1327 + Name="VCCLCompilerTool" |
| 1328 + Optimization="2" |
| 1329 + EnableIntrinsicFunctions="true" |
| 1330 + AdditionalIncludeDirectories=""$(SolutionDi
r)";..\mswin" |
| 1331 + PreprocessorDefinitions="WIN32;NOMINMAX;DEBUG;_W
INDOWS;_UNICODE;NOPCH;WIN32_LEAN_AND_MEAN;NOGDI" |
| 1332 + RuntimeLibrary="2" |
| 1333 + EnableFunctionLevelLinking="true" |
| 1334 + UsePrecompiledHeader="0" |
| 1335 + WarningLevel="3" |
| 1336 + DebugInformationFormat="3" |
| 1337 + /> |
| 1338 + <Tool |
| 1339 + Name="VCManagedResourceCompilerTool" |
| 1340 + /> |
| 1341 + <Tool |
| 1342 + Name="VCResourceCompilerTool" |
| 1343 + /> |
| 1344 + <Tool |
| 1345 + Name="VCPreLinkEventTool" |
| 1346 + /> |
| 1347 + <Tool |
| 1348 + Name="VCLibrarianTool" |
| 1349 + /> |
| 1350 + <Tool |
| 1351 + Name="VCALinkTool" |
| 1352 + /> |
| 1353 + <Tool |
| 1354 + Name="VCXDCMakeTool" |
| 1355 + /> |
| 1356 + <Tool |
| 1357 + Name="VCBscMakeTool" |
| 1358 + /> |
| 1359 + <Tool |
| 1360 + Name="VCFxCopTool" |
| 1361 + /> |
| 1362 + <Tool |
| 1363 + Name="VCPostBuildEventTool" |
| 1364 + /> |
| 1365 + </Configuration> |
| 1366 + </Configurations> |
| 1367 + <References> |
| 1368 + </References> |
| 1369 + <Files> |
| 1370 + <Filter |
| 1371 + Name="Source Files" |
| 1372 + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" |
| 1373 + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
" |
| 1374 + > |
| 1375 + <File |
| 1376 + RelativePath=".\arena.cc" |
| 1377 + > |
| 1378 + </File> |
| 1379 + <File |
| 1380 + RelativePath=".\hash.cc" |
| 1381 + > |
| 1382 + </File> |
| 1383 + <File |
| 1384 + RelativePath=".\pcre.cc" |
| 1385 + > |
| 1386 + </File> |
| 1387 + <File |
| 1388 + RelativePath=".\random.cc" |
| 1389 + > |
| 1390 + </File> |
| 1391 + <File |
| 1392 + RelativePath=".\rune.cc" |
| 1393 + > |
| 1394 + </File> |
| 1395 + <File |
| 1396 + RelativePath=".\stringpiece.cc" |
| 1397 + > |
| 1398 + </File> |
| 1399 + <File |
| 1400 + RelativePath=".\stringprintf.cc" |
| 1401 + > |
| 1402 + </File> |
| 1403 + <File |
| 1404 + RelativePath=".\strutil.cc" |
| 1405 + > |
| 1406 + </File> |
| 1407 + <File |
| 1408 + RelativePath=".\valgrind.cc" |
| 1409 + > |
| 1410 + </File> |
| 1411 + </Filter> |
| 1412 + <Filter |
| 1413 + Name="Header Files" |
| 1414 + Filter="h;hpp;hxx;hm;inl;inc;xsd" |
| 1415 + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}
" |
| 1416 + > |
| 1417 + <File |
| 1418 + RelativePath=".\arena.h" |
| 1419 + > |
| 1420 + </File> |
| 1421 + <File |
| 1422 + RelativePath=".\atomicops.h" |
| 1423 + > |
| 1424 + </File> |
| 1425 + <File |
| 1426 + RelativePath=".\benchmark.h" |
| 1427 + > |
| 1428 + </File> |
| 1429 + <File |
| 1430 + RelativePath=".\flags.h" |
| 1431 + > |
| 1432 + </File> |
| 1433 + <File |
| 1434 + RelativePath=".\logging.h" |
| 1435 + > |
| 1436 + </File> |
| 1437 + <File |
| 1438 + RelativePath=".\pcre.h" |
| 1439 + > |
| 1440 + </File> |
| 1441 + <File |
| 1442 + RelativePath=".\random.h" |
| 1443 + > |
| 1444 + </File> |
| 1445 + <File |
| 1446 + RelativePath=".\sparse_array.h" |
| 1447 + > |
| 1448 + </File> |
| 1449 + <File |
| 1450 + RelativePath=".\sparse_set.h" |
| 1451 + > |
| 1452 + </File> |
| 1453 + <File |
| 1454 + RelativePath=".\utf.h" |
| 1455 + > |
| 1456 + </File> |
| 1457 + <File |
| 1458 + RelativePath=".\util.h" |
| 1459 + > |
| 1460 + </File> |
| 1461 + <File |
| 1462 + RelativePath=".\valgrind.h" |
| 1463 + > |
| 1464 + </File> |
| 1465 + </Filter> |
| 1466 + <Filter |
| 1467 + Name="Resource Files" |
| 1468 + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;
jpe;resx;tiff;tif;png;wav" |
| 1469 + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
" |
| 1470 + > |
| 1471 + </Filter> |
| 1472 + </Files> |
| 1473 + <Globals> |
| 1474 + </Globals> |
| 1475 +</VisualStudioProject> |
| 1476 diff -r c79416ca4228 util/valgrind.h |
| 1477 --- a/util/valgrind.h Tue May 29 11:50:48 2012 -0400 |
| 1478 +++ b/util/valgrind.h Wed Jun 20 19:00:08 2012 +0200 |
| 1479 @@ -4063,7 +4063,7 @@ |
| 1480 |
| 1481 #endif /* PLAT_ppc64_aix5 */ |
| 1482 |
| 1483 - |
| 1484 +#ifndef WIN32 |
| 1485 /* ------------------------------------------------------------------ */ |
| 1486 /* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS. */ |
| 1487 /* */ |
| 1488 @@ -4170,7 +4170,7 @@ |
| 1489 VG_USERREQ__DISCARD_TRANSLATIONS, \ |
| 1490 _qzz_addr, _qzz_len, 0, 0, 0); \ |
| 1491 } |
| 1492 - |
| 1493 +#endif |
| 1494 |
| 1495 /* These requests are for getting Valgrind itself to print something. |
| 1496 Possibly with a backtrace. This is a really ugly hack. The return value |
OLD | NEW |