|
1 diff -r -u /tmp/opensm-3.3.9/complib/Makefile.in opensm-3.3.9/complib/Makefile.in |
|
2 --- /tmp/opensm-3.3.9/complib/Makefile.in Mon Mar 7 00:01:52 2011 |
|
3 +++ opensm-3.3.9/complib/Makefile.in Mon Mar 14 03:17:52 2011 |
|
4 @@ -239,7 +239,8 @@ |
|
5 lib_LTLIBRARIES = libosmcomp.la |
|
6 @DEBUG_FALSE@DBGFLAGS = -g |
|
7 @DEBUG_TRUE@DBGFLAGS = -ggdb -D_DEBUG_ |
|
8 -libosmcomp_la_CFLAGS = -Wall $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 |
|
9 +libosmcomp_la_CFLAGS = -Wall $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 \ |
|
10 + -D__EXTENSIONS__ |
|
11 @HAVE_LD_VERSION_SCRIPT_FALSE@libosmcomp_version_script = |
|
12 @HAVE_LD_VERSION_SCRIPT_TRUE@libosmcomp_version_script = -Wl,--version-script=$(srcdir)/libosmcomp.map |
|
13 complib_api_version = $(shell grep LIBVERSION= $(srcdir)/libosmcomp.ver | sed 's/LIBVERSION=//') |
|
14 @@ -343,7 +344,7 @@ |
|
15 done; \ |
|
16 test -z "$$list2" || { \ |
|
17 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ |
|
18 - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ |
|
19 + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ |
|
20 } |
|
21 |
|
22 uninstall-libLTLIBRARIES: |
|
23 diff -r -u /tmp/opensm-3.3.9/complib/cl_spinlock.c opensm-3.3.9/complib/cl_spinlock.c |
|
24 --- /tmp/opensm-3.3.9/complib/cl_spinlock.c Sun Mar 6 23:51:11 2011 |
|
25 +++ opensm-3.3.9/complib/cl_spinlock.c Mon Mar 14 03:13:30 2011 |
|
26 @@ -63,7 +63,21 @@ |
|
27 void cl_spinlock_destroy(IN cl_spinlock_t * const p_spinlock) |
|
28 { |
|
29 CL_ASSERT(p_spinlock); |
|
30 +#if !(defined(__SVR4) && defined(__sun)) |
|
31 +/* |
|
32 + * Solaris dumps cores when ibdiagnet is run with any of |
|
33 + * these three options: --help, --version, and --vars. |
|
34 + * The core dumping seems to be triggered by the "exit 0" |
|
35 + * in ibdebug_if.tcl after the appropriate message, such as |
|
36 + * the help message, is printed. The stack trace from the |
|
37 + * core dump shows the following CL_ASSERT fails with |
|
38 + * p_spinlock->state being 0, an invalid state. It's not |
|
39 + * clear why the TCL "exit 0" dumps cores on Solaris but |
|
40 + * not on Linux. As a workaround, the CL_ASSERT() is skipped |
|
41 + * to avoid dumping cores. |
|
42 + */ |
|
43 CL_ASSERT(cl_is_state_valid(p_spinlock->state)); |
|
44 +#endif |
|
45 |
|
46 if (p_spinlock->state == CL_INITIALIZED) { |
|
47 p_spinlock->state = CL_UNINITIALIZED; |
|
48 diff -r -u /tmp/opensm-3.3.9/opensm/osm_qos_policy.c opensm-3.3.9/opensm/osm_qos_policy.c |
|
49 --- /tmp/opensm-3.3.9/opensm/osm_qos_policy.c Sun Mar 6 23:51:12 2011 |
|
50 +++ opensm-3.3.9/opensm/osm_qos_policy.c Mon Mar 14 03:13:57 2011 |
|
51 @@ -46,7 +46,11 @@ |
|
52 #include <stdio.h> |
|
53 #include <assert.h> |
|
54 #include <stdlib.h> |
|
55 +#if !(defined(__SVR4) && defined(__sun)) |
|
56 #include <string.h> |
|
57 +#else |
|
58 +#include <strings.h> |
|
59 +#endif |
|
60 #include <ctype.h> |
|
61 #include <arpa/inet.h> |
|
62 #include <opensm/osm_log.h> |
|
63 diff -r -u /tmp/opensm-3.3.9/opensm/Makefile.am opensm-3.3.9/opensm/Makefile.am |
|
64 --- /tmp/opensm-3.3.9/opensm/Makefile.am Sun Mar 6 23:54:55 2011 |
|
65 +++ opensm-3.3.9/opensm/Makefile.am Mon Mar 14 03:13:52 2011 |
|
66 @@ -25,7 +25,7 @@ |
|
67 libopensm_la_DEPENDENCIES = $(srcdir)/libopensm.map |
|
68 |
|
69 sbin_PROGRAMS = opensm |
|
70 -opensm_LDFLAGS = -rdynamic |
|
71 +opensm_LDFLAGS = |
|
72 opensm_DEPENDENCIES = libopensm.la |
|
73 opensm_SOURCES = main.c osm_console_io.c osm_console.c osm_db_files.c \ |
|
74 osm_db_pack.c osm_drop_mgr.c \ |
|
75 diff -r -u /tmp/opensm-3.3.9/opensm/osm_opensm.c opensm-3.3.9/opensm/osm_opensm.c |
|
76 --- /tmp/opensm-3.3.9/opensm/osm_opensm.c Sun Mar 6 23:54:55 2011 |
|
77 +++ opensm-3.3.9/opensm/osm_opensm.c Mon Mar 14 03:13:56 2011 |
|
78 @@ -46,7 +46,11 @@ |
|
79 |
|
80 #include <stdio.h> |
|
81 #include <stdlib.h> |
|
82 +#if !(defined(__SVR4) && defined(__sun)) |
|
83 #include <string.h> |
|
84 +#else |
|
85 +#include <strings.h> |
|
86 +#endif |
|
87 #include <complib/cl_dispatcher.h> |
|
88 #include <complib/cl_passivelock.h> |
|
89 #include <vendor/osm_vendor_api.h> |
|
90 diff -r -u /tmp/opensm-3.3.9/opensm/Makefile.in opensm-3.3.9/opensm/Makefile.in |
|
91 --- /tmp/opensm-3.3.9/opensm/Makefile.in Mon Mar 7 00:01:53 2011 |
|
92 +++ opensm-3.3.9/opensm/Makefile.in Mon Mar 14 03:17:51 2011 |
|
93 @@ -284,7 +284,8 @@ |
|
94 top_builddir = @top_builddir@ |
|
95 top_srcdir = @top_srcdir@ |
|
96 INCLUDES = $(OSMV_INCLUDES) |
|
97 -AM_CFLAGS = -Wall $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 |
|
98 +AM_CFLAGS = -Wall $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 \ |
|
99 + -D__EXTENSIONS__ |
|
100 lib_LTLIBRARIES = libopensm.la |
|
101 @DEBUG_FALSE@DBGFLAGS = -g |
|
102 @DEBUG_TRUE@DBGFLAGS = -ggdb -D_DEBUG_ |
|
103 @@ -296,7 +297,7 @@ |
|
104 -export-dynamic $(libopensm_version_script) |
|
105 |
|
106 libopensm_la_DEPENDENCIES = $(srcdir)/libopensm.map |
|
107 -opensm_LDFLAGS = -rdynamic |
|
108 +opensm_LDFLAGS = |
|
109 opensm_DEPENDENCIES = libopensm.la |
|
110 opensm_SOURCES = main.c osm_console_io.c osm_console.c osm_db_files.c \ |
|
111 osm_db_pack.c osm_drop_mgr.c \ |
|
112 @@ -436,8 +437,8 @@ |
|
113 else :; fi; \ |
|
114 done; \ |
|
115 test -z "$$list2" || { \ |
|
116 - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ |
|
117 - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ |
|
118 + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ |
|
119 + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ |
|
120 } |
|
121 |
|
122 uninstall-libLTLIBRARIES: |
|
123 diff -r -u /tmp/opensm-3.3.9/opensm/osm_mcast_mgr.c opensm-3.3.9/opensm/osm_mcast_mgr.c |
|
124 --- /tmp/opensm-3.3.9/opensm/osm_mcast_mgr.c Sun Mar 6 23:56:08 2011 |
|
125 +++ opensm-3.3.9/opensm/osm_mcast_mgr.c Mon Mar 14 03:17:13 2011 |
|
126 @@ -751,7 +751,7 @@ |
|
127 OSM_LOG(sm->p_log, OSM_LOG_VERBOSE, |
|
128 "MLID 0x%X has %u members - nothing to do\n", |
|
129 mbox->mlid, num_ports); |
|
130 - drop_port_list(&port_list); |
|
131 + drop_port_list(&port_list); |
|
132 goto Exit; |
|
133 } |
|
134 |
|
135 diff -r -u /tmp/opensm-3.3.9/opensm/osm_helper.c opensm-3.3.9/opensm/osm_helper.c |
|
136 --- /tmp/opensm-3.3.9/opensm/osm_helper.c Sun Mar 6 23:51:12 2011 |
|
137 +++ opensm-3.3.9/opensm/osm_helper.c Mon Mar 14 03:13:53 2011 |
|
138 @@ -48,6 +48,7 @@ |
|
139 #include <stdio.h> |
|
140 #include <string.h> |
|
141 #include <arpa/inet.h> |
|
142 +#include <netinet/in.h> |
|
143 #include <complib/cl_debug.h> |
|
144 #include <iba/ib_types.h> |
|
145 #include <opensm/osm_helper.h> |
|
146 diff -r -u /tmp/opensm-3.3.9/opensm/osm_log.c opensm-3.3.9/opensm/osm_log.c |
|
147 --- /tmp/opensm-3.3.9/opensm/osm_log.c Sun Mar 6 23:51:12 2011 |
|
148 +++ opensm-3.3.9/opensm/osm_log.c Mon Mar 14 03:13:54 2011 |
|
149 @@ -191,7 +191,7 @@ |
|
150 (result.tm_mon < |
|
151 12 ? month_str[result.tm_mon] : "???"), |
|
152 result.tm_mday, result.tm_hour, result.tm_min, |
|
153 - result.tm_sec, usecs, pid, verbosity, buffer); |
|
154 + result.tm_sec, usecs, (int)pid, verbosity, buffer); |
|
155 #endif |
|
156 |
|
157 /* flush log */ |
|
158 diff -r -u /tmp/opensm-3.3.9/opensm/osm_db_files.c opensm-3.3.9/opensm/osm_db_files.c |
|
159 --- /tmp/opensm-3.3.9/opensm/osm_db_files.c Sun Mar 6 23:51:12 2011 |
|
160 +++ opensm-3.3.9/opensm/osm_db_files.c Mon Mar 14 03:13:53 2011 |
|
161 @@ -375,7 +375,7 @@ |
|
162 p_accum_val); |
|
163 |
|
164 /* check that the key is a number */ |
|
165 - if (!strtouq(p_key, &endptr, 0) |
|
166 + if (!strtoull(p_key, &endptr, 0) |
|
167 && *endptr != '\0') { |
|
168 OSM_LOG(p_log, OSM_LOG_ERROR, |
|
169 "ERR 610B: " |
|
170 diff -r -u /tmp/opensm-3.3.9/opensm/osm_qos_parser_y.h opensm-3.3.9/opensm/osm_qos_parser_y.h |
|
171 --- /tmp/opensm-3.3.9/opensm/osm_qos_parser_y.h Mon Mar 7 00:02:04 2011 |
|
172 +++ opensm-3.3.9/opensm/osm_qos_parser_y.h Mon Mar 14 03:18:09 2011 |
|
173 @@ -1,23 +1,24 @@ |
|
174 +/* A Bison parser, made by GNU Bison 2.3. */ |
|
175 |
|
176 -/* A Bison parser, made by GNU Bison 2.4.1. */ |
|
177 - |
|
178 /* Skeleton interface for Bison's Yacc-like parsers in C |
|
179 - |
|
180 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
|
181 + |
|
182 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
|
183 Free Software Foundation, Inc. |
|
184 - |
|
185 - This program is free software: you can redistribute it and/or modify |
|
186 + |
|
187 + This program is free software; you can redistribute it and/or modify |
|
188 it under the terms of the GNU General Public License as published by |
|
189 - the Free Software Foundation, either version 3 of the License, or |
|
190 - (at your option) any later version. |
|
191 - |
|
192 + the Free Software Foundation; either version 2, or (at your option) |
|
193 + any later version. |
|
194 + |
|
195 This program is distributed in the hope that it will be useful, |
|
196 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
197 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
198 GNU General Public License for more details. |
|
199 - |
|
200 + |
|
201 You should have received a copy of the GNU General Public License |
|
202 - along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
|
203 + along with this program; if not, write to the Free Software |
|
204 + Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
205 + Boston, MA 02110-1301, USA. */ |
|
206 |
|
207 /* As a special exception, you may create a larger work that contains |
|
208 part or all of the Bison parser skeleton and distribute that work |
|
209 @@ -28,11 +29,10 @@ |
|
210 special exception, which will cause the skeleton and the resulting |
|
211 Bison output files to be licensed under the GNU General Public |
|
212 License without this special exception. |
|
213 - |
|
214 + |
|
215 This special exception was added by the Free Software Foundation in |
|
216 version 2.2 of Bison. */ |
|
217 |
|
218 - |
|
219 /* Tokens. */ |
|
220 #ifndef YYTOKENTYPE |
|
221 # define YYTOKENTYPE |
|
222 @@ -198,11 +198,10 @@ |
|
223 |
|
224 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
|
225 typedef int YYSTYPE; |
|
226 -# define YYSTYPE_IS_TRIVIAL 1 |
|
227 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
|
228 # define YYSTYPE_IS_DECLARED 1 |
|
229 +# define YYSTYPE_IS_TRIVIAL 1 |
|
230 #endif |
|
231 |
|
232 extern YYSTYPE yylval; |
|
233 - |
|
234 |
|
235 diff -r -u /tmp/opensm-3.3.9/libvendor/Makefile.in opensm-3.3.9/libvendor/Makefile.in |
|
236 --- /tmp/opensm-3.3.9/libvendor/Makefile.in Mon Mar 7 00:01:52 2011 |
|
237 +++ opensm-3.3.9/libvendor/Makefile.in Mon Mar 14 03:17:51 2011 |
|
238 @@ -424,8 +424,8 @@ |
|
239 else :; fi; \ |
|
240 done; \ |
|
241 test -z "$$list2" || { \ |
|
242 - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ |
|
243 - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ |
|
244 + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ |
|
245 + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 755 $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ |
|
246 } |
|
247 |
|
248 uninstall-libLTLIBRARIES: |
|
249 diff -r -u /tmp/opensm-3.3.9/libvendor/osm_vendor_ibumad.c opensm-3.3.9/libvendor/osm_vendor_ibumad.c |
|
250 --- /tmp/opensm-3.3.9/libvendor/osm_vendor_ibumad.c Sun Mar 6 23:54:55 2011 |
|
251 +++ opensm-3.3.9/libvendor/osm_vendor_ibumad.c Mon Mar 14 03:13:49 2011 |
|
252 @@ -265,7 +265,8 @@ |
|
253 &length, -1)) < 0) { |
|
254 if (length <= MAD_BLOCK_SIZE) { |
|
255 OSM_LOG(p_ur->p_log, OSM_LOG_ERROR, "ERR 5404: " |
|
256 - "recv error on MAD sized umad (%m)\n"); |
|
257 + "recv error on MAD sized umad (%s)\n", |
|
258 + strerror(errno)); |
|
259 continue; |
|
260 } else { |
|
261 umad_free(umad); |
|
262 @@ -284,8 +285,9 @@ |
|
263 -1)) < 0) { |
|
264 OSM_LOG(p_ur->p_log, OSM_LOG_ERROR, |
|
265 "ERR 5406: " |
|
266 - "recv error on umad length %d (%m)\n", |
|
267 - length); |
|
268 + "recv error on umad length %d " |
|
269 + "(%s)\n", length, |
|
270 + strerror(errno)); |
|
271 continue; |
|
272 } |
|
273 } |
|
274 @@ -1073,8 +1075,9 @@ |
|
275 resp_expected ? p_bind->timeout : 0, |
|
276 p_bind->max_retries)) < 0) { |
|
277 OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5430: " |
|
278 - "Send p_madw = %p of size %d TID 0x%" PRIx64 " failed %d (%m)\n", |
|
279 - p_madw, sent_mad_size, cl_ntoh64(p_mad->trans_id), ret); |
|
280 + "Send p_madw = %p of size %d TID 0x%" PRIx64 "" |
|
281 + "failed %d (%s)\n", p_madw, sent_mad_size, |
|
282 + cl_ntoh64(p_mad->trans_id), ret, strerror(errno)); |
|
283 if (resp_expected) { |
|
284 get_madw(p_vend, &p_mad->trans_id); /* remove from aging table */ |
|
285 p_madw->status = IB_ERROR; |
|
286 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_map.h opensm-3.3.9/include/complib/cl_map.h |
|
287 --- /tmp/opensm-3.3.9/include/complib/cl_map.h Sun Mar 6 23:51:12 2011 |
|
288 +++ opensm-3.3.9/include/complib/cl_map.h Mon Mar 14 03:13:35 2011 |
|
289 @@ -275,7 +275,11 @@ |
|
290 * The map's pool of map items is the last thing initialized. |
|
291 * We can therefore use it to test for initialization. |
|
292 */ |
|
293 +#if !(defined(__SVR4) && defined(__sun)) |
|
294 return (cl_is_qpool_inited(&p_map->pool)); |
|
295 +#else |
|
296 + return (boolean_t)(cl_is_qpool_inited(&p_map->pool)); |
|
297 +#endif |
|
298 } |
|
299 |
|
300 /* |
|
301 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_types.h opensm-3.3.9/include/complib/cl_types.h |
|
302 --- /tmp/opensm-3.3.9/include/complib/cl_types.h Sun Mar 6 23:51:12 2011 |
|
303 +++ opensm-3.3.9/include/complib/cl_types.h Mon Mar 14 03:13:37 2011 |
|
304 @@ -428,8 +428,13 @@ |
|
305 */ |
|
306 static inline boolean_t cl_is_state_valid(IN const cl_state_t state) |
|
307 { |
|
308 +#if !(defined(__SVR4) && defined(__sun)) |
|
309 return ((state == CL_UNINITIALIZED) || (state == CL_INITIALIZED) || |
|
310 (state == CL_DESTROYING) || (state == CL_DESTROYED)); |
|
311 +#else |
|
312 + return (boolean_t)((state == CL_UNINITIALIZED) || (state == CL_INITIALIZED) || |
|
313 + (state == CL_DESTROYING) || (state == CL_DESTROYED)); |
|
314 +#endif |
|
315 } |
|
316 |
|
317 /* |
|
318 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_thread_osd.h opensm-3.3.9/include/complib/cl_thread_osd.h |
|
319 --- /tmp/opensm-3.3.9/include/complib/cl_thread_osd.h Sun Mar 6 23:51:12 2011 |
|
320 +++ opensm-3.3.9/include/complib/cl_thread_osd.h Mon Mar 14 03:13:37 2011 |
|
321 @@ -61,7 +61,11 @@ |
|
322 |
|
323 static inline boolean_t cl_is_blockable(void) |
|
324 { |
|
325 +#if !(defined(__SVR4) && defined(__sun)) |
|
326 return TRUE; |
|
327 +#else |
|
328 + return ((boolean_t)TRUE); |
|
329 +#endif |
|
330 } |
|
331 |
|
332 END_C_DECLS |
|
333 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_types_osd.h opensm-3.3.9/include/complib/cl_types_osd.h |
|
334 --- /tmp/opensm-3.3.9/include/complib/cl_types_osd.h Sun Mar 6 23:51:12 2011 |
|
335 +++ opensm-3.3.9/include/complib/cl_types_osd.h Mon Mar 14 03:13:37 2011 |
|
336 @@ -72,7 +72,12 @@ |
|
337 /* |
|
338 * Types not explicitly defined are native to the platform. |
|
339 */ |
|
340 +#if !(defined(__SVR4) && defined(__sun)) |
|
341 typedef int boolean_t; |
|
342 +#else |
|
343 +#include <infiniband/ofa_solaris.h> |
|
344 +#endif |
|
345 + |
|
346 typedef volatile int32_t atomic32_t; |
|
347 |
|
348 #ifndef NULL |
|
349 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_qlist.h opensm-3.3.9/include/complib/cl_qlist.h |
|
350 --- /tmp/opensm-3.3.9/include/complib/cl_qlist.h Sun Mar 6 23:51:12 2011 |
|
351 +++ opensm-3.3.9/include/complib/cl_qlist.h Mon Mar 14 03:13:36 2011 |
|
352 @@ -508,7 +508,11 @@ |
|
353 /* CL_ASSERT that the list was initialized. */ |
|
354 CL_ASSERT(p_list->state == CL_INITIALIZED); |
|
355 |
|
356 +#if !(defined(__SVR4) && defined(__sun)) |
|
357 return (!cl_qlist_count(p_list)); |
|
358 +#else |
|
359 + return (boolean_t)(!cl_qlist_count(p_list)); |
|
360 +#endif |
|
361 } |
|
362 |
|
363 /* |
|
364 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_byteswap_osd.h opensm-3.3.9/include/complib/cl_byteswap_osd.h |
|
365 --- /tmp/opensm-3.3.9/include/complib/cl_byteswap_osd.h Sun Mar 6 23:51:12 2011 |
|
366 +++ opensm-3.3.9/include/complib/cl_byteswap_osd.h Mon Mar 14 03:13:33 2011 |
|
367 @@ -44,8 +44,12 @@ |
|
368 /* |
|
369 * This provides defines __LITTLE_ENDIAN, __BIG_ENDIAN and __BYTE_ORDER |
|
370 */ |
|
371 +#if !(defined(__SVR4) && defined(__sun)) |
|
372 #include <endian.h> |
|
373 #include <byteswap.h> |
|
374 +#else |
|
375 +#include <infiniband/ofa_solaris.h> |
|
376 +#endif |
|
377 |
|
378 #ifdef __cplusplus |
|
379 # define BEGIN_C_DECLS extern "C" { |
|
380 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_debug_osd.h opensm-3.3.9/include/complib/cl_debug_osd.h |
|
381 --- /tmp/opensm-3.3.9/include/complib/cl_debug_osd.h Sun Mar 6 23:51:12 2011 |
|
382 +++ opensm-3.3.9/include/complib/cl_debug_osd.h Mon Mar 14 03:13:34 2011 |
|
383 @@ -42,7 +42,6 @@ |
|
384 #define _CL_DEBUG_OSD_H_ |
|
385 |
|
386 #include <complib/cl_types.h> |
|
387 -#include <bits/wordsize.h> |
|
388 |
|
389 #ifdef __cplusplus |
|
390 # define BEGIN_C_DECLS extern "C" { |
|
391 diff -r -u /tmp/opensm-3.3.9/include/complib/cl_qmap.h opensm-3.3.9/include/complib/cl_qmap.h |
|
392 --- /tmp/opensm-3.3.9/include/complib/cl_qmap.h Sun Mar 6 23:51:12 2011 |
|
393 +++ opensm-3.3.9/include/complib/cl_qmap.h Mon Mar 14 03:13:36 2011 |
|
394 @@ -346,7 +346,11 @@ |
|
395 CL_ASSERT(p_map); |
|
396 CL_ASSERT(p_map->state == CL_INITIALIZED); |
|
397 |
|
398 +#if !(defined(__SVR4) && defined(__sun)) |
|
399 return (p_map->count == 0); |
|
400 +#else |
|
401 + return (boolean_t)(p_map->count == 0); |
|
402 +#endif |
|
403 } |
|
404 |
|
405 /* |
|
406 diff -r -u /tmp/opensm-3.3.9/include/opensm/osm_madw.h opensm-3.3.9/include/opensm/osm_madw.h |
|
407 --- /tmp/opensm-3.3.9/include/opensm/osm_madw.h Sun Mar 6 23:51:12 2011 |
|
408 +++ opensm-3.3.9/include/opensm/osm_madw.h Mon Mar 14 03:13:40 2011 |
|
409 @@ -489,7 +489,11 @@ |
|
410 p_madw->mad_size = mad_size; |
|
411 if (p_mad_addr) |
|
412 p_madw->mad_addr = *p_mad_addr; |
|
413 +#if !(defined(__SVR4) && defined(__sun)) |
|
414 p_madw->resp_expected = FALSE; |
|
415 +#else |
|
416 + p_madw->resp_expected = (boolean_t)FALSE; |
|
417 +#endif |
|
418 } |
|
419 |
|
420 /* |
|
421 diff -r -u /tmp/opensm-3.3.9/include/opensm/osm_log.h opensm-3.3.9/include/opensm/osm_log.h |
|
422 --- /tmp/opensm-3.3.9/include/opensm/osm_log.h Sun Mar 6 23:51:12 2011 |
|
423 +++ opensm-3.3.9/include/opensm/osm_log.h Mon Mar 14 03:13:40 2011 |
|
424 @@ -355,7 +355,11 @@ |
|
425 static inline boolean_t osm_log_is_active(IN const osm_log_t * p_log, |
|
426 IN osm_log_level_t level) |
|
427 { |
|
428 +#if !(defined(__SVR4) && defined(__sun)) |
|
429 return ((p_log->level & level) != 0); |
|
430 +#else |
|
431 + return (boolean_t)((p_log->level & level) != 0); |
|
432 +#endif |
|
433 } |
|
434 |
|
435 /* |
|
436 diff -r -u /tmp/opensm-3.3.9/include/opensm/osm_helper.h opensm-3.3.9/include/opensm/osm_helper.h |
|
437 --- /tmp/opensm-3.3.9/include/opensm/osm_helper.h Sun Mar 6 23:51:12 2011 |
|
438 +++ opensm-3.3.9/include/opensm/osm_helper.h Mon Mar 14 03:13:39 2011 |
|
439 @@ -182,7 +182,11 @@ |
|
440 */ |
|
441 static inline boolean_t ib_gid_is_notzero(IN const ib_gid_t * p_gid) |
|
442 { |
|
443 +#if !(defined(__SVR4) && defined(__sun)) |
|
444 return memcmp(p_gid, &ib_zero_gid, sizeof(*p_gid)); |
|
445 +#else |
|
446 + return (boolean_t)memcmp(p_gid, &ib_zero_gid, sizeof(*p_gid)); |
|
447 +#endif |
|
448 } |
|
449 |
|
450 /* |
|
451 diff -r -u /tmp/opensm-3.3.9/include/iba/ib_types.h opensm-3.3.9/include/iba/ib_types.h |
|
452 --- /tmp/opensm-3.3.9/include/iba/ib_types.h Sun Mar 6 23:54:55 2011 |
|
453 +++ opensm-3.3.9/include/iba/ib_types.h Mon Mar 14 03:13:38 2011 |
|
454 @@ -578,8 +578,13 @@ |
|
455 static inline boolean_t OSM_API |
|
456 ib_class_is_vendor_specific_low(IN const uint8_t class_code) |
|
457 { |
|
458 +#if !(defined(__SVR4) && defined(__sun)) |
|
459 return ((class_code >= IB_MCLASS_VENDOR_LOW_RANGE_MIN) && |
|
460 (class_code <= IB_MCLASS_VENDOR_LOW_RANGE_MAX)); |
|
461 +#else |
|
462 + return (boolean_t)((class_code >= IB_MCLASS_VENDOR_LOW_RANGE_MIN) && |
|
463 + (class_code <= IB_MCLASS_VENDOR_LOW_RANGE_MAX)); |
|
464 +#endif |
|
465 } |
|
466 |
|
467 /* |
|
468 @@ -610,8 +615,13 @@ |
|
469 static inline boolean_t OSM_API |
|
470 ib_class_is_vendor_specific_high(IN const uint8_t class_code) |
|
471 { |
|
472 +#if !(defined(__SVR4) && defined(__sun)) |
|
473 return ((class_code >= IB_MCLASS_VENDOR_HIGH_RANGE_MIN) && |
|
474 (class_code <= IB_MCLASS_VENDOR_HIGH_RANGE_MAX)); |
|
475 +#else |
|
476 + return (boolean_t)((class_code >= IB_MCLASS_VENDOR_HIGH_RANGE_MIN) && |
|
477 + (class_code <= IB_MCLASS_VENDOR_HIGH_RANGE_MAX)); |
|
478 +#endif |
|
479 } |
|
480 |
|
481 /* |
|
482 @@ -641,8 +651,13 @@ |
|
483 static inline boolean_t OSM_API |
|
484 ib_class_is_vendor_specific(IN const uint8_t class_code) |
|
485 { |
|
486 +#if !(defined(__SVR4) && defined(__sun)) |
|
487 return (ib_class_is_vendor_specific_low(class_code) || |
|
488 ib_class_is_vendor_specific_high(class_code)); |
|
489 +#else |
|
490 + return (boolean_t)(ib_class_is_vendor_specific_low(class_code) || |
|
491 + ib_class_is_vendor_specific_high(class_code)); |
|
492 +#endif |
|
493 } |
|
494 |
|
495 /* |
|
496 @@ -671,11 +686,19 @@ |
|
497 */ |
|
498 static inline boolean_t OSM_API ib_class_is_rmpp(IN const uint8_t class_code) |
|
499 { |
|
500 +#if !(defined(__SVR4) && defined(__sun)) |
|
501 return ((class_code == IB_MCLASS_SUBN_ADM) || |
|
502 (class_code == IB_MCLASS_DEV_MGMT) || |
|
503 (class_code == IB_MCLASS_DEV_ADM) || |
|
504 (class_code == IB_MCLASS_BIS) || |
|
505 ib_class_is_vendor_specific_high(class_code)); |
|
506 +#else |
|
507 + return (boolean_t)((class_code == IB_MCLASS_SUBN_ADM) || |
|
508 + (class_code == IB_MCLASS_DEV_MGMT) || |
|
509 + (class_code == IB_MCLASS_DEV_ADM) || |
|
510 + (class_code == IB_MCLASS_BIS) || |
|
511 + ib_class_is_vendor_specific_high(class_code)); |
|
512 +#endif |
|
513 } |
|
514 |
|
515 /* |
|
516 @@ -2186,7 +2209,11 @@ |
|
517 */ |
|
518 static inline boolean_t OSM_API ib_pkey_is_full_member(IN const ib_net16_t pkey) |
|
519 { |
|
520 +#if !(defined(__SVR4) && defined(__sun)) |
|
521 return ((pkey & IB_PKEY_TYPE_MASK) == IB_PKEY_TYPE_MASK); |
|
522 +#else |
|
523 + return (boolean_t)((pkey & IB_PKEY_TYPE_MASK) == IB_PKEY_TYPE_MASK); |
|
524 +#endif |
|
525 } |
|
526 |
|
527 /* |
|
528 @@ -2217,7 +2244,11 @@ |
|
529 */ |
|
530 static inline boolean_t OSM_API ib_pkey_is_invalid(IN const ib_net16_t pkey) |
|
531 { |
|
532 +#if !(defined(__SVR4) && defined(__sun)) |
|
533 return ib_pkey_get_base(pkey) == 0x0000 ? TRUE : FALSE; |
|
534 +#else |
|
535 + return ib_pkey_get_base(pkey) == 0x0000 ? (boolean_t)TRUE : (boolean_t)FALSE; |
|
536 +#endif |
|
537 } |
|
538 |
|
539 /* |
|
540 @@ -2280,7 +2311,11 @@ |
|
541 */ |
|
542 static inline boolean_t OSM_API ib_gid_is_multicast(IN const ib_gid_t * p_gid) |
|
543 { |
|
544 +#if !(defined(__SVR4) && defined(__sun)) |
|
545 return (p_gid->raw[0] == 0xFF); |
|
546 +#else |
|
547 + return (boolean_t)(p_gid->raw[0] == 0xFF); |
|
548 +#endif |
|
549 } |
|
550 |
|
551 /****f* IBA Base: Types/ib_gid_get_scope |
|
552 @@ -2388,8 +2423,13 @@ |
|
553 static inline boolean_t OSM_API |
|
554 ib_gid_is_link_local(IN const ib_gid_t * const p_gid) |
|
555 { |
|
556 +#if !(defined(__SVR4) && defined(__sun)) |
|
557 return ((ib_gid_get_subnet_prefix(p_gid) & |
|
558 CL_HTON64(0xFFC0000000000000ULL)) == IB_DEFAULT_SUBNET_PREFIX); |
|
559 +#else |
|
560 + return (boolean_t)((ib_gid_get_subnet_prefix(p_gid) & |
|
561 + CL_HTON64(0xFFC0000000000000ULL)) == IB_DEFAULT_SUBNET_PREFIX); |
|
562 +#endif |
|
563 } |
|
564 |
|
565 /* |
|
566 @@ -2420,9 +2460,15 @@ |
|
567 static inline boolean_t OSM_API |
|
568 ib_gid_is_site_local(IN const ib_gid_t * const p_gid) |
|
569 { |
|
570 +#if !(defined(__SVR4) && defined(__sun)) |
|
571 return ((ib_gid_get_subnet_prefix(p_gid) & |
|
572 CL_HTON64(0xFFFFFFFFFFFF0000ULL)) == |
|
573 CL_HTON64(0xFEC0000000000000ULL)); |
|
574 +#else |
|
575 + return (boolean_t)((ib_gid_get_subnet_prefix(p_gid) & |
|
576 + CL_HTON64(0xFFFFFFFFFFFF0000ULL)) == |
|
577 + CL_HTON64(0xFEC0000000000000ULL)); |
|
578 +#endif |
|
579 } |
|
580 |
|
581 /* |
|
582 @@ -3912,8 +3958,13 @@ |
|
583 ib_mad_is_response(IN const ib_mad_t * const p_mad) |
|
584 { |
|
585 CL_ASSERT(p_mad); |
|
586 +#if !(defined(__SVR4) && defined(__sun)) |
|
587 return (p_mad->method & IB_MAD_METHOD_RESP_MASK || |
|
588 p_mad->method == IB_MAD_METHOD_TRAP_REPRESS); |
|
589 +#else |
|
590 + return (boolean_t)(p_mad->method & IB_MAD_METHOD_RESP_MASK || |
|
591 + p_mad->method == IB_MAD_METHOD_TRAP_REPRESS); |
|
592 +#endif |
|
593 } |
|
594 |
|
595 /* |
|
596 @@ -3968,7 +4019,11 @@ |
|
597 IN const uint8_t flag) |
|
598 { |
|
599 CL_ASSERT(p_rmpp_mad); |
|
600 +#if !(defined(__SVR4) && defined(__sun)) |
|
601 return ((p_rmpp_mad->rmpp_flags & flag) == flag); |
|
602 +#else |
|
603 + return (boolean_t)((p_rmpp_mad->rmpp_flags & flag) == flag); |
|
604 +#endif |
|
605 } |
|
606 |
|
607 /* |
|
608 @@ -4189,7 +4244,11 @@ |
|
609 */ |
|
610 static inline boolean_t OSM_API ib_smp_is_d(IN const ib_smp_t * const p_smp) |
|
611 { |
|
612 +#if !(defined(__SVR4) && defined(__sun)) |
|
613 return ((p_smp->status & IB_SMP_DIRECTION) == IB_SMP_DIRECTION); |
|
614 +#else |
|
615 + return (boolean_t)((p_smp->status & IB_SMP_DIRECTION) == IB_SMP_DIRECTION); |
|
616 +#endif |
|
617 } |
|
618 |
|
619 /* |
|
620 @@ -6114,7 +6173,11 @@ |
|
621 static inline boolean_t OSM_API |
|
622 ib_switch_info_get_state_change(IN const ib_switch_info_t * const p_si) |
|
623 { |
|
624 +#if !(defined(__SVR4) && defined(__sun)) |
|
625 return ((p_si->life_state & IB_SWITCH_PSC) == IB_SWITCH_PSC); |
|
626 +#else |
|
627 + return (boolean_t)((p_si->life_state & IB_SWITCH_PSC) == IB_SWITCH_PSC); |
|
628 +#endif |
|
629 } |
|
630 |
|
631 /* |
|
632 @@ -6170,7 +6233,11 @@ |
|
633 static inline boolean_t OSM_API |
|
634 ib_switch_info_get_opt_sl2vlmapping(IN const ib_switch_info_t * const p_si) |
|
635 { |
|
636 +#if !(defined(__SVR4) && defined(__sun)) |
|
637 return ((p_si->life_state & 0x01) == 0x01); |
|
638 +#else |
|
639 + return (boolean_t)((p_si->life_state & 0x01) == 0x01); |
|
640 +#endif |
|
641 } |
|
642 |
|
643 /* |
|
644 @@ -6200,7 +6267,11 @@ |
|
645 static inline boolean_t OSM_API |
|
646 ib_switch_info_is_enhanced_port0(IN const ib_switch_info_t * const p_si) |
|
647 { |
|
648 +#if !(defined(__SVR4) && defined(__sun)) |
|
649 return ((p_si->flags & 0x08) == 0x08); |
|
650 +#else |
|
651 + return (boolean_t)((p_si->flags & 0x08) == 0x08); |
|
652 +#endif |
|
653 } |
|
654 |
|
655 /* |
|
656 @@ -7460,7 +7531,11 @@ |
|
657 static inline boolean_t OSM_API |
|
658 ib_notice_is_generic(IN const ib_mad_notice_attr_t * p_ntc) |
|
659 { |
|
660 +#if !(defined(__SVR4) && defined(__sun)) |
|
661 return (p_ntc->generic_type & 0x80); |
|
662 +#else |
|
663 + return (boolean_t)(p_ntc->generic_type & 0x80); |
|
664 +#endif |
|
665 } |
|
666 |
|
667 /* |
|
668 diff -r -u /tmp/opensm-3.3.9/configure opensm-3.3.9/configure |
|
669 --- /tmp/opensm-3.3.9/configure Mon Mar 7 00:01:54 2011 |
|
670 +++ opensm-3.3.9/configure Mon Mar 14 03:13:28 2011 |
|
671 @@ -8022,7 +8022,7 @@ |
|
672 # are reset later if shared libraries are not supported. Putting them |
|
673 # here allows them to be overridden if necessary. |
|
674 runpath_var=LD_RUN_PATH |
|
675 - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
676 + hardcode_libdir_flag_spec='${wl}-R ${wl}$libdir' |
|
677 export_dynamic_flag_spec='${wl}--export-dynamic' |
|
678 # ancient GNU ld didn't support --whole-archive et. al. |
|
679 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then |
|
680 @@ -8245,7 +8245,7 @@ |
|
681 # DT_RUNPATH tag from executables and libraries. But doing so |
|
682 # requires that you compile everything twice, which is a pain. |
|
683 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
|
684 - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
|
685 + hardcode_libdir_flag_spec='${wl}-R ${wl}$libdir' |
|
686 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
|
687 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
|
688 else |
|
689 @@ -8493,7 +8493,7 @@ |
|
690 ;; |
|
691 |
|
692 bsdi[45]*) |
|
693 - export_dynamic_flag_spec=-rdynamic |
|
694 + export_dynamic_flag_spec= |
|
695 ;; |
|
696 |
|
697 cygwin* | mingw* | pw32* | cegcc*) |
|
698 @@ -8822,6 +8822,7 @@ |
|
699 ;; |
|
700 esac |
|
701 link_all_deplibs=yes |
|
702 + hardcode_libdir_flag_spec= |
|
703 ;; |
|
704 |
|
705 sunos4*) |