From b9e10147d94e556b3a5c10a743c6eae4671e6535 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 15 Dec 2008 13:32:15 +0100 Subject: [PATCH] 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 442516e5986..1e41e4d9bc0 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 65a27edc68b..89d5ce9d8cb 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 580c2e55d09..0c8e0a96f9f 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)); -- 2.11.4.GIT