[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-318-g096302d

Service Account noreply at mpich.org
Tue May 24 13:15:44 CDT 2016


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  096302d9f9c7b06439185feb82c3ea497909281f (commit)
      from  1bcb945c1f1636d838ba40d5b2f6980218d80802 (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/096302d9f9c7b06439185feb82c3ea497909281f

commit 096302d9f9c7b06439185feb82c3ea497909281f
Author: Gilles Gouaillardet <gilles at rist.or.jp>
Date:   Mon May 9 13:54:46 2016 +0900

    io/romio: fix filesystem type check on OpenBSD 5.7
    
    check the existence of the f_type field in struct statfs
    
    Thanks Paul Hargrove for the report
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/common/ad_fstype.c b/src/mpi/romio/adio/common/ad_fstype.c
index 51893c0..94451c6 100644
--- a/src/mpi/romio/adio/common/ad_fstype.c
+++ b/src/mpi/romio/adio/common/ad_fstype.c
@@ -338,7 +338,7 @@ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *erro
     /* --END ERROR HANDLING-- */
 
 # ifdef ROMIO_HAVE_STRUCT_STATFS_WITH_F_FSTYPENAME
-    /* uncommon: maybe only on Darwin ? */
+    /* less common: Darwin and OpenBSD */
     if ( !strncmp("nfs",fsbuf.f_fstypename,3) ) {
 	*fstype = ADIO_NFS;
 	return;
@@ -346,6 +346,8 @@ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *erro
 # endif
 
 
+# ifdef ROMIO_HAVE_STRUCT_STATFS_WITH_F_TYPE
+
 #ifdef ROMIO_GPFS
     if (fsbuf.f_type == GPFS_SUPER_MAGIC) {
 	*fstype = ADIO_GPFS;
@@ -413,6 +415,8 @@ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *erro
     }
 # endif
 
+# endif /*ROMIO_HAVE_STRUCT_STATFS_WITH_F_TYPE */
+
 # ifdef ROMIO_UFS
     /* if UFS support is enabled, default to that */
     *fstype = ADIO_UFS;
diff --git a/src/mpi/romio/configure.ac b/src/mpi/romio/configure.ac
index 250391d..67732c4 100644
--- a/src/mpi/romio/configure.ac
+++ b/src/mpi/romio/configure.ac
@@ -1177,12 +1177,54 @@ AC_MSG_RESULT($pac_cv_have_statfs)
 if test "$pac_cv_have_statfs" = yes ; then
     AC_DEFINE(HAVE_STRUCT_STATFS,1,[Define if struct statfs can be compiled])
 fi
-	  
+AC_MSG_CHECKING([for f_type member of statfs structure])
+AC_TRY_COMPILE([
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+    ],[
+    struct statfs f;
+    memset(&f, 0, sizeof(f));
+    f.f_type = 0;
+    ],
+    pac_cv_have_statfs_f_type=yes,
+    pac_cv_have_statfs_f_type=no
+)
+AC_MSG_RESULT($pac_cv_have_statfs_f_type)
+if test $pac_cv_have_statfs_f_type = yes ; then
+    AC_DEFINE(ROMIO_HAVE_STRUCT_STATFS_WITH_F_TYPE, 1,[Define if statfs has f_type])
+fi
+
+
 AC_MSG_CHECKING([for f_fstypename member of statfs structure])
 AC_TRY_COMPILE([
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
+#endif
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
     ],[
     struct statfs f;
     memset(&f, 0, sizeof(f));

-----------------------------------------------------------------------

Summary of changes:
 src/mpi/romio/adio/common/ad_fstype.c |    6 +++-
 src/mpi/romio/configure.ac            |   44 ++++++++++++++++++++++++++++++++-
 2 files changed, 48 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list