Skip to content

Commit

Permalink
Fix global usage of "WIN32" macros, see corresponding MR for info.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-trinh committed Jun 22, 2024
1 parent 2b81a1a commit 1ecda29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/core/include/visp3/core/vpSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ BEGIN_VISP_NAMESPACE
int main()
{
#ifndef WIN32
#ifndef _WIN32
vpSerial serial("/dev/ttyUSB0");
serial.write("Hello world");
#endif
Expand Down
8 changes: 4 additions & 4 deletions modules/core/src/tools/serial/vpSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ BEGIN_VISP_NAMESPACE
int main()
{
#ifndef WIN32
#ifndef _WIN32
vpSerial serial("/dev/ttyUSB0");
#endif
}
Expand All @@ -79,7 +79,7 @@ int main()
int main()
{
#ifndef WIN32
#ifndef _WIN32
vpSerial serial;
serial.setPort("/dev/ttyUSB0");
serial.open();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -207,7 +207,7 @@ void vpSerial::close()
int main()
{
#ifndef WIN32
#ifndef _WIN32
vpSerial serial;
serial.setPort("/dev/ttyUSB0");
Expand Down
6 changes: 3 additions & 3 deletions modules/robot/src/real-robot/flir-ptu/vpRobotFlirPtu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1ecda29

Please sign in to comment.