Skip to content

Commit 5cd3a1b

Browse files
Daisuke NishimatsuDaisuke Nishimatsu
authored andcommitted
update patch
Signed-off-by: Daisuke Nishimatsu <daisuke@DaisukenoMacBook-Air.local>
1 parent 1a0e06c commit 5cd3a1b

5 files changed

Lines changed: 11 additions & 506 deletions
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 5665ea33..6c0c46e9 100644
2+
index 611816f..7a16ab2 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -70,6 +70,18 @@ else()
5+
@@ -75,6 +75,18 @@ else()
66
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
77
set(FOXGLOVE_SDK_PLATFORM "x86_64-unknown-linux-gnu")
8-
set(FOXGLOVE_SDK_SHA "d07ec994e0b07766e6b68323a1f3bd407dc65391084f376b6169564b6d9873f0")
8+
set(FOXGLOVE_SDK_SHA "8e4967ec7446a06b5a04c47b54bcd4cecff2ad8776e002ef3803ed4a7076841d")
99
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
1010
+ set(FOXGLOVE_SDK_PLATFORM "aarch64-apple-darwin")
11-
+ set(FOXGLOVE_SDK_SHA "2ca081fa503211aba4e89fba26f5edf6174e3978620267f95700e1da559922e3")
11+
+ set(FOXGLOVE_SDK_SHA "0799fcb999616fe25d16d7e4b2894adb6f7fa97ce9671bd908d8412505887bec")
1212
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
1313
+ set(FOXGLOVE_SDK_PLATFORM "x86_64-apple-darwin")
14-
+ set(FOXGLOVE_SDK_SHA "c639c62143995bfc79e9cbe9eb9c170269acfa55b733bc2787742a1801d3b7b3")
14+
+ set(FOXGLOVE_SDK_SHA "3e0d7e575e7de9351ae71a0201ede5c00020f2e9d12cc5cd08e2c896033c9fa9")
1515
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
1616
+ set(FOXGLOVE_SDK_PLATFORM "aarch64-pc-windows-msvc")
17-
+ set(FOXGLOVE_SDK_SHA "3d1fc78ab0e870ad524cecd53857b9297999fe162548459287c477a307fff832")
17+
+ set(FOXGLOVE_SDK_SHA "9bb816d97a69bf8f5b81559027955bf9277fcd60204cd11495dff352f49cb35e")
1818
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
1919
+ set(FOXGLOVE_SDK_PLATFORM "x86_64-pc-windows-msvc")
20-
+ set(FOXGLOVE_SDK_SHA "f45238d567a9d576ba201f5bc407f0240bbb987f3c2e7cebda562269c7c1c310")
20+
+ set(FOXGLOVE_SDK_SHA "219f84aa184eb1224d8ba35bc84412dc253137e65b3d6c5f0ffd80a8b0c2dbd2")
2121
else()
2222
message(FATAL_ERROR "Unsupported platform/architecture combination: ${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}")
2323
endif()

patch/ros-kilted-rosx-introspection.unix.patch

Lines changed: 0 additions & 23 deletions
This file was deleted.

patch/ros-kilted-rosx-introspection.win.patch

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 4 additions & 226 deletions
Original file line numberDiff line numberDiff line change
@@ -1,236 +1,14 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index ab44d1c..07e3e9f 100644
2+
index 40bc803..937b6cf 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -97,6 +97,9 @@ endif()
5+
@@ -114,6 +114,9 @@ endif()
66
if(CMAKE_THREAD_LIBS_INIT)
77
target_link_libraries(urcl PUBLIC "${CMAKE_THREAD_LIBS_INIT}")
88
endif()
99
+if(UNIX AND NOT APPLE)
1010
+ target_link_libraries(urcl PUBLIC "rt")
1111
+endif()
1212

13-
##
14-
## Build testing if enabled by option
15-
diff --git a/include/ur_client_library/comm/bin_parser.h b/include/ur_client_library/comm/bin_parser.h
16-
index e13aba6..83f8e6c 100644
17-
--- a/include/ur_client_library/comm/bin_parser.h
18-
+++ b/include/ur_client_library/comm/bin_parser.h
19-
@@ -21,7 +21,6 @@
20-
#pragma once
21-
22-
#include <assert.h>
23-
-#include <endian.h>
24-
#include <inttypes.h>
25-
#include <array>
26-
#include <bitset>
27-
@@ -29,6 +28,7 @@
28-
#include <cstring>
29-
#include <string>
30-
#include <memory>
31-
+#include "ur_client_library/portable_endian.h"
32-
#include "ur_client_library/log.h"
33-
#include "ur_client_library/types.h"
34-
#include "ur_client_library/exceptions.h"
35-
diff --git a/include/ur_client_library/comm/package_serializer.h b/include/ur_client_library/comm/package_serializer.h
36-
index 01fa857..29fb196 100644
37-
--- a/include/ur_client_library/comm/package_serializer.h
38-
+++ b/include/ur_client_library/comm/package_serializer.h
39-
@@ -29,11 +29,11 @@
40-
#ifndef UR_CLIENT_LIBRARY_PACKAGE_SERIALIZER_H_INCLUDED
41-
#define UR_CLIENT_LIBRARY_PACKAGE_SERIALIZER_H_INCLUDED
42-
43-
-#include <endian.h>
44-
#include <cstdint>
45-
#include <cstring>
46-
#include <string>
47-
48-
+#include "ur_client_library/portable_endian.h"
49-
#include "ur_client_library/types.h"
50-
51-
namespace urcl
52-
diff --git a/include/ur_client_library/control/reverse_interface.h b/include/ur_client_library/control/reverse_interface.h
53-
index 8220207..665f26d 100644
54-
--- a/include/ur_client_library/control/reverse_interface.h
55-
+++ b/include/ur_client_library/control/reverse_interface.h
56-
@@ -36,9 +36,9 @@
57-
#include "ur_client_library/ur/robot_receive_timeout.h"
58-
#include "ur_client_library/ur/version_information.h"
59-
#include <cstring>
60-
-#include <endian.h>
61-
#include <condition_variable>
62-
#include <list>
63-
+#include "ur_client_library/portable_endian.h"
64-
65-
namespace urcl
66-
{
67-
diff --git a/include/ur_client_library/portable_endian.h b/include/ur_client_library/portable_endian.h
68-
new file mode 100644
69-
index 0000000..2b43378
70-
--- /dev/null
71-
+++ b/include/ur_client_library/portable_endian.h
72-
@@ -0,0 +1,118 @@
73-
+// "License": Public Domain
74-
+// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
75-
+// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
76-
+// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
77-
+// an example on how to get the endian conversion functions on different platforms.
78-
+
79-
+#ifndef PORTABLE_ENDIAN_H__
80-
+#define PORTABLE_ENDIAN_H__
81-
+
82-
+#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
83-
+
84-
+# define __WINDOWS__
85-
+
86-
+#endif
87-
+
88-
+#if defined(__linux__) || defined(__CYGWIN__)
89-
+
90-
+# include <endian.h>
91-
+
92-
+#elif defined(__APPLE__)
93-
+
94-
+# include <libkern/OSByteOrder.h>
95-
+
96-
+# define htobe16(x) OSSwapHostToBigInt16(x)
97-
+# define htole16(x) OSSwapHostToLittleInt16(x)
98-
+# define be16toh(x) OSSwapBigToHostInt16(x)
99-
+# define le16toh(x) OSSwapLittleToHostInt16(x)
100-
+
101-
+# define htobe32(x) OSSwapHostToBigInt32(x)
102-
+# define htole32(x) OSSwapHostToLittleInt32(x)
103-
+# define be32toh(x) OSSwapBigToHostInt32(x)
104-
+# define le32toh(x) OSSwapLittleToHostInt32(x)
105-
+
106-
+# define htobe64(x) OSSwapHostToBigInt64(x)
107-
+# define htole64(x) OSSwapHostToLittleInt64(x)
108-
+# define be64toh(x) OSSwapBigToHostInt64(x)
109-
+# define le64toh(x) OSSwapLittleToHostInt64(x)
110-
+
111-
+# define __BYTE_ORDER BYTE_ORDER
112-
+# define __BIG_ENDIAN BIG_ENDIAN
113-
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
114-
+# define __PDP_ENDIAN PDP_ENDIAN
115-
+
116-
+#elif defined(__OpenBSD__)
117-
+
118-
+# include <sys/endian.h>
119-
+
120-
+#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
121-
+
122-
+# include <sys/endian.h>
123-
+
124-
+# define be16toh(x) betoh16(x)
125-
+# define le16toh(x) letoh16(x)
126-
+
127-
+# define be32toh(x) betoh32(x)
128-
+# define le32toh(x) letoh32(x)
129-
+
130-
+# define be64toh(x) betoh64(x)
131-
+# define le64toh(x) letoh64(x)
132-
+
133-
+#elif defined(__WINDOWS__)
134-
+
135-
+# include <winsock2.h>
136-
+# include <sys/param.h>
137-
+
138-
+# if BYTE_ORDER == LITTLE_ENDIAN
139-
+
140-
+# define htobe16(x) htons(x)
141-
+# define htole16(x) (x)
142-
+# define be16toh(x) ntohs(x)
143-
+# define le16toh(x) (x)
144-
+
145-
+# define htobe32(x) htonl(x)
146-
+# define htole32(x) (x)
147-
+# define be32toh(x) ntohl(x)
148-
+# define le32toh(x) (x)
149-
+
150-
+# define htobe64(x) htonll(x)
151-
+# define htole64(x) (x)
152-
+# define be64toh(x) ntohll(x)
153-
+# define le64toh(x) (x)
154-
+
155-
+# elif BYTE_ORDER == BIG_ENDIAN
156-
+
157-
+ /* that would be xbox 360 */
158-
+# define htobe16(x) (x)
159-
+# define htole16(x) __builtin_bswap16(x)
160-
+# define be16toh(x) (x)
161-
+# define le16toh(x) __builtin_bswap16(x)
162-
+
163-
+# define htobe32(x) (x)
164-
+# define htole32(x) __builtin_bswap32(x)
165-
+# define be32toh(x) (x)
166-
+# define le32toh(x) __builtin_bswap32(x)
167-
+
168-
+# define htobe64(x) (x)
169-
+# define htole64(x) __builtin_bswap64(x)
170-
+# define be64toh(x) (x)
171-
+# define le64toh(x) __builtin_bswap64(x)
172-
+
173-
+# else
174-
+
175-
+# error byte order not supported
176-
+
177-
+# endif
178-
+
179-
+# define __BYTE_ORDER BYTE_ORDER
180-
+# define __BIG_ENDIAN BIG_ENDIAN
181-
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
182-
+# define __PDP_ENDIAN PDP_ENDIAN
183-
+
184-
+#else
185-
+
186-
+# error platform not supported
187-
+
188-
+#endif
189-
+
190-
+#endif
191-
diff --git a/include/ur_client_library/primary/package_header.h b/include/ur_client_library/primary/package_header.h
192-
index cd64bda..440b2e4 100644
193-
--- a/include/ur_client_library/primary/package_header.h
194-
+++ b/include/ur_client_library/primary/package_header.h
195-
@@ -32,7 +32,7 @@
196-
197-
#include <inttypes.h>
198-
#include <cstddef>
199-
-#include <endian.h>
200-
+#include "ur_client_library/portable_endian.h"
201-
#include "ur_client_library/types.h"
202-
203-
namespace urcl
204-
diff --git a/include/ur_client_library/rtde/package_header.h b/include/ur_client_library/rtde/package_header.h
205-
index f910a08..eb509ea 100644
206-
--- a/include/ur_client_library/rtde/package_header.h
207-
+++ b/include/ur_client_library/rtde/package_header.h
208-
@@ -31,7 +31,7 @@
209-
#define UR_CLIENT_LIBRARY_RTDE__HEADER_H_INCLUDED
210-
211-
#include <cstddef>
212-
-#include <endian.h>
213-
+#include "ur_client_library/portable_endian.h"
214-
#include "ur_client_library/types.h"
215-
#include "ur_client_library/comm/package_serializer.h"
216-
217-
diff --git a/src/comm/tcp_socket.cpp b/src/comm/tcp_socket.cpp
218-
index de18910..7e3c196 100644
219-
--- a/src/comm/tcp_socket.cpp
220-
+++ b/src/comm/tcp_socket.cpp
221-
@@ -20,7 +20,6 @@
222-
* limitations under the License.
223-
*/
224-
225-
-#include <endian.h>
226-
#include <chrono>
227-
#include <cstring>
228-
#include <sstream>
229-
@@ -31,6 +30,7 @@
230-
# include <netinet/tcp.h>
231-
#endif
232-
233-
+#include "ur_client_library/portable_endian.h"
234-
#include "ur_client_library/log.h"
235-
#include "ur_client_library/comm/tcp_socket.h"
236-
13+
# When warnings are treated as errors, also enable high warning level for all targets
14+
if(CMAKE_COMPILE_WARNING_AS_ERROR)

0 commit comments

Comments
 (0)