summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2018-06-18 21:21:45 +0100
committerPatric Stout <truebrain@openttd.org>2018-07-19 20:24:17 +0200
commit63898f61b0ce4e321b5a7c39da2cfb5b16cfde5f (patch)
tree549ee0acd8d9af0f946cd8024e2d4839f82aeca8 /src/os
parent93469a92f20246d100d6ca8888ba621223e480ff (diff)
downloadopenttd-63898f61b0ce4e321b5a7c39da2cfb5b16cfde5f.tar.xz
Codechange: Rearrange struct packing defines and make MinGW use _Pragma pack style
Diffstat (limited to 'src/os')
-rw-r--r--src/os/windows/win32.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp
index 2d853037f..59b2fccac 100644
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -805,16 +805,15 @@ int OTTDStringCompare(const char *s1, const char *s2)
}
#ifdef _MSC_VER
-/* Code from MSDN: https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx */
+/* Based on code from MSDN: https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx */
const DWORD MS_VC_EXCEPTION = 0x406D1388;
-#pragma pack(push,8)
-typedef struct {
+
+PACK_N(struct THREADNAME_INFO {
DWORD dwType; ///< Must be 0x1000.
LPCSTR szName; ///< Pointer to name (in user addr space).
DWORD dwThreadID; ///< Thread ID (-1=caller thread).
DWORD dwFlags; ///< Reserved for future use, must be zero.
-} THREADNAME_INFO;
-#pragma pack(pop)
+}, 8);
/**
* Signal thread name to any attached debuggers.