Mercurial > vim
comparison src/version.c @ 20713:5ddd4df27068 v8.2.0910
patch 8.2.0910: Vim is not reproducibly buildable
Commit: https://github.com/vim/vim/commit/8f1dde5021d9623a951d1ccbc78cf1b1a55ccd7a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 5 23:16:29 2020 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 05 Jun 2020 23:30:04 +0200 |
parents | d91b8d1e5198 |
children | 587df3e9fa5f |
comparison
equal
deleted
inserted
replaced
20712:f65c7bc846b2 | 20713:5ddd4df27068 |
---|---|
42 /* | 42 /* |
43 * Construct the long version string. Necessary because | 43 * Construct the long version string. Necessary because |
44 * VAX C can't concatenate strings in the preprocessor. | 44 * VAX C can't concatenate strings in the preprocessor. |
45 */ | 45 */ |
46 strcpy(longVersion, VIM_VERSION_LONG_DATE); | 46 strcpy(longVersion, VIM_VERSION_LONG_DATE); |
47 #ifdef BUILD_DATE | |
48 strcat(longVersion, BUILD_DATE); | |
49 #else | |
47 strcat(longVersion, __DATE__); | 50 strcat(longVersion, __DATE__); |
48 strcat(longVersion, " "); | 51 strcat(longVersion, " "); |
49 strcat(longVersion, __TIME__); | 52 strcat(longVersion, __TIME__); |
53 #endif | |
50 strcat(longVersion, ")"); | 54 strcat(longVersion, ")"); |
51 } | 55 } |
52 | 56 |
53 # else | 57 # else |
54 void | 58 void |
55 init_longVersion(void) | 59 init_longVersion(void) |
56 { | 60 { |
57 if (longVersion == NULL) | 61 if (longVersion == NULL) |
58 { | 62 { |
63 #ifdef BUILD_DATE | |
64 char *date_time = BUILD_DATE; | |
65 #else | |
66 #ifdef BUILD_DATE | |
67 char *date_time = BUILD_DATE; | |
68 #else | |
59 char *date_time = __DATE__ " " __TIME__; | 69 char *date_time = __DATE__ " " __TIME__; |
70 #endif | |
71 #endif | |
60 char *msg = _("%s (%s, compiled %s)"); | 72 char *msg = _("%s (%s, compiled %s)"); |
61 size_t len = strlen(msg) | 73 size_t len = strlen(msg) |
62 + strlen(VIM_VERSION_LONG_ONLY) | 74 + strlen(VIM_VERSION_LONG_ONLY) |
63 + strlen(VIM_VERSION_DATE_ONLY) | 75 + strlen(VIM_VERSION_DATE_ONLY) |
64 + strlen(date_time); | 76 + strlen(date_time); |