Skip to content

Commit

Permalink
Use _WIN32 as the standard preprocessor macro for Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Nov 25, 2023
1 parent b244725 commit ddf44bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions libs/hid/hidtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(int argc, char* argv[])
hid_device *handle;
int i;

#ifdef WIN32
#ifdef _WIN32
UNREFERENCED_PARAMETER(argc);
UNREFERENCED_PARAMETER(argv);
#endif
Expand Down Expand Up @@ -178,7 +178,7 @@ int main(int argc, char* argv[])
printf("waiting...\n");
if (res < 0)
printf("Unable to read()\n");
#ifdef WIN32
#ifdef _WIN32
Sleep(500);
#else
usleep(500 * 1000);
Expand All @@ -196,7 +196,7 @@ int main(int argc, char* argv[])
/* Free static HIDAPI objects. */
hid_exit();

#ifdef WIN32
#ifdef _WIN32
system("pause");
#endif

Expand Down
2 changes: 1 addition & 1 deletion libs/indiclient/baseclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ bool BaseClient::connectServer()

IDLog("INDI::BaseClient::connectServer: creating new connection...\n");

#ifndef _WINDOWS
#ifndef _WIN32
// System with unix support automatically connect over unix domain
if (d->cServer != "localhost" || d->cServer != "127.0.0.1" || d->connectToHostAndWait("localhost:", d->cPort) == false)
#endif
Expand Down
2 changes: 1 addition & 1 deletion libs/indicore/indiutility.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ inline static size_t indi_strlcpy(char * dst, const char * src, size_t maxlen)
// C++
#ifdef __cplusplus

#ifdef _WINDOWS
#ifdef _WIN32
typedef int mode_t;
#endif

Expand Down

0 comments on commit ddf44bd

Please sign in to comment.