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
441a7dcf
Commit
441a7dcf
authored
Apr 29, 2002
by
Patrik Stridvall
Committed by
Alexandre Julliard
Apr 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Microsoft C related changes.
parent
9fe4deb7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
winnt.h
include/winnt.h
+20
-5
sysdeps.c
scheduler/sysdeps.c
+7
-1
No files found.
include/winnt.h
View file @
441a7dcf
...
...
@@ -69,6 +69,8 @@
# if defined(__GNUC__) && ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
# define __stdcall __attribute__((__stdcall__))
# define __cdecl __attribute__((__cdecl__))
# elif defined(_MSC_VER)
/* Nothing needs to be done. __cdecl/__stdcall already exists */
# else
# error You need gcc >= 2.7 to build Wine on a 386
# endif
/* __GNUC__ */
...
...
@@ -154,6 +156,14 @@
#define WINE_NORETURN
/* nothing */
#endif
#ifndef DECLSPEC_NORETURN
# if _MSVC_VER > 1200
# define DECLSPEC_NORETURN __declspec(noreturn)
# else
# define DECLSPEC_NORETURN
# endif
#endif
/* Anonymous union/struct handling */
#ifdef __WINE__
...
...
@@ -1232,10 +1242,15 @@ typedef CONTEXT *PCONTEXT;
{ unsigned short res; __asm__("movw %%" #seg ",%w0" : "=r"(res)); return res; }
# define __DEFINE_SET_SEG(seg) \
extern inline void __set_##seg(int val) { __asm__("movw %w0,%%" #seg : : "r" (val)); }
# else
/* __GNUC__ */
# elif defined(_MSC_VER)
# define __DEFINE_GET_SEG(seg) \
extern inline unsigned short __get_##seg(void) { unsigned short res; __asm { mov res, fs } return res; }
# define __DEFINE_SET_SEG(seg) \
extern inline void __set_##seg(unsigned short val) { __asm { mov seg, val } }
# else
/* __GNUC__ || _MSC_VER */
# define __DEFINE_GET_SEG(seg) extern unsigned short __get_##seg(void);
# define __DEFINE_SET_SEG(seg) extern void __set_##seg(unsigned int);
# endif
/* __GNUC__ */
# endif
/* __GNUC__
|| _MSC_VER
*/
#else
/* __i386__ */
# define __DEFINE_GET_SEG(seg) inline static unsigned short __get_##seg(void) { return 0; }
# define __DEFINE_SET_SEG(seg)
/* nothing */
...
...
@@ -2338,15 +2353,15 @@ typedef struct _NT_TIB
struct
_TEB
;
#if defined(__i386__) && defined(__GNUC__)
extern
inline
struct
_TEB
WINAPI
*
NtCurrentTeb
(
void
);
extern
inline
struct
_TEB
WINAPI
*
NtCurrentTeb
(
void
)
extern
inline
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
);
extern
inline
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
struct
_TEB
*
teb
;
__asm__
(
".byte 0x64
\n\t
movl (0x18),%0"
:
"=r"
(
teb
));
return
teb
;
}
#else
extern
struct
_TEB
WINAPI
*
NtCurrentTeb
(
void
);
extern
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
);
#endif
...
...
scheduler/sysdeps.c
View file @
441a7dcf
...
...
@@ -309,8 +309,14 @@ void SYSDEPS_AbortThread( int status )
*
* This will crash and burn if called before threading is initialized
*/
#if
def __i386__
#if
defined(__i386__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC
(
NtCurrentTeb
,
".byte 0x64
\n\t
movl 0x18,%eax
\n\t
ret"
);
#elif defined(__i386__) && defined(_MSC_VER)
__declspec
(
naked
)
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
__asm
mov
eax
,
fs
:
[
0x18
];
__asm
ret
;
}
#elif defined(HAVE__LWP_CREATE)
/***********************************************************************
* NtCurrentTeb (NTDLL.@)
...
...
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