Skip to content

Commit c50c0bc

Browse files
committed
configury: remove now obsolete reference to OPAL_PTRDIFF_TYPE
since Open MPI now requires a C99, and ptrdiff_t type is part of C99, there is no more need for the abstract OPAL_PTRDIFF_TYPE type. Thanks George, Nathan and Paul for the help.
1 parent 1fe35c5 commit c50c0bc

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

config/ompi_find_mpi_aint_count_offset.m4

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
1616
# reserved.
1717
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
18-
# Copyright (c) 2014 Research Organization for Information Science
18+
# Copyright (c) 2014-2016 Research Organization for Information Science
1919
# and Technology (RIST). All rights reserved.
2020
# Copyright (c) 2015 Intel, Inc. All rights reserved.
2121
# $COPYRIGHT$
@@ -42,14 +42,13 @@ AC_DEFUN([OMPI_FIND_MPI_AINT_COUNT_OFFSET],[
4242
dnl #########################################################################
4343

4444
AC_DEFUN([_OMPI_FIND_MPI_AINT_TYPE], [
45-
# Find the type of MPI_Aint. We already did the work to figure
46-
# out what opal_ptrdiff will be; just use that.
45+
# MPI_Aint type is ptrdiff_t; just use that.
4746
AC_MSG_CHECKING([for type of MPI_Aint])
4847

49-
MPI_AINT_TYPE=$opal_ptrdiff_t
48+
MPI_AINT_TYPE=ptrdiff_t
5049
# Get the size of this type; we'll need it to figure out Fortran's
5150
# MPI_ADDRESS_KIND, later
52-
MPI_AINT_SIZE=$opal_ptrdiff_size
51+
MPI_AINT_SIZE=$ac_cv_sizeof_ptrdiff_t
5352
AC_DEFINE_UNQUOTED(OMPI_MPI_AINT_TYPE, [$MPI_AINT_TYPE],
5453
[Type of MPI_Aint])
5554

configure.ac

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ if test "$ac_cv_type_ssize_t" = yes ; then
408408
fi
409409
if test "$ac_cv_type_ptrdiff_t" = yes; then
410410
AC_CHECK_SIZEOF(ptrdiff_t)
411+
else
412+
AC_MSG_ERROR([ptrdiff_t type is not available, this is required by C99 standard. Cannot continue])
411413
fi
412414
AC_CHECK_SIZEOF(wchar_t)
413415

@@ -770,27 +772,6 @@ AC_INCLUDES_DEFAULT
770772
#endif
771773
])
772774

773-
#
774-
# Check for ptrdiff type. Yes, there are platforms where
775-
# sizeof(void*) != sizeof(long) (64 bit Windows, apparently).
776-
#
777-
AC_MSG_CHECKING([for pointer diff type])
778-
if test $ac_cv_type_ptrdiff_t = yes ; then
779-
opal_ptrdiff_t="ptrdiff_t"
780-
opal_ptrdiff_size=$ac_cv_sizeof_ptrdiff_t
781-
elif test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long ; then
782-
opal_ptrdiff_t="long"
783-
opal_ptrdiff_size=$ac_cv_sizeof_long
784-
elif test $ac_cv_type_long_long = yes && test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long_long ; then
785-
opal_ptrdiff_t="long long"
786-
opal_ptrdiff_size=$ac_cv_sizeof_long_long
787-
else
788-
AC_MSG_ERROR([Could not find datatype to emulate ptrdiff_t. Cannot continue])
789-
fi
790-
AC_DEFINE_UNQUOTED([OPAL_PTRDIFF_TYPE], [$opal_ptrdiff_t],
791-
[type to use for ptrdiff_t])
792-
AC_MSG_RESULT([$opal_ptrdiff_t (size: $opal_ptrdiff_size)])
793-
794775
#
795776
# Find corresponding types for MPI_Aint, MPI_Count, and MPI_Offset.
796777
# And if relevant, find the corresponding MPI_ADDRESS_KIND,

0 commit comments

Comments
 (0)