]> granicus.if.org Git - libatomic_ops/commitdiff
Eliminate 'cast to long from void*' compiler warning in test_atomic
authorIvan Maidanski <ivmai@mail.ru>
Wed, 12 Oct 2016 06:17:01 +0000 (09:17 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 2 Nov 2016 08:44:21 +0000 (11:44 +0300)
* tests/run_parallel.h (AO_PTRDIFF_T): Define to ptrdiff_t for all
targets.

tests/run_parallel.h

index 42110dc1700f330ad0192787d1b59a21473dc647..f34b56860e14f1c0367fc1bbb7940813a7adadab 100644 (file)
 # define abort() _exit(-1) /* there is no abort() in WinCE */
 #endif
 
-#ifndef _WIN64
-# define AO_PTRDIFF_T long
-#elif defined(__int64)
-# define AO_PTRDIFF_T __int64
-#else
-# define AO_PTRDIFF_T long long
+#ifndef AO_PTRDIFF_T
+# define AO_PTRDIFF_T ptrdiff_t
 #endif
 
 typedef void * (* thr_func)(void *);