Portability fixes for Solaris and OSF1.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@11 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Matt Chapman 2000-08-15 12:01:01 +00:00
parent 3adf8de45c
commit 93c7854261
5 changed files with 9 additions and 8 deletions

View File

@ -18,7 +18,7 @@ means running X in 8-bit mode. Keyboard mapping may also be problematic.
The -l option will disable licence negotiation, which is probably
what you want during testing.
Tested platforms include Linux, Solaris and IRIX, but it is should be
Tested platforms include Linux, Solaris and OSF1, but it is should be
fairly straight-forward to port to other platforms and even windowing
systems.

View File

@ -842,7 +842,7 @@ void process_orders(STREAM s)
}
if (s->p != next_packet)
WARN("%d bytes remaining\n", next_packet - s->p);
WARN("%d bytes remaining\n", (int)(next_packet - s->p));
}
/* Reset order state */

View File

@ -21,7 +21,6 @@
#include <stdlib.h> /* malloc realloc free */
#include <unistd.h> /* read close getuid getgid getpid getppid gethostname */
#include <fcntl.h> /* open */
#include <getopt.h> /* getopt */
#include <pwd.h> /* getpwuid */
#include <sys/stat.h> /* stat */
#include <sys/time.h> /* gettimeofday */
@ -139,7 +138,9 @@ int main(int argc, char *argv[])
STATUS("Connection successful.\n");
snprintf(title, sizeof(title), "rdesktop - %s", server);
strcpy(title, "rdesktop - ");
strncat(title, server, sizeof(title));
if (ui_create_window(title))
{
rdp_main_loop();

6
tcp.c
View File

@ -23,7 +23,7 @@
#include <sys/time.h> /* timeval */
#include <netdb.h> /* gethostbyname */
#include <netinet/tcp.h> /* TCP_NODELAY */
#include <arpa/inet.h> /* inet_aton */
#include <arpa/inet.h> /* sockaddr_in inet_addr */
#include <errno.h> /* errno */
#include "rdesktop.h"
@ -120,7 +120,7 @@ BOOL tcp_connect(char *server)
{
memcpy(&servaddr.sin_addr, nslookup->h_addr, sizeof(servaddr.sin_addr));
}
else if (!inet_aton(server, &servaddr.sin_addr))
else if (!(servaddr.sin_addr.s_addr = inet_addr(server)))
{
STATUS("%s: unable to resolve host\n", server);
return False;
@ -142,7 +142,7 @@ BOOL tcp_connect(char *server)
return False;
}
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &true, sizeof(true));
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *)&true, sizeof(true));
in.size = 4096;
in.data = xmalloc(in.size);

2
xwin.c
View File

@ -526,7 +526,7 @@ void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy)
int scanline;
scanline = (cx + 3) & ~3;
STATUS("XGetImage(%p,%x,%d,%d,%d,%d,%x,%d)\n", display, wnd, x, y,
DEBUG("XGetImage(%p,%x,%d,%d,%d,%d,%x,%d)\n", display, wnd, x, y,
cx, cy, 0xffffffff, ZPixmap);
image = XGetImage(display, wnd, x, y, cx, cy, 0xffffffff, ZPixmap);
cache_put_desktop(offset, scanline*cy, image->data);