aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitcoin-qt.pro3
-rw-r--r--contrib/gitian-descriptors/gitian-win32.yml4
-rw-r--r--contrib/gitian-descriptors/qt-win32.yml4
-rw-r--r--doc/release-notes.txt5
-rw-r--r--doc/release-process.txt2
-rw-r--r--src/clientversion.h19
-rw-r--r--src/net.cpp10
-rw-r--r--src/qt/res/bitcoin-qt.rc16
-rw-r--r--src/test/rpc_tests.cpp2
-rw-r--r--src/version.cpp6
-rw-r--r--src/version.h9
11 files changed, 54 insertions, 26 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
index 1d2b1dbdc3..cdd3bc2b81 100644
--- a/bitcoin-qt.pro
+++ b/bitcoin-qt.pro
@@ -178,7 +178,8 @@ HEADERS += src/qt/bitcoingui.h \
src/ui_interface.h \
src/qt/rpcconsole.h \
src/version.h \
- src/netbase.h
+ src/netbase.h \
+ src/clientversion.h
SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/qt/transactiontablemodel.cpp \
diff --git a/contrib/gitian-descriptors/gitian-win32.yml b/contrib/gitian-descriptors/gitian-win32.yml
index 89c22da942..7948bbe45d 100644
--- a/contrib/gitian-descriptors/gitian-win32.yml
+++ b/contrib/gitian-descriptors/gitian-win32.yml
@@ -15,14 +15,14 @@ remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
"dir": "bitcoin"
files:
-- "qt-win32-4.7.4-gitian.zip"
+- "qt-win32-4.7.4-gitian-r1.zip"
- "boost-win32-1.50.0-gitian2.zip"
- "bitcoin-deps-0.0.4.zip"
script: |
#
mkdir $HOME/qt
cd $HOME/qt
- unzip ../build/qt-win32-4.7.4-gitian.zip
+ unzip ../build/qt-win32-4.7.4-gitian-r1.zip
cd $HOME/build/
export PATH=$PATH:$HOME/qt/bin/
#
diff --git a/contrib/gitian-descriptors/qt-win32.yml b/contrib/gitian-descriptors/qt-win32.yml
index 6eb76b2170..fa3a84b321 100644
--- a/contrib/gitian-descriptors/qt-win32.yml
+++ b/contrib/gitian-descriptors/qt-win32.yml
@@ -40,7 +40,7 @@ script: |
#export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
- ./configure -prefix $INSTDIR -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -opengl no -nomake examples -nomake demos -nomake docs
+ ./configure -prefix $INSTDIR -confirm-license -release -opensource -static -no-qt3support -xplatform unsupported/win32-g++-cross -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs -no-feature-style-plastique -no-feature-style-cleanlooks -no-feature-style-motif -no-feature-style-cde -no-feature-style-windowsce -no-feature-style-windowsmobile -no-feature-style-s60
find . -name *.prl | xargs -l sed 's|/\.||' -i
find . -name *.prl | xargs -l sed 's|/$||' -i
make $MAKEOPTS install
@@ -51,4 +51,4 @@ script: |
# as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
- zip -r $OUTDIR/qt-win32-4.7.4-gitian.zip *
+ zip -r $OUTDIR/qt-win32-4.7.4-gitian-r1.zip *
diff --git a/doc/release-notes.txt b/doc/release-notes.txt
index 1fe385bd9e..c2fdc425fd 100644
--- a/doc/release-notes.txt
+++ b/doc/release-notes.txt
@@ -43,6 +43,7 @@ Core bitcoin handling and blockchain database
* -loadblock=FILE will import an external block file
* Additional DoS (denial-of-service) prevention measures
* New blockchain checkpoint at block 193,000
+* (Windows only): enable ASLR and DEP for bitcoind.exe
JSON-RPC API
@@ -101,7 +102,7 @@ Qt GUI
* Override progress bar design on platforms with segmented progress bars to assist with readability
* Added 'immature balance' display on the overview page
* (Windows only): enable ASLR and DEP for bitcoin-qt.exe
-* (Windows only): add meta-data to bitcoin-qt.exe (e.g. description)
+* (Windows only): add meta-data to bitcoin-qt.exe (e.g. description and version)
Internal codebase
-----------------
@@ -113,4 +114,4 @@ Miscellaneous
-------------
* Reopen debug.log upon SIGHUP
* Bash programmable completion for bitcoind(1)
-* On supported OS's, each thread is given a useful name
+* On supported OSes, each thread is given a useful name
diff --git a/doc/release-process.txt b/doc/release-process.txt
index b31b0ab541..8443961d27 100644
--- a/doc/release-process.txt
+++ b/doc/release-process.txt
@@ -2,7 +2,7 @@
* update (commit) version in sources
bitcoin-qt.pro
- src/version.h
+ src/clientversion.h
share/setup.nsi
doc/README*
diff --git a/src/clientversion.h b/src/clientversion.h
new file mode 100644
index 0000000000..844eaa37bb
--- /dev/null
+++ b/src/clientversion.h
@@ -0,0 +1,19 @@
+#ifndef CLIENTVERSION_H
+#define CLIENTVERSION_H
+
+//
+// client versioning
+//
+
+// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
+#define CLIENT_VERSION_MAJOR 0
+#define CLIENT_VERSION_MINOR 7
+#define CLIENT_VERSION_REVISION 0
+#define CLIENT_VERSION_BUILD 2
+
+// Converts the parameter X to a string after macro replacement on X has been performed.
+// Don't merge these into one macro!
+#define STRINGIZE(X) DO_STRINGIZE(X)
+#define DO_STRINGIZE(X) #X
+
+#endif // CLIENTVERSION_H
diff --git a/src/net.cpp b/src/net.cpp
index 11bade6bbd..c0693306af 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -752,10 +752,12 @@ void ThreadSocketHandler2(void* parg)
FD_ZERO(&fdsetSend);
FD_ZERO(&fdsetError);
SOCKET hSocketMax = 0;
+ bool have_fds = false;
BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) {
FD_SET(hListenSocket, &fdsetRecv);
hSocketMax = max(hSocketMax, hListenSocket);
+ have_fds = true;
}
{
LOCK(cs_vNodes);
@@ -766,6 +768,7 @@ void ThreadSocketHandler2(void* parg)
FD_SET(pnode->hSocket, &fdsetRecv);
FD_SET(pnode->hSocket, &fdsetError);
hSocketMax = max(hSocketMax, pnode->hSocket);
+ have_fds = true;
{
TRY_LOCK(pnode->cs_vSend, lockSend);
if (lockSend && !pnode->vSend.empty())
@@ -775,15 +778,16 @@ void ThreadSocketHandler2(void* parg)
}
vnThreadsRunning[THREAD_SOCKETHANDLER]--;
- int nSelect = select(hSocketMax + 1, &fdsetRecv, &fdsetSend, &fdsetError, &timeout);
+ int nSelect = select(have_fds ? hSocketMax + 1 : 0,
+ &fdsetRecv, &fdsetSend, &fdsetError, &timeout);
vnThreadsRunning[THREAD_SOCKETHANDLER]++;
if (fShutdown)
return;
if (nSelect == SOCKET_ERROR)
{
- int nErr = WSAGetLastError();
- if (hSocketMax != INVALID_SOCKET)
+ if (have_fds)
{
+ int nErr = WSAGetLastError();
printf("socket select error %d\n", nErr);
for (unsigned int i = 0; i <= hSocketMax; i++)
FD_SET(i, &fdsetRecv);
diff --git a/src/qt/res/bitcoin-qt.rc b/src/qt/res/bitcoin-qt.rc
index bce87d782b..834001c0c6 100644
--- a/src/qt/res/bitcoin-qt.rc
+++ b/src/qt/res/bitcoin-qt.rc
@@ -1,10 +1,18 @@
IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico"
-#include <windows.h> // needed for VERSIONINFO
+#include <windows.h> // needed for VERSIONINFO
+#include "../../clientversion.h" // holds the needed client version information
+
+#define VER_PRODUCTVERSION CLIENT_VERSION_MAJOR,CLIENT_VERSION_MINOR,CLIENT_VERSION_REVISION,CLIENT_VERSION_BUILD
+#define VER_PRODUCTVERSION_STR STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD)
+#define VER_FILEVERSION VER_PRODUCTVERSION
+#define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR
VS_VERSION_INFO VERSIONINFO
-FILEOS VOS_NT_WINDOWS32
-FILETYPE VFT_APP
+FILEVERSION VER_FILEVERSION
+PRODUCTVERSION VER_PRODUCTVERSION
+FILEOS VOS_NT_WINDOWS32
+FILETYPE VFT_APP
BEGIN
BLOCK "StringFileInfo"
BEGIN
@@ -12,11 +20,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Bitcoin"
VALUE "FileDescription", "Bitcoin-Qt (OSS GUI client for Bitcoin)"
+ VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-qt"
VALUE "LegalCopyright", "2009-2012 The Bitcoin developers"
VALUE "LegalTrademarks1", "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoin-qt.exe"
VALUE "ProductName", "Bitcoin-Qt"
+ VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index e6c00e39d8..eb820ade6d 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -17,7 +17,7 @@ createArgs(int nRequired, const char* address1=NULL, const char* address2=NULL)
result.push_back(nRequired);
Array addresses;
if (address1) addresses.push_back(address1);
- if (address2) addresses.push_back(address1);
+ if (address2) addresses.push_back(address2);
result.push_back(addresses);
return result;
}
diff --git a/src/version.cpp b/src/version.cpp
index 60b7aae2e5..8af406feab 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -39,13 +39,11 @@ const std::string CLIENT_NAME("Satoshi");
# define GIT_COMMIT_DATE "$Format:%cD"
#endif
-#define STRINGIFY(s) #s
-
#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
- "v" STRINGIFY(maj) "." STRINGIFY(min) "." STRINGIFY(rev) "." STRINGIFY(build) "-g" commit
+ "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit
#define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \
- "v" STRINGIFY(maj) "." STRINGIFY(min) "." STRINGIFY(rev) "." STRINGIFY(build) "-unk"
+ "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk"
#ifndef BUILD_DESC
# ifdef GIT_COMMIT_ID
diff --git a/src/version.h b/src/version.h
index f731c4570a..b66d056928 100644
--- a/src/version.h
+++ b/src/version.h
@@ -4,21 +4,16 @@
#ifndef BITCOIN_VERSION_H
#define BITCOIN_VERSION_H
+#include "clientversion.h"
#include <string>
//
// client versioning
//
-// These need to be macros, as version.cpp's voodoo requires it
-#define CLIENT_VERSION_MAJOR 0
-#define CLIENT_VERSION_MINOR 7
-#define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 2
-
static const int CLIENT_VERSION =
1000000 * CLIENT_VERSION_MAJOR
- + 10000 * CLIENT_VERSION_MINOR
+ + 10000 * CLIENT_VERSION_MINOR
+ 100 * CLIENT_VERSION_REVISION
+ 1 * CLIENT_VERSION_BUILD;