Skip to content

Commit cc937a0

Browse files
authored
Merge pull request #4054 from rhc54/cmr2x/exports
Fix PMIX_DECLSPEC conversions to PMIX_EXPORT, and fix unused var warning
2 parents d43a118 + 323b1bc commit cc937a0

File tree

20 files changed

+178
-197
lines changed

20 files changed

+178
-197
lines changed

opal/mca/pmix/pmix112/pmix/include/pmix/autogen/pmix_config_bottom.h

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2013 Mellanox Technologies, Inc.
1515
* All rights reserved.
16-
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
16+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2016 IBM Corporation. All rights reserved.
1818
* $COPYRIGHT$
1919
*
@@ -343,27 +343,15 @@
343343
# define __pmix_attribute_destructor__
344344
#endif
345345

346-
#ifndef PMIX_DECLSPEC
347-
# define PMIX_DECLSPEC
348346
#ifdef PMIX_C_HAVE_VISIBILITY
349347
# if PMIX_C_HAVE_VISIBILITY
350-
# define PMIX_EXPORT __attribute__((__visibility__("default")))
348+
# define PMIX_EXPORT __pmix_attribute_visibility__("default")
351349
# else
352350
# define PMIX_EXPORT
353351
# endif
354352
#else
355353
# define PMIX_EXPORT
356354
#endif
357-
#endif
358-
359-
#ifndef PMIX_DECLSPEC
360-
#define PMIX_DECLSPEC
361-
# if PMIX_C_HAVE_VISIBILITY
362-
# define PMIX_EXPORT __pmix_attribute_visibility__("default")
363-
# else
364-
# define PMIX_EXPORT
365-
# endif
366-
#endif
367355

368356
/*
369357
* Do we have <stdint.h>?
@@ -402,11 +390,11 @@ typedef PMIX_PTRDIFF_TYPE ptrdiff_t;
402390
#include <sys/param.h>
403391
#endif
404392
#if defined(PATH_MAX)
405-
#define PMIX_PATH_MAX (PATH_MAX + 1)
393+
#define PMIX_PATH_MAX (PATH_MAX + 1)
406394
#elif defined(_POSIX_PATH_MAX)
407-
#define PMIX_PATH_MAX (_POSIX_PATH_MAX + 1)
395+
#define PMIX_PATH_MAX (_POSIX_PATH_MAX + 1)
408396
#else
409-
#define PMIX_PATH_MAX 256
397+
#define PMIX_PATH_MAX 256
410398
#endif
411399

412400
#if defined(MAXHOSTNAMELEN)
@@ -590,4 +578,3 @@ typedef PMIX_PTRDIFF_TYPE ptrdiff_t;
590578

591579
#endif /* PMIX_BUILDING */
592580
#endif /* PMIX_CONFIG_BOTTOM_H */
593-

opal/mca/pmix/pmix112/pmix/src/buffer_ops/buffer_ops.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
14-
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved
14+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1515
* Copyright (c) 2015 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* Copyright (c) 2016 Mellanox Technologies, Inc.
@@ -44,12 +44,12 @@ BEGIN_C_DECLS
4444
* of places throughout the code base - transferring a value to
4545
* another pmix_value_t structure
4646
*/
47-
PMIX_DECLSPEC pmix_status_t pmix_value_xfer(pmix_value_t *kv, pmix_value_t *src);
48-
PMIX_DECLSPEC void pmix_value_load(pmix_value_t *v, void *data,
49-
pmix_data_type_t type);
50-
PMIX_DECLSPEC pmix_status_t pmix_value_unload(pmix_value_t *kv, void **data,
51-
size_t *sz, pmix_data_type_t type);
52-
PMIX_DECLSPEC bool pmix_value_cmp(pmix_value_t *p, pmix_value_t *p1);
47+
PMIX_EXPORT pmix_status_t pmix_value_xfer(pmix_value_t *kv, pmix_value_t *src);
48+
PMIX_EXPORT void pmix_value_load(pmix_value_t *v, void *data,
49+
pmix_data_type_t type);
50+
PMIX_EXPORT pmix_status_t pmix_value_unload(pmix_value_t *kv, void **data,
51+
size_t *sz, pmix_data_type_t type);
52+
PMIX_EXPORT bool pmix_value_cmp(pmix_value_t *p, pmix_value_t *p1);
5353

5454

5555
#define PMIX_LOAD_BUFFER(b, d, s) \
@@ -247,12 +247,12 @@ typedef pmix_status_t (*pmix_bfrop_copy_payload_fn_t)(pmix_buffer_t *dest,
247247
* structure gets loaded, so we provide an "open" call that is
248248
* executed as part of the program startup.
249249
*/
250-
PMIX_DECLSPEC pmix_status_t pmix_bfrop_open(void);
250+
PMIX_EXPORT pmix_status_t pmix_bfrop_open(void);
251251

252252
/**
253253
* BFROP finalize function
254254
*/
255-
PMIX_DECLSPEC pmix_status_t pmix_bfrop_close(void);
255+
PMIX_EXPORT pmix_status_t pmix_bfrop_close(void);
256256

257257

258258
/**
@@ -308,7 +308,7 @@ struct pmix_bfrop_t {
308308
};
309309
typedef struct pmix_bfrop_t pmix_bfrop_t;
310310

311-
PMIX_DECLSPEC extern pmix_bfrop_t pmix_bfrop; /* holds bfrop function pointers */
311+
PMIX_EXPORT extern pmix_bfrop_t pmix_bfrop; /* holds bfrop function pointers */
312312

313313
END_C_DECLS
314314

opal/mca/pmix/pmix112/pmix/src/buffer_ops/internal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
14-
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
14+
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
1515
* Copyright (c) 2015 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* Copyright (c) 2016 IBM Corporation. All rights reserved.
@@ -189,7 +189,7 @@ typedef struct {
189189
/** print function */
190190
pmix_bfrop_print_fn_t odti_print_fn;
191191
} pmix_bfrop_type_info_t;
192-
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_bfrop_type_info_t);
192+
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_bfrop_type_info_t);
193193

194194
/*
195195
* globals needed within bfrop
@@ -235,10 +235,10 @@ extern pmix_data_type_t pmix_bfrop_num_reg_types;
235235
/*
236236
* Specialized functions
237237
*/
238-
PMIX_DECLSPEC pmix_status_t pmix_bfrop_pack_buffer(pmix_buffer_t *buffer, const void *src,
238+
PMIX_EXPORT pmix_status_t pmix_bfrop_pack_buffer(pmix_buffer_t *buffer, const void *src,
239239
int32_t num_vals, pmix_data_type_t type);
240240

241-
PMIX_DECLSPEC pmix_status_t pmix_bfrop_unpack_buffer(pmix_buffer_t *buffer, void *dst,
241+
PMIX_EXPORT pmix_status_t pmix_bfrop_unpack_buffer(pmix_buffer_t *buffer, void *dst,
242242
int32_t *num_vals, pmix_data_type_t type);
243243

244244
/*

opal/mca/pmix/pmix112/pmix/src/buffer_ops/types.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
15-
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
15+
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
1616
* $COPYRIGHT$
1717
*
1818
* Additional copyrights may follow
@@ -78,7 +78,7 @@ typedef struct {
7878
including overhead -- packed in the buffer) */
7979
size_t bytes_used;
8080
} pmix_buffer_t;
81-
PMIX_DECLSPEC PMIX_CLASS_DECLARATION (pmix_buffer_t);
81+
PMIX_EXPORT PMIX_CLASS_DECLARATION (pmix_buffer_t);
8282

8383
/* these classes are required by the regex code shared
8484
* between the client and server implementations - it
@@ -88,7 +88,7 @@ typedef struct {
8888
int start;
8989
int cnt;
9090
} pmix_regex_range_t;
91-
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_regex_range_t);
91+
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_regex_range_t);
9292

9393
typedef struct {
9494
/* list object */
@@ -98,7 +98,7 @@ typedef struct {
9898
int num_digits;
9999
pmix_list_t ranges;
100100
} pmix_regex_value_t;
101-
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_regex_value_t);
101+
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_regex_value_t);
102102

103103
END_C_DECLS
104104

opal/mca/pmix/pmix112/pmix/src/class/pmix_hash_table.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12-
* Copyright (c) 2015 Intel, Inc. All rights reserved.
12+
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
1313
* Copyright (c) 2015 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
1515
* Copyright (c) 2016 Mellanox Technologies, Inc.
@@ -47,7 +47,7 @@
4747

4848
BEGIN_C_DECLS
4949

50-
PMIX_DECLSPEC PMIX_CLASS_DECLARATION(pmix_hash_table_t);
50+
PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_hash_table_t);
5151

5252
struct pmix_hash_table_t
5353
{
@@ -73,12 +73,12 @@ typedef struct pmix_hash_table_t pmix_hash_table_t;
7373
*
7474
*/
7575

76-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_init(pmix_hash_table_t* ht, size_t table_size);
76+
PMIX_EXPORT pmix_status_t pmix_hash_table_init(pmix_hash_table_t* ht, size_t table_size);
7777

7878
/**
7979
* Alternative form
8080
*/
81-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_init2(pmix_hash_table_t* ht, size_t estimated_max_size,
81+
PMIX_EXPORT pmix_status_t pmix_hash_table_init2(pmix_hash_table_t* ht, size_t estimated_max_size,
8282
int density_numer, int density_denom,
8383
int growth_numer, int growth_denom);
8484

@@ -103,7 +103,7 @@ static inline size_t pmix_hash_table_get_size(pmix_hash_table_t *ht)
103103
*
104104
*/
105105

106-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_all(pmix_hash_table_t *ht);
106+
PMIX_EXPORT pmix_status_t pmix_hash_table_remove_all(pmix_hash_table_t *ht);
107107

108108
/**
109109
* Retrieve value via uint32_t key.
@@ -118,8 +118,8 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_all(pmix_hash_table_t *ht);
118118
*
119119
*/
120120

121-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint32(pmix_hash_table_t* table, uint32_t key,
122-
void** ptr);
121+
PMIX_EXPORT pmix_status_t pmix_hash_table_get_value_uint32(pmix_hash_table_t* table, uint32_t key,
122+
void** ptr);
123123

124124
/**
125125
* Set value based on uint32_t key.
@@ -131,7 +131,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint32(pmix_hash_table_t*
131131
*
132132
*/
133133

134-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint32(pmix_hash_table_t* table, uint32_t key, void* value);
134+
PMIX_EXPORT pmix_status_t pmix_hash_table_set_value_uint32(pmix_hash_table_t* table, uint32_t key, void* value);
135135

136136
/**
137137
* Remove value based on uint32_t key.
@@ -142,7 +142,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint32(pmix_hash_table_t*
142142
*
143143
*/
144144

145-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint32(pmix_hash_table_t* table, uint32_t key);
145+
PMIX_EXPORT pmix_status_t pmix_hash_table_remove_value_uint32(pmix_hash_table_t* table, uint32_t key);
146146

147147
/**
148148
* Retrieve value via uint64_t key.
@@ -157,8 +157,8 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint32(pmix_hash_table_
157157
*
158158
*/
159159

160-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint64(pmix_hash_table_t *table, uint64_t key,
161-
void **ptr);
160+
PMIX_EXPORT pmix_status_t pmix_hash_table_get_value_uint64(pmix_hash_table_t *table, uint64_t key,
161+
void **ptr);
162162

163163
/**
164164
* Set value based on uint64_t key.
@@ -170,7 +170,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_uint64(pmix_hash_table_t *
170170
*
171171
*/
172172

173-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint64(pmix_hash_table_t *table, uint64_t key, void* value);
173+
PMIX_EXPORT pmix_status_t pmix_hash_table_set_value_uint64(pmix_hash_table_t *table, uint64_t key, void* value);
174174

175175
/**
176176
* Remove value based on uint64_t key.
@@ -181,7 +181,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_uint64(pmix_hash_table_t *
181181
*
182182
*/
183183

184-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint64(pmix_hash_table_t *table, uint64_t key);
184+
PMIX_EXPORT pmix_status_t pmix_hash_table_remove_value_uint64(pmix_hash_table_t *table, uint64_t key);
185185

186186
/**
187187
* Retrieve value via arbitrary length binary key.
@@ -196,8 +196,8 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_uint64(pmix_hash_table_
196196
*
197197
*/
198198

199-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_ptr(pmix_hash_table_t *table, const void* key,
200-
size_t keylen, void **ptr);
199+
PMIX_EXPORT pmix_status_t pmix_hash_table_get_value_ptr(pmix_hash_table_t *table, const void* key,
200+
size_t keylen, void **ptr);
201201

202202
/**
203203
* Set value based on arbitrary length binary key.
@@ -209,7 +209,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_value_ptr(pmix_hash_table_t *tab
209209
*
210210
*/
211211

212-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen, void* value);
212+
PMIX_EXPORT pmix_status_t pmix_hash_table_set_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen, void* value);
213213

214214
/**
215215
* Remove value based on arbitrary length binary key.
@@ -220,7 +220,7 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_set_value_ptr(pmix_hash_table_t *tab
220220
*
221221
*/
222222

223-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen);
223+
PMIX_EXPORT pmix_status_t pmix_hash_table_remove_value_ptr(pmix_hash_table_t *table, const void* key, size_t keylen);
224224

225225

226226
/** The following functions are only for allowing iterating through
@@ -245,8 +245,8 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_remove_value_ptr(pmix_hash_table_t *
245245
*
246246
*/
247247

248-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint32(pmix_hash_table_t *table, uint32_t *key,
249-
void **value, void **node);
248+
PMIX_EXPORT pmix_status_t pmix_hash_table_get_first_key_uint32(pmix_hash_table_t *table, uint32_t *key,
249+
void **value, void **node);
250250

251251

252252
/**
@@ -263,9 +263,9 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint32(pmix_hash_table
263263
*
264264
*/
265265

266-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_next_key_uint32(pmix_hash_table_t *table, uint32_t *key,
267-
void **value, void *in_node,
268-
void **out_node);
266+
PMIX_EXPORT pmix_status_t pmix_hash_table_get_next_key_uint32(pmix_hash_table_t *table, uint32_t *key,
267+
void **value, void *in_node,
268+
void **out_node);
269269

270270

271271
/**
@@ -281,8 +281,8 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_next_key_uint32(pmix_hash_table_
281281
*
282282
*/
283283

284-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint64(pmix_hash_table_t *table, uint64_t *key,
285-
void **value, void **node);
284+
PMIX_EXPORT pmix_status_t pmix_hash_table_get_first_key_uint64(pmix_hash_table_t *table, uint64_t *key,
285+
void **value, void **node);
286286

287287

288288
/**
@@ -299,9 +299,9 @@ PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_first_key_uint64(pmix_hash_table
299299
*
300300
*/
301301

302-
PMIX_DECLSPEC pmix_status_t pmix_hash_table_get_next_key_uint64(pmix_hash_table_t *table, uint64_t *key,
303-
void **value, void *in_node,
304-
void **out_node);
302+
PMIX_EXPORT pmix_status_t pmix_hash_table_get_next_key_uint64(pmix_hash_table_t *table, uint64_t *key,
303+
void **value, void *in_node,
304+
void **out_node);
305305

306306
/**
307307
* @brief Returns next power-of-two of the given value.

0 commit comments

Comments
 (0)