Skip to content

Commit 94d7479

Browse files
committed
Fix warning of no prototypes for removed functions.
When compiling the removed functions in v4.0.x we were defining ENABLE_MPI1_COMPAT to 1 in each implementation file, so we wouldn't have to port these implementations to call newer MPI APIs. Ironic, because that's exactly what we're asking our user to do. This however neglected providing the protypes for these removed functions when NOT configured with --enable-mpi1-compatibility This commit changes these removed functions to hardcode OMPI_OMIT_MPI1_COMPAT_DECLS to 0 instead before including the mpi header, so these functions will have full prototypes. Signed-off-by: Geoffrey Paulsen <[email protected]>
1 parent 4a0fdea commit 94d7479

File tree

10 files changed

+30
-21
lines changed

10 files changed

+30
-21
lines changed

ompi/mpi/c/address.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
* with --enable-mpi1-compatibility.
2828
*
2929
* To prevent having to port these implementations of removed functions
30-
* to the newer MPI calls, we are defining ENABLE_MPI1_COMPAT to 1
31-
* before including the c bindings.
30+
* to the newer MPI calls, we are defining OMPI_OMIT_MPI1_COMPAT_DECLS
31+
* to 0 before including the c bindings.
3232
*/
33-
#define ENABLE_MPI1_COMPAT 1
33+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
3434

3535
#include "ompi/mpi/c/bindings.h"
3636
#include "ompi/runtime/params.h"

ompi/mpi/c/errhandler_create.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/communicator/communicator.h"

ompi/mpi/c/errhandler_get.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/runtime/params.h"

ompi/mpi/c/errhandler_set.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/runtime/params.h"

ompi/mpi/c/type_extent.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/runtime/params.h"

ompi/mpi/c/type_hindexed.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/runtime/params.h"

ompi/mpi/c/type_hvector.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/runtime/params.h"

ompi/mpi/c/type_lb.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/runtime/params.h"

ompi/mpi/c/type_struct.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829

ompi/mpi/c/type_ub.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "ompi_config.h"
2222

23-
/* defining ENABLE_MPI1_COMPAT to 1 for removed implementations here.
23+
/* defining OMPI_OMIT_MPI1_COMPAT_DECLS to 0 for prototyping the
24+
* removed implementations here.
2425
* see comments in address.c for more information. */
25-
#define ENABLE_MPI1_COMPAT 1
26+
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0
2627

2728
#include "ompi/mpi/c/bindings.h"
2829
#include "ompi/runtime/params.h"

0 commit comments

Comments
 (0)