Commit 563ef824 authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

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
...@@ -2757,7 +2757,6 @@ int create_msft_typelib(typelib_t *typelib) ...@@ -2757,7 +2757,6 @@ int create_msft_typelib(typelib_t *typelib)
const statement_t *stmt; const statement_t *stmt;
const attr_t *attr; const attr_t *attr;
time_t cur_time; time_t cur_time;
char *time_override;
unsigned int version = 7 << 24 | 555; /* 7.00.0555 */ 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_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}}; 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) ...@@ -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 /* midl adds three sets of custom data to the library:
and midl's version number */ * - 2147483647 (INT_MAX, previously the current Unix time)
time_override = getenv( "WIDL_TIME_OVERRIDE"); * - midl's version number
cur_time = time_override ? atol( time_override) : time(NULL); * - a string representation of those
sprintf(info_string, "Created by WIDL version %s at %s", PACKAGE_VERSION, ctime(&cur_time)); */
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_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_time_guid, VT_UI4, &cur_time, &msft->typelib_header.CustomDataOffset);
set_custdata(msft, &midl_version_guid, VT_UI4, &version, &msft->typelib_header.CustomDataOffset); set_custdata(msft, &midl_version_guid, VT_UI4, &version, &msft->typelib_header.CustomDataOffset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment