diff --git a/3rdparty/simdlib/Simd/SimdAlignment.h b/3rdparty/simdlib/Simd/SimdAlignment.h index a0c5699a06..08f451b495 100644 --- a/3rdparty/simdlib/Simd/SimdAlignment.h +++ b/3rdparty/simdlib/Simd/SimdAlignment.h @@ -58,7 +58,7 @@ namespace Simd SIMD_INLINE size_t Alignment() { -#if defined(WIN32) +#if defined(_WIN32) return GetAlignment(); #else return ALIGNMENT; diff --git a/3rdparty/simdlib/Simd/SimdAllocator.hpp b/3rdparty/simdlib/Simd/SimdAllocator.hpp index 8ee548e5ae..e90d5520ab 100644 --- a/3rdparty/simdlib/Simd/SimdAllocator.hpp +++ b/3rdparty/simdlib/Simd/SimdAllocator.hpp @@ -125,7 +125,7 @@ namespace Simd */ static SIMD_INLINE size_t Alignment() { -#if defined(__SimdAlignment_h__) && defined(WIN32) +#if defined(__SimdAlignment_h__) && defined(_WIN32) return Simd::Alignment(); #else return SimdAlignment(); diff --git a/3rdparty/simdlib/Simd/SimdBaseCpu.cpp b/3rdparty/simdlib/Simd/SimdBaseCpu.cpp index ab0cf38d6f..53948c1400 100644 --- a/3rdparty/simdlib/Simd/SimdBaseCpu.cpp +++ b/3rdparty/simdlib/Simd/SimdBaseCpu.cpp @@ -33,7 +33,7 @@ #include #include -#if defined(_MSC_VER) +#if defined(_WIN32) #ifndef NOMINMAX #define NOMINMAX @@ -77,7 +77,7 @@ namespace Simd { #if defined(SIMD_X86_ENABLE) || defined(SIMD_X64_ENABLE) bool CheckBit(int eax, int ecx, Cpuid::Register index, Cpuid::Bit bit) { unsigned int registers[4] = { 0, 0, 0, 0 }; -#if defined(_MSC_VER) +#if defined(_WIN32) __cpuidex((int*)registers, eax, ecx); #elif (defined __GNUC__) if (__get_cpuid_max(0, NULL) < eax) @@ -124,7 +124,7 @@ namespace Simd { } #endif -#if defined(_MSC_VER) +#if defined(_WIN32) typedef SYSTEM_LOGICAL_PROCESSOR_INFORMATION Info; void GetLogicalProcessorInformation(std::vector& info) { diff --git a/3rdparty/simdlib/Simd/SimdLib.cpp b/3rdparty/simdlib/Simd/SimdLib.cpp index a70197885d..57adeb2df5 100644 --- a/3rdparty/simdlib/Simd/SimdLib.cpp +++ b/3rdparty/simdlib/Simd/SimdLib.cpp @@ -30,7 +30,7 @@ #define SIMD_LIB_CPP #endif -#if defined(WIN32) && !defined(SIMD_STATIC) +#if defined(_WIN32) && !defined(SIMD_STATIC) #define SIMD_EXPORTS #ifndef NOMINMAX @@ -50,7 +50,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReasonForCall, LPVOID lpReserved) } return TRUE; } -#endif//WIN32 +#endif//_WIN32 #include "Simd/SimdLib.h" diff --git a/modules/core/include/visp3/core/vpSerial.h b/modules/core/include/visp3/core/vpSerial.h index fca5de1a55..ade88891ba 100644 --- a/modules/core/include/visp3/core/vpSerial.h +++ b/modules/core/include/visp3/core/vpSerial.h @@ -1,6 +1,6 @@ /* * ViSP, open source Visual Servoing Platform software. - * Copyright (C) 2005 - 2023 by Inria. All rights reserved. + * Copyright (C) 2005 - 2024 by Inria. All rights reserved. * * This software is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,8 +31,8 @@ * Serial communication. */ -#ifndef _vpSerial_h_ -#define _vpSerial_h_ +#ifndef VP_SERIAL_H +#define VP_SERIAL_H #if !defined(_WIN32) diff --git a/modules/core/src/tools/serial/vpSerial.cpp b/modules/core/src/tools/serial/vpSerial.cpp index cbf311b474..4c06297990 100644 --- a/modules/core/src/tools/serial/vpSerial.cpp +++ b/modules/core/src/tools/serial/vpSerial.cpp @@ -1,5 +1,4 @@ -/**************************************************************************** - * +/* * ViSP, open source Visual Servoing Platform software. * Copyright (C) 2005 - 2023 by Inria. All rights reserved. * @@ -30,8 +29,7 @@ * * Description: * Serial communication. - * -*****************************************************************************/ + */ #include @@ -100,7 +98,7 @@ BEGIN_VISP_NAMESPACE \param[in] bytesize : Size of each byte in the serial transmission of data. Default is 8 bits. \param[in] parity : Parity parameter. Default is without parity check. \param[in] stopbits : Number of stop bits used. Default is 1 stop bit. - \param[in] flowcontrol : Type of flowcontrol used. Default is no flow control. + \param[in] flowcontrol : Type of flow control used. Default is no flow control. */ vpSerial::vpSerial(const std::string &port, unsigned long baudrate, bytesize_t bytesize, parity_t parity, @@ -223,7 +221,7 @@ void vpSerial::close() int main() { - #ifndef WIN32 + #ifndef _WIN32 vpSerial serial; serial.setPort("/dev/ttyUSB0"); diff --git a/modules/core/test/math/testMath.cpp b/modules/core/test/math/testMath.cpp index 23292c7aca..edd45b92d6 100644 --- a/modules/core/test/math/testMath.cpp +++ b/modules/core/test/math/testMath.cpp @@ -53,7 +53,7 @@ // 4723 : potential divide by 0 #endif -#ifdef WIN32 +#ifdef _WIN32 #ifndef NAN // https://msdn.microsoft.com/en-us/library/w22adx1s%28v=vs.120%29.aspx // http://tdistler.com/2011/03/24/how-to-define-nan-not-a-number-on-windows 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