diff --git a/modules/core/include/visp3/core/vpSerial.h b/modules/core/include/visp3/core/vpSerial.h index c961e49ca5..af5e2bd4fe 100644 --- a/modules/core/include/visp3/core/vpSerial.h +++ b/modules/core/include/visp3/core/vpSerial.h @@ -54,7 +54,7 @@ BEGIN_VISP_NAMESPACE int main() { -#ifndef WIN32 +#ifndef _WIN32 vpSerial serial("/dev/ttyUSB0"); serial.write("Hello world"); #endif diff --git a/modules/core/src/tools/serial/vpSerial.cpp b/modules/core/src/tools/serial/vpSerial.cpp index dc67b13159..1c4e2461f1 100644 --- a/modules/core/src/tools/serial/vpSerial.cpp +++ b/modules/core/src/tools/serial/vpSerial.cpp @@ -67,7 +67,7 @@ BEGIN_VISP_NAMESPACE int main() { -#ifndef WIN32 +#ifndef _WIN32 vpSerial serial("/dev/ttyUSB0"); #endif } @@ -79,7 +79,7 @@ int main() int main() { -#ifndef WIN32 +#ifndef _WIN32 vpSerial serial; serial.setPort("/dev/ttyUSB0"); serial.open(); @@ -146,7 +146,7 @@ void vpSerial::setStopbits(const stopbits_t &stopbits) { m_stopbits = stopbits; int main() { -#ifndef WIN32 +#ifndef _WIN32 vpSerial serial; serial.setPort("/dev/ttyUSB0"); serial.open(); @@ -207,7 +207,7 @@ void vpSerial::close() int main() { -#ifndef WIN32 +#ifndef _WIN32 vpSerial serial; serial.setPort("/dev/ttyUSB0"); diff --git a/modules/robot/src/real-robot/flir-ptu/vpRobotFlirPtu.cpp b/modules/robot/src/real-robot/flir-ptu/vpRobotFlirPtu.cpp index ce4e9a98e1..27b57c2a03 100644 --- a/modules/robot/src/real-robot/flir-ptu/vpRobotFlirPtu.cpp +++ b/modules/robot/src/real-robot/flir-ptu/vpRobotFlirPtu.cpp @@ -71,7 +71,7 @@ void vpRobotFlirPtu::emergencyStop(int signo) case SIGSEGV: msg << "SIGSEGV (stop due to a segmentation fault) "; break; -#ifndef WIN32 +#ifndef _WIN32 case SIGBUS: msg << "SIGBUS (stop due to a bus error) "; break; @@ -113,7 +113,7 @@ vpRobotFlirPtu::vpRobotFlirPtu() { signal(SIGINT, vpRobotFlirPtu::emergencyStop); signal(SIGSEGV, vpRobotFlirPtu::emergencyStop); -#ifndef WIN32 +#ifndef _WIN32 signal(SIGBUS, vpRobotFlirPtu::emergencyStop); signal(SIGKILL, vpRobotFlirPtu::emergencyStop); signal(SIGQUIT, vpRobotFlirPtu::emergencyStop); @@ -547,7 +547,7 @@ void vpRobotFlirPtu::connect(const std::string &portname, int baudrate) // Open a port if (ceropen(m_cer, portname.c_str(), 0)) { -#if WIN32 +#if _WIN32 throw(vpException(vpException::fatalError, "Failed to open %s: %s.", portname.c_str(), cerstrerror(m_cer, errstr, sizeof(errstr)))); #else