diff --git a/configure.ac b/configure.ac index fb552765e6..326eea8872 100644 --- a/configure.ac +++ b/configure.ac @@ -1278,7 +1278,7 @@ if test "$MPI_OFFSET_TYPE" = "not found"; then AC_MSG_WARN([*** Unable to find the right definition for MPI_Offset]) AC_MSG_ERROR([Cannot continue]) fi -AC_DEFINE_UNQUOTED(MPI_Offset, $MPI_OFFSET_TYPE, [Type of MPI_Offset]) +AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_TYPE, $MPI_OFFSET_TYPE, [Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's]) # # If we haven't already, figure out an MPI datatype that corresponds diff --git a/include/mpi.h.in b/include/mpi.h.in index 847aeace4a..d0bb42479f 100644 --- a/include/mpi.h.in +++ b/include/mpi.h.in @@ -67,8 +67,8 @@ /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT -/* Type of MPI_Offset */ -#undef MPI_Offset +/* Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's */ +#undef OMPI_MPI_OFFSET_TYPE /* Whether we want MPI cxx support or not */ #undef OMPI_WANT_CXX_BINDINGS @@ -140,6 +140,7 @@ extern "C" { * Typedefs */ typedef long MPI_Aint; +typedef OMPI_MPI_OFFSET_TYPE MPI_Offset; typedef struct ompi_communicator_t *MPI_Comm; typedef struct ompi_datatype_t *MPI_Datatype; typedef struct ompi_errhandler_t *MPI_Errhandler;