This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via 41d9cd4e3484bdd66b33e7f667483aeee92b3801 (commit) via 32cbcba941243b80afcfc69df6efcbbe801e5646 (commit) from ed612b0a744661e974b0e56c3d121a99627543da (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/41d9cd4e3484bdd66b33e7f667483aeee9... commit 41d9cd4e3484bdd66b33e7f667483aeee92b3801 Author: Yanfei Guo <[email protected]> Date: Thu Sep 29 17:07:10 2016 -0500 autoconf: fix strict build on Solaris. 1. GCC on solaris use C89 as default which does not support POSIX 2001. The support for POSIX 2001 must be checked after checking the support of C99. 2. AC_CHECK_FUNCS has false positive when checking gethrtime on Solaris with strict configuration. Use AC_CHECK_DECL to double check the availability of gethrtime. No reviewer. diff --git a/confdb/aclocal_cc.m4 b/confdb/aclocal_cc.m4 index fd7152b..23d7365 100644 --- a/confdb/aclocal_cc.m4 +++ b/confdb/aclocal_cc.m4 @@ -626,13 +626,6 @@ if test "$enable_strict_done" != "yes" ; then pac_cc_strict_flags="-O2" fi pac_cc_strict_flags="$pac_cc_strict_flags $pac_common_strict_flags" - case "$enable_posix" in - no) : ;; - 1995) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=199506L],[pac_cc_strict_flags]) ;; - 2001) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=200112L],[pac_cc_strict_flags]) ;; - 2008) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=200809L],[pac_cc_strict_flags]) ;; - *) AC_MSG_ERROR([internal error, unexpected POSIX version: '$enable_posix']) ;; - esac # We only allow one of strict-C99 or strict-C89 to be # enabled. If C99 is enabled, we automatically disable C89. if test "${enable_c99}" = "yes" ; then @@ -645,6 +638,16 @@ if test "$enable_strict_done" != "yes" ; then PAC_APPEND_FLAG([-std=c89],[pac_cc_strict_flags]) PAC_APPEND_FLAG([-Wdeclaration-after-statement],[pac_cc_strict_flags]) fi + # POSIX 2001 should be used with C99. But the default standard for some + # compilers are not C99. We must test the support of POSIX 2001 after + # testing C99. + case "$enable_posix" in + no) : ;; + 1995) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=199506L],[pac_cc_strict_flags]) ;; + 2001) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=200112L],[pac_cc_strict_flags]) ;; + 2008) PAC_APPEND_FLAG([-D_POSIX_C_SOURCE=200809L],[pac_cc_strict_flags]) ;; + *) AC_MSG_ERROR([internal error, unexpected POSIX version: '$enable_posix']) ;; + esac fi # See if the above options work with the compiler diff --git a/src/mpl/configure.ac b/src/mpl/configure.ac index cf34469..9438e03 100644 --- a/src/mpl/configure.ac +++ b/src/mpl/configure.ac @@ -273,8 +273,14 @@ pac_cv_hrtime_works=yes,pac_cv_hrtime_works=no)]) # hrtime_t to int64_t works, and even more ambitious # would check whether long or long long was 64 bits (or even # better, the sizeof hrtime_t). + + # AC_CHECK_FUNCS has false positive when checking whether gethrtime is + # available on Solaris with strict configuration. We must use + # AC_CHECK_DECL to confirm it. + AC_CHECK_DECL(gethrtime) fi if test "$ac_cv_func_gethrtime" = "yes" -a \ + "$ac_cv_has_decl_gethrtime" = "yes" -a \ "$pac_cv_hrtime_works" = "yes" ; then timer_type=gethrtime elif test "$ac_cv_func_clock_gettime" = "yes" -a \ http://git.mpich.org/mpich.git/commitdiff/32cbcba941243b80afcfc69df6efcbbe80... commit 32cbcba941243b80afcfc69df6efcbbe801e5646 Author: Rob Latham <[email protected]> Date: Tue Sep 27 14:15:32 2016 -0500 A more standard check for large file support Remove the explicit setting of _LARGEFILE64_SOURCE and friends. Let autoconf's AC_SYS_LARGEFILE do it for us. (solaris strict headers do not like the LARGEFILE defines) Signed-off-by: Yanfei Guo <[email protected]> diff --git a/src/mpi/romio/configure.ac b/src/mpi/romio/configure.ac index eaec4f2..e9539b2 100644 --- a/src/mpi/romio/configure.ac +++ b/src/mpi/romio/configure.ac @@ -1306,35 +1306,11 @@ AC_CHECK_TYPE([blksize_t],[],[AC_DEFINE_UNQUOTED([blksize_t],[__blksize_t],[Prov #endif]] ) # -# Check for large file support. Make sure that we can use the off64_t -# type (in some cases, it is an array, and the ROMIO code isn't prepared for -# that). +# in 2004, solairs defined off_t as a union. Today (2016) that is not the case +# and we can simplify this check # -AC_CHECK_HEADERS(unistd.h) -if test "$ac_cv_header_unistd_h" = "yes" ; then - AC_CACHE_CHECK([for large file defines],ac_cv_has_large_file_defines,[ - AC_TRY_COMPILE([ -#include <unistd.h> - ], [ -#ifndef _LFS64_LARGEFILE -#error no largefile defines -#endif - ],ac_cv_has_large_file_defines=yes,ac_cv_has_large_file_defines=no)]) - if test "$ac_cv_has_large_file_defines" = "yes" ; then - # See if we can use them - AC_CACHE_CHECK([whether off64_t is an scalar type],ac_cv_off64_t_scalar,[ - AC_TRY_COMPILE([ -#define _LARGEFILE64_SOURCE -#define _FILE_OFFSET_BITS 64 -#include <sys/types.h> -#include <unistd.h> -],[off64_t a = 3;],ac_cv_off64_t_scalar=yes,ac_cv_off64_t_scalar=no)]) - if test "$ac_cv_off64_t_scalar" = "yes" ; then - CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" - fi - fi -fi +AC_SYS_LARGEFILE() # pread and pwrite are useful to ROMIO: if implemented well, they help us avoid # an extra system call. But --enable-strict or CFLAGS="--std=c99" does not @@ -1631,20 +1607,6 @@ else F77MPIOINC="include 'mpiof.h'" fi -AC_CHECK_HEADERS(unistd.h, - AC_MSG_CHECKING([for large file defines]) - AC_TRY_COMPILE([ - #include <unistd.h> - ], [ - #ifndef _LFS64_LARGEFILE - #error no largefile defines - #endif - ], - CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" - AC_MSG_RESULT(yes), - AC_MSG_RESULT(none) ) - ) - echo "setting SYSDEP_INC to $SYSDEP_INC" AC_SUBST(SYSDEP_INC) diff --git a/test/mpi/io/simple_collective.c b/test/mpi/io/simple_collective.c index 54e32fa..5bf5512 100644 --- a/test/mpi/io/simple_collective.c +++ b/test/mpi/io/simple_collective.c @@ -19,8 +19,6 @@ * I am surprised src/mpi/romio/test/create_excl.c did not uncover the bug */ -#define _LARGEFILE64_SOURCE - #include <assert.h> #include <stdio.h> #include <stdlib.h> ----------------------------------------------------------------------- Summary of changes: confdb/aclocal_cc.m4 | 17 ++++++++------ src/mpi/romio/configure.ac | 44 ++------------------------------------ src/mpl/configure.ac | 6 +++++ test/mpi/io/simple_collective.c | 2 - 4 files changed, 19 insertions(+), 50 deletions(-) hooks/post-receive -- MPICH primary repository