1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-07 08:02:56 +03:00

libssh2.h: use _WIN32 for Windows detection instead of rolling our own

Sync up `libssh2.h` Windows detection with the libssh2 source code.

`libssh2.h` was using `WIN32` and `LIBSSH2_WIN32` for Windows detection,
next to the official `_WIN32`. After this patch it only uses `_WIN32`
for this. Also, make it stop defining `LIBSSH2_WIN32`.

There is a slight chance these break compatibility with Windows
compilers that fail to define `_WIN32`. I'm not aware of any obsolete
or modern compiler affected, but in case there is one, one possible
solution is to define this macro manually.

Closes #1238
This commit is contained in:
Viktor Szakats
2023-11-21 20:32:12 +00:00
parent 487152f4fa
commit 631e7734c8
2 changed files with 9 additions and 13 deletions

View File

@@ -42,7 +42,7 @@
#include "libssh2.h"
#ifndef LIBSSH2_WIN32
#ifndef _WIN32
#include <unistd.h>
#endif