make compilable on windows

This commit is contained in:
Axel Kohlmeyer
2021-10-05 22:31:39 -04:00
parent 46eaa4888e
commit f17aeebbcd

View File

@ -23,7 +23,15 @@
#include <cstring>
#include <cctype>
#include <csignal>
#include <unistd.h>
#if defined(_WIN32)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> // for _getpid()
#else
#include <unistd.h> // for getpid()
#endif
#ifdef LMP_KOKKOS_GPU
@ -591,6 +599,10 @@ int KokkosLMP::neigh_count(int m)
void KokkosLMP::my_signal_handler(int sig)
{
if (sig == SIGSEGV) {
#if defined(_WIN32)
kill(_getpid(),SIGABRT);
#else
kill(getpid(),SIGABRT);
#endif
}
}