Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2bf8293e
Commit
2bf8293e
authored
Dec 08, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Mark more functions as obsolete.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
758e75cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
59 deletions
+75
-59
config.c
libs/wine/config.c
+5
-4
loader.c
libs/wine/loader.c
+33
-26
mmap.c
libs/wine/mmap.c
+31
-23
wine.map
libs/wine/wine.map
+6
-6
No files found.
libs/wine/config.c
View file @
2bf8293e
...
...
@@ -20,6 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "wine/asm.h"
#ifdef __ASM_OBSOLETE
#include <stdio.h>
#include <stdarg.h>
...
...
@@ -40,7 +43,6 @@
#define _POSIX_SPAWN_DISABLE_ASLR 0x0100
#endif
#endif
#include "wine/asm.h"
static
char
*
bindir
;
static
char
*
dlldir
;
...
...
@@ -296,7 +298,7 @@ static int set_dlldir( char *libdir )
}
/* initialize the argv0 path */
void
wine_init_argv0_path
(
const
char
*
argv0
)
void
wine_init_argv0_path
_obsolete
(
const
char
*
argv0
)
{
const
char
*
basename
,
*
wineloader
;
...
...
@@ -330,8 +332,6 @@ done:
}
}
#ifdef __ASM_OBSOLETE
static
const
char
server_config_dir
[]
=
"/.wine"
;
/* config dir relative to $HOME */
static
const
char
server_root_prefix
[]
=
"/tmp/.wine"
;
/* prefix for server root dir */
static
const
char
server_dir_prefix
[]
=
"/server-"
;
/* prefix for server dir */
...
...
@@ -622,6 +622,7 @@ void wine_exec_wine_binary_obsolete( const char *name, char **argv, const char *
free
(
argv
[
0
]
);
}
__ASM_OBSOLETE
(
wine_init_argv0_path
);
__ASM_OBSOLETE
(
wine_get_build_dir
);
__ASM_OBSOLETE
(
wine_get_build_id
);
__ASM_OBSOLETE
(
wine_get_config_dir
);
...
...
libs/wine/loader.c
View file @
2bf8293e
...
...
@@ -66,15 +66,6 @@ char **__wine_main_argv = NULL;
WCHAR
**
__wine_main_wargv
=
NULL
;
char
**
__wine_main_environ
=
NULL
;
struct
dll_path_context
{
unsigned
int
index
;
/* current index in the dll path list */
char
*
buffer
;
/* buffer used for storing path names */
char
*
name
;
/* start of file name part in buffer (including leading slash) */
int
namelen
;
/* length of file name without .so extension */
int
win16
;
/* 16-bit dll search */
};
#define MAX_DLLS 100
static
struct
...
...
@@ -90,14 +81,27 @@ static const IMAGE_NT_HEADERS *main_exe;
typedef
void
(
*
load_dll_callback_t
)(
void
*
,
const
char
*
);
static
load_dll_callback_t
load_dll_callback
;
extern
const
char
*
build_dir
;
extern
void
*
wine_anon_mmap
(
void
*
start
,
size_t
size
,
int
prot
,
int
flags
);
#ifdef __ASM_OBSOLETE
struct
dll_path_context
{
unsigned
int
index
;
/* current index in the dll path list */
char
*
buffer
;
/* buffer used for storing path names */
char
*
name
;
/* start of file name part in buffer (including leading slash) */
int
namelen
;
/* length of file name without .so extension */
int
win16
;
/* 16-bit dll search */
};
static
const
char
*
default_dlldir
;
static
const
char
**
dll_paths
;
static
unsigned
int
nb_dll_paths
;
static
int
dll_path_maxlen
;
extern
void
*
wine_anon_mmap
(
void
*
start
,
size_t
size
,
int
prot
,
int
flags
);
extern
void
wine_init_argv0_path
(
const
char
*
argv0
);
extern
const
char
*
build_dir
;
extern
void
wine_init_argv0_path_obsolete
(
const
char
*
argv0
);
extern
void
mmap_init
(
void
);
extern
const
char
*
get_dlldir
(
const
char
**
default_dlldir
);
...
...
@@ -226,6 +230,7 @@ static inline void free_dll_path( struct dll_path_context *context )
free
(
context
->
buffer
);
}
#endif
/* __ASM_OBSOLETE */
/* adjust an array of pointers to make them into RVAs */
static
inline
void
fixup_rva_ptrs
(
void
*
array
,
BYTE
*
base
,
unsigned
int
count
)
...
...
@@ -784,16 +789,6 @@ int wine_dll_get_owner_obsolete( const char *name, char *buffer, int size, int *
return
ret
;
}
__ASM_OBSOLETE
(
wine_dlopen
);
__ASM_OBSOLETE
(
wine_dlsym
);
__ASM_OBSOLETE
(
wine_dlclose
);
__ASM_OBSOLETE
(
wine_dll_enum_load_path
);
__ASM_OBSOLETE
(
wine_dll_get_owner
);
__ASM_OBSOLETE
(
wine_dll_load
);
__ASM_OBSOLETE
(
wine_dll_load_main_exe
);
__ASM_OBSOLETE
(
wine_dll_unload
);
#endif
/* __ASM_OBSOLETE */
/***********************************************************************
* set_max_limit
...
...
@@ -878,9 +873,9 @@ static void apple_create_wine_thread( void *init_func )
* fails, just let it go wherever. It'll be a waste of space, but we
* can go on. */
if
(
!
pthread_attr_getstacksize
(
&
attr
,
&
info
.
desired_size
)
&&
wine_mmap_enum_reserved_areas
(
apple_alloc_thread_stack
,
&
info
,
1
))
wine_mmap_enum_reserved_areas
_obsolete
(
apple_alloc_thread_stack
,
&
info
,
1
))
{
wine_mmap_remove_reserved_area
(
info
.
stack
,
info
.
desired_size
,
0
);
wine_mmap_remove_reserved_area
_obsolete
(
info
.
stack
,
info
.
desired_size
,
0
);
pthread_attr_setstackaddr
(
&
attr
,
(
char
*
)
info
.
stack
+
info
.
desired_size
);
}
#endif
...
...
@@ -958,7 +953,7 @@ static void apple_main_thread( void (*init_func)(void) )
*
* Main Wine initialisation.
*/
void
wine_init
(
int
argc
,
char
*
argv
[],
char
*
error
,
int
error_size
)
void
wine_init
_obsolete
(
int
argc
,
char
*
argv
[],
char
*
error
,
int
error_size
)
{
struct
dll_path_context
context
;
char
*
path
;
...
...
@@ -973,7 +968,7 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
set_max_limit
(
RLIMIT_AS
);
#endif
wine_init_argv0_path
(
argv
[
0
]
);
wine_init_argv0_path
_obsolete
(
argv
[
0
]
);
build_dll_path
();
__wine_main_argc
=
argc
;
__wine_main_argv
=
argv
;
...
...
@@ -1012,3 +1007,15 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
init_func
();
#endif
}
__ASM_OBSOLETE
(
wine_dlopen
);
__ASM_OBSOLETE
(
wine_dlsym
);
__ASM_OBSOLETE
(
wine_dlclose
);
__ASM_OBSOLETE
(
wine_dll_enum_load_path
);
__ASM_OBSOLETE
(
wine_dll_get_owner
);
__ASM_OBSOLETE
(
wine_dll_load
);
__ASM_OBSOLETE
(
wine_dll_load_main_exe
);
__ASM_OBSOLETE
(
wine_dll_unload
);
__ASM_OBSOLETE
(
wine_init
);
#endif
/* __ASM_OBSOLETE */
libs/wine/mmap.c
View file @
2bf8293e
...
...
@@ -44,18 +44,6 @@
#include "wine/list.h"
struct
reserved_area
{
struct
list
entry
;
void
*
base
;
size_t
size
;
};
static
struct
list
reserved_areas
=
LIST_INIT
(
reserved_areas
);
#ifndef __APPLE__
static
const
unsigned
int
granularity_mask
=
0xffff
;
/* reserved areas have 64k granularity */
#endif
#ifndef MAP_NORESERVE
#define MAP_NORESERVE 0
#endif
...
...
@@ -66,8 +54,6 @@ static const unsigned int granularity_mask = 0xffff; /* reserved areas have 64k
#define MAP_ANON 0
#endif
void
wine_mmap_add_reserved_area
(
void
*
addr
,
size_t
size
);
static
inline
int
get_fdzero
(
void
)
{
static
int
fd
=
-
1
;
...
...
@@ -231,6 +217,21 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
return
mmap
(
start
,
size
,
prot
,
flags
,
get_fdzero
(),
0
);
}
#ifdef __ASM_OBSOLETE
struct
reserved_area
{
struct
list
entry
;
void
*
base
;
size_t
size
;
};
static
struct
list
reserved_areas
=
LIST_INIT
(
reserved_areas
);
#ifndef __APPLE__
static
const
unsigned
int
granularity_mask
=
0xffff
;
/* reserved areas have 64k granularity */
#endif
void
wine_mmap_add_reserved_area_obsolete
(
void
*
addr
,
size_t
size
);
#ifdef __APPLE__
...
...
@@ -281,7 +282,7 @@ static inline void reserve_area( void *addr, void *end )
ret
=
mach_vm_map
(
mach_task_self
(),
&
alloc_address
,
hole_size
,
0
,
VM_FLAGS_FIXED
,
MEMORY_OBJECT_NULL
,
0
,
0
,
PROT_NONE
,
VM_PROT_ALL
,
VM_INHERIT_COPY
);
if
(
!
ret
)
wine_mmap_add_reserved_area
(
(
void
*
)
hole_address
,
hole_size
);
wine_mmap_add_reserved_area
_obsolete
(
(
void
*
)
hole_address
,
hole_size
);
else
if
(
ret
==
KERN_NO_SPACE
)
{
/* something filled (part of) the hole before we could.
...
...
@@ -340,7 +341,7 @@ static inline void reserve_area( void *addr, void *end )
i
&=
~
granularity_mask
;
if
(
i
&&
mmap
(
addr
,
i
,
PROT_NONE
,
MAP_FIXED
|
MAP_PRIVATE
|
MAP_ANON
|
MAP_NORESERVE
,
get_fdzero
(),
0
)
!=
(
void
*
)
-
1
)
wine_mmap_add_reserved_area
(
addr
,
i
);
wine_mmap_add_reserved_area
_obsolete
(
addr
,
i
);
i
+=
granularity_mask
+
1
;
if
((
char
*
)
addr
+
i
<
(
char
*
)
addr
)
break
;
/* overflow */
...
...
@@ -353,7 +354,7 @@ static inline void reserve_area( void *addr, void *end )
if
(
mmap_reserve
(
addr
,
size
))
{
wine_mmap_add_reserved_area
(
addr
,
size
);
wine_mmap_add_reserved_area
_obsolete
(
addr
,
size
);
return
;
}
size
=
(
size
/
2
)
&
~
granularity_mask
;
...
...
@@ -410,7 +411,7 @@ static inline void reserve_dos_area(void)
}
/* now add first page with MAP_FIXED */
wine_anon_mmap
(
NULL
,
first_page
,
PROT_NONE
,
MAP_NORESERVE
|
MAP_FIXED
);
wine_mmap_add_reserved_area
(
NULL
,
dos_area_size
);
wine_mmap_add_reserved_area
_obsolete
(
NULL
,
dos_area_size
);
}
#endif
...
...
@@ -501,7 +502,7 @@ void mmap_init(void)
* Note: the reserved areas functions are not reentrant, caller is
* responsible for proper locking.
*/
void
wine_mmap_add_reserved_area
(
void
*
addr
,
size_t
size
)
void
wine_mmap_add_reserved_area
_obsolete
(
void
*
addr
,
size_t
size
)
{
struct
reserved_area
*
area
;
struct
list
*
ptr
;
...
...
@@ -560,7 +561,7 @@ void wine_mmap_add_reserved_area( void *addr, size_t size )
* Note: the reserved areas functions are not reentrant, caller is
* responsible for proper locking.
*/
void
wine_mmap_remove_reserved_area
(
void
*
addr
,
size_t
size
,
int
unmap
)
void
wine_mmap_remove_reserved_area
_obsolete
(
void
*
addr
,
size_t
size
,
int
unmap
)
{
struct
reserved_area
*
area
;
struct
list
*
ptr
;
...
...
@@ -635,7 +636,7 @@ void wine_mmap_remove_reserved_area( void *addr, size_t size, int unmap )
* Note: the reserved areas functions are not reentrant, caller is
* responsible for proper locking.
*/
int
wine_mmap_is_in_reserved_area
(
void
*
addr
,
size_t
size
)
int
wine_mmap_is_in_reserved_area
_obsolete
(
void
*
addr
,
size_t
size
)
{
struct
reserved_area
*
area
;
struct
list
*
ptr
;
...
...
@@ -662,8 +663,8 @@ int wine_mmap_is_in_reserved_area( void *addr, size_t size )
* Note: the reserved areas functions are not reentrant, caller is
* responsible for proper locking.
*/
int
wine_mmap_enum_reserved_areas
(
int
(
*
enum_func
)(
void
*
base
,
size_t
size
,
void
*
arg
),
void
*
arg
,
int
top_down
)
int
wine_mmap_enum_reserved_areas
_obsolete
(
int
(
*
enum_func
)(
void
*
base
,
size_t
size
,
void
*
arg
),
void
*
arg
,
int
top_down
)
{
int
ret
=
0
;
struct
list
*
ptr
;
...
...
@@ -686,3 +687,10 @@ int wine_mmap_enum_reserved_areas( int (*enum_func)(void *base, size_t size, voi
}
return
ret
;
}
__ASM_OBSOLETE
(
wine_mmap_add_reserved_area
);
__ASM_OBSOLETE
(
wine_mmap_remove_reserved_area
);
__ASM_OBSOLETE
(
wine_mmap_is_in_reserved_area
);
__ASM_OBSOLETE
(
wine_mmap_enum_reserved_areas
);
#endif
/* __ASM_OBSOLETE */
libs/wine/wine.map
View file @
2bf8293e
...
...
@@ -8,12 +8,6 @@ WINE_1.0
__wine_main_wargv;
wine_anon_mmap;
wine_dll_set_callback;
wine_init;
wine_init_argv0_path;
wine_mmap_add_reserved_area;
wine_mmap_enum_reserved_areas;
wine_mmap_is_in_reserved_area;
wine_mmap_remove_reserved_area;
/* the following functions are obsolete and only exported for backwards compatibility */
...
...
@@ -99,6 +93,8 @@ WINE_1.0
wine_get_ss;
wine_get_user_name;
wine_get_version;
wine_init;
wine_init_argv0_path;
wine_is_dbcs_leadbyte;
wine_ldt_alloc_entries;
wine_ldt_alloc_fs;
...
...
@@ -112,6 +108,10 @@ WINE_1.0
wine_ldt_is_system;
wine_ldt_realloc_entries;
wine_ldt_set_entry;
wine_mmap_add_reserved_area;
wine_mmap_enum_reserved_areas;
wine_mmap_is_in_reserved_area;
wine_mmap_remove_reserved_area;
wine_pthread_get_functions;
wine_pthread_set_functions;
wine_set_fs;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment