Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
901eba9f
Commit
901eba9f
authored
Sep 20, 2014
by
Daniel Cohen Gindi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generally adjusting headers for compiling on windows without the mixing of Winsock 1 and 2.
parent
8c585936
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
httpd.c
libvncserver/httpd.c
+8
-1
rfbserver.c
libvncserver/rfbserver.c
+2
-0
sockets.c
libvncserver/sockets.c
+5
-0
rfbclient.h
rfb/rfbclient.h
+4
-0
No files found.
libvncserver/httpd.c
View file @
901eba9f
...
@@ -43,8 +43,15 @@
...
@@ -43,8 +43,15 @@
#include <errno.h>
#include <errno.h>
#ifdef WIN32
#ifdef WIN32
#include <winsock.h>
#include <io.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#define close closesocket
#define close closesocket
#if defined(_MSC_VER)
#include <BaseTsd.h>
/* For the missing ssize_t */
#define ssize_t SSIZE_T
#define read _read
/* Prevent POSIX deprecation warnings */
#endif
#else
#else
#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H
#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H
#include <sys/time.h>
#include <sys/time.h>
...
...
libvncserver/rfbserver.c
View file @
901eba9f
...
@@ -43,6 +43,8 @@
...
@@ -43,6 +43,8 @@
#endif
#endif
#ifdef WIN32
#ifdef WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <io.h>
#include <io.h>
#define write(sock,buf,len) send(sock,buf,len,0)
#define write(sock,buf,len) send(sock,buf,len,0)
#else
#else
...
...
libvncserver/sockets.c
View file @
901eba9f
...
@@ -98,6 +98,8 @@ int deny_severity=LOG_WARNING;
...
@@ -98,6 +98,8 @@ int deny_severity=LOG_WARNING;
#endif
#endif
#if defined(WIN32)
#if defined(WIN32)
#include <winsock2.h>
#include <ws2tcpip.h>
#ifndef __MINGW32__
#ifndef __MINGW32__
#pragma warning (disable: 4018 4761)
#pragma warning (disable: 4018 4761)
#endif
#endif
...
@@ -110,6 +112,9 @@ int deny_severity=LOG_WARNING;
...
@@ -110,6 +112,9 @@ int deny_severity=LOG_WARNING;
#endif
#endif
#ifdef _MSC_VER
#ifdef _MSC_VER
#define SHUT_RD 0x00
#define SHUT_WR 0x01
#define SHUT_RDWR 0x02
#define snprintf _snprintf
/* Missing in MSVC */
#define snprintf _snprintf
/* Missing in MSVC */
#endif
#endif
...
...
rfb/rfbclient.h
View file @
901eba9f
...
@@ -31,6 +31,10 @@
...
@@ -31,6 +31,10 @@
* @file rfbclient.h
* @file rfbclient.h
*/
*/
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
/* Prevent loading any Winsock 1.x headers from windows.h */
#endif
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment