From 58048308c5ce37479fbeff46a34305e870fd5ddc Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 23 Nov 2009 16:45:23 -0500 Subject: [svn-r17925] Description: Bring r17924 from trunk to 1.8 branch: Add detection for POSIX lstat() routine to configure script (mostly for non-UNIX/Linux machines) and add macro wrapper for it. Alphabetatize the system/library calls we test for, to make them easier to read. Removed the sigaction() detection & macro wrappers, since it's not used by the distribution currently. Tested on: FreeBSD/32 6.3 (duty) in debug mode (h5committested on trunk) --- configure | 21 ++++----------- configure.in | 10 +++----- perform/sio_standalone.h | 5 +++- src/H5Pfcpl.c | 2 +- src/H5config.h.in | 6 ++--- src/H5private.h | 11 +++++--- src/Makefile.in | 67 ++++++++++++++++++++++++------------------------ vms/src/h5pubconf.h | 6 ++--- windows/src/H5pubconf.h | 6 ++--- 9 files changed, 64 insertions(+), 70 deletions(-) diff --git a/configure b/configure index 3d26996..347b0e1 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 17677 2009-10-19 05:41:33Z lrknox . +# From configure.in Id: configure.in 17709 2009-10-21 13:29:15Z epourmal . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.64 for HDF5 1.8.4-snap0. # @@ -24746,7 +24746,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_func in alarm fork frexpf frexpl gethostname getpwuid getrusage +for ac_func in alarm BSDgettimeofday fork frexpf frexpl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -24759,7 +24759,7 @@ _ACEOF fi done -for ac_func in BSDgettimeofday siglongjmp longjmp setsysinfo sigaction +for ac_func in gethostname getpwuid getrusage longjmp lstat do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -24772,7 +24772,7 @@ _ACEOF fi done -for ac_func in signal snprintf vasprintf strdup system waitpid +for ac_func in rand_r random setsysinfo siglongjmp signal do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -24785,7 +24785,7 @@ _ACEOF fi done -for ac_func in rand_r random srandom +for ac_func in snprintf srandom strdup system tmpfile vasprintf waitpid do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -24798,17 +24798,6 @@ _ACEOF fi done -for ac_func in tmpfile -do : - ac_fn_c_check_func "$LINENO" "tmpfile" "ac_cv_func_tmpfile" -if test "x$ac_cv_func_tmpfile" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TMPFILE 1 -_ACEOF - -fi -done - for ac_func in vsnprintf do : diff --git a/configure.in b/configure.in index 4b27bea..53531af 100644 --- a/configure.in +++ b/configure.in @@ -1985,13 +1985,11 @@ AC_MSG_RESULT([no])) dnl ---------------------------------------------------------------------- dnl Check for functions. -dnl tmpfile needed by h5pdiff. dnl -AC_CHECK_FUNCS(alarm fork frexpf frexpl gethostname getpwuid getrusage) -AC_CHECK_FUNCS(BSDgettimeofday siglongjmp longjmp setsysinfo sigaction) -AC_CHECK_FUNCS(signal snprintf vasprintf strdup system waitpid) -AC_CHECK_FUNCS(rand_r random srandom) -AC_CHECK_FUNCS(tmpfile) +AC_CHECK_FUNCS(alarm BSDgettimeofday fork frexpf frexpl) +AC_CHECK_FUNCS(gethostname getpwuid getrusage longjmp lstat) +AC_CHECK_FUNCS(rand_r random setsysinfo siglongjmp signal) +AC_CHECK_FUNCS(snprintf srandom strdup system tmpfile vasprintf waitpid) dnl Check for vsnprintf() separately, so we can detect situations where it dnl doesn't return the correct size for formatted strings that are too large diff --git a/perform/sio_standalone.h b/perform/sio_standalone.h index 9faaac1..b31d4846 100644 --- a/perform/sio_standalone.h +++ b/perform/sio_standalone.h @@ -177,22 +177,26 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #ifdef _WIN32 #ifdef __MWERKS__ #define HDfstat(F,B) fstat(F,B) + #define HDlstat(S,B) lstat(S,B) #define HDstat(S,B) stat(S,B) typedef struct stat h5_stat_t; typedef off_t h5_stat_size_t; #else /*MSVC*/ #define HDfstat(F,B) _fstati64(F,B) + #define HDlstat(S,B) _lstati64(S,B) #define HDstat(S,B) _stati64(S,B) typedef struct _stati64 h5_stat_t; typedef __int64 h5_stat_size_t; #endif #elif H5_SIZEOF_OFF_T!=8 && H5_SIZEOF_OFF64_T==8 && defined(H5_HAVE_STAT64) #define HDfstat(F,B) fstat64(F,B) + #define HDlstat(S,B) lstat64(S,B) #define HDstat(S,B) stat64(S,B) typedef struct stat64 h5_stat_t; typedef off64_t h5_stat_size_t; #else #define HDfstat(F,B) fstat(F,B) + #define HDlstat(S,B) lstat(S,B) #define HDstat(S,B) stat(S,B) typedef struct stat h5_stat_t; typedef off_t h5_stat_size_t; @@ -349,7 +353,6 @@ int HDremove_all(const char * fname); #else #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2)) #endif -#define HDsigaction(N,A) sigaction(N,A) #define HDsigaddset(S,N) sigaddset(S,N) #define HDsigdelset(S,N) sigdelset(S,N) #define HDsigemptyset(S) sigemptyset(S) diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c index 0dadb9c..d0418e5 100644 --- a/src/H5Pfcpl.c +++ b/src/H5Pfcpl.c @@ -417,7 +417,7 @@ H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr, size_t *sizeof_size) herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(H5Pget_sizes, FAIL) - H5TRACE3("e", "ixx", plist_id, sizeof_addr, sizeof_size); + H5TRACE3("e", "i*z*z", plist_id, sizeof_addr, sizeof_size); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_CREATE))) diff --git a/src/H5config.h.in b/src/H5config.h.in index bb03fc7..94601b8 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -220,6 +220,9 @@ /* Define to 1 if you have the `lseek64' function. */ #undef HAVE_LSEEK64 +/* Define to 1 if you have the `lstat' function. */ +#undef HAVE_LSTAT + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -256,9 +259,6 @@ /* Define to 1 if you have the `setsysinfo' function. */ #undef HAVE_SETSYSINFO -/* Define to 1 if you have the `sigaction' function. */ -#undef HAVE_SIGACTION - /* Define to 1 if you have the `siglongjmp' function. */ #undef HAVE_SIGLONGJMP diff --git a/src/H5private.h b/src/H5private.h index 227f7c2..e377d51 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -724,11 +724,14 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); * For Unix, if off_t is not 64bit big, try use the pseudo-standard * xxx64 versions if available. */ -#if !defined(HDfstat) || !defined(HDstat) +#if !defined(HDfstat) || !defined(HDstat) || !defined(HDlstat) #if H5_SIZEOF_OFF_T!=8 && H5_SIZEOF_OFF64_T==8 && defined(H5_HAVE_STAT64) #ifndef HDfstat #define HDfstat(F,B) fstat64(F,B) #endif /* HDfstat */ + #ifndef HDlstat + #define HDlstat(S,B) lstat64(S,B) + #endif /* HDlstat */ #ifndef HDstat #define HDstat(S,B) stat64(S,B) #endif /* HDstat */ @@ -739,6 +742,9 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #ifndef HDfstat #define HDfstat(F,B) fstat(F,B) #endif /* HDfstat */ + #ifndef HDlstat + #define HDlstat(S,B) lstat(S,B) + #endif /* HDlstat */ #ifndef HDstat #define HDstat(S,B) stat(S,B) #endif /* HDstat */ @@ -1074,9 +1080,6 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); #ifndef HDsetvbuf #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z) #endif /* HDsetvbuf */ -#ifndef HDsigaction - #define HDsigaction(N,A) sigaction(N,A) -#endif /* HDsigaction */ #ifndef HDsigaddset #define HDsigaddset(S,N) sigaddset(S,N) #endif /* HDsigaddset */ diff --git a/src/Makefile.in b/src/Makefile.in index a52c1cc..27ec520 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -98,39 +98,40 @@ libhdf5_la_LIBADD = am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5timer.lo H5trace.lo H5A.lo H5Abtree2.lo H5Adense.lo \ H5Adeprec.lo H5Aint.lo H5Atest.lo H5AC.lo H5B.lo H5Bcache.lo \ - H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo H5B2hdr.lo H5B2int.lo \ - H5B2stat.lo H5B2test.lo H5C.lo H5CS.lo H5D.lo H5Dbtree.lo \ - H5Dchunk.lo H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo H5Ddeprec.lo \ - H5Defl.lo H5Dfill.lo H5Dint.lo H5Dio.lo H5Dlayout.lo \ - H5Dmpio.lo H5Doh.lo H5Dscatgath.lo H5Dselect.lo H5Dtest.lo \ - H5E.lo H5Edeprec.lo H5Eint.lo H5F.lo H5Faccum.lo H5Fdbg.lo \ - H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo H5Fquery.lo \ - H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo H5Ftest.lo H5FD.lo \ - H5FDcore.lo H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo \ - H5FDmpi.lo H5FDmpio.lo H5FDmpiposix.lo H5FDmulti.lo \ - H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FL.lo H5FO.lo H5FS.lo \ - H5FScache.lo H5FSdbg.lo H5FSsection.lo H5FSstat.lo H5FStest.lo \ - H5G.lo H5Gbtree2.lo H5Gcache.lo H5Gcompact.lo H5Gdense.lo \ - H5Gdeprec.lo H5Gent.lo H5Gint.lo H5Glink.lo H5Gloc.lo \ - H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo H5Groot.lo H5Gstab.lo \ - H5Gtest.lo H5Gtraverse.lo H5HF.lo H5HFbtree2.lo H5HFcache.lo \ - H5HFdbg.lo H5HFdblock.lo H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo \ - H5HFiblock.lo H5HFiter.lo H5HFman.lo H5HFsection.lo \ - H5HFspace.lo H5HFstat.lo H5HFtest.lo H5HFtiny.lo H5HG.lo \ - H5HGcache.lo H5HGdbg.lo H5HL.lo H5HLcache.lo H5HLdbg.lo \ - H5HP.lo H5I.lo H5L.lo H5Lexternal.lo H5MF.lo H5MFaggr.lo \ - H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo H5MPtest.lo H5O.lo \ - H5Oainfo.lo H5Oalloc.lo H5Oattr.lo H5Oattribute.lo H5Obogus.lo \ - H5Obtreek.lo H5Ocache.lo H5Ocont.lo H5Ocopy.lo H5Odbg.lo \ - H5Odrvinfo.lo H5Odtype.lo H5Oefl.lo H5Ofill.lo H5Oginfo.lo \ - H5Olayout.lo H5Olinfo.lo H5Olink.lo H5Omessage.lo H5Omtime.lo \ - H5Oname.lo H5Onull.lo H5Opline.lo H5Orefcount.lo H5Osdspace.lo \ - H5Oshared.lo H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo \ - H5P.lo H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo \ - H5Pdxpl.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo \ - H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo \ - H5Pstrcpl.lo H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo \ - H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \ + H5Bdbg.lo H5B2.lo H5B2cache.lo H5B2dbg.lo H5B2hdr.lo \ + H5B2int.lo H5B2stat.lo H5B2test.lo H5C.lo H5CS.lo H5D.lo \ + H5Dbtree.lo H5Dchunk.lo H5Dcompact.lo H5Dcontig.lo H5Ddbg.lo \ + H5Ddeprec.lo H5Defl.lo H5Dfill.lo H5Dint.lo H5Dio.lo \ + H5Dlayout.lo H5Dmpio.lo H5Doh.lo H5Dscatgath.lo H5Dselect.lo \ + H5Dtest.lo H5E.lo H5Edeprec.lo H5Eint.lo H5F.lo H5Faccum.lo \ + H5Fdbg.lo H5Ffake.lo H5Fio.lo H5Fmount.lo H5Fmpi.lo \ + H5Fquery.lo H5Fsfile.lo H5Fsuper.lo H5Fsuper_cache.lo \ + H5Ftest.lo H5FD.lo H5FDcore.lo H5FDdirect.lo H5FDfamily.lo \ + H5FDint.lo H5FDlog.lo H5FDmpi.lo H5FDmpio.lo H5FDmpiposix.lo \ + H5FDmulti.lo H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FL.lo \ + H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ + H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo \ + H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo \ + H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo \ + H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo H5HF.lo \ + H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ + H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo H5HFiblock.lo H5HFiter.lo \ + H5HFman.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo H5HFtest.lo \ + H5HFtiny.lo H5HG.lo H5HGcache.lo H5HGdbg.lo H5HL.lo \ + H5HLcache.lo H5HLdbg.lo H5HP.lo H5I.lo H5L.lo H5Lexternal.lo \ + H5MF.lo H5MFaggr.lo H5MFdbg.lo H5MFsection.lo H5MM.lo H5MP.lo \ + H5MPtest.lo H5O.lo H5Oainfo.lo H5Oalloc.lo H5Oattr.lo \ + H5Oattribute.lo H5Obogus.lo H5Obtreek.lo H5Ocache.lo \ + H5Ocont.lo H5Ocopy.lo H5Odbg.lo H5Odrvinfo.lo H5Odtype.lo \ + H5Oefl.lo H5Ofill.lo H5Oginfo.lo H5Olayout.lo H5Olinfo.lo \ + H5Olink.lo H5Omessage.lo H5Omtime.lo H5Oname.lo H5Onull.lo \ + H5Opline.lo H5Orefcount.lo H5Osdspace.lo H5Oshared.lo \ + H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo H5P.lo \ + H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo \ + H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo \ + H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo \ + H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo H5S.lo \ + H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \ H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \ H5SMbtree2.lo H5SMcache.lo H5SMtest.lo H5ST.lo H5T.lo \ H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo H5Tconv.lo \ diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index a42bad7..4e7f39a 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -215,6 +215,9 @@ /* Define to 1 if you have the `lseek64' function. */ /* #define H5_HAVE_LSEEK64 1 */ +/* Define to 1 if you have the `lstat' function. */ +/* #define H5_HAVE_LSTAT 1 */ + /* Define to 1 if you have the header file. */ #define H5_HAVE_MEMORY_H 1 @@ -251,9 +254,6 @@ /* Define to 1 if you have the `setsysinfo' function. */ /* #undef H5_HAVE_SETSYSINFO */ -/* Define to 1 if you have the `sigaction' function. */ -#define H5_HAVE_SIGACTION 1 - /* Define to 1 if you have the `siglongjmp' function. */ #define H5_HAVE_SIGLONGJMP 1 diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index 234e3c3..9db775d 100755 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -224,6 +224,9 @@ /* Define to 1 if you have the `lseek64' function. */ /* #undef H5_HAVE_LSEEK64 */ +/* Define to 1 if you have the `lstat' function. */ +/* #undef H5_HAVE_LSTAT */ + /* Define to 1 if you have the header file. */ #define H5_HAVE_MEMORY_H 1 @@ -260,9 +263,6 @@ /* Define to 1 if you have the `setsysinfo' function. */ /* #undef H5_HAVE_SETSYSINFO */ -/* Define to 1 if you have the `sigaction' function. */ -/* #undef H5_HAVE_SIGACTION */ - /* Define to 1 if you have the `siglongjmp' function. */ /* #undef H5_HAVE_SIGLONGJMP */ -- cgit v0.12