mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r2866] Purpose:
Code cleanup Description: Found more "Have_foo" usage and converted them to "H5_HAVE_foo" Platforms tested: FreeBSD 4.1.1 (hawkwind)
This commit is contained in:
parent
47bef32530
commit
04223a18f4
18
src/H5.c
18
src/H5.c
@ -35,7 +35,7 @@ static char RcsId[] = "@(#)$Revision$";
|
||||
#include <H5FDmpio.h>
|
||||
|
||||
/* we need this for the struct rusage declaration */
|
||||
#if defined(HAVE_GETRUSAGE) && defined(linux)
|
||||
#if defined(H5_HAVE_GETRUSAGE) && defined(linux)
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
@ -586,7 +586,7 @@ H5close (void)
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#ifndef H5_HAVE_SNPRINTF
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: HDsnprintf
|
||||
*
|
||||
@ -626,10 +626,10 @@ HDsnprintf(char *buf, size_t UNUSED size, const char *fmt, ...)
|
||||
va_end(ap);
|
||||
return n;
|
||||
}
|
||||
#endif /* HAVE_SNPRINTF */
|
||||
#endif /* H5_HAVE_SNPRINTF */
|
||||
|
||||
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
#ifndef H5_HAVE_VSNPRINTF
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: HDvsnprintf
|
||||
*
|
||||
@ -659,7 +659,7 @@ HDvsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
|
||||
{
|
||||
return vsprintf(buf, fmt, ap);
|
||||
}
|
||||
#endif /* HAVE_VSNPRINTF */
|
||||
#endif /* H5_HAVE_VSNPRINTF */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -1111,16 +1111,16 @@ H5_timer_reset (H5_timer_t *timer)
|
||||
void
|
||||
H5_timer_begin (H5_timer_t *timer)
|
||||
{
|
||||
#ifdef HAVE_GETRUSAGE
|
||||
#ifdef H5_HAVE_GETRUSAGE
|
||||
struct rusage rusage;
|
||||
#endif
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
#ifdef H5_HAVE_GETTIMEOFDAY
|
||||
struct timeval etime;
|
||||
#endif
|
||||
|
||||
assert (timer);
|
||||
|
||||
#ifdef HAVE_GETRUSAGE
|
||||
#ifdef H5_HAVE_GETRUSAGE
|
||||
getrusage (RUSAGE_SELF, &rusage);
|
||||
timer->utime = (double)rusage.ru_utime.tv_sec +
|
||||
(double)rusage.ru_utime.tv_usec/1e6;
|
||||
@ -1130,7 +1130,7 @@ H5_timer_begin (H5_timer_t *timer)
|
||||
timer->utime = 0.0;
|
||||
timer->stime = 0.0;
|
||||
#endif
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
#ifdef H5_HAVE_GETTIMEOFDAY
|
||||
gettimeofday (&etime, NULL);
|
||||
timer->etime = (double)etime.tv_sec + (double)etime.tv_usec/1e6;
|
||||
#else
|
||||
|
@ -1661,7 +1661,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
|
||||
IS_H5FD_MPIO(dataset->ent.file)) {
|
||||
sconv->read = H5S_mpio_spaces_read;
|
||||
}
|
||||
#endif /*HAVE_PARALLEL*/
|
||||
#endif /*H5_HAVE_PARALLEL*/
|
||||
|
||||
/*
|
||||
* If there is no type conversion then try reading directly into the
|
||||
@ -2074,7 +2074,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
|
||||
IS_H5FD_MPIO(dataset->ent.file)) {
|
||||
sconv->write = H5S_mpio_spaces_write;
|
||||
}
|
||||
#endif /*HAVE_PARALLEL*/
|
||||
#endif /*H5_HAVE_PARALLEL*/
|
||||
|
||||
/*
|
||||
* If there is no type conversion then try writing directly from
|
||||
|
@ -64,7 +64,7 @@ typedef struct H5FD_dpss_t {
|
||||
* file_seek: The function which adjusts the current file position,
|
||||
* either lseek() or lseek64().
|
||||
*/
|
||||
#ifdef HAVE_LSEEK64
|
||||
#ifdef H5_HAVE_LSEEK64
|
||||
# define file_offset_t off64_t
|
||||
# define file_seek lseek64
|
||||
#else
|
||||
|
@ -65,7 +65,7 @@ typedef struct H5FD_gass_t {
|
||||
* file_seek: The function which adjusts the current file position,
|
||||
* either lseek() or lseek64().
|
||||
*/
|
||||
#ifdef HAVE_LSEEK64
|
||||
#ifdef H5_HAVE_LSEEK64
|
||||
# define file_offset_t off64_t
|
||||
# define file_seek lseek64
|
||||
#else
|
||||
|
@ -114,7 +114,7 @@ typedef struct H5FD_log_t {
|
||||
* file_seek: The function which adjusts the current file position,
|
||||
* either lseek() or lseek64().
|
||||
*/
|
||||
#ifdef HAVE_LSEEK64
|
||||
#ifdef H5_HAVE_LSEEK64
|
||||
# define file_offset_t off64_t
|
||||
# define file_seek lseek64
|
||||
#else
|
||||
|
@ -86,7 +86,7 @@ typedef struct H5FD_sec2_t {
|
||||
* file_seek: The function which adjusts the current file position,
|
||||
* either lseek() or lseek64().
|
||||
*/
|
||||
#ifdef HAVE_LSEEK64
|
||||
#ifdef H5_HAVE_LSEEK64
|
||||
# define file_offset_t off64_t
|
||||
# define file_seek lseek64
|
||||
#else
|
||||
|
@ -21,7 +21,7 @@ static hid_t H5FD_SRB_g = 0;
|
||||
|
||||
#ifdef H5_HAVE_SRB
|
||||
|
||||
#ifdef HAVE_LSEEK64
|
||||
#ifdef H5_HAVE_LSEEK64
|
||||
# define file_offset_t off64_t
|
||||
# define file_seek lseek64
|
||||
#else
|
||||
|
@ -41,7 +41,7 @@
|
||||
#endif
|
||||
#include <netdb.h> /* gethostbyname */
|
||||
#include <netinet/in.h> /* socket stuff */
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#ifdef H5_HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h> /* socket stuff */
|
||||
#endif
|
||||
#endif
|
||||
@ -128,7 +128,7 @@ static const H5FD_stream_fapl_t default_fapl =
|
||||
* REGION_OVERFLOW: Checks whether an address and size pair describe data
|
||||
* which can be addressed entirely in memory.
|
||||
*/
|
||||
#ifdef HAVE_LSEEK64
|
||||
#ifdef H5_HAVE_LSEEK64
|
||||
# define file_offset_t off64_t
|
||||
#else
|
||||
# define file_offset_t off_t
|
||||
|
@ -112,16 +112,16 @@ H5O_mtime_decode(H5F_t UNUSED *f, const uint8_t *p,
|
||||
"badly formatted modification time message");
|
||||
}
|
||||
|
||||
#if defined(HAVE_TM_GMTOFF)
|
||||
#if defined(H5_HAVE_TM_GMTOFF)
|
||||
/* FreeBSD, OSF 4.0 */
|
||||
the_time += tm.tm_gmtoff;
|
||||
#elif defined(HAVE___TM_GMTOFF)
|
||||
#elif defined(H5_HAVE___TM_GMTOFF)
|
||||
/* Linux libc-4 */
|
||||
the_time += tm.__tm_gmtoff;
|
||||
#elif defined(HAVE_TIMEZONE)
|
||||
#elif defined(H5_HAVE_TIMEZONE)
|
||||
/* Linux libc-5 */
|
||||
the_time -= timezone - (tm.tm_isdst?3600:0);
|
||||
#elif defined(HAVE_BSDGETTIMEOFDAY) && defined(HAVE_STRUCT_TIMEZONE)
|
||||
#elif defined(H5_HAVE_BSDGETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE)
|
||||
/* Irix5.3 */
|
||||
{
|
||||
struct timezone tz;
|
||||
@ -131,7 +131,7 @@ H5O_mtime_decode(H5F_t UNUSED *f, const uint8_t *p,
|
||||
}
|
||||
the_time -= tz.tz_minuteswest*60 - (tm.tm_isdst?3600:0);
|
||||
}
|
||||
#elif defined(HAVE_GETTIMEOFDAY) && defined(HAVE_STRUCT_TIMEZONE)
|
||||
#elif defined(H5_HAVE_GETTIMEOFDAY) && defined(H5_HAVE_STRUCT_TIMEZONE)
|
||||
{
|
||||
struct timezone tz;
|
||||
if (gettimeofday(NULL, &tz)<0) {
|
||||
|
@ -329,7 +329,7 @@ H5S_mpio_hyper_type( const H5S_t *space, const size_t elmt_size,
|
||||
"***displacements: 0, %d\n", i, displacement[1]);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MPI2 /* have MPI-2 */
|
||||
#ifdef H5_HAVE_MPI2 /* have MPI-2 */
|
||||
err = MPI_Type_create_resized
|
||||
( outer_type, /* old type */
|
||||
0, /* blocklengths */
|
||||
|
@ -10,11 +10,11 @@
|
||||
#include <H5MMprivate.h>
|
||||
#include <H5Zprivate.h>
|
||||
|
||||
#ifdef HAVE_ZLIB_H
|
||||
#ifdef H5_HAVE_ZLIB_H
|
||||
# include <zlib.h>
|
||||
#else
|
||||
/* Make sure compression is disabled too. */
|
||||
#undef HAVE_COMPRESS2
|
||||
#undef H5_HAVE_COMPRESS2
|
||||
#endif
|
||||
|
||||
/* Interface initialization */
|
||||
@ -46,7 +46,7 @@ H5Z_filter_deflate (unsigned flags, size_t cd_nelmts,
|
||||
{
|
||||
size_t ret_value = 0;
|
||||
void *outbuf = NULL;
|
||||
#if defined(HAVE_COMPRESS2)
|
||||
#if defined(H5_HAVE_COMPRESS2)
|
||||
int aggression = 6;
|
||||
int status;
|
||||
#endif
|
||||
@ -59,7 +59,7 @@ H5Z_filter_deflate (unsigned flags, size_t cd_nelmts,
|
||||
"invalid deflate aggression level");
|
||||
}
|
||||
|
||||
#if defined(HAVE_COMPRESS2)
|
||||
#if defined(H5_HAVE_COMPRESS2)
|
||||
aggression = cd_values[0];
|
||||
if (flags & H5Z_FLAG_REVERSE) {
|
||||
/* Input; uncompress */
|
||||
|
@ -242,7 +242,7 @@ precision (detected_t *d)
|
||||
precision (&(INFO)); \
|
||||
}
|
||||
|
||||
#if defined(HAVE_LONGJMP) && defined(HAVE_SIGNAL)
|
||||
#if defined(H5_HAVE_LONGJMP) && defined(H5_HAVE_SIGNAL)
|
||||
#define ALIGNMENT(TYPE,ALIGN) { \
|
||||
char *volatile _buf=NULL; \
|
||||
volatile TYPE _val=0; \
|
||||
@ -269,7 +269,7 @@ precision (detected_t *d)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#if defined(HAVE_FORK) && defined(HAVE_WAITPID)
|
||||
#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
|
||||
#define ALIGNMENT(TYPE,ALIGN) { \
|
||||
char *_buf; \
|
||||
TYPE _val=0; \
|
||||
@ -841,7 +841,7 @@ print_header(void)
|
||||
char host_name[256];
|
||||
int i;
|
||||
const char *s;
|
||||
#ifdef HAVE_GETPWUID
|
||||
#ifdef H5_HAVE_GETPWUID
|
||||
struct passwd *pwd = NULL;
|
||||
#else
|
||||
int pwd = 1;
|
||||
@ -891,7 +891,7 @@ bit.\n";
|
||||
/*
|
||||
* The real name is the first item from the passwd gecos field.
|
||||
*/
|
||||
#ifdef HAVE_GETPWUID
|
||||
#ifdef H5_HAVE_GETPWUID
|
||||
{
|
||||
size_t n;
|
||||
char *comma;
|
||||
@ -915,7 +915,7 @@ bit.\n";
|
||||
/*
|
||||
* The FQDM of this host or the empty string.
|
||||
*/
|
||||
#ifdef HAVE_GETHOSTNAME
|
||||
#ifdef H5_HAVE_GETHOSTNAME
|
||||
if (gethostname(host_name, sizeof(host_name)) < 0) {
|
||||
host_name[0] = '\0';
|
||||
}
|
||||
@ -934,7 +934,7 @@ bit.\n";
|
||||
if (pwd || real_name[0] || host_name[0]) {
|
||||
printf(" *\t\t\t");
|
||||
if (real_name[0]) printf("%s <", real_name);
|
||||
#ifdef HAVE_GETPWUID
|
||||
#ifdef H5_HAVE_GETPWUID
|
||||
if (pwd) fputs(pwd->pw_name, stdout);
|
||||
#endif
|
||||
if (host_name[0]) printf("@%s", host_name);
|
||||
@ -981,7 +981,7 @@ main(void)
|
||||
detected_t d[MAXDETECT];
|
||||
volatile int nd = 0;
|
||||
|
||||
#if defined(HAVE_SETSYSINFO) && defined(SSI_NVPAIRS)
|
||||
#if defined(H5_HAVE_SETSYSINFO) && defined(SSI_NVPAIRS)
|
||||
#if defined(UAC_NOPRINT) && defined(UAC_SIGBUS)
|
||||
/*
|
||||
* Make sure unaligned access generates SIGBUS and doesn't print warning
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
* Purpose: This file is included by all HDF5 library source files to
|
||||
* define common things which are not defined in the HDF5 API.
|
||||
* The configuration constants like HAVE_UNISTD_H etc. are
|
||||
* The configuration constants like H5_HAVE_UNISTD_H etc. are
|
||||
* defined in H5config.h which is included by H5public.h.
|
||||
*/
|
||||
#ifndef _H5private_H
|
||||
@ -23,7 +23,7 @@
|
||||
/*
|
||||
* Include ANSI-C header files.
|
||||
*/
|
||||
#ifdef STDC_HEADERS
|
||||
#ifdef H5_STDC_HEADERS
|
||||
# include <assert.h>
|
||||
# include <ctype.h>
|
||||
# include <errno.h>
|
||||
@ -42,7 +42,7 @@
|
||||
* If _POSIX_VERSION is defined in unistd.h then this system is Posix.1
|
||||
* compliant. Otherwise all bets are off.
|
||||
*/
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#ifdef H5_HAVE_UNISTD_H
|
||||
# include <sys/types.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
@ -54,7 +54,7 @@
|
||||
/*
|
||||
* C9x integer types
|
||||
*/
|
||||
#ifdef HAVE_STDINT_H
|
||||
#ifdef H5_HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
* but often apears on non-Posix systems also. The `struct stat' is required
|
||||
* for hdf5 to compile, although only a few fields are actually used.
|
||||
*/
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#ifdef H5_HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
@ -77,10 +77,10 @@
|
||||
* used in conjunction with `HAVE_SYS_TIME_H', whose existence is checked
|
||||
* by `AC_CHECK_HEADERS(sys/time.h)' in configure.in.
|
||||
*/
|
||||
#if defined(TIME_WITH_SYS_TIME)
|
||||
#if defined(H5_TIME_WITH_SYS_TIME)
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#elif defined(HAVE_SYS_TIME_H)
|
||||
#elif defined(H5_HAVE_SYS_TIME_H)
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# include <time.h>
|
||||
@ -89,7 +89,7 @@
|
||||
/*
|
||||
* Longjumps are used to detect alignment constrants
|
||||
*/
|
||||
#ifdef HAVE_SETJMP_H
|
||||
#ifdef H5_HAVE_SETJMP_H
|
||||
# include <setjmp.h>
|
||||
#endif
|
||||
|
||||
@ -97,7 +97,7 @@
|
||||
* Resource usage is not Posix.1 but HDF5 uses it anyway for some performance
|
||||
* and debugging code if available.
|
||||
*/
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
#ifdef H5_HAVE_SYS_RESOURCE_H
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
@ -105,7 +105,7 @@
|
||||
* Unix ioctls. These are used by h5ls (and perhaps others) to determine a
|
||||
* resonable output width.
|
||||
*/
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#ifdef H5_HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
@ -114,20 +114,20 @@
|
||||
* of unaligned accesses by the operating system during detection of
|
||||
* alignment constraints in H5detect.c:main().
|
||||
*/
|
||||
#ifdef HAVE_SYS_SYSINFO_H
|
||||
#ifdef H5_HAVE_SYS_SYSINFO_H
|
||||
# include <sys/sysinfo.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PROC_H
|
||||
#ifdef H5_HAVE_SYS_PROC_H
|
||||
# include <sys/proc.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Win32 is severely broken when it comes to ANSI-C and Posix.1 compliance.
|
||||
*/
|
||||
#ifdef HAVE_IO_H
|
||||
#ifdef H5_HAVE_IO_H
|
||||
# include <io.h>
|
||||
#endif
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifdef H5_HAVE_WINDOWS_H
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifndef F_OK
|
||||
@ -139,7 +139,7 @@
|
||||
/*
|
||||
* Pablo support files.
|
||||
*/
|
||||
#ifdef HAVE_PABLO
|
||||
#ifdef H5_HAVE_PABLO
|
||||
# define IOTRACE
|
||||
# define HDFIOTRACE
|
||||
# include "HDFIOTrace.h"
|
||||
@ -162,7 +162,7 @@
|
||||
* suppresses warnings about unused function arguments. It's no big deal if
|
||||
* we don't.
|
||||
*/
|
||||
#ifdef HAVE_ATTRIBUTE
|
||||
#ifdef H5_HAVE_ATTRIBUTE
|
||||
# define UNUSED __attribute__((unused))
|
||||
#else
|
||||
# define __attribute__(X) /*void*/
|
||||
@ -174,7 +174,7 @@
|
||||
* currently being defined? If not then define it to be some constant
|
||||
* string.
|
||||
*/
|
||||
#ifndef HAVE_FUNCTION
|
||||
#ifndef H5_HAVE_FUNCTION
|
||||
# define __FUNCTION__ "NoFunctionName"
|
||||
#endif
|
||||
|
||||
@ -479,7 +479,7 @@ __DLL__ void H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds);
|
||||
#define HDctermid(S) ctermid(S)
|
||||
#define HDctime(T) ctime(T)
|
||||
#define HDcuserid(S) cuserid(S)
|
||||
#ifdef HAVE_DIFFTIME
|
||||
#ifdef H5_HAVE_DIFFTIME
|
||||
#define HDdifftime(X,Y) difftime(X,Y)
|
||||
#else
|
||||
#define HDdifftime(X,Y) ((double)(X)-(double)(Y))
|
||||
@ -634,7 +634,7 @@ __DLL__ int HDfprintf (FILE *stream, const char *fmt, ...);
|
||||
#define HDsin(X) sin(X)
|
||||
#define HDsinh(X) sinh(X)
|
||||
#define HDsleep(N) sleep(N)
|
||||
#ifdef HAVE_SNPRINTF
|
||||
#ifdef H5_HAVE_SNPRINTF
|
||||
# define HDsnprintf snprintf /*varargs*/
|
||||
#endif
|
||||
/* sprintf() variable arguments */
|
||||
@ -695,7 +695,7 @@ __DLL__ int64_t HDstrtoll (const char *s, const char **rest, int base);
|
||||
#define HDvfprintf(F,FMT,A) vfprintf(F,FMT,A)
|
||||
#define HDvprintf(FMT,A) vprintf(FMT,A)
|
||||
#define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A)
|
||||
#ifdef HAVE_VSNPRINTF
|
||||
#ifdef H5_HAVE_VSNPRINTF
|
||||
# define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A)
|
||||
#endif
|
||||
#define HDwait(W) wait(W)
|
||||
@ -713,10 +713,10 @@ char *strdup(const char *s);
|
||||
#endif
|
||||
#define HDstrdup(S) strdup(S)
|
||||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#ifndef H5_HAVE_SNPRINTF
|
||||
__DLL__ int HDsnprintf(char *buf, size_t size, const char *fmt, ...);
|
||||
#endif
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
#ifndef H5_HAVE_VSNPRINTF
|
||||
__DLL__ int HDvsnprintf(char *buf, size_t size, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
@ -999,7 +999,7 @@ extern hbool_t H5_libinit_g; /*good thing C's lazy about extern! */
|
||||
* The FUNC_ENTER() and FUNC_LEAVE() macros make calls to Pablo functions
|
||||
* through one of these two sets of macros.
|
||||
*/
|
||||
#ifdef HAVE_PABLO
|
||||
#ifdef H5_HAVE_PABLO
|
||||
# define PABLO_SAVE(func_id) intn pablo_func_id = func_id;
|
||||
# define PABLO_TRACE_ON(m, f) TRACE_ON(m,f)
|
||||
# define PABLO_TRACE_OFF(m, f) TRACE_OFF(m,f)
|
||||
|
@ -82,7 +82,7 @@ is_sparse(void)
|
||||
if (close(fd)<0) return 0;
|
||||
if (stat("x.h5", &sb)<0) return 0;
|
||||
if (unlink("x.h5")<0) return 0;
|
||||
#ifdef HAVE_STAT_ST_BLOCKS
|
||||
#ifdef H5_HAVE_STAT_ST_BLOCKS
|
||||
return ((unsigned long)sb.st_blocks*512 < (unsigned long)sb.st_size);
|
||||
#else
|
||||
return (0);
|
||||
|
14
test/dsets.c
14
test/dsets.c
@ -378,7 +378,7 @@ test_compression(hid_t file)
|
||||
/* Create the dataset */
|
||||
if ((dataset = H5Dcreate(file, DSET_COMPRESS_NAME, H5T_NATIVE_INT, space,
|
||||
dc))<0) goto error;
|
||||
#ifdef HAVE_COMPRESS2
|
||||
#ifdef H5_HAVE_COMPRESS2
|
||||
PASSED();
|
||||
#else
|
||||
SKIPPED();
|
||||
@ -405,7 +405,7 @@ test_compression(hid_t file)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_COMPRESS2
|
||||
#ifdef H5_HAVE_COMPRESS2
|
||||
PASSED();
|
||||
#else
|
||||
SKIPPED();
|
||||
@ -427,7 +427,7 @@ test_compression(hid_t file)
|
||||
|
||||
if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, xfer, points)<0)
|
||||
goto error;
|
||||
#ifdef HAVE_COMPRESS2
|
||||
#ifdef H5_HAVE_COMPRESS2
|
||||
PASSED();
|
||||
#else
|
||||
SKIPPED();
|
||||
@ -456,7 +456,7 @@ test_compression(hid_t file)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_COMPRESS2
|
||||
#ifdef H5_HAVE_COMPRESS2
|
||||
PASSED();
|
||||
#else
|
||||
SKIPPED();
|
||||
@ -496,7 +496,7 @@ test_compression(hid_t file)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_COMPRESS2
|
||||
#ifdef H5_HAVE_COMPRESS2
|
||||
PASSED();
|
||||
#else
|
||||
SKIPPED();
|
||||
@ -528,7 +528,7 @@ test_compression(hid_t file)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_COMPRESS2
|
||||
#ifdef H5_HAVE_COMPRESS2
|
||||
PASSED();
|
||||
#else
|
||||
SKIPPED();
|
||||
@ -574,7 +574,7 @@ test_compression(hid_t file)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_COMPRESS2
|
||||
#ifdef H5_HAVE_COMPRESS2
|
||||
PASSED();
|
||||
#else
|
||||
SKIPPED();
|
||||
|
@ -89,7 +89,7 @@ static int num_opaque_conversions_g = 0;
|
||||
* be allowed to continue (cf. Posix signals) so in order to recover from a
|
||||
* SIGFPE we run tests that might generate one in a child process.
|
||||
*/
|
||||
#if defined(HAVE_FORK) && defined(HAVE_WAITPID)
|
||||
#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
|
||||
# define HANDLE_SIGFPE
|
||||
#endif
|
||||
|
||||
@ -198,7 +198,7 @@ some_dummy_func(float x)
|
||||
static void
|
||||
generates_sigfpe(void)
|
||||
{
|
||||
#if defined(HAVE_FORK) && defined(HAVE_WAITPID)
|
||||
#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)
|
||||
pid_t pid;
|
||||
int status;
|
||||
size_t i, j;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <H5MMprivate.h>
|
||||
#include <H5Vprivate.h>
|
||||
|
||||
#ifndef HAVE_FUNCTION
|
||||
#ifndef H5_HAVE_FUNCTION
|
||||
#undef __FUNCTION__
|
||||
#define __FUNCTION__ ""
|
||||
#endif
|
||||
|
12
tools/h5ls.c
12
tools/h5ls.c
@ -1849,35 +1849,35 @@ get_width(void)
|
||||
width = (int)strtol(s, NULL, 0);
|
||||
}
|
||||
|
||||
#if defined(HAVE_STRUCT_VIDEOCONFIG) && defined(HAVE__GETVIDEOCONFIG)
|
||||
#if defined(H5_HAVE_STRUCT_VIDEOCONFIG) && defined(H5_HAVE__GETVIDEOCONFIG)
|
||||
{
|
||||
/* Microsoft C */
|
||||
struct videoconfig w;
|
||||
_getvideoconfig(&w);
|
||||
width = w.numtextcols;
|
||||
}
|
||||
#elif defined(HAVE_STRUCT_TEXT_INFO) && defined(HAVE_GETTEXTINFO)
|
||||
#elif defined(H5_HAVE_STRUCT_TEXT_INFO) && defined(H5_HAVE_GETTEXTINFO)
|
||||
{
|
||||
/* Borland C or DJGPPC */
|
||||
struct text_info w;
|
||||
gettextinfo(&w);
|
||||
width = w.screenwidth;
|
||||
}
|
||||
#elif defined(HAVE_GETCONSOLESCREENBUFFERINFO)
|
||||
#elif defined(H5_HAVE_GETCONSOLESCREENBUFFERINFO)
|
||||
{
|
||||
/* Win32 C */
|
||||
CONSOLE_SCREEN_BUFFER_INFO scr;
|
||||
GetConsoleScreenBufferInfo(con_out, &scr);
|
||||
width = scr.srWindow.Right - scr.srWindow.Left + 1;
|
||||
}
|
||||
#elif defined(HAVE__SCRSIZE)
|
||||
#elif defined(H5_HAVE__SCRSIZE)
|
||||
{
|
||||
/* OS/2 */
|
||||
int w[2];
|
||||
_scrsize(w);
|
||||
width = w[0];
|
||||
}
|
||||
#elif defined(HAVE_TIOCGWINSZ) && defined(HAVE_IOCTL)
|
||||
#elif defined(H5_HAVE_TIOCGWINSZ) && defined(H5_HAVE_IOCTL)
|
||||
{
|
||||
/* Unix with ioctl(TIOCGWINSZ) */
|
||||
struct winsize w;
|
||||
@ -1885,7 +1885,7 @@ get_width(void)
|
||||
width = w.ws_col;
|
||||
}
|
||||
}
|
||||
#elif defined(HAVE_TIOCGETD) && defined(HAVE_IOCTL)
|
||||
#elif defined(H5_HAVE_TIOCGETD) && defined(H5_HAVE_IOCTL)
|
||||
{
|
||||
/* Unix with ioctl(TIOCGETD) */
|
||||
struct uwdata w;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <mfhdf.h>
|
||||
#include <hdf5.h>
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#ifdef H5_HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
|
@ -1534,7 +1534,7 @@ h5dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset,
|
||||
|
||||
/* Print the data */
|
||||
flags = ((elmtno == 0 ? START_OF_DATA : 0) |
|
||||
(elmtno + hs_nelmts >= p_nelmts ? END_OF_DATA : 0));
|
||||
((elmtno + hs_nelmts) >= p_nelmts ? END_OF_DATA : 0));
|
||||
h5dump_simple_data(stream, info, dset, &ctx, flags, hs_nelmts,
|
||||
p_type, sm_buf);
|
||||
|
||||
@ -1961,7 +1961,8 @@ h5dump_vlen_dset(FILE *stream, const h5dump_t *info, hid_t dset,
|
||||
hid_t mem_space;
|
||||
const char *bad_type;
|
||||
herr_t ret;
|
||||
hssize_t start = 0, count = 1;
|
||||
hssize_t start = 0;
|
||||
hsize_t count = 1;
|
||||
unsigned int i;
|
||||
|
||||
memset(&ctx, 0, sizeof(h5dump_context_t));
|
||||
|
Loading…
x
Reference in New Issue
Block a user