Skip to content

Commit cc8a655

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. Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent fa5cd0d commit cc8a655

File tree

3 files changed

+8
-32
lines changed

3 files changed

+8
-32
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-2017 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: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Copyright (c) 2013 Mellanox Technologies, Inc.
2121
# All rights reserved.
2222
# Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
23-
# Copyright (c) 2014-2016 Research Organization for Information Science
23+
# Copyright (c) 2014-2017 Research Organization for Information Science
2424
# and Technology (RIST). All rights reserved.
2525
# Copyright (c) 2016 IBM Corporation. All rights reserved.
2626
# $COPYRIGHT$
@@ -420,6 +420,8 @@ if test "$ac_cv_type_ssize_t" = yes ; then
420420
fi
421421
if test "$ac_cv_type_ptrdiff_t" = yes; then
422422
AC_CHECK_SIZEOF(ptrdiff_t)
423+
else
424+
AC_MSG_ERROR([ptrdiff_t type is not available, this is required by C99 standard. Cannot continue])
423425
fi
424426
AC_CHECK_SIZEOF(wchar_t)
425427

@@ -782,27 +784,6 @@ AC_INCLUDES_DEFAULT
782784
#endif
783785
])
784786

785-
#
786-
# Check for ptrdiff type. Yes, there are platforms where
787-
# sizeof(void*) != sizeof(long) (64 bit Windows, apparently).
788-
#
789-
AC_MSG_CHECKING([for pointer diff type])
790-
if test $ac_cv_type_ptrdiff_t = yes ; then
791-
opal_ptrdiff_t="ptrdiff_t"
792-
opal_ptrdiff_size=$ac_cv_sizeof_ptrdiff_t
793-
elif test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long ; then
794-
opal_ptrdiff_t="long"
795-
opal_ptrdiff_size=$ac_cv_sizeof_long
796-
elif test $ac_cv_type_long_long = yes && test $ac_cv_sizeof_void_p -eq $ac_cv_sizeof_long_long ; then
797-
opal_ptrdiff_t="long long"
798-
opal_ptrdiff_size=$ac_cv_sizeof_long_long
799-
else
800-
AC_MSG_ERROR([Could not find datatype to emulate ptrdiff_t. Cannot continue])
801-
fi
802-
AC_DEFINE_UNQUOTED([OPAL_PTRDIFF_TYPE], [$opal_ptrdiff_t],
803-
[type to use for ptrdiff_t])
804-
AC_MSG_RESULT([$opal_ptrdiff_t (size: $opal_ptrdiff_size)])
805-
806787
#
807788
# Find corresponding types for MPI_Aint, MPI_Count, and MPI_Offset.
808789
# And if relevant, find the corresponding MPI_ADDRESS_KIND,

opal/include/opal_config_bottom.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2013 Mellanox Technologies, Inc.
1515
* All rights reserved.
16-
* Copyright (c) 2015 Research Organization for Information Science
16+
* Copyright (c) 2015-2017 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2015 Intel, Inc. All rights reserved.
1919
* $COPYRIGHT$
@@ -260,10 +260,6 @@
260260
**********************************************************************/
261261
#if OMPI_BUILDING
262262

263-
#ifndef HAVE_PTRDIFF_T
264-
typedef OPAL_PTRDIFF_TYPE ptrdiff_t;
265-
#endif
266-
267263
/*
268264
* Maximum size of a filename path.
269265
*/

0 commit comments

Comments
 (0)