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
b66c944f
Commit
b66c944f
authored
Jan 25, 2007
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile fix for MinGW
parent
b1ec6f9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
19 deletions
+27
-19
rfbserver.c
libvncserver/rfbserver.c
+27
-19
No files found.
libvncserver/rfbserver.c
View file @
b66c944f
...
...
@@ -75,6 +75,14 @@
/* errno */
#include <errno.h>
#ifdef __MINGW32__
static
int
compat_mkdir
(
const
char
*
path
,
int
mode
)
{
return
mkdir
(
path
);
}
#define mkdir compat_mkdir
#endif
static
void
rfbProcessClientProtocolVersion
(
rfbClientPtr
cl
);
static
void
rfbProcessClientNormalMessage
(
rfbClientPtr
cl
);
static
void
rfbProcessClientInitMessage
(
rfbClientPtr
cl
);
...
...
@@ -1115,32 +1123,32 @@ rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t
*/
#define MAX_PATH 260
typedef
struct
_FILETIME
{
typedef
struct
{
uint32_t
dwLowDateTime
;
uint32_t
dwHighDateTime
;
}
FILETIME
;
}
RFB_
FILETIME
;
typedef
struct
_WIN32_FIND_DATA
{
typedef
struct
{
uint32_t
dwFileAttributes
;
FILETIME
ftCreationTime
;
FILETIME
ftLastAccessTime
;
FILETIME
ftLastWriteTime
;
RFB_
FILETIME
ftCreationTime
;
RFB_
FILETIME
ftLastAccessTime
;
RFB_
FILETIME
ftLastWriteTime
;
uint32_t
nFileSizeHigh
;
uint32_t
nFileSizeLow
;
uint32_t
dwReserved0
;
uint32_t
dwReserved1
;
uint8_t
cFileName
[
MAX_PATH
];
uint8_t
cAlternateFileName
[
14
];
}
WIN32
_FIND_DATA
;
}
RFB
_FIND_DATA
;
#define FILE_ATTRIBUTE_READONLY 0x1
#define FILE_ATTRIBUTE_HIDDEN 0x2
#define FILE_ATTRIBUTE_SYSTEM 0x4
#define FILE_ATTRIBUTE_DIRECTORY 0x10
#define FILE_ATTRIBUTE_ARCHIVE 0x20
#define FILE_ATTRIBUTE_NORMAL 0x80
#define FILE_ATTRIBUTE_TEMPORARY 0x100
#define FILE_ATTRIBUTE_COMPRESSED 0x800
#define
RFB_
FILE_ATTRIBUTE_READONLY 0x1
#define
RFB_
FILE_ATTRIBUTE_HIDDEN 0x2
#define
RFB_
FILE_ATTRIBUTE_SYSTEM 0x4
#define
RFB_
FILE_ATTRIBUTE_DIRECTORY 0x10
#define
RFB_
FILE_ATTRIBUTE_ARCHIVE 0x20
#define
RFB_
FILE_ATTRIBUTE_NORMAL 0x80
#define
RFB_
FILE_ATTRIBUTE_TEMPORARY 0x100
#define
RFB_
FILE_ATTRIBUTE_COMPRESSED 0x800
rfbBool
rfbFilenameTranslate2UNIX
(
rfbClientPtr
cl
,
char
*
path
,
char
*
unixPath
)
{
...
...
@@ -1180,7 +1188,7 @@ rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer)
char
retfilename
[
MAX_PATH
];
char
path
[
MAX_PATH
];
struct
stat
statbuf
;
WIN32
_FIND_DATA
win32filename
;
RFB
_FIND_DATA
win32filename
;
int
nOptLen
=
0
,
retval
=
0
;
DIR
*
dirp
=
NULL
;
struct
dirent
*
direntp
=
NULL
;
...
...
@@ -1205,9 +1213,9 @@ rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer)
if
(
retval
==
0
)
{
memset
((
char
*
)
&
win32filename
,
0
,
sizeof
(
win32filename
));
win32filename
.
dwFileAttributes
=
Swap32IfBE
(
FILE_ATTRIBUTE_NORMAL
);
win32filename
.
dwFileAttributes
=
Swap32IfBE
(
RFB_
FILE_ATTRIBUTE_NORMAL
);
if
(
S_ISDIR
(
statbuf
.
st_mode
))
win32filename
.
dwFileAttributes
=
Swap32IfBE
(
FILE_ATTRIBUTE_DIRECTORY
);
win32filename
.
dwFileAttributes
=
Swap32IfBE
(
RFB_
FILE_ATTRIBUTE_DIRECTORY
);
win32filename
.
ftCreationTime
.
dwLowDateTime
=
Swap32IfBE
(
statbuf
.
st_ctime
);
/* Intel Order */
win32filename
.
ftCreationTime
.
dwHighDateTime
=
0
;
win32filename
.
ftLastAccessTime
.
dwLowDateTime
=
Swap32IfBE
(
statbuf
.
st_atime
);
/* Intel Order */
...
...
@@ -1226,7 +1234,7 @@ rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer)
/* Do not show hidden files (but show how to move up the tree) */
if
((
strcmp
(
direntp
->
d_name
,
".."
)
==
0
)
||
(
direntp
->
d_name
[
0
]
!=
'.'
))
{
nOptLen
=
sizeof
(
WIN32
_FIND_DATA
)
-
MAX_PATH
-
14
+
strlen
((
char
*
)
win32filename
.
cFileName
);
nOptLen
=
sizeof
(
RFB
_FIND_DATA
)
-
MAX_PATH
-
14
+
strlen
((
char
*
)
win32filename
.
cFileName
);
/*
rfbLog("rfbProcessFileTransfer() rfbDirContentRequest: rfbRDirContent: Sending \"%s\"\n", (char *)win32filename.cFileName);
*/
...
...
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