Alexandre Julliard : ntdll: Don't include ntdll_misc.h from the Unix library.

Alexandre Julliard julliard at winehq.org
Fri May 29 15:22:55 CDT 2020


Module: wine
Branch: master
Commit: e6e2f2325a0a4eb14f10dd6df319b068761e9600
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e6e2f2325a0a4eb14f10dd6df319b068761e9600

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri May 29 15:48:44 2020 +0200

ntdll: Don't include ntdll_misc.h from the Unix library.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/unix/debug.c        |  5 ++++-
 dlls/ntdll/unix/unix_private.h | 27 +++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/unix/debug.c b/dlls/ntdll/unix/debug.c
index 7bc7787c9d..12e9cdd36d 100644
--- a/dlls/ntdll/unix/debug.c
+++ b/dlls/ntdll/unix/debug.c
@@ -33,8 +33,11 @@
 # include <unistd.h>
 #endif
 
+#include "windef.h"
+#include "winnt.h"
+#include "winternl.h"
+#include "unix_private.h"
 #include "wine/debug.h"
-#include "ntdll_misc.h"
 
 WINE_DECLARE_DEBUG_CHANNEL(pid);
 WINE_DECLARE_DEBUG_CHANNEL(timestamp);
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 663036a699..749f9add57 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -23,6 +23,33 @@
 
 #include "unixlib.h"
 
+struct debug_info
+{
+    unsigned int str_pos;       /* current position in strings buffer */
+    unsigned int out_pos;       /* current position in output buffer */
+    char         strings[1024]; /* buffer for temporary strings */
+    char         output[1024];  /* current output line */
+};
+
+/* thread private data, stored in NtCurrentTeb()->GdiTebBatch */
+struct ntdll_thread_data
+{
+    struct debug_info *debug_info;    /* info for debugstr functions */
+    void              *start_stack;   /* stack for thread startup */
+    int                request_fd;    /* fd for sending server requests */
+    int                reply_fd;      /* fd for receiving server replies */
+    int                wait_fd[2];    /* fd for sleeping server requests */
+    BOOL               wow64_redir;   /* Wow64 filesystem redirection flag */
+    pthread_t          pthread_id;    /* pthread thread id */
+};
+
+C_ASSERT( sizeof(struct ntdll_thread_data) <= sizeof(((TEB *)0)->GdiTebBatch) );
+
+static inline struct ntdll_thread_data *ntdll_get_thread_data(void)
+{
+    return (struct ntdll_thread_data *)&NtCurrentTeb()->GdiTebBatch;
+}
+
 void CDECL mmap_add_reserved_area( void *addr, SIZE_T size ) DECLSPEC_HIDDEN;
 void CDECL mmap_remove_reserved_area( void *addr, SIZE_T size ) DECLSPEC_HIDDEN;
 int  CDECL mmap_is_in_reserved_area( void *addr, SIZE_T size ) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list