0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.0910: Vim is not reproducibly buildable

Problem:    Vim is not reproducibly buildable.
Solution:   Use the $SOURCE_DATE_EPOCH environment variable in configure.
            (James McCoy, closes #513)  Give a warning about using it.
This commit is contained in:
Bram Moolenaar
2020-06-05 23:16:29 +02:00
parent 002bc79991
commit 8f1dde5021
6 changed files with 44 additions and 0 deletions

View File

@@ -44,9 +44,13 @@ init_longVersion(void)
* VAX C can't concatenate strings in the preprocessor.
*/
strcpy(longVersion, VIM_VERSION_LONG_DATE);
#ifdef BUILD_DATE
strcat(longVersion, BUILD_DATE);
#else
strcat(longVersion, __DATE__);
strcat(longVersion, " ");
strcat(longVersion, __TIME__);
#endif
strcat(longVersion, ")");
}
@@ -56,7 +60,15 @@ init_longVersion(void)
{
if (longVersion == NULL)
{
#ifdef BUILD_DATE
char *date_time = BUILD_DATE;
#else
#ifdef BUILD_DATE
char *date_time = BUILD_DATE;
#else
char *date_time = __DATE__ " " __TIME__;
#endif
#endif
char *msg = _("%s (%s, compiled %s)");
size_t len = strlen(msg)
+ strlen(VIM_VERSION_LONG_ONLY)