Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
e513f0ee
Commit
e513f0ee
authored
Mar 10, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed warnings and remote tests in MinGW build
parent
e45262b4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
22 deletions
+20
-22
cppa/detail/execinfo_windows.hpp
cppa/detail/execinfo_windows.hpp
+0
-1
src/execinfo_windows.cpp
src/execinfo_windows.cpp
+8
-17
src/fd_util.cpp
src/fd_util.cpp
+1
-1
unit_testing/test.hpp
unit_testing/test.hpp
+7
-0
unit_testing/test_broker.cpp
unit_testing/test_broker.cpp
+1
-1
unit_testing/test_remote_actor.cpp
unit_testing/test_remote_actor.cpp
+2
-1
unit_testing/test_typed_remote_actor.cpp
unit_testing/test_typed_remote_actor.cpp
+1
-1
No files found.
cppa/detail/execinfo_windows.hpp
View file @
e513f0ee
...
...
@@ -62,7 +62,6 @@ namespace cppa {
namespace
detail
{
int
backtrace
(
void
**
buffer
,
int
size
);
char
**
backtrace_symbols
(
void
*
const
*
buffer
,
int
size
);
void
backtrace_symbols_fd
(
void
*
const
*
buffer
,
int
size
,
int
fd
);
}
// namespace detail
...
...
src/execinfo_windows.cpp
View file @
e513f0ee
...
...
@@ -61,6 +61,9 @@
#include <stdlib.h>
#include <io.h>
#include <sstream>
#include <iostream>
#include "cppa/detail/execinfo_windows.hpp"
namespace
cppa
{
...
...
@@ -68,29 +71,17 @@ namespace detail {
int
backtrace
(
void
**
buffer
,
int
size
)
{
if
(
size
<=
0
)
return
0
;
auto
hProcess
=
GetCurrentProcess
();
auto
frames
=
CaptureStackBackTrace
(
0
,
(
DWORD
)
size
,
buffer
,
NULL
);
return
static_cast
<
int
>
(
frames
);
}
char
**
backtrace_symbols
(
void
*
const
*
buffer
,
int
size
)
{
auto
t
=
((
size_t
)
size
)
*
((
sizeof
(
void
*
)
*
2
)
+
6
+
sizeof
(
char
*
));
auto
r
=
(
char
**
)
malloc
(
t
);
if
(
!
r
)
return
nullptr
;
auto
cur
=
(
char
*
)
&
r
[
size
];
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
r
[
i
]
=
cur
;
sprintf
(
cur
,
"[+0x%Ix]"
,
(
size_t
)
buffer
[
i
]);
cur
+=
strlen
(
cur
)
+
1
;
}
return
r
;
}
void
backtrace_symbols_fd
(
void
*
const
*
buffer
,
int
size
,
int
fd
)
{
char
s
[
128
]
;
std
::
ostringstream
out
;
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
sprintf
(
s
,
"[+0x%Ix]
\n
"
,
(
size_t
)
buffer
[
i
]);
write
(
fd
,
s
,
strlen
(
s
));
out
<<
"["
<<
std
::
hex
<<
reinterpret_cast
<
size_t
>
(
buffer
[
i
])
<<
"]"
<<
std
::
endl
;
auto
s
=
out
.
str
();
write
(
fd
,
s
.
c_str
(),
s
.
size
());
}
_commit
(
fd
);
}
...
...
src/fd_util.cpp
View file @
e513f0ee
...
...
@@ -201,7 +201,7 @@ inline void ccall(const char* errmsg, F f, Ts&&... args) {
\******************************************************************************/
std
::
pair
<
native_socket_type
,
native_socket_type
>
create_pipe
()
{
socklen_t
addrlen
=
sizeof
(
sockaddr_in
);
native_socket_type
socks
[
2
]
=
{
-
1
,
-
1
};
native_socket_type
socks
[
2
]
=
{
invalid_socket
,
invalid_socket
};
auto
listener
=
socket
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
if
(
listener
==
invalid_socket
)
throw_io_failure
(
"socket() failed"
);
union
{
...
...
unit_testing/test.hpp
View file @
e513f0ee
...
...
@@ -11,10 +11,17 @@
#include "cppa/cppa.hpp"
#include "cppa/actor.hpp"
#include "cppa/config.hpp"
#include "cppa/logging.hpp"
#include "cppa/to_string.hpp"
#include "cppa/util/scope_guard.hpp"
#ifndef CPPA_WINDOWS
constexpr
char
to_dev_null
[]
=
" &>/dev/null"
;
#else
constexpr
char
to_dev_null
[]
=
""
;
#endif // CPPA_WINDOWS
void
set_default_test_settings
();
size_t
cppa_error_count
();
...
...
unit_testing/test_broker.cpp
View file @
e513f0ee
...
...
@@ -167,7 +167,7 @@ int main(int argc, char** argv) {
spawn_io_server
(
peer_acceptor
,
port
,
p
);
CPPA_CHECKPOINT
();
ostringstream
oss
;
oss
<<
app_path
<<
" mode=client port="
<<
port
<<
" &>/dev/null"
;
oss
<<
app_path
<<
" mode=client port="
<<
port
<<
to_dev_null
;
thread
child
{[
&
oss
]
{
CPPA_LOGC_TRACE
(
"NONE"
,
"main$thread_launcher"
,
""
);
auto
cmdstr
=
oss
.
str
();
...
...
unit_testing/test_remote_actor.cpp
View file @
e513f0ee
...
...
@@ -387,7 +387,8 @@ int main(int argc, char** argv) {
thread
child
;
ostringstream
oss
;
if
(
run_remote_actor
)
{
oss
<<
app_path
<<
" run=remote_actor port="
<<
port
<<
" &>/dev/null"
;
oss
<<
app_path
<<
" run=remote_actor port="
<<
port
<<
to_dev_null
;
// execute client_part() in a separate process,
// connected via localhost socket
child
=
thread
([
&
oss
]()
{
...
...
unit_testing/test_typed_remote_actor.cpp
View file @
e513f0ee
...
...
@@ -109,7 +109,7 @@ int main(int argc, char** argv) {
CPPA_CHECKPOINT
();
thread
child
;
ostringstream
oss
;
oss
<<
argv
[
0
]
<<
" run=remote_actor port="
<<
port
<<
" &>/dev/null"
;
oss
<<
argv
[
0
]
<<
" run=remote_actor port="
<<
port
<<
to_dev_null
;
// execute client_part() in a separate process,
// connected via localhost socket
child
=
thread
([
&
oss
]()
{
...
...
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