Skip to content

Commit

Permalink
Fix 'symbol NT_TIB has not been declared' wcc error
Browse files Browse the repository at this point in the history
(fix of commit 9483d5b)

Open Watcom (as of v2 2024-11-02 Build) does not define NT_TIB type
in winnt.h file.  The workaround to define own minimal variant of the
structure.

* include/private/pthread_support.h [WOW64_THREAD_CONTEXT_WORKAROUND
&& __WATCOMC__ && GC_WIN32_THREADS] (GC_NT_TIB_s): Define struct; add
comment.
* include/private/pthread_support.h [WOW64_THREAD_CONTEXT_WORKAROUND
&& __WATCOMC__ && GC_WIN32_THREADS] (GC_NT_TIB) Define to
`struct GC_NT_TIB_s` instead of `NT_TIB`.
  • Loading branch information
ivmai committed Nov 18, 2024
1 parent 7165bd5 commit 27bfe29
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion include/private/pthread_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@
EXTERN_C_BEGIN

# ifdef WOW64_THREAD_CONTEXT_WORKAROUND
# define GC_NT_TIB NT_TIB
# if defined(__WATCOMC__) && defined(GC_WIN32_THREADS)
/* Open Watcom (as of v2 2024-11-02 Build) does not define NT_TIB */
/* in winnt.h file. */
struct GC_NT_TIB_s {
/* struct _EXCEPTION_REGISTRATION_RECORD */ void *ExceptionList; /* unused */
PVOID StackBase;
PVOID StackLimit;
/* The remaining fields are unused. */
};
typedef struct GC_NT_TIB_s GC_NT_TIB;
# else
# define GC_NT_TIB NT_TIB
# endif
# endif

typedef struct GC_StackContext_Rep {
Expand Down

0 comments on commit 27bfe29

Please sign in to comment.