Module: wine Branch: master Commit: b9e10147d94e556b3a5c10a743c6eae4671e6535 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b9e10147d94e556b3a5c10a743...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 15 13:32:15 2008 +0100
ntdll: NtCurrentTeb is not exported on x86_64.
---
dlls/ntdll/ntdll.spec | 2 +- dlls/ntdll/thread.c | 4 ++++ include/winnt.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 442516e..1e41e4d 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -144,7 +144,7 @@ @ stdcall NtCreateTimer(ptr long ptr long) @ stub NtCreateToken # @ stub NtCreateWaitablePort -@ stdcall NtCurrentTeb() +@ stdcall -arch=i386,sparc,alpha,powerpc NtCurrentTeb() # @ stub NtDebugActiveProcess # @ stub NtDebugContinue @ stdcall NtDelayExecution(long ptr) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 65a27ed..89d5ce9 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -1465,6 +1465,10 @@ __ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" )
/* Nothing needs to be done. MS C "magically" exports the inline version from winnt.h */
+#elif defined(__x86_64__) && defined(__GNUC__) + +/* not exported on x86_64 */ + #else
/**********************************************************************/ diff --git a/include/winnt.h b/include/winnt.h index 580c2e5..0c8e0a9 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2261,7 +2261,7 @@ extern inline struct _TEB * WINAPI NtCurrentTeb(void) return teb; } #elif defined(__x86_64__) && defined(__GNUC__) -extern inline struct _TEB * WINAPI NtCurrentTeb(void) +static inline struct _TEB * WINAPI NtCurrentTeb(void) { struct _TEB *teb; __asm__(".byte 0x65\n\tmovq (0x30),%0" : "=r" (teb));