From 1c93d143cf3b03985be4786dc16c97f3d883bec6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 21 Nov 2015 10:54:41 +0100 Subject: [PATCH] EbmlVersion.cpp: always set EbmlCodeDate to "Unknown" This is done in order to enable deterministic builds while still keeping the library API and ABI compatible. Patch by Ed Schouten . --- ChangeLog | 6 ++++++ ebml/EbmlConfig.h | 5 ----- src/EbmlVersion.cpp | 6 +++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index f406373..e5665a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-11-21 Moritz Bunkus + + * EbmlVersion.cpp: in order to enable deterministic builds the + EbmlCodeDate variable has been set to "Unknown" instead of the + date and time of compilation. Patch by Ed Schouten . + 2015-11-18 Moritz Bunkus * libebml_t.h: use C99-style integer typedefs instead of BSD-style diff --git a/ebml/EbmlConfig.h b/ebml/EbmlConfig.h index 9c96f33..5bb679f 100644 --- a/ebml/EbmlConfig.h +++ b/ebml/EbmlConfig.h @@ -111,11 +111,6 @@ # endif #endif -// For compilers that don't define __TIMESTAMP__ (e.g. gcc 2.95, gcc 3.2) -#ifndef __TIMESTAMP__ -#define __TIMESTAMP__ __DATE__ " " __TIME__ -#endif - #ifdef __GNUC__ #define EBML_PRETTYLONGINT(c) (c ## ll) #else // __GNUC__ diff --git a/src/EbmlVersion.cpp b/src/EbmlVersion.cpp index 375b702..62140b7 100644 --- a/src/EbmlVersion.cpp +++ b/src/EbmlVersion.cpp @@ -39,6 +39,10 @@ START_LIBEBML_NAMESPACE const std::string EbmlCodeVersion = "1.3.3"; -const std::string EbmlCodeDate = __TIMESTAMP__; + +// Up to version 1.3.3 this library exported a build date string. As +// this made the build non-reproducible, replace it by a placeholder to +// remain API compatible. +const std::string EbmlCodeDate = "Unknown"; END_LIBEBML_NAMESPACE