Skip to content
Snippets Groups Projects
Commit 563ef824 authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard
Browse files

widl: Use hardcoded build time in TLB custom data.

This makes builds reproducible, and matches the current MIDL behavior
(except that MIDL's string representation will vary with the build machine
timezone).
parent 538ef6a5
No related branches found
No related tags found
No related merge requests found
......@@ -2757,7 +2757,6 @@ int create_msft_typelib(typelib_t *typelib)
const statement_t *stmt;
const attr_t *attr;
time_t cur_time;
char *time_override;
unsigned int version = 7 << 24 | 555; /* 7.00.0555 */
static const struct uuid midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}};
static const struct uuid midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}};
......@@ -2813,11 +2812,13 @@ int create_msft_typelib(typelib_t *typelib)
}
}
/* midl adds two sets of custom data to the library: the current unix time
and midl's version number */
time_override = getenv( "WIDL_TIME_OVERRIDE");
cur_time = time_override ? atol( time_override) : time(NULL);
sprintf(info_string, "Created by WIDL version %s at %s", PACKAGE_VERSION, ctime(&cur_time));
/* midl adds three sets of custom data to the library:
* - 2147483647 (INT_MAX, previously the current Unix time)
* - midl's version number
* - a string representation of those
*/
cur_time = 2147483647;
sprintf(info_string, "Created by WIDL version %s at %s", PACKAGE_VERSION, asctime(gmtime(&cur_time)));
set_custdata(msft, &midl_info_guid, VT_BSTR, info_string, &msft->typelib_header.CustomDataOffset);
set_custdata(msft, &midl_time_guid, VT_UI4, &cur_time, &msft->typelib_header.CustomDataOffset);
set_custdata(msft, &midl_version_guid, VT_UI4, &version, &msft->typelib_header.CustomDataOffset);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment