mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
151 lines
4.6 KiB
Diff
151 lines
4.6 KiB
Diff
From d216f85a593a09e7983d9178fb3e1f20bfcf08cc Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Lackner <sebastian@fds-team.de>
|
|
Date: Thu, 29 May 2014 23:43:45 +0200
|
|
Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
|
list.
|
|
|
|
---
|
|
dlls/ntdll/misc.c | 8 ++++++++
|
|
dlls/ntdll/ntdll.spec | 1 +
|
|
include/wine/library.h | 1 +
|
|
libs/wine/config.c | 6 ++++++
|
|
libs/wine/wine.map | 1 +
|
|
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
|
|
6 files changed, 58 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
|
index c29a1c26c..8906e1942 100644
|
|
--- a/dlls/ntdll/misc.c
|
|
+++ b/dlls/ntdll/misc.c
|
|
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
|
return wine_get_version();
|
|
}
|
|
|
|
+/*********************************************************************
|
|
+ * wine_get_patches (NTDLL.@)
|
|
+ */
|
|
+const void * CDECL NTDLL_wine_get_patches(void)
|
|
+{
|
|
+ return wine_get_patches();
|
|
+}
|
|
+
|
|
/*********************************************************************
|
|
* wine_get_build_id (NTDLL.@)
|
|
*/
|
|
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
|
index 7aa953ca6..cf7d5b6f9 100644
|
|
--- a/dlls/ntdll/ntdll.spec
|
|
+++ b/dlls/ntdll/ntdll.spec
|
|
@@ -1566,6 +1566,7 @@
|
|
|
|
# Version
|
|
@ cdecl wine_get_version() NTDLL_wine_get_version
|
|
+@ cdecl wine_get_patches() NTDLL_wine_get_patches
|
|
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
|
|
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
|
|
|
|
diff --git a/include/wine/library.h b/include/wine/library.h
|
|
index a6fe28059..511bf4722 100644
|
|
--- a/include/wine/library.h
|
|
+++ b/include/wine/library.h
|
|
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
|
|
extern const char *wine_get_server_dir(void);
|
|
extern const char *wine_get_user_name(void);
|
|
extern const char *wine_get_version(void);
|
|
+extern const void *wine_get_patches(void);
|
|
extern const char *wine_get_build_id(void);
|
|
extern void wine_init_argv0_path( const char *argv0 );
|
|
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
|
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
|
index 2a3314cbf..5b66c063d 100644
|
|
--- a/libs/wine/config.c
|
|
+++ b/libs/wine/config.c
|
|
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
|
|
return PACKAGE_VERSION;
|
|
}
|
|
|
|
+/* return the applied non-standard patches */
|
|
+const void *wine_get_patches(void)
|
|
+{
|
|
+ return NULL;
|
|
+}
|
|
+
|
|
/* return the build id string */
|
|
const char *wine_get_build_id(void)
|
|
{
|
|
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
|
index 3f2c430fa..ca46979f5 100644
|
|
--- a/libs/wine/wine.map
|
|
+++ b/libs/wine/wine.map
|
|
@@ -28,6 +28,7 @@ WINE_1.0
|
|
wine_get_ss;
|
|
wine_get_user_name;
|
|
wine_get_version;
|
|
+ wine_get_patches;
|
|
wine_init;
|
|
wine_init_argv0_path;
|
|
wine_ldt_alloc_entries;
|
|
diff --git a/loader/main.c b/loader/main.c
|
|
index f197cf802..f6629128d 100644
|
|
--- a/loader/main.c
|
|
+++ b/loader/main.c
|
|
@@ -54,7 +54,8 @@ static void check_command_line( int argc, char *argv[] )
|
|
static const char usage[] =
|
|
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
|
" wine --help Display this help and exit\n"
|
|
- " wine --version Output version information and exit";
|
|
+ " wine --version Output version information and exit\n"
|
|
+ " wine --patches Output patch information and exit";
|
|
|
|
if (argc <= 1)
|
|
{
|
|
@@ -71,6 +72,45 @@ static void check_command_line( int argc, char *argv[] )
|
|
printf( "%s\n", wine_get_build_id() );
|
|
exit(0);
|
|
}
|
|
+ if (!strcmp( argv[1], "--patches" ))
|
|
+ {
|
|
+ const struct
|
|
+ {
|
|
+ const char *author;
|
|
+ const char *subject;
|
|
+ int revision;
|
|
+ }
|
|
+ *next, *cur = wine_get_patches();
|
|
+
|
|
+ if (!cur)
|
|
+ {
|
|
+ fprintf( stderr, "Patchlist not available.\n" );
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
+ while (cur->author)
|
|
+ {
|
|
+ next = cur + 1;
|
|
+ while (next->author)
|
|
+ {
|
|
+ if (strcmp( cur->author, next->author )) break;
|
|
+ next++;
|
|
+ }
|
|
+
|
|
+ printf( "%s (%d):\n", cur->author, (int)(next - cur) );
|
|
+ while (cur < next)
|
|
+ {
|
|
+ printf( " %s", cur->subject );
|
|
+ if (cur->revision != 1)
|
|
+ printf( " [rev %d]", cur->revision );
|
|
+ printf( "\n" );
|
|
+ cur++;
|
|
+ }
|
|
+ printf( "\n" );
|
|
+ }
|
|
+
|
|
+ exit(0);
|
|
+ }
|
|
}
|
|
|
|
|
|
--
|
|
2.25.0
|
|
|