[Cmake-commits] CMake branch, next, updated. v3.5.0-rc3-218-ga70c292
Brad King
brad.king at kitware.com
Fri Feb 19 09:45:22 EST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via a70c2929815916a7c9d3600733ef37a7be3e0aad (commit)
via f23f18ab686faa0ce91486143469bb58753b0843 (commit)
via b13a74b35b17ecb44ec6ff552ecb1cbdac204361 (commit)
from b377afb9e39fd27b25d271847798971463cdd0e4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a70c2929815916a7c9d3600733ef37a7be3e0aad
commit a70c2929815916a7c9d3600733ef37a7be3e0aad
Merge: b377afb f23f18a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 19 09:45:21 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 19 09:45:21 2016 -0500
Merge topic 'reduce-entropy-consumption' into next
f23f18ab cmSystemTools: Avoid excess entropy consumption by RandomSeed (#15976)
b13a74b3 cmSystemTools: Remove unused include <fcntl.h>
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f23f18ab686faa0ce91486143469bb58753b0843
commit f23f18ab686faa0ce91486143469bb58753b0843
Author: Cristian Rodríguez <crrodriguez at opensuse.org>
AuthorDate: Wed Feb 17 09:02:04 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 19 09:44:59 2016 -0500
cmSystemTools: Avoid excess entropy consumption by RandomSeed (#15976)
Read `/dev/urandom` without buffering to avoid taking more than we need.
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index c9670fa..9af54bf 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2183,8 +2183,10 @@ unsigned int cmSystemTools::RandomSeed()
} seed;
// Try using a real random source.
- cmsys::ifstream fin("/dev/urandom");
- if(fin && fin.read(seed.bytes, sizeof(seed)) &&
+ cmsys::ifstream fin;
+ fin.rdbuf()->pubsetbuf(0, 0); // Unbuffered read.
+ fin.open("/dev/urandom");
+ if(fin.good() && fin.read(seed.bytes, sizeof(seed)) &&
fin.gcount() == sizeof(seed))
{
return seed.integer;
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b13a74b35b17ecb44ec6ff552ecb1cbdac204361
commit b13a74b35b17ecb44ec6ff552ecb1cbdac204361
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Feb 18 09:57:35 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 19 09:44:59 2016 -0500
cmSystemTools: Remove unused include <fcntl.h>
We do not seem to need this header anymore, and including it on AIX
causes `#define open open64` which breaks `std::ifstream::open` calls.
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 3ba7287..c9670fa 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -60,8 +60,7 @@
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
-# include <fcntl.h>
-# include "cmCryptoHash.h"
+# include "cmCryptoHash.h"
#endif
#if defined(CMAKE_USE_ELF_PARSER)
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list