Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
a3781294
Commit
a3781294
authored
5 years ago
by
Sergey Yakubov
Browse files
Options
Downloads
Patches
Plain Diff
fix windows
parent
20ed827a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/cpp/src/system_io/system_io.h
+2
-2
2 additions, 2 deletions
common/cpp/src/system_io/system_io.h
common/cpp/src/system_io/system_io_windows.cpp
+1
-3
1 addition, 3 deletions
common/cpp/src/system_io/system_io_windows.cpp
with
3 additions
and
5 deletions
common/cpp/src/system_io/system_io.h
+
2
−
2
View file @
a3781294
...
@@ -70,6 +70,8 @@ class SystemIO final : public IO {
...
@@ -70,6 +70,8 @@ class SystemIO final : public IO {
Error
*
err
)
const
;
Error
*
err
)
const
;
void
GetSubDirectoriesRecursively
(
const
std
::
string
&
path
,
SubDirList
*
subdirs
,
Error
*
err
)
const
;
void
GetSubDirectoriesRecursively
(
const
std
::
string
&
path
,
SubDirList
*
subdirs
,
Error
*
err
)
const
;
Error
CreateDirectoryWithParents
(
const
std
::
string
&
root_path
,
const
std
::
string
&
path
)
const
;
Error
CreateDirectoryWithParents
(
const
std
::
string
&
root_path
,
const
std
::
string
&
path
)
const
;
uint8_t
*
AllocateArray
(
uint64_t
fsize
,
Error
*
err
)
const
;
#if defined(__linux__) || defined (__APPLE__)
#if defined(__linux__) || defined (__APPLE__)
// used to for epoll - assumed single epoll instance per class instance
// used to for epoll - assumed single epoll instance per class instance
const
int
kMaxEpollEvents
=
10
;
const
int
kMaxEpollEvents
=
10
;
...
@@ -78,8 +80,6 @@ class SystemIO final : public IO {
...
@@ -78,8 +80,6 @@ class SystemIO final : public IO {
Error
CreateEpoolIfNeeded
(
SocketDescriptor
master_socket
)
const
;
Error
CreateEpoolIfNeeded
(
SocketDescriptor
master_socket
)
const
;
Error
ProcessNewConnection
(
SocketDescriptor
master_socket
,
std
::
vector
<
std
::
string
>*
new_connections
,
Error
ProcessNewConnection
(
SocketDescriptor
master_socket
,
std
::
vector
<
std
::
string
>*
new_connections
,
ListSocketDescriptors
*
sockets_to_listen
)
const
;
ListSocketDescriptors
*
sockets_to_listen
)
const
;
uint8_t
*
AllocateArray
(
uint64_t
fsize
,
Error
*
err
)
const
;
#endif
#endif
public:
public:
~
SystemIO
();
~
SystemIO
();
...
...
This diff is collapsed.
Click to expand it.
common/cpp/src/system_io/system_io_windows.cpp
+
1
−
3
View file @
a3781294
...
@@ -8,8 +8,6 @@
...
@@ -8,8 +8,6 @@
#include
<fcntl.h>
#include
<fcntl.h>
#include
<iostream>
#include
<iostream>
#include
<direct.h>
#include
<direct.h>
#include
<mswsock.h>
using
std
::
string
;
using
std
::
string
;
using
std
::
vector
;
using
std
::
vector
;
...
@@ -385,7 +383,7 @@ Error SystemIO::SendFile(SocketDescriptor socket_fd, const std::string& fname, s
...
@@ -385,7 +383,7 @@ Error SystemIO::SendFile(SocketDescriptor socket_fd, const std::string& fname, s
return
GetLastError
();
return
GetLastError
();
}
}
if
(
!
TransmitFile
(
socket_fd
,
hFile
,
0
,
0
,
NULL
,
NULL
,
TF_USE_DEFAULT_WORKER
))
{
if
(
!
TransmitFile
(
socket_fd
,
hFile
,
0
,
0
,
NULL
,
NULL
,
0
))
{
_close
(
hFile
);
_close
(
hFile
);
return
GetLastError
();
return
GetLastError
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment