On 12/08/14 16:37, Emil Velikov wrote:
MSVC helps us out with the final test by undicating that we're
corrupting the stack, which begs the question - at which point are we
messing up with the calling conventions. This patch attempts to resolve
that yet the bug still persists :'(

Signed-off-by: Emil Velikov <[email protected]>
---
  src/waffle/core/wcore_error_unittest.c | 4 ++++
  third_party/threads/threads.h          | 2 +-
  2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/waffle/core/wcore_error_unittest.c 
b/src/waffle/core/wcore_error_unittest.c
index 5176031..8b9b334 100644
--- a/src/waffle/core/wcore_error_unittest.c
+++ b/src/waffle/core/wcore_error_unittest.c
@@ -148,7 +148,11 @@ struct thread_arg {
  };

  /// The start routine given to threads in test wcore_error.thread_local.
+#if !defined(_WIN32)
  static bool
+#else
+static bool __stdcall
+#endif
  thread_start(struct thread_arg *a)
  {
      static const enum waffle_error error_codes[NUM_THREADS] = {
diff --git a/third_party/threads/threads.h b/third_party/threads/threads.h
index 4e7dba2..eb024dd 100644
--- a/third_party/threads/threads.h
+++ b/third_party/threads/threads.h
@@ -117,7 +117,7 @@ typedef pthread_once_t  once_flag;

  /*---------------------------- types ----------------------------*/
  typedef void (*tss_dtor_t)(void*);
-typedef int (*thrd_start_t)(void*);
+typedef int (__stdcall *thrd_start_t)(void*);

  struct xtime {
      time_t sec;



Sorry, I've been on PTO and I haven't caught up with email.

What is the problem here again?

Jose
_______________________________________________
waffle mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to