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
Admin message
GitLab update on
10 April 7 a.m. CEST
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
0be0dca7
Commit
0be0dca7
authored
7 years ago
by
Patzke
Browse files
Options
Downloads
Patches
Plain Diff
TMPFIX/Windows
parent
5623b501
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/cpp/src/system_io_windows.cpp
+54
-4
54 additions, 4 deletions
common/cpp/src/system_io_windows.cpp
with
54 additions
and
4 deletions
common/cpp/src/system_io_windows.cpp
+
54
−
4
View file @
0be0dca7
...
...
@@ -83,6 +83,11 @@ std::chrono::system_clock::time_point FileTime2TimePoint(const FILETIME& ft, IOE
return
tp
;
}
FileInfo
hidra2
::
SystemIO
::
GetFileInfo
(
const
std
::
string
&
path
,
const
std
::
string
&
name
,
IOErrors
*
err
)
const
{
return
FileInfo
();
}
bool
IsDirectory
(
const
WIN32_FIND_DATA
f
)
{
return
(
f
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
strstr
(
f
.
cFileName
,
".."
)
==
nullptr
&&
...
...
@@ -137,6 +142,47 @@ void SystemIO::CollectFileInformationRecursivly(const std::string& path,
}
}
int
hidra2
::
SystemIO
::
AddressFamilyToPosixFamily
(
AddressFamilies
address_family
)
const
{
return
0
;
}
int
hidra2
::
SystemIO
::
SocketTypeToPosixType
(
SocketTypes
socket_type
)
const
{
return
0
;
}
int
hidra2
::
SystemIO
::
SocketProtocolToPosixProtocol
(
SocketProtocols
socket_protocol
)
const
{
return
0
;
}
void
hidra2
::
SystemIO
::
InetBind
(
FileDescriptor
socket_fd
,
const
std
::
string
&
address
,
uint16_t
port
,
IOErrors
*
err
)
const
{
}
std
::
unique_ptr
<
std
::
tuple
<
std
::
string
,
FileDescriptor
>>
SystemIO
::
InetAccept
(
FileDescriptor
socket_fd
,
IOErrors
*
err
)
const
{
return
std
::
unique_ptr
<
std
::
tuple
<
std
::
string
,
FileDescriptor
>>
();
}
void
hidra2
::
SystemIO
::
InetConnect
(
FileDescriptor
socket_fd
,
const
std
::
string
&
address
,
IOErrors
*
err
)
const
{
}
size_t
hidra2
::
SystemIO
::
ReceiveTimeout
(
FileDescriptor
socket_fd
,
void
*
buf
,
size_t
length
,
uint16_t
timeout_in_sec
,
IOErrors
*
err
)
const
{
return
size_t
();
}
FileDescriptor
hidra2
::
SystemIO
::
_open
(
const
char
*
filename
,
int
posix_open_flags
)
const
{
int
fd
;
errno
=
_sopen_s
(
&
fd
,
filename
,
posix_open_flags
,
_SH_DENYNO
,
_S_IREAD
|
_S_IWRITE
);
return
fd
;
}
void
SystemIO
::
_close
(
hidra2
::
FileDescriptor
fd
)
const
{
::
_close
(
fd
);
...
...
@@ -151,15 +197,18 @@ ssize_t SystemIO::_write(hidra2::FileDescriptor fd, const void* buffer, size_t l
}
FileDescriptor
SystemIO
::
_socket
(
int
address_family
,
int
socket_type
,
int
socket_protocol
)
const
{
return
::
socket
(
address_family
,
socket_type
,
socket_protocol
);
//return ::socket(address_family, socket_type, socket_protocol);
return
0
;
}
ssize_t
SystemIO
::
_send
(
FileDescriptor
socket_fd
,
const
void
*
buffer
,
size_t
length
)
const
{
return
::
send
(
socket_fd
,
(
char
*
)
buffer
,
length
,
0
);
//return ::send(socket_fd, (char*)buffer, length, 0);
return
0
;
}
ssize_t
SystemIO
::
_recv
(
FileDescriptor
socket_fd
,
void
*
buffer
,
size_t
length
)
const
{
return
::
recv
(
socket_fd
,
(
char
*
)
buffer
,
length
,
0
);
//return ::recv(socket_fd, (char*)buffer, length, 0);
return
0
;
}
int
SystemIO
::
_mkdir
(
const
char
*
dirname
)
const
{
...
...
@@ -167,7 +216,8 @@ int SystemIO::_mkdir(const char* dirname) const {
}
int
SystemIO
::
_listen
(
FileDescriptor
fd
,
int
backlog
)
const
{
return
::
listen
(
fd
,
backlog
);
//return ::listen(fd, backlog);
return
0
;
}
...
...
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