Module: wine Branch: master Commit: 44162aa21a5c00d9efe603bffdd2cb1f86ed2b13 URL: http://source.winehq.org/git/wine.git/?a=commit;h=44162aa21a5c00d9efe603bffd...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Dec 5 13:25:23 2008 +0100
libwine: Don't export the selector functions for the Windows build.
---
include/wine/library.h | 12 ++++++++++-- libs/wine/ldt.c | 5 +---- libs/wine/wine.def | 11 ----------- 3 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/include/wine/library.h b/include/wine/library.h index 2411ae1..84d0a60 100644 --- a/include/wine/library.h +++ b/include/wine/library.h @@ -93,7 +93,7 @@ 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 ); -#ifdef __i386__ +#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 ); @@ -178,7 +178,15 @@ static inline int wine_ldt_is_empty( const LDT_ENTRY *ent ) /* segment register access */
#ifdef __i386__ -# ifdef __GNUC__ +# ifdef __MINGW32__ +# define __DEFINE_GET_SEG(seg) \ + static inline unsigned short wine_get_##seg(void); \ + static inline unsigned short wine_get_##seg(void) \ + { unsigned short res; __asm__ __volatile__("movw %%" #seg ",%w0" : "=r"(res)); return res; } +# define __DEFINE_SET_SEG(seg) \ + static inline void wine_set_##seg(int val); \ + static inline void wine_set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); } +# elif defined(__GNUC__) # define __DEFINE_GET_SEG(seg) \ extern inline unsigned short wine_get_##seg(void); \ extern inline unsigned short wine_get_##seg(void) \ diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c index c46ff6f..80ceba8 100644 --- a/libs/wine/ldt.c +++ b/libs/wine/ldt.c @@ -385,7 +385,7 @@ void wine_ldt_free_entries( unsigned short sel, int count ) }
-#ifdef __i386__ +#if defined(__i386__) && !defined(__MINGW32__) && !defined(_MSC_VER)
static int global_fs_sel = -1; /* global selector for %fs shared among all threads */
@@ -477,8 +477,6 @@ void wine_ldt_free_fs( unsigned short sel ) /*********************************************************************** * selector access functions */ -# ifndef _MSC_VER -/* Nothing needs to be done for MS C, it will do with inline versions from the winnt.h */ __ASM_GLOBAL_FUNC( wine_get_cs, "movw %cs,%ax\n\tret" ) __ASM_GLOBAL_FUNC( wine_get_ds, "movw %ds,%ax\n\tret" ) __ASM_GLOBAL_FUNC( wine_get_es, "movw %es,%ax\n\tret" ) @@ -487,6 +485,5 @@ __ASM_GLOBAL_FUNC( wine_get_gs, "movw %gs,%ax\n\tret" ) __ASM_GLOBAL_FUNC( wine_get_ss, "movw %ss,%ax\n\tret" ) __ASM_GLOBAL_FUNC( wine_set_fs, "movl 4(%esp),%eax\n\tmovw %ax,%fs\n\tret" ) __ASM_GLOBAL_FUNC( wine_set_gs, "movl 4(%esp),%eax\n\tmovw %ax,%gs\n\tret" ) -# endif /* defined(_MSC_VER) */
#endif /* __i386__ */ diff --git a/libs/wine/wine.def b/libs/wine/wine.def index dc5f853..318db78 100644 --- a/libs/wine/wine.def +++ b/libs/wine/wine.def @@ -79,28 +79,19 @@ EXPORTS wine_get_build_dir wine_get_build_id wine_get_config_dir - wine_get_cs wine_get_data_dir - wine_get_ds - wine_get_es - wine_get_fs - wine_get_gs wine_get_server_dir wine_get_sortkey - 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 wine_ldt_copy wine_ldt_free_entries - wine_ldt_free_fs wine_ldt_get_entry wine_ldt_get_ptr - wine_ldt_init_fs wine_ldt_init_locking wine_ldt_is_system wine_ldt_realloc_entries @@ -111,8 +102,6 @@ EXPORTS wine_mmap_remove_reserved_area wine_pthread_get_functions wine_pthread_set_functions - wine_set_fs - wine_set_gs wine_switch_to_stack wine_utf8_mbstowcs wine_utf8_wcstombs