mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added patch for forward/backward compatibility of previous format of high precision registry timestamps.
This commit is contained in:
parent
b1ede54d23
commit
ab06aee23d
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -16,6 +16,8 @@ wine-staging (1.7.50) UNRELEASED; urgency=low
|
||||
(fixes Wine Staging Bug #363).
|
||||
* Added patch fix detection of case-insensitive systems in MSYS2.
|
||||
* Added patch to fix implementation of krnl386.exe16.GetTempDrive.
|
||||
* Added patch for forward/backward compatibility of previous format of high
|
||||
precision registry timestamps.
|
||||
* Removed patch to move security cookie initialization from memory management
|
||||
to loader (accepted upstream).
|
||||
* Removed patches for stub of D3DCompileFromFile and D3DCompile2 (accepted
|
||||
|
@ -220,6 +220,7 @@ patch_enable_all ()
|
||||
enable_server_RootDirectory_File="$1"
|
||||
enable_server_Shared_Memory="$1"
|
||||
enable_server_Stored_ACLs="$1"
|
||||
enable_server_Timestamp_Compat="$1"
|
||||
enable_setupapi_SetupDiSelectBestCompatDrv="$1"
|
||||
enable_setupapi_SetupDiSetDeviceInstallParamsW="$1"
|
||||
enable_setupapi_SetupPromptForDisk="$1"
|
||||
@ -748,6 +749,9 @@ patch_enable ()
|
||||
server-Stored_ACLs)
|
||||
enable_server_Stored_ACLs="$2"
|
||||
;;
|
||||
server-Timestamp_Compat)
|
||||
enable_server_Timestamp_Compat="$2"
|
||||
;;
|
||||
setupapi-SetupDiSelectBestCompatDrv)
|
||||
enable_setupapi_SetupDiSelectBestCompatDrv="$2"
|
||||
;;
|
||||
@ -4603,6 +4607,18 @@ if test "$enable_server_Shared_Memory" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset server-Timestamp_Compat
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * server/registry.c
|
||||
# |
|
||||
if test "$enable_server_Timestamp_Compat" -eq 1; then
|
||||
patch_apply server-Timestamp_Compat/0001-server-Compatibility-with-Wine-Staging-format-for-hi.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "server: Compatibility with Wine Staging format for high precision registry timestamps.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset setupapi-SetupDiSelectBestCompatDrv
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,57 @@
|
||||
From 36fb61bb93cb04d4548130f49116577abb21693e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 28 Jul 2015 17:46:13 +0200
|
||||
Subject: server: Compatibility with Wine Staging format for high precision
|
||||
registry timestamps.
|
||||
|
||||
The corresponding bug was fixed upstream in commit
|
||||
http://source.winehq.org/git/wine.git/commit/1baf01fc2475c508b6464bc735483a7e25c915f6
|
||||
This patch should ensure forward/backward compatibility when upgrading Wine.
|
||||
---
|
||||
server/registry.c | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index 7f7a7b1..891b4e3 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -264,7 +264,8 @@ static void save_subkeys( const struct key *key, const struct key *base, FILE *f
|
||||
{
|
||||
fprintf( f, "\n[" );
|
||||
if (key != base) dump_path( key, base, f );
|
||||
- fprintf( f, "] %u\n", (unsigned int)((key->modif - ticks_1601_to_1970) / TICKS_PER_SEC) );
|
||||
+ fprintf( f, "] %u %u\n", (unsigned int)((key->modif - ticks_1601_to_1970) / TICKS_PER_SEC),
|
||||
+ (unsigned int)((key->modif - ticks_1601_to_1970) % TICKS_PER_SEC) );
|
||||
fprintf( f, "#time=%x%08x\n", (unsigned int)(key->modif >> 32), (unsigned int)key->modif );
|
||||
if (key->class)
|
||||
{
|
||||
@@ -1347,8 +1348,8 @@ static struct key *load_key( struct key *base, const char *buffer, int prefix_le
|
||||
{
|
||||
WCHAR *p;
|
||||
struct unicode_str name;
|
||||
- int res;
|
||||
- unsigned int mod;
|
||||
+ int res, num_items;
|
||||
+ unsigned int mod, mod_ticks;
|
||||
data_size_t len;
|
||||
|
||||
if (!get_file_tmp_space( info, strlen(buffer) * sizeof(WCHAR) )) return NULL;
|
||||
@@ -1359,10 +1360,11 @@ static struct key *load_key( struct key *base, const char *buffer, int prefix_le
|
||||
file_read_error( "Malformed key", info );
|
||||
return NULL;
|
||||
}
|
||||
- if (sscanf( buffer + res, " %u", &mod ) == 1)
|
||||
- *modif = (timeout_t)mod * TICKS_PER_SEC + ticks_1601_to_1970;
|
||||
- else
|
||||
- *modif = current_time;
|
||||
+
|
||||
+ *modif = current_time;
|
||||
+ num_items = sscanf( buffer + res, " %u %u", &mod, &mod_ticks );
|
||||
+ if (num_items >= 1) *modif = (timeout_t)mod * TICKS_PER_SEC + ticks_1601_to_1970;
|
||||
+ if (num_items >= 2) *modif += mod_ticks;
|
||||
|
||||
p = info->tmp;
|
||||
while (prefix_len && *p) { if (*p++ == '\\') prefix_len--; }
|
||||
--
|
||||
2.5.0
|
||||
|
Loading…
Reference in New Issue
Block a user