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
442512d5
Commit
442512d5
authored
Dec 29, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Do not export any of the LDT support on non-i386 platforms.
parent
82f393dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
37 deletions
+5
-37
library.h
include/wine/library.h
+4
-17
winnt.h
include/winnt.h
+0
-3
ldt.c
libs/wine/ldt.c
+1
-9
wine.def
libs/wine/wine.def
+0
-8
No files found.
include/wine/library.h
View file @
442512d5
...
...
@@ -82,6 +82,8 @@ extern int wine_mmap_is_in_reserved_area( void *addr, size_t size );
extern
int
wine_mmap_enum_reserved_areas
(
int
(
*
enum_func
)(
void
*
base
,
size_t
size
,
void
*
arg
),
void
*
arg
,
int
top_down
);
#ifdef __i386__
/* LDT management */
extern
void
wine_ldt_init_locking
(
void
(
*
lock_func
)(
void
),
void
(
*
unlock_func
)(
void
)
);
...
...
@@ -92,15 +94,9 @@ extern void *wine_ldt_get_ptr( unsigned short sel, unsigned long offset );
extern
unsigned
short
wine_ldt_alloc_entries
(
int
count
);
extern
unsigned
short
wine_ldt_realloc_entries
(
unsigned
short
sel
,
int
oldcount
,
int
newcount
);
extern
void
wine_ldt_free_entries
(
unsigned
short
sel
,
int
count
);
#if defined(__i386__) && !defined(__MINGW32__) && !defined(_MSC_VER)
extern
unsigned
short
wine_ldt_alloc_fs
(
void
);
extern
void
wine_ldt_init_fs
(
unsigned
short
sel
,
const
LDT_ENTRY
*
entry
);
extern
void
wine_ldt_free_fs
(
unsigned
short
sel
);
#else
/* __i386__ */
static
inline
unsigned
short
wine_ldt_alloc_fs
(
void
)
{
return
0x0b
;
/* pseudo GDT selector */
}
static
inline
void
wine_ldt_init_fs
(
unsigned
short
sel
,
const
LDT_ENTRY
*
entry
)
{
}
static
inline
void
wine_ldt_free_fs
(
unsigned
short
sel
)
{
}
#endif
/* __i386__ */
/* the local copy of the LDT */
extern
struct
__wine_ldt_copy
...
...
@@ -123,9 +119,6 @@ static inline void wine_ldt_set_base( LDT_ENTRY *ent, const void *base )
ent
->
BaseLow
=
(
WORD
)(
ULONG_PTR
)
base
;
ent
->
HighWord
.
Bits
.
BaseMid
=
(
BYTE
)((
ULONG_PTR
)
base
>>
16
);
ent
->
HighWord
.
Bits
.
BaseHi
=
(
BYTE
)((
ULONG_PTR
)
base
>>
24
);
#ifdef _WIN64
ent
->
BaseHigh
=
(
ULONG_PTR
)
base
>>
32
;
#endif
}
static
inline
void
wine_ldt_set_limit
(
LDT_ENTRY
*
ent
,
unsigned
int
limit
)
{
...
...
@@ -136,9 +129,6 @@ static inline void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
static
inline
void
*
wine_ldt_get_base
(
const
LDT_ENTRY
*
ent
)
{
return
(
void
*
)(
ent
->
BaseLow
|
#ifdef _WIN64
(
ULONG_PTR
)
ent
->
BaseHigh
<<
32
|
#endif
(
ULONG_PTR
)
ent
->
HighWord
.
Bits
.
BaseMid
<<
16
|
(
ULONG_PTR
)
ent
->
HighWord
.
Bits
.
BaseHi
<<
24
);
}
...
...
@@ -171,7 +161,6 @@ static inline int wine_ldt_is_empty( const LDT_ENTRY *ent )
/* segment register access */
#ifdef __i386__
# ifdef __MINGW32__
# define __DEFINE_GET_SEG(seg) \
static inline unsigned short wine_get_##seg(void); \
...
...
@@ -200,10 +189,6 @@ static inline int wine_ldt_is_empty( const LDT_ENTRY *ent )
# define __DEFINE_GET_SEG(seg) extern unsigned short wine_get_##seg(void);
# define __DEFINE_SET_SEG(seg) extern void wine_set_##seg(unsigned int);
# endif
/* __GNUC__ || _MSC_VER */
#else
/* __i386__ */
# define __DEFINE_GET_SEG(seg) static inline unsigned short wine_get_##seg(void) { return 0; }
# define __DEFINE_SET_SEG(seg) static inline void wine_set_##seg(int val) {
/* nothing */
}
#endif
/* __i386__ */
__DEFINE_GET_SEG
(
cs
)
__DEFINE_GET_SEG
(
ds
)
...
...
@@ -216,6 +201,8 @@ __DEFINE_SET_SEG(gs)
#undef __DEFINE_GET_SEG
#undef __DEFINE_SET_SEG
#endif
/* __i386__ */
#ifdef __cplusplus
}
#endif
...
...
include/winnt.h
View file @
442512d5
...
...
@@ -866,9 +866,6 @@ typedef struct _LDT_ENTRY {
unsigned
BaseHi
:
8
;
}
Bits
;
}
HighWord
;
#ifdef _WIN64
/* FIXME: 64-bit code should not be using the LDT */
DWORD
BaseHigh
;
#endif
}
LDT_ENTRY
,
*
PLDT_ENTRY
;
/* x86-64 context definitions */
...
...
libs/wine/ldt.c
View file @
442512d5
...
...
@@ -33,7 +33,7 @@
#include "winbase.h"
#include "wine/library.h"
#if
def __i386__
#if
defined(__i386__) && !defined(__MINGW32__) && !defined(_MSC_VER)
#ifdef __linux__
...
...
@@ -118,8 +118,6 @@ static inline int set_thread_area( struct modify_ldt_s *ptr )
#include <i386/user_ldt.h>
#endif
#endif
/* __i386__ */
/* local copy of the LDT */
#ifdef __APPLE__
struct
__wine_ldt_copy
wine_ldt_copy
=
{
{
0
,
0
,
0
}
};
...
...
@@ -190,8 +188,6 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry )
if
(
index
<
LDT_FIRST_ENTRY
)
return
0
;
/* cannot modify reserved entries */
#ifdef __i386__
#ifdef linux
{
struct
modify_ldt_s
ldt_info
;
...
...
@@ -234,8 +230,6 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry )
exit
(
1
);
#endif
#endif
/* __i386__ */
if
(
ret
>=
0
)
{
wine_ldt_copy
.
base
[
index
]
=
wine_ldt_get_base
(
entry
);
...
...
@@ -384,8 +378,6 @@ void wine_ldt_free_entries( unsigned short sel, int count )
}
#if defined(__i386__) && !defined(__MINGW32__) && !defined(_MSC_VER)
static
int
global_fs_sel
=
-
1
;
/* global selector for %fs shared among all threads */
/***********************************************************************
...
...
libs/wine/wine.def
View file @
442512d5
...
...
@@ -86,14 +86,6 @@ EXPORTS
wine_init
wine_init_argv0_path
wine_is_dbcs_leadbyte
wine_ldt_alloc_entries
wine_ldt_free_entries
wine_ldt_get_entry
wine_ldt_get_ptr
wine_ldt_init_locking
wine_ldt_is_system
wine_ldt_realloc_entries
wine_ldt_set_entry
wine_pthread_get_functions
wine_pthread_set_functions
wine_switch_to_stack
...
...
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