Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EtherBone Core
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
EtherBone Core
Commits
c04b21d7
Commit
c04b21d7
authored
13 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
Port back to linux
parent
59bf8bbb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/Makefile
+5
-6
5 additions, 6 deletions
api/Makefile
api/transport/posix-ip.h
+3
-2
3 additions, 2 deletions
api/transport/posix-ip.h
api/transport/ssh.c
+4
-0
4 additions, 0 deletions
api/transport/ssh.c
with
12 additions
and
8 deletions
api/Makefile
+
5
−
6
View file @
c04b21d7
TARGET
=
i586-mingw32msvc-
#TARGET = i586-mingw32msvc-
#LIBS = -lwsock32 -lws2_32
FLAGS
=
-Wall
-Wmissing-declarations
-O0
-g
-m32
#FLAGS := $(FLAGS) -DEB_USE_DYNAMIC # deterministic untill table overflow (default)
...
...
@@ -12,8 +13,6 @@ CXXFLAGS= $(FLAGS)
CC
=
$(
TARGET
)
gcc
CXX
=
$(
TARGET
)
g++
LIBS
=
-lwsock32
-lws2_32
GOALS
=
demo/sizes demo/eb-read demo/eb-write demo/eb-snoop
test
/loopback
LIBRARY
=
etherbone.a
OBJECTS
=
$(
patsubst %.cpp,%.o,
$(
patsubst %.c,%.o,
$(
SOURCES
)))
...
...
@@ -42,9 +41,9 @@ all: $(GOALS) $(LIBRARY)
$(LIBRARY)
:
$(OBJECTS)
rm
-f
$@
i586-mingw32msvc-g++
$(
CXXFLAGS
)
-shared
-Wl
,--out-implib
=
libetherbone.dll.a
-Wl
,--output-def,etherbone.def
-o
$@
$^
$(
LIBS
)
#
$(TARGET)ar rcs $@ $^
#
$(TARGET)ranlib $@
#
i586-mingw32msvc-g++ $(CXXFLAGS) -shared -Wl,--out-implib=libetherbone.dll.a -Wl,--output-def,etherbone.def -o $@ $^ $(LIBS)
$(TARGET)ar
rcs
$@
$^
$(TARGET)ranlib
$@
demo/%
:
demo/%.c $(LIBRARY)
$(
CC
)
$(
CFLAGS
)
-o
$@
$^
$(
LIBS
)
...
...
This diff is collapsed.
Click to expand it.
api/transport/posix-ip.h
+
3
−
2
View file @
c04b21d7
...
...
@@ -28,6 +28,8 @@
#ifndef EB_POSIX_IP_H
#define EB_POSIX_IP_H
#include
"../etherbone.h"
#ifdef __WIN32
#define _WIN32_WINNT 0x0501
#define MSG_DONTWAIT 0 // !!!
...
...
@@ -43,11 +45,10 @@ typedef SOCKET eb_posix_sock_t;
#include
<sys/time.h>
#include
<netinet/in.h>
#include
<netdb.h>
#include
<unistd.h>
typedef
eb_descriptor_t
eb_posix_sock_t
;
#endif
#include
"../etherbone.h"
EB_PRIVATE
void
eb_posix_ip_close
(
eb_posix_sock_t
sock
);
EB_PRIVATE
eb_posix_sock_t
eb_posix_ip_open
(
int
type
,
int
port
);
EB_PRIVATE
socklen_t
eb_posix_ip_resolve
(
const
char
*
prefix
,
const
char
*
address
,
int
type
,
struct
sockaddr_storage
*
out
);
...
...
This diff is collapsed.
Click to expand it.
api/transport/ssh.c
+
4
−
0
View file @
c04b21d7
...
...
@@ -35,6 +35,10 @@
#include
<stdlib.h>
#include
<errno.h>
#ifndef __WIN32
#include
<unistd.h>
#endif
eb_status_t
eb_ssh_open
(
struct
eb_transport
*
transportp
,
int
port
)
{
/* noop */
return
EB_OK
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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