aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src
diff options
context:
space:
mode:
authorVadim Troshchinskiy <vtroshchinskiy@qindel.com>2021-03-10 00:25:20 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-08 08:10:45 +0200
commit46258974d0527e299c82d36e31f9f160ee3e586f (patch)
tree8f0e53d5d213f2c584e9dcce4c3ec0e1fa236141 /nxcomp/src
parent9815f32d5c7c397c5a27a53764565beda2d007c2 (diff)
downloadnx-libs-46258974d0527e299c82d36e31f9f160ee3e586f.tar.gz
nx-libs-46258974d0527e299c82d36e31f9f160ee3e586f.tar.bz2
nx-libs-46258974d0527e299c82d36e31f9f160ee3e586f.zip
nxcomp: Support Cygwin64.
64 bit Cygwin defines __CYGWIN__ instead of __CYGWIN32__
Diffstat (limited to 'nxcomp/src')
-rw-r--r--nxcomp/src/Auth.cpp2
-rw-r--r--nxcomp/src/BlockCacheSet.cpp4
-rw-r--r--nxcomp/src/ChannelEndPoint.cpp2
-rw-r--r--nxcomp/src/Children.cpp4
-rw-r--r--nxcomp/src/Fork.cpp2
-rw-r--r--nxcomp/src/Loop.cpp16
-rw-r--r--nxcomp/src/MD5.c4
-rw-r--r--nxcomp/src/Proxy.cpp4
-rw-r--r--nxcomp/src/ServerChannel.cpp4
-rw-r--r--nxcomp/src/Socket.cpp8
10 files changed, 25 insertions, 25 deletions
diff --git a/nxcomp/src/Auth.cpp b/nxcomp/src/Auth.cpp
index 87955f6ab..aaca905de 100644
--- a/nxcomp/src/Auth.cpp
+++ b/nxcomp/src/Auth.cpp
@@ -238,7 +238,7 @@ int Auth::getCookie()
char command[DEFAULT_STRING_LIMIT];
- #if defined(__CYGWIN32__)
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
snprintf(command, DEFAULT_STRING_LIMIT,
"%s/bin/nxauth", control -> SystemPath);
diff --git a/nxcomp/src/BlockCacheSet.cpp b/nxcomp/src/BlockCacheSet.cpp
index 1dd6361dc..1f79b2dd0 100644
--- a/nxcomp/src/BlockCacheSet.cpp
+++ b/nxcomp/src/BlockCacheSet.cpp
@@ -51,13 +51,13 @@ BlockCacheSet::~BlockCacheSet()
// failure happens in this destructor.
//
- #ifndef __CYGWIN32__
+ #if !(defined(__CYGWIN__) || defined(__CYGWIN32__))
for (unsigned int i = 0; i < size_; i++)
delete caches_[i];
delete[]caches_;
- #endif /* ifdef __CYGWIN32__ */
+ #endif /* if defined(__CYGWIN__) || defined(__CYGWIN32__) */
}
diff --git a/nxcomp/src/ChannelEndPoint.cpp b/nxcomp/src/ChannelEndPoint.cpp
index 635dd1ac7..7d088bdde 100644
--- a/nxcomp/src/ChannelEndPoint.cpp
+++ b/nxcomp/src/ChannelEndPoint.cpp
@@ -253,7 +253,7 @@ getComputerName() {
const char *hostname = NULL;
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
hostname = getenv("COMPUTERNAME");
diff --git a/nxcomp/src/Children.cpp b/nxcomp/src/Children.cpp
index 2e89f2e68..4c74e662b 100644
--- a/nxcomp/src/Children.cpp
+++ b/nxcomp/src/Children.cpp
@@ -295,7 +295,7 @@ int NXTransDialog(const char *caption, const char *message,
strcat(newPath, "/Applications/NX Client for OSX.app/Contents/MacOS:");
#endif
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
// FIXME: missing length limitation!
strcat(newPath, ".:");
#endif
@@ -505,7 +505,7 @@ int NXTransClient(const char* display)
#endif
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
strcat(newPath, ".:");
diff --git a/nxcomp/src/Fork.cpp b/nxcomp/src/Fork.cpp
index 657c36134..5c855e0c3 100644
--- a/nxcomp/src/Fork.cpp
+++ b/nxcomp/src/Fork.cpp
@@ -53,7 +53,7 @@
int Fork()
{
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
int limit = RETRY_LIMIT;
int timeout = RETRY_TIMEOUT;
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp
index 7fecb9123..4bbf42b91 100644
--- a/nxcomp/src/Loop.cpp
+++ b/nxcomp/src/Loop.cpp
@@ -79,7 +79,7 @@ typedef int socklen_t;
#include <sys/select.h>
#endif
-#ifndef __CYGWIN32__
+#if !(defined(__CYGWIN__) || defined(__CYGWIN32__))
#include <netinet/tcp.h>
#endif
@@ -4702,7 +4702,7 @@ void CleanupStreams()
// at the time the proxy is being shut down.
//
- #ifndef __CYGWIN32__
+ #if !(defined(__CYGWIN__) || defined(__CYGWIN32__))
nxinfo << "Loop: Freeing up streams in process "
<< "with pid '" << getpid() << "'.\n"
@@ -4753,7 +4753,7 @@ void CleanupStreams()
errofs = NULL;
}
- #endif /* #ifndef __CYGWIN32__ */
+ #endif /* #if !(defined(__CYGWIN__) || defined(__CYGWIN32__)) */
//
// Reset these as they can't be reset
@@ -5705,7 +5705,7 @@ void HandleSignal(int signal)
break;
}
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
case 12:
{
@@ -6753,7 +6753,7 @@ int ConnectToRemote(ChannelEndPoint &socketAddress)
// on Windows.
//
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
KillProcess(lastDialog, "dialog", SIGKILL, 1);
@@ -9849,7 +9849,7 @@ char *GetClientPath()
clientEnv = "/Applications/NX Client for OSX.app/Contents/MacOS/nxclient";
#else
- # if defined(__CYGWIN32__)
+ # if defined(__CYGWIN__) || defined(__CYGWIN32__)
clientEnv = "C:\\Program Files\\NX Client for Windows\\nxclient";
@@ -13633,7 +13633,7 @@ int CheckSignal(int signal)
}
default:
{
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
//
// This signal can be raised by the Cygwin
@@ -14968,7 +14968,7 @@ static void handleAlertInLoop()
// on Windows.
//
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
KillProcess(lastDialog, "dialog", SIGKILL, 0);
diff --git a/nxcomp/src/MD5.c b/nxcomp/src/MD5.c
index 43a2793e3..f5bc01761 100644
--- a/nxcomp/src/MD5.c
+++ b/nxcomp/src/MD5.c
@@ -64,7 +64,7 @@
* at compile time.
*/
-#if defined(__linux) || defined(__CYGWIN32__)
+#if defined(__linux) || defined(__CYGWIN__) || defined(__CYGWIN32__)
#include <endian.h>
@@ -74,7 +74,7 @@
#define ARCH_IS_BIG_ENDIAN 1
#endif
-#endif /* #if defined(__linux) || defined(__CYGWIN32__) */
+#endif /* #if defined(__linux) || defined(__CYGWIN__) || defined(__CYGWIN32__) */
#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
#ifdef ARCH_IS_BIG_ENDIAN
diff --git a/nxcomp/src/Proxy.cpp b/nxcomp/src/Proxy.cpp
index 7f72fae3f..1713e308b 100644
--- a/nxcomp/src/Proxy.cpp
+++ b/nxcomp/src/Proxy.cpp
@@ -44,7 +44,7 @@
#include "Misc.h"
-#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
+#if defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
#include <netinet/in_systm.h>
#endif
@@ -788,7 +788,7 @@ const char *Proxy::getComputerName()
const char *hostname = NULL;
- #ifdef __CYGWIN32__
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__)
hostname = getenv("COMPUTERNAME");
diff --git a/nxcomp/src/ServerChannel.cpp b/nxcomp/src/ServerChannel.cpp
index 0c99c9d33..4ee83507d 100644
--- a/nxcomp/src/ServerChannel.cpp
+++ b/nxcomp/src/ServerChannel.cpp
@@ -6972,7 +6972,7 @@ int ServerChannel::handleShmemRequest(DecodeBuffer &decodeBuffer, unsigned char
// 0600 mask doesn't seem to work).
//
- #if defined(__CYGWIN32__) || defined(__APPLE__)
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__APPLE__)
int permissions = 0777;
@@ -7047,7 +7047,7 @@ int ServerChannel::handleShmemRequest(DecodeBuffer &decodeBuffer, unsigned char
}
else
{
- #ifndef __CYGWIN32__
+ #if !(defined(__CYGWIN__) || defined(__CYGWIN32__))
#ifdef WARNING
*logofs << "handleShmemRequest: WARNING! Can't create the shared "
diff --git a/nxcomp/src/Socket.cpp b/nxcomp/src/Socket.cpp
index 8be04d76d..34fdea634 100644
--- a/nxcomp/src/Socket.cpp
+++ b/nxcomp/src/Socket.cpp
@@ -30,7 +30,7 @@
#include <sys/types.h>
#include <sys/utsname.h>
-#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
+#if defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
#include <netinet/in_systm.h>
#endif
@@ -65,7 +65,7 @@
// disabled when running on MacOS/X.
//
-#ifdef __CYGWIN32__
+#if defined(__CYGWIN__) || defined(__CYGWIN32__)
#define TIOCOUTQ ((unsigned int) -1)
#endif
@@ -101,7 +101,7 @@ int GetKernelStep()
// in the relevant OS dependent functions.
//
- #if defined(__CYGWIN32__) || defined(__APPLE__)
+ #if defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__APPLE__)
_kernelStep = 0;
@@ -183,7 +183,7 @@ int GetKernelStep()
}
}
- #endif /* #if defined(__CYGWIN32__) || defined(__APPLE__) */
+ #endif /* #if defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__APPLE__) */
}
return _kernelStep;