]> granicus.if.org Git - libatomic_ops/commitdiff
Fix missing abort() usage in atomic_ops_malloc and tests on WinCE
authorIvan Maidanski <ivmai@mail.ru>
Mon, 7 Jan 2013 08:31:48 +0000 (12:31 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 7 Jan 2013 08:31:48 +0000 (12:31 +0400)
* src/atomic_ops_malloc.c (abort): Define to _exit(-1) if _WIN32_WCE
or __MINGW32CE__ (since there is no abort() in WinCE).
* tests/run_parallel.h (abort): Likewise.
* tests/test_stack.c (abort): Likewise.

src/atomic_ops_malloc.c
tests/run_parallel.h
tests/test_stack.c

index 9e5187bd8ed9cbbd05683e37b3f9f62647b21833..60757cfe95f4ac8ace131d198ab3a8f8810be785 100644 (file)
 # include <pthread.h>
 #endif
 
+#if (defined(_WIN32_WCE) || defined(__MINGW32CE__)) && !defined(abort)
+# define abort() _exit(-1) /* there is no abort() in WinCE */
+#endif
+
 /*
  * We round up each allocation request to the next power of two
  * minus one word.
index 7fae0b0ecae72169151b32e2c87ca049e403e075..42110dc1700f330ad0192787d1b59a21473dc647 100644 (file)
 
 #include "atomic_ops.h"
 
+#if (defined(_WIN32_WCE) || defined(__MINGW32CE__)) && !defined(abort)
+# define abort() _exit(-1) /* there is no abort() in WinCE */
+#endif
+
 #ifndef _WIN64
 # define AO_PTRDIFF_T long
 #elif defined(__int64)
index be108d9eccd79668eddee13b6364e571d11dd747..8170e5c1cf111dae80c3c99982e9f1067e4172fd 100644 (file)
 
 #include "atomic_ops_stack.h" /* includes atomic_ops.h as well */
 
+#if (defined(_WIN32_WCE) || defined(__MINGW32CE__)) && !defined(abort)
+# define abort() _exit(-1) /* there is no abort() in WinCE */
+#endif
+
 #ifndef MAX_NTHREADS
 # define MAX_NTHREADS 100
 #endif