wine-staging/patches/Staging/0003-loader-Add-commandline-option-patches-to-show-the-pa.patch
Zebediah Figura 307f8a782d Staging: Get rid of the wine_get_patches() ntdll export.
Nobody should ever programmatically care about this.
2020-05-18 19:31:47 -05:00

118 lines
3.5 KiB
Diff

From 599c50c9e339fe04e96fdb665b3d7ccb1a7708b7 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.
---
include/wine/library.h | 1 +
libs/wine/config.c | 6 ++++++
libs/wine/wine.map | 1 +
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
4 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/include/wine/library.h b/include/wine/library.h
index 090b8349559..b8a4a2df576 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -42,6 +42,7 @@ extern "C" {
/* configuration */
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 f5b4c0de9af..e52739d55ad 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -515,6 +515,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 1143b129734..55f874d3e74 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -13,6 +13,7 @@ WINE_1.0
wine_exec_wine_binary;
wine_get_build_id;
wine_get_version;
+ wine_get_patches;
wine_init;
wine_init_argv0_path;
wine_mmap_add_reserved_area;
diff --git a/loader/main.c b/loader/main.c
index 0e6b6f66b50..24bcfff8c4c 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -55,7 +55,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)
{
@@ -72,6 +73,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.26.2