From 4e389127b56054f69ca2033ed2c7b45343b7ab77 Mon Sep 17 00:00:00 2001 From: Scott Determan Date: Tue, 13 Jan 2015 12:10:55 -0500 Subject: [PATCH] Use microsecond granularity for sqlite lock backoff algorithm: When sql tries to acquire a lock that is already held, it sleeps for some microseconds using the usleep function and then try to acquire the lock again. However, if the HAVE_USLEEP macro is not defined then the sleep function will be used. This fix will define HAVE_USLEEP even when it is not already defined by the system. Although some Linux distros may not define HAVE_USLEEP, all supported versions provide usleep. If the system does not actually have a usleep function, then the compiler will flag the error. --- Builds/VisualStudio2013/RippleD.vcxproj | 6 +++--- SConstruct | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 Builds/VisualStudio2013/RippleD.vcxproj diff --git a/Builds/VisualStudio2013/RippleD.vcxproj b/Builds/VisualStudio2013/RippleD.vcxproj old mode 100644 new mode 100755 index a08b521585..8031d9adef --- a/Builds/VisualStudio2013/RippleD.vcxproj +++ b/Builds/VisualStudio2013/RippleD.vcxproj @@ -1,4 +1,4 @@ - + {26B7D9AC-1A80-8EF8-6703-D061F1BECB75} @@ -50,7 +50,7 @@ - _WIN32_WINNT=0x6000;DEBUG;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + HAVE_USLEEP=1;_WIN32_WINNT=0x6000;DEBUG;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_DEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ..\..\build\proto;..\..\src;..\..\src\beast;..\..\src\protobuf\src;..\..\src\protobuf\vsprojects;%(AdditionalIncludeDirectories) 4800;4244;4267;4018 Async @@ -87,7 +87,7 @@ - _WIN32_WINNT=0x6000;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;NDEBUG;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + HAVE_USLEEP=1;_WIN32_WINNT=0x6000;DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;NDEBUG;OPENSSL_NO_SSL2;WIN32_CONSOLE;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) ..\..\build\proto;..\..\src;..\..\src\beast;..\..\src\protobuf\src;..\..\src\protobuf\vsprojects;%(AdditionalIncludeDirectories) 4800;4244;4267;4018 Async diff --git a/SConstruct b/SConstruct index fdbb7714c3..48a7c5d068 100644 --- a/SConstruct +++ b/SConstruct @@ -212,6 +212,7 @@ def config_base(env): env.Append(CPPDEFINES=[ 'OPENSSL_NO_SSL2' ,'DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER' + ,{'HAVE_USLEEP' : '1'} ]) try: