Alexandre Julliard : libwine: Make the remaining configuration functions obsolete.

Alexandre Julliard julliard at winehq.org
Tue Sep 8 15:36:15 CDT 2020


Module: wine
Branch: master
Commit: 595f2846b2064a6ebeb0b02133e2d68851fb1c06
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=595f2846b2064a6ebeb0b02133e2d68851fb1c06

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Sep  8 10:10:48 2020 +0200

libwine: Make the remaining configuration functions obsolete.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/wine/Makefile.in |  8 --------
 libs/wine/config.c    | 44 +++++++++++++++++++++++---------------------
 libs/wine/wine.map    |  6 +++---
 3 files changed, 26 insertions(+), 32 deletions(-)

diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
index fe2a2b45e5..6bb27e34dc 100644
--- a/libs/wine/Makefile.in
+++ b/libs/wine/Makefile.in
@@ -84,8 +84,6 @@ C_SRCS = \
 	utf8.c \
 	wctomb.c
 
-EXTRA_OBJS = version.o
-
 config_EXTRADEFS = \
 	-DBINDIR='"${bindir}"' \
 	-DDLLDIR='"${dlldir}"' \
@@ -98,9 +96,3 @@ SHAREDLIB = $(LIBWINE_SHAREDLIB)
 
 libwine_LDFLAGS = $(LIBWINE_LDFLAGS)
 libwine_DEPS = $(LIBWINE_DEPENDS)
-
-version.c: dummy
-	version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
-
-dummy:
-.PHONY: dummy
diff --git a/libs/wine/config.c b/libs/wine/config.c
index f46ed4df08..6d4ecb95ae 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -92,14 +92,6 @@ static char *xstrdup( const char *str )
     return res;
 }
 
-/* check if a string ends in a given substring */
-static inline int strendswith( const char* str, const char* end )
-{
-    size_t len = strlen( str );
-    size_t tail = strlen( end );
-    return len >= tail && !strcmp( str + len - tail, end );
-}
-
 /* build a path from the specified dir and name */
 static char *build_path( const char *dir, const char *name )
 {
@@ -348,6 +340,14 @@ static char *config_dir;
 static char *server_dir;
 static char *user_name;
 
+/* check if a string ends in a given substring */
+static inline int strendswith( const char* str, const char* end )
+{
+    size_t len = strlen( str );
+    size_t tail = strlen( end );
+    return len >= tail && !strcmp( str + len - tail, end );
+}
+
 /* remove all trailing slashes from a path name */
 static inline void remove_trailing_slashes( char *path )
 {
@@ -500,25 +500,16 @@ const char *wine_get_user_name_obsolete(void)
     return user_name;
 }
 
-__ASM_OBSOLETE(wine_get_build_dir);
-__ASM_OBSOLETE(wine_get_config_dir);
-__ASM_OBSOLETE(wine_get_data_dir);
-__ASM_OBSOLETE(wine_get_server_dir);
-__ASM_OBSOLETE(wine_get_user_name);
-
-#endif /* __ASM_OBSOLETE */
-
 /* return the standard version string */
-const char *wine_get_version(void)
+const char *wine_get_version_obsolete(void)
 {
     return PACKAGE_VERSION;
 }
 
 /* return the build id string */
-const char *wine_get_build_id(void)
+const char *wine_get_build_id_obsolete(void)
 {
-    extern const char wine_build[];
-    return wine_build;
+    return PACKAGE_VERSION;
 }
 
 /* exec a binary using the preloader if requested; helper for wine_exec_wine_binary */
@@ -563,7 +554,7 @@ static void preloader_exec( char **argv, int use_preloader )
 }
 
 /* exec a wine internal binary (either the wine loader or the wine server) */
-void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
+void wine_exec_wine_binary_obsolete( const char *name, char **argv, const char *env_var )
 {
     const char *path, *pos, *ptr;
     int use_preloader;
@@ -630,3 +621,14 @@ void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
     preloader_exec( argv, use_preloader );
     free( argv[0] );
 }
+
+__ASM_OBSOLETE(wine_get_build_dir);
+__ASM_OBSOLETE(wine_get_build_id);
+__ASM_OBSOLETE(wine_get_config_dir);
+__ASM_OBSOLETE(wine_get_data_dir);
+__ASM_OBSOLETE(wine_get_server_dir);
+__ASM_OBSOLETE(wine_get_user_name);
+__ASM_OBSOLETE(wine_get_version);
+__ASM_OBSOLETE(wine_exec_wine_binary);
+
+#endif /* __ASM_OBSOLETE */
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
index 1143b12973..192bf4bd46 100644
--- a/libs/wine/wine.map
+++ b/libs/wine/wine.map
@@ -10,9 +10,6 @@ WINE_1.0
     wine_casemap_lower;
     wine_casemap_upper;
     wine_dll_set_callback;
-    wine_exec_wine_binary;
-    wine_get_build_id;
-    wine_get_version;
     wine_init;
     wine_init_argv0_path;
     wine_mmap_add_reserved_area;
@@ -87,8 +84,10 @@ WINE_1.0
     wine_dll_unload;
     wine_dlopen;
     wine_dlsym;
+    wine_exec_wine_binary;
     wine_fold_string;
     wine_get_build_dir;
+    wine_get_build_id;
     wine_get_config_dir;
     wine_get_cs;
     wine_get_data_dir;
@@ -100,6 +99,7 @@ WINE_1.0
     wine_get_sortkey;
     wine_get_ss;
     wine_get_user_name;
+    wine_get_version;
     wine_is_dbcs_leadbyte;
     wine_ldt_alloc_entries;
     wine_ldt_alloc_fs;




More information about the wine-cvs mailing list