Commit 0c9abbee authored by Alexandre Julliard's avatar Alexandre Julliard

Avoid reference to wine_get_cs function from libwine.

parent 98bcdf9e
......@@ -29,7 +29,6 @@
#include <ctype.h>
#include "wine/exception.h"
#include "wine/library.h"
#include "builtin16.h"
#include "module.h"
#include "stackframe.h"
......@@ -38,6 +37,25 @@
/*******************************************************************
* get_cs
*/
#ifdef __i386__
static inline unsigned short get_cs(void)
{
unsigned short res;
#ifdef __GNUC__
__asm__("movw %%cs,%w0" : "=r"(res));
#elif defined(_MSC_VER)
__asm { mov res, cs }
#else
res = 0;
#endif
return res;
}
#endif /* __i386__ */
/*******************************************************************
* output_file_header
*
* Output a file header with the common declarations we need.
......@@ -629,7 +647,7 @@ void BuildSpec16File( FILE *outfile )
unsigned char *data;
char constructor[100], destructor[100];
#ifdef __i386__
unsigned short code_selector = wine_get_cs();
unsigned short code_selector = get_cs();
#endif
/* File header */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment