1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 7 #define _CRTIMP 8 #include <stdlib.h> 9 #include <windows.h> 10 _set_purecall_handler(_purecall_handler handler)11_purecall_handler __cdecl _set_purecall_handler(_purecall_handler handler) 12 { 13 static _purecall_handler prev_handler; 14 return InterlockedExchangePointer((void**)&prev_handler, handler); 15 } 16 17 void *__MINGW_IMP_SYMBOL(_set_purecall_handler) = _set_purecall_handler; 18 19