Commit d43efde4 authored by Brad King's avatar Brad King
Browse files

Merge branch 'hdf5-upstream' into vtkhdf5

Add Utilities/vtkhdf5 using upstream snapshot hdf5 1.8.5-r19589.
parents 1c287e4f 8e37142d
Acknowledgments - June 2010
---------------------------
We would like to thank the following people who have contributed directly
or indirectly to HDF5:
John A. Biddiscombe, Mike Jackson, and Sean McBride for contributing and
testing CMake code included in the HDF5 1.8.5 distribution.
The HDF5 community for helping shape the development of HDF5 by contributing
bug reports and patches, joining in on forum discussions, and continually
supporting our software.
Finally, we'd like to thank all organizations whose funding has made HDF5
possible.
This diff is collapsed.
Copyright Notice and License Terms for
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
-----------------------------------------------------------------------------
HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 2006-2010 by The HDF Group.
NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities
Copyright 1998-2006 by the Board of Trustees of the University of Illinois.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted for any purpose (including commercial purposes)
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions, and the following disclaimer in the documentation
and/or materials provided with the distribution.
3. In addition, redistributions of modified forms of the source or binary
code must carry prominent notices stating that the original code was
changed and the date of the change.
4. All publications or advertising materials mentioning features or use of
this software are asked, but not required, to acknowledge that it was
developed by The HDF Group and by the National Center for Supercomputing
Applications at the University of Illinois at Urbana-Champaign and
credit the contributors.
5. Neither the name of The HDF Group, the name of the University, nor the
name of any Contributor may be used to endorse or promote products derived
from this software without specific prior written permission from
The HDF Group, the University, or the Contributor, respectively.
DISCLAIMER:
THIS SOFTWARE IS PROVIDED BY THE HDF GROUP AND THE CONTRIBUTORS
"AS IS" WITH NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. In no
event shall The HDF Group or the Contributors be liable for any damages
suffered by the users arising out of the use of this software, even if
advised of the possibility of such damage.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Contributors: National Center for Supercomputing Applications (NCSA) at
the University of Illinois, Fortner Software, Unidata Program Center (netCDF),
The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip),
and Digital Equipment Corporation (DEC).
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from the Lawrence Berkeley
National Laboratory (LBNL) and the United States Department of Energy
under Prime Contract No. DE-AC02-05CH11231.
-----------------------------------------------------------------------------
Portions of HDF5 were developed with support from the University of
California, Lawrence Livermore National Laboratory (UC LLNL).
The following statement applies to those portions of the product and must
be retained in any redistribution of source code, binaries, documentation,
and/or accompanying materials:
This work was partially produced at the University of California,
Lawrence Livermore National Laboratory (UC LLNL) under contract
no. W-7405-ENG-48 (Contract 48) between the U.S. Department of Energy
(DOE) and The Regents of the University of California (University)
for the operation of UC LLNL.
DISCLAIMER:
This work was prepared as an account of work sponsored by an agency of
the United States Government. Neither the United States Government nor
the University of California nor any of their employees, makes any
warranty, express or implied, or assumes any liability or responsibility
for the accuracy, completeness, or usefulness of any information,
apparatus, product, or process disclosed, or represents that its use
would not infringe privately- owned rights. Reference herein to any
specific commercial products, process, or service by trade name,
trademark, manufacturer, or otherwise, does not necessarily constitute
or imply its endorsement, recommendation, or favoring by the United
States Government or the University of California. The views and
opinions of authors expressed herein do not necessarily state or reflect
those of the United States Government or the University of California,
and shall not be used for advertising or product endorsement purposes.
-----------------------------------------------------------------------------
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "HDF5.1.8")
set(CTEST_NIGHTLY_START_TIME "20:00:00 CST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "nei.hdfgroup.uiuc.edu")
set(CTEST_DROP_LOCATION "/cdash/submit.php?project=HDF5.1.8")
set(CTEST_DROP_SITE_CDASH TRUE)
set(UPDATE_TYPE svn)
This diff is collapsed.
HDF5 version 1.8.5-post2 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
This release is fully functional for the API described in the documentation.
See the RELEASE.txt file in the release_docs/ directory for information
specific to this release of the library. Several INSTALL* files can also be
found in the release_docs/ directory: INSTALL contains instructions for
compiling and installing the library; INSTALL_parallel contains instructions
for installing the parallel version of the library; similarly-named files
contain instructions for VMS and several environments on MS Windows systems.
Documentation for this release can be found at the following URL:
http://www.hdfgroup.org/HDF5/doc/.
The following mailing lists are currently set up for HDF5 Library users:
news - For announcements of HDF5 related developments,
not a discussion list.
hdf-forum - For general discussion of the HDF5 library with
other users.
hdf5dev - For discussion of the HDF5 library development
with developers and other interested parties.
To subscribe to a list, send mail to "<list>-subscribe@hdfgroup.org".
where <list> is the name of the list. For example, send a request
to subscribe to the 'news' mail list to the following address:
news-subscribe@hdfgroup.org
Messages sent to the list should be addressed to "<list>@hdfgroup.org".
Periodic code snapshots are provided at the following URL:
ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots
Please read the README.txt file in that directory before working with a
library snapshot.
The HDF5 website is located at http://hdfgroup.org/HDF5/
Bugs should be reported to help@hdfgroup.org.
# - Find SZIP library
# - Derived from the FindTiff.cmake that is included with cmake
# Find the native SZIP includes and library
# This module defines
# SZIP_INCLUDE_DIRS, where to find tiff.h, etc.
# SZIP_LIBRARIES, libraries to link against to use SZIP.
# SZIP_FOUND, If false, do not try to use SZIP.
# also defined, but not for general use are
# SZIP_LIBRARY, where to find the SZIP library.
# SZIP_LIBRARY_DEBUG - Debug version of tiff library
# SZIP_LIBRARY_RELEASE - Release Version of tiff library
# MESSAGE (STATUS "Finding Szip library and headers..." )
############################################
#
# Check the existence of the libraries.
#
############################################
# This macro was taken directly from the FindQt4.cmake file that is included
# with the CMake distribution. This is NOT my work. All work was done by the
# original authors of the FindQt4.cmake file. Only minor modifications were
# made to remove references to Qt and make this file more generally applicable
#########################################################################
MACRO (SZIP_ADJUST_LIB_VARS basename)
IF (${basename}_INCLUDE_DIR)
# if only the release version was found, set the debug variable also to the release version
IF (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
SET (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE})
SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE})
SET (${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE})
ENDIF (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
# if only the debug version was found, set the release variable also to the debug version
IF (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
SET (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG})
SET (${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG})
SET (${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG})
ENDIF (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
IF (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
# if the generator supports configuration types then set
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
SET (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
# then just use the release libraries
SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
SET (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
ENDIF (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
SET (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
IF (${basename}_LIBRARY)
SET (${basename}_FOUND 1)
ENDIF (${basename}_LIBRARY)
ENDIF (${basename}_INCLUDE_DIR )
# Make variables changeble to the advanced user
MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR )
ENDMACRO (SZIP_ADJUST_LIB_VARS)
# Look for the header file.
SET (SZIP_INCLUDE_SEARCH_DIRS
$ENV{SZIP_INSTALL}/include
$ENV{SZIP_INSTALL}/include/szip
/usr/include
/usr/include/szip
)
SET (SZIP_LIB_SEARCH_DIRS
$ENV{SZIP_INSTALL}/lib
/usr/lib
)
SET (SZIP_BIN_SEARCH_DIRS
$ENV{SZIP_INSTALL}/bin
/usr/bin
)
FIND_PATH (SZIP_INCLUDE_DIR
NAMES szlib.h
PATHS ${SZIP_INCLUDE_SEARCH_DIRS}
NO_DEFAULT_PATH
)
IF (WIN32 AND NOT MINGW)
SET (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
SET (SZIP_SEARCH_RELEASE_NAMES "sz;libsz")
ELSE (WIN32 AND NOT MINGW)
SET (SZIP_SEARCH_DEBUG_NAMES "sz_d")
SET (SZIP_SEARCH_RELEASE_NAMES "sz")
ENDIF (WIN32 AND NOT MINGW)
# Look for the library.
FIND_LIBRARY (SZIP_LIBRARY_DEBUG
NAMES ${SZIP_SEARCH_DEBUG_NAMES}
PATHS ${SZIP_LIB_SEARCH_DIRS}
NO_DEFAULT_PATH
)
FIND_LIBRARY (SZIP_LIBRARY_RELEASE
NAMES ${SZIP_SEARCH_RELEASE_NAMES}
PATHS ${SZIP_LIB_SEARCH_DIRS}
NO_DEFAULT_PATH
)
SZIP_ADJUST_LIB_VARS (SZIP)
IF (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
SET (SZIP_FOUND 1)
SET (SZIP_LIBRARIES ${SZIP_LIBRARY})
SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
IF (SZIP_LIBRARY_DEBUG)
GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_DEBUG} PATH)
SET (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
ELSEIF (SZIP_LIBRARY_RELEASE)
GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_RELEASE} PATH)
SET (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
ENDIF (SZIP_LIBRARY_DEBUG)
ELSE (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
SET (SZIP_FOUND 0)
SET (SZIP_LIBRARIES)
SET (SZIP_INCLUDE_DIRS)
ENDIF (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
# Report the results.
IF (NOT SZIP_FOUND)
SET (SZIP_DIR_MESSAGE
"SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable."
)
IF (NOT SZIP_FIND_QUIETLY)
MESSAGE (STATUS "${SZIP_DIR_MESSAGE}")
ELSE (NOT SZIP_FIND_QUIETLY)
IF (SZIP_FIND_REQUIRED)
MESSAGE (FATAL_ERROR "SZip was NOT found and is Required by this project")
ENDIF (SZIP_FIND_REQUIRED)
ENDIF (NOT SZIP_FIND_QUIETLY)
ENDIF (NOT SZIP_FOUND)
IF (SZIP_FOUND)
INCLUDE (CheckSymbolExists)
#############################################
# Find out if SZIP was build using dll's
#############################################
# Save required variable
SET (CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
SET (CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
# Add SZIP_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
SET (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${SZIP_INCLUDE_DIRS}")
CHECK_SYMBOL_EXISTS (SZIP_BUILT_AS_DYNAMIC_LIB "SZconfig.h" HAVE_SZIP_DLL)
IF (HAVE_SZIP_DLL STREQUAL "TRUE")
SET (HAVE_SZIP_DLL "1")
ENDIF (HAVE_SZIP_DLL STREQUAL "TRUE")
# Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
SET (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
SET (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
#
#############################################
ENDIF (SZIP_FOUND)
IF (FIND_SZIP_DEBUG)
MESSAGE (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
MESSAGE (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}")
MESSAGE (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
MESSAGE (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
MESSAGE (STATUS "HAVE_SZIP_DLL: ${HAVE_SZIP_DLL}")
MESSAGE (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
ENDIF (FIND_SZIP_DEBUG)
#
# Check if the type exists and determine size of type. if the type
# exists, the size will be stored to the variable.
#
# CHECK_TYPE_SIZE - macro which checks the size of type
# VARIABLE - variable to store size if the type exists.
# HAVE_${VARIABLE} - does the variable exists or not
#
MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
SET (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
IF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET (MACRO_CHECK_TYPE_SIZE_FLAGS
"-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}"
)
FOREACH (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H)
IF ("${def}")
SET (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
ENDIF("${def}")
ENDFOREACH (def)
MESSAGE (STATUS "Check size of ${TYPE}")
IF (CMAKE_REQUIRED_LIBRARIES)
SET (CHECK_TYPE_SIZE_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
)
ENDIF (CMAKE_REQUIRED_LIBRARIES)
TRY_RUN (${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
${HDF5_PROJECT_DIR}/Resources/CheckTypeSize.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT
)
IF (HAVE_${VARIABLE})
MESSAGE (STATUS "Check size of ${TYPE} - done")
FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n"
)
ELSE (HAVE_${VARIABLE})
MESSAGE (STATUS "Check size of ${TYPE} - failed")
FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n"
)
ENDIF (HAVE_${VARIABLE})
ENDIF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
ENDMACRO (HDF_CHECK_TYPE_SIZE)
#ifdef H5_FP_TO_INTEGER_OVERFLOW_WORKS_TEST
int main(void)
{
float f = 2147483648.0f;
int i;
i = (int)f;
done:
exit(0);
}
#endif
#ifdef H5_FP_TO_ULLONG_ACCURATE_TEST
int main(void)
{
float f = 111.60f;
double d = 222.55L;
unsigned long long l1 = (unsigned long long)f;
unsigned long long l2 = (unsigned long long)d;
int ret = 0;
if(l1 == 112)
ret = 1;
if(l2 == 223)
ret = 1;
done:
exit(ret);
}
#endif
#ifdef H5_FP_TO_ULLONG_RIGHT_MAXIMUM_TEST
int main(void)
{
float f = 9701917572145405952.00f;
double d1 = 9701917572145405952.00L;
long double d2 = 9701917572145405952.00L;
double d3 = 2e40L;
unsigned long long l1 = (unsigned long long)f;
unsigned long long l2 = (unsigned long long)d1;
unsigned long long l3 = (unsigned long long)d2;
unsigned long long l4;
unsigned long long l5 = 0x7fffffffffffffffULL;
int ret = 0;
if(l1 <= l5 || l2 <= l5 || l3 <= l5)
ret = 1;
l4 = (unsigned long long)d3;
if(l4 <= l5)
ret = 1;
done:
exit(ret);
}
#endif
#ifdef H5_LDOUBLE_TO_INTEGER_WORKS_TEST
int main(void)
{
void *align;
long double ld = 9701917572145405952.00L;
unsigned char v1;
short v2;
unsigned int v3;
int ret = 0;
align = (void*) malloc(sizeof(long double));
memcpy(align, &ld, sizeof(long double));
/*For HU-UX11.00, there's floating exception(core dump) when doing some of casting
*from 'long double' to integers*/
v1 = (unsigned char) (*((long double*) align));
v2 = (short) (*((long double*) align));
v3 = (unsigned int) (*((long double*) align));
done: exit(ret);
}
#endif
#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE_TEST
int main(void)
{
long double ld = 20041683600089727.779961L;
long long ll;
unsigned long long ull;
unsigned char s[16];
int ret = 0;
if(sizeof(long double) == 16)
{
/*make sure the long double type is the same as the failing type
*which has 16 bytes in size and 11 bits of exponent. If it is,
*the bit sequence should be like below. It's not
*a decent way to check but this info isn't available. */
memcpy(s, &ld, 16);
if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c)
{
/*slightly adjust the bit sequence (s[8]=0xdf). The converted
*values will go wild on Mac OS 10.4 and IRIX64 6.5.*/
s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
memcpy(&ld, s, 16);
ll = (long long)ld;
ull = (unsigned long long)ld;
if(ll != 20041683600089728 || ull != 20041683600089728)
ret = 1;
}
}
done:
exit(ret);
}
#endif
#ifdef H5_LDOUBLE_TO_UINT_ACCURATE_TEST
int main(void)
{
long double ld = 2733248032.9183987530L;
unsigned int i;
int ret = 0;
i = (unsigned int)ld;
if(i!=2733248032 && i!=2733248031 && i!=2733248033)
ret = 1;
done:
exit(ret);
}
#endif
#ifdef H5_LLONG_TO_LDOUBLE_CORRECT_TEST
int main(void)
{
long double ld;
long long ll;
unsigned long long ull;
unsigned char s[16];
int flag=0, ret=0;
/*Determine if long double has 16 byte in size, 11 bit exponent, and
*the bias is 0x3ff */
if(sizeof(long double) == 16)
{
ld = 1.0L;
memcpy(s, &ld, 16);
if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
flag = 1;
}
if(flag==1 && sizeof(long long)==8)
{
ll = 0x01ffffffffffffffLL;
ld = (long double)ll;
memcpy(s, &ld, 16);
/*Check if the bit sequence is as supposed to be*/
if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
ret = 1;
}
if(flag==1 && sizeof(unsigned long long)==8)
{
ull = 0x01ffffffffffffffULL;
ld = (long double)ull;
memcpy(s, &ld, 16);
if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
ret = 1;
}
done:
exit(ret);
}
#endif
#ifdef H5_NO_ALIGNMENT_RESTRICTIONS_TEST
#include <stdlib.h>
#include <string.h>
typedef struct
{
size_t len;
void *p;
}hvl_t;
#ifdef FC_DUMMY_MAIN
#ifndef FC_DUMMY_MAIN_EQ_F77
# ifdef __cplusplus
extern "C"