From 0f7dc05b52428797556c8b281afc976403a93157 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Dec 2019 13:51:22 +0000 Subject: Make definition of struct mp_int EXACTLY the same as the one in the (modified) tommath.h --- generic/tcl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic/tcl.h b/generic/tcl.h index 01ebd9b..8a81d9e 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2173,8 +2173,10 @@ typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData); * Override definitions for libtommath. */ -typedef struct mp_int mp_int; +#ifndef MP_INT_DECLARED #define MP_INT_DECLARED +typedef struct mp_int mp_int; +#endif /* *---------------------------------------------------------------------------- -- cgit v0.12 From 51bf99fdf5def9a1842cccf4308cc8d429c1ef21 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Dec 2019 13:52:05 +0000 Subject: More progress in making clang build on Cygwin warning-free --- unix/tclSelectNotfy.c | 3 +++ unix/tclUnixInit.c | 3 +++ unix/tclUnixPort.h | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c index cb8addf..585cd80 100644 --- a/unix/tclSelectNotfy.c +++ b/unix/tclSelectNotfy.c @@ -233,6 +233,9 @@ typedef struct { const void *lpszClassName; } WNDCLASSW; +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wignored-attributes" +#endif extern void __stdcall CloseHandle(void *); extern void *__stdcall CreateEventW(void *, unsigned char, unsigned char, void *); diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 13a624e..218813f 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -31,6 +31,9 @@ #endif #ifdef __CYGWIN__ +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wignored-attributes" +#endif DLLIMPORT extern __stdcall unsigned char GetVersionExW(void *); DLLIMPORT extern __stdcall void *GetModuleHandleW(const void *); DLLIMPORT extern __stdcall void FreeLibrary(void *); diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 85839f1..d253101 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -96,6 +96,10 @@ typedef off_t Tcl_SeekOffset; # define SOCKET unsigned int # define WSAEWOULDBLOCK 10035 typedef unsigned short WCHAR; +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wignored-attributes" +#endif __declspec(dllimport) extern __stdcall int GetModuleHandleExW(unsigned int, const void *, void *); __declspec(dllimport) extern __stdcall int GetModuleFileNameW(void *, const void *, int); __declspec(dllimport) extern __stdcall int WideCharToMultiByte(int, int, const void *, int, @@ -109,6 +113,9 @@ typedef off_t Tcl_SeekOffset; __declspec(dllimport) extern __stdcall int SetFileAttributesW(const WCHAR *, int); __declspec(dllimport) extern int cygwin_conv_path(int, const void *, void *, int); +#ifdef __clang__ +#pragma clang diagnostic pop +#endif /* On Cygwin, the environment is imported from the Cygwin DLL. */ #ifndef __x86_64__ # define environ __cygwin_environ -- cgit v0.12