Commit 7df1b9e0 authored by Alexandre Julliard's avatar Alexandre Julliard

Start using the exported TEB structure from winternl.h where

possible.
parent 6e9f2786
......@@ -25,6 +25,7 @@
#include "winbase.h"
#include "winerror.h"
#include "wine/windef16.h"
#include "wine/server.h"
#include "wine/debug.h"
......
......@@ -23,6 +23,7 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "thread.h"
#include "wine/server.h"
#include "wine/debug.h"
......
......@@ -30,7 +30,6 @@
#include "winternl.h"
#include "wine/exception.h"
#include "thread.h"
#include "msvcrt.h"
#include "msvcrt/setjmp.h"
......
......@@ -26,6 +26,7 @@
#include <signal.h>
#include "windef.h"
#include "thread.h"
#include "winternl.h"
#include "wine/exception.h"
#include "wine/server.h"
......
......@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "thread.h"
#include "winternl.h"
#include "wine/server.h"
#include "wine/debug.h"
......
......@@ -40,6 +40,7 @@
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "thread.h"
#include "winternl.h"
#include "global.h"
#include "wine/library.h"
......
......@@ -28,7 +28,7 @@
#include "wtypes.h"
#include "dcom.h"
#include "thread.h"
#include "winternl.h"
/* exported interface */
typedef struct tagXIF {
......
......@@ -22,7 +22,6 @@
#include "wownt32.h"
#include "winerror.h"
#include "message.h"
#include "thread.h"
#include "win.h"
#include "winproc.h"
#include "wine/debug.h"
......
......@@ -32,7 +32,6 @@
#include "global.h"
#include "message.h"
#include "user.h"
#include "thread.h"
#include "win.h"
#include "wine/debug.h"
......
......@@ -45,12 +45,12 @@
#include "winnt.h"
#include "wincon.h"
#include "thread.h"
#include "msdos.h"
#include "file.h"
#include "miscemu.h"
#include "dosexe.h"
#include "dosvm.h"
#include "thread.h"
#include "wine/debug.h"
#include "excpt.h"
......
......@@ -123,6 +123,7 @@
#include "winnt.h"
#include "wownt32.h"
#include "iphlpapi.h"
#include "thread.h"
#include "wine/server.h"
#include "wine/debug.h"
......
......@@ -26,6 +26,7 @@
#ifndef __WINE_ASYNC_H
#define __WINE_ASYNC_H
#include "thread.h"
#include "wine/server.h"
#include "winternl.h"
......
......@@ -21,6 +21,7 @@
#ifndef __WINE_THREAD_H
#define __WINE_THREAD_H
#define WINE_NO_TEB
#include "winternl.h"
#include "wine/windef16.h"
......@@ -51,6 +52,8 @@ struct debug_info
ie4 0x40
PESHiELD 0x23/0x30 (win95)
*/
#ifndef WINE_TEB_DEFINED
#define WINE_TEB_DEFINED
typedef struct _TEB
{
NT_TIB Tib; /* 12- 00 Thread information block */
......@@ -126,6 +129,7 @@ typedef struct _TEB
DWORD pad9[24]; /* --n f20 */
PVOID ReservedForOle; /* -2- f80 used by ole32 (IErrorInfo*) */
} TEB;
#endif /* WINE_TEB_DEFINED */
/* Thread exception flags */
#define TEBF_WIN32 0x0001
......
......@@ -21,7 +21,7 @@
#ifndef __WINE_WINE_SERVER_H
#define __WINE_WINE_SERVER_H
#include "thread.h"
#include "winternl.h"
#include "wine/exception.h"
#include "wine/server_protocol.h"
......
......@@ -30,35 +30,6 @@ extern "C" {
#endif /* defined(__cplusplus) */
/***********************************************************************
* TEB data structure
*/
#if 0
typedef struct _TEB
{
NT_TIB Tib; /* 000 */
PVOID EnvironmentPointer; /* 01c */
CLIENT_ID ClientId; /* 020 */
PVOID ActiveRpcHandle; /* 028 */
PVOID ThreadLocalStoragePointer; /* 02c */
PPEB Peb; /* 030 */
ULONG LastErrorValue; /* 034 */
BYTE __pad038[140]; /* 038 */
ULONG CurrentLocale; /* 0c4 */
BYTE __pad0c8[1752]; /* 0c8 */
PVOID Reserved2[278]; /* 7a0 */
UNICODE_STRING StaticUnicodeString; /* bf8 used by advapi32 */
WCHAR StaticUnicodeBuffer[261]; /* c00 used by advapi32 */
PVOID DeallocationStack; /* e0c */
PVOID TlsSlots[64]; /* e10 */
BYTE Reserved3[8]; /* f10 */
PVOID Reserved4[26]; /* f18 */
PVOID ReservedForOle; /* f80 Windows 2000 only */
PVOID Reserved5[4]; /* f84 */
PVOID TlsExpansionSlots; /* f94 */
} TEB, *PTEB;
#endif
/**********************************************************************
* Fundamental types and data structures
*/
......@@ -176,6 +147,42 @@ typedef struct _PEB
/***********************************************************************
* TEB data structure
*/
#if defined(_NTSYSTEM_) || defined(_KERNEL32_) /* hack, should go away */
# define WINE_NO_TEB
#endif
#ifndef WINE_NO_TEB /* don't define TEB if included from thread.h */
# ifndef WINE_TEB_DEFINED
# define WINE_TEB_DEFINED
typedef struct _TEB
{
NT_TIB Tib; /* 000 */
PVOID EnvironmentPointer; /* 01c */
CLIENT_ID ClientId; /* 020 */
PVOID ActiveRpcHandle; /* 028 */
PVOID ThreadLocalStoragePointer; /* 02c */
PPEB Peb; /* 030 */
ULONG LastErrorValue; /* 034 */
BYTE __pad038[140]; /* 038 */
ULONG CurrentLocale; /* 0c4 */
BYTE __pad0c8[1752]; /* 0c8 */
PVOID Reserved2[278]; /* 7a0 */
UNICODE_STRING StaticUnicodeString; /* bf8 used by advapi32 */
WCHAR StaticUnicodeBuffer[261]; /* c00 used by advapi32 */
PVOID DeallocationStack; /* e0c */
PVOID TlsSlots[64]; /* e10 */
BYTE Reserved3[8]; /* f10 */
PVOID Reserved4[26]; /* f18 */
PVOID ReservedForOle; /* f80 Windows 2000 only */
PVOID Reserved5[4]; /* f84 */
PVOID TlsExpansionSlots; /* f94 */
} TEB, *PTEB;
# endif /* WINE_TEB_DEFINED */
#endif /* WINE_NO_TEB */
/***********************************************************************
* Enums
*/
......
......@@ -34,6 +34,7 @@
#include "winerror.h"
#include "winternl.h"
#include "heap.h"
#include "thread.h"
#include "file.h"
#include "module.h"
......
......@@ -27,7 +27,7 @@
#include "windef.h"
#include "winerror.h"
#include "thread.h"
#include "wine/winbase16.h"
#include "wine/server.h"
#include "wine/library.h"
......
......@@ -29,9 +29,9 @@
#include <ctype.h>
#include "wine/exception.h"
#include "stackframe.h"
#include "builtin16.h"
#include "module.h"
#include "stackframe.h"
#include "build.h"
......
......@@ -37,7 +37,6 @@
#include "controls.h"
#include "dde.h"
#include "message.h"
#include "thread.h"
#include "user.h"
#include "win.h"
#include "winpos.h"
......
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