Skip to content

Commit

Permalink
VFD SWMR: Sync with develop (#811)
Browse files Browse the repository at this point in the history
* Normalization with develop

* Removes checks and work-arounds for strtoll and strtoull (#769)

* Removes checks for (v)snprintf, which are C99 (#772)

* Update missing release note info. (#776)

* Replaces the H5_OVERRIDE macro with override (#773)

The macro is no longer necessary now that we require C++11.

* Cleans up some POSIX header bits in H5private.h (#783)

* Removes outdated checks for ways inline might be defined (#781)

These are obsolete now that we require C99.

* Removes checks for system(), which is C89/90 (#782)

* Removes C++ dependency on H5private.h (#774)

* Removes C++ dependency on H5private.h

Most C API calls have been removed, aside from a few uses of free,
where we just dropped the 'HD'. A couple of H5_ATTR_UNUSED macros
were also replaced with (void) statements.

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Further simplifies Autotools type size checks (#789)

Also fixes an issue where clock_gettime and difftime are not detected
due to earlier simplifications of this code.

* Release Note (#784)

* Normalization of CMake H5pubconf.h with Autotools (#791)

Mostly just moving things around and changing the comments to keep the
delta small. The only symbol change is that for curl/curl.h which I
changed to H5_HAVE_CURL_CURL_H to match the Autotools. This symbol
is not used in the library and is just an artifact of the checks.

* Fix tools test (#794)

* Removes ancient Autotools cruft (#790)

* Reorganization of C and POSIX headers in H5public.h & H5private.h (#793)

* Reorganization of C and POSIX headers in H5public.h & H5private.h

Consolidated and removed duplicates

* It turns out Windows has sys/types.h

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>

* Removes checks for signal and set/longjmp, which are C89 (#798)

Also removes checks for setjmp.h and stddef.h

* Assume frexpl/f and fabsl/f, which are C99 (#799)

* Assume the library has C99 types in C++ type code (#806)

* Assume the library has C99 types in C++ type code

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Removes obsolete equivalents of C99's __func__ (#800)

* Cleans up POSIX/C bits in H5private.h (#804)

* Cleans up POSIX/C bits in H5private.h

* Assume difftime exists (C89)
* Reorg AC_CHECK_HEADERS so headers are in alphabetical order
* Split off networking-related AC_CHECK_HEADERS
* Remove unused UNAME_CYGWIN from configure.ac
* Remove checks for unused sys/timeb.h
* Tidying pass over H5private.h HD prefix macros
* Tidy H5win32defs.h
* Add HD prefix to various scanf calls

* Committing clang-format changes

* Fixes to the alarm(2) code used in the tests to make Windows happy

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Brings the tools getopt(3) replacement into the main library (#803)

* Moves get_option from the tools library to the C library

* Adds H5 prefix to get_option call and variables

* Renames the H5_get_option long options struct and enum

* Removes type guesses when C99 types are missing (#807)

* Assume C99 types exist in H5detect.c (#808)

* Fixes parallel issues from recent C99 changes

* Adds MPE FUNC --> __func__ changes missed in earlier PRs

* Fix typo

* Fixes parallel issues from recent C99 changes (#809)

* Fixes parallel issues from recent C99 changes

* Adds MPE FUNC --> __func__ changes missed in earlier PRs

* Even more missed FUNC --> __func__ macros

* Removes remaining H5_TIME_WITH_SYS_TIME cruft (#810)

Mostly from CMake

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
  • Loading branch information
3 people authored Jun 30, 2021
1 parent 18c08c5 commit b9dbabc
Show file tree
Hide file tree
Showing 142 changed files with 3,217 additions and 4,039 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CMakeTests.* @byrnHDF @derobins

/doc/ @gnuoyd @jrmainzer

/examples/ @lrknox @derobins @bljhdf
/examples/ @lrknox @derobins @bmribler

/fortran/ @brtnfld @epourmal

Expand All @@ -29,7 +29,7 @@ CMakeTests.* @byrnHDF @derobins

/m4/ @lrknox @derobins

/release_docs/ @lrknox @bljhdf @byrnHDF
/release_docs/ @lrknox @bmribler @byrnHDF

/src/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup @jrmainzer

Expand Down
2 changes: 1 addition & 1 deletion bin/trace
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ sub rewrite_func ($$$$$) {

# Compose the trace macro
$trace = "H5TRACE" . scalar(@arg_str) . "(\"$rettype\", \"";
$argtrace = "H5ARG_TRACE" . scalar(@arg_str) . "(FUNC, \"";
$argtrace = "H5ARG_TRACE" . scalar(@arg_str) . "(__func__, \"";
$trace .= join("", @arg_str) . "\"";
$argtrace .= join("", @arg_str) . "\"";

Expand Down
6 changes: 3 additions & 3 deletions c++/src/H5ArrayType.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class H5_DLLCPP ArrayType : public DataType {

// Returns an ArrayType object via DataType* by decoding the
// binary object description of this type.
virtual DataType *decode() const H5_OVERRIDE;
virtual DataType *decode() const override;

// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
Expand All @@ -49,7 +49,7 @@ class H5_DLLCPP ArrayType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("ArrayType");
}
Expand All @@ -61,7 +61,7 @@ class H5_DLLCPP ArrayType : public DataType {
ArrayType(const hid_t existing_id);

// Noop destructor
virtual ~ArrayType() H5_OVERRIDE;
virtual ~ArrayType() override;

// Default constructor
ArrayType();
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5AtomType.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class H5_DLLCPP AtomType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("AtomType");
}
Expand All @@ -68,7 +68,7 @@ class H5_DLLCPP AtomType : public DataType {
AtomType(const AtomType &original);

// Noop destructor
virtual ~AtomType() H5_OVERRIDE;
virtual ~AtomType() override;
#endif // DOXYGEN_SHOULD_SKIP_THIS

protected:
Expand Down
14 changes: 7 additions & 7 deletions c++/src/H5Attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <iostream>
#include <string>

#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
Expand Down Expand Up @@ -313,7 +312,7 @@ Attribute::getName() const
H5std_string attr_name; // attribute name to return

// Preliminary call to get the size of the attribute name
ssize_t name_size = H5Aget_name(id, static_cast<size_t>(0), NULL);
ssize_t name_size = H5Aget_name(id, 0, NULL);

// If H5Aget_name failed, throw exception
if (name_size < 0) {
Expand All @@ -324,8 +323,8 @@ Attribute::getName() const
}
// Attribute's name exists, retrieve it
else if (name_size > 0) {
char *name_C = new char[name_size + 1]; // temporary C-string
HDmemset(name_C, 0, name_size + 1); // clear buffer
// Create buffer for C string
char *name_C = new char[name_size + 1]();

// Use overloaded function
name_size = getName(name_C, name_size + 1);
Expand All @@ -336,6 +335,7 @@ Attribute::getName() const
// Clean up resource
delete[] name_C;
}

// Return attribute's name
return (attr_name);
}
Expand Down Expand Up @@ -393,8 +393,8 @@ Attribute::getName(H5std_string &attr_name, size_t len) const
}
// If length is provided, get that number of characters in name
else {
char *name_C = new char[len + 1]; // temporary C-string
HDmemset(name_C, 0, len + 1); // clear buffer
// Create buffer for C string
char *name_C = new char[len + 1]();

// Use overloaded function
name_size = getName(name_C, len + 1);
Expand Down Expand Up @@ -551,7 +551,7 @@ Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) con

// Get string from the C char* and release resource allocated by C API
strg = strg_C;
HDfree(strg_C);
free(strg_C);
}

#ifndef DOXYGEN_SHOULD_SKIP_THIS
Expand Down
18 changes: 9 additions & 9 deletions c++/src/H5Attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
Attribute(const hid_t attr_id);

// Closes this attribute.
virtual void close() H5_OVERRIDE;
virtual void close() override;

// Gets the name of this attribute.
ssize_t getName(char *attr_name, size_t buf_size = 0) const;
Expand All @@ -50,13 +50,13 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
ssize_t getName(size_t buf_size, H5std_string &attr_name) const;

// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const H5_OVERRIDE;
virtual DataSpace getSpace() const override;

// Returns the amount of storage size required for this attribute.
virtual hsize_t getStorageSize() const H5_OVERRIDE;
virtual hsize_t getStorageSize() const override;

// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const H5_OVERRIDE;
virtual size_t getInMemDataSize() const override;

// Reads data from this attribute.
void read(const DataType &mem_type, void *buf) const;
Expand All @@ -68,21 +68,21 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("Attribute");
}

// Gets the attribute id.
virtual hid_t getId() const H5_OVERRIDE;
virtual hid_t getId() const override;

// Destructor: properly terminates access to this attribute.
virtual ~Attribute() H5_OVERRIDE;
virtual ~Attribute() override;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
// Sets the attribute id.
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS

private:
Expand All @@ -92,7 +92,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const H5_OVERRIDE;
virtual hid_t p_get_type() const override;

// Reads variable or fixed len strings from this attribute.
void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const;
Expand Down
1 change: 0 additions & 1 deletion c++/src/H5CommonFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <string>

#include "H5private.h" // for HDstrcpy
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
Expand Down
6 changes: 3 additions & 3 deletions c++/src/H5CompType.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class H5_DLLCPP CompType : public DataType {

// Returns a CompType object via DataType* by decoding the binary
// object description of this type.
virtual DataType *decode() const H5_OVERRIDE;
virtual DataType *decode() const override;

// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
Expand Down Expand Up @@ -108,13 +108,13 @@ class H5_DLLCPP CompType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("CompType");
}

// Noop destructor.
virtual ~CompType() H5_OVERRIDE;
virtual ~CompType() override;

private:
// Contains common code that is used by the member functions
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5DaccProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("DSetAccPropList");
}
Expand All @@ -51,7 +51,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {
DSetAccPropList(const hid_t plist_id);

// Noop destructor.
virtual ~DSetAccPropList() H5_OVERRIDE;
virtual ~DSetAccPropList() override;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

Expand Down
7 changes: 3 additions & 4 deletions c++/src/H5DataSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <iostream>
#include <string>

#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
Expand Down Expand Up @@ -717,8 +716,8 @@ DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, con

// If there is data, allocate buffer and read it.
if (data_size > 0) {
char *strg_C = new char[data_size + 1];
HDmemset(strg_C, 0, data_size + 1); // clear buffer
// Create buffer for C string
char *strg_C = new char[data_size + 1]();

herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);

Expand Down Expand Up @@ -759,7 +758,7 @@ DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id,

// Get string from the C char* and release resource allocated by C API
strg = strg_C;
HDfree(strg_C);
free(strg_C);
}

#ifndef DOXYGEN_SHOULD_SKIP_THIS
Expand Down
18 changes: 9 additions & 9 deletions c++/src/H5DataSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace H5 {
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
public:
// Close this dataset.
virtual void close() H5_OVERRIDE;
virtual void close() override;

// Extends the dataset with unlimited dimension.
void extend(const hsize_t *size) const;
Expand All @@ -53,16 +53,16 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
haddr_t getOffset() const;

// Gets the dataspace of this dataset.
virtual DataSpace getSpace() const H5_OVERRIDE;
virtual DataSpace getSpace() const override;

// Determines whether space has been allocated for a dataset.
void getSpaceStatus(H5D_space_status_t &status) const;

// Returns the amount of storage size required for this dataset.
virtual hsize_t getStorageSize() const H5_OVERRIDE;
virtual hsize_t getStorageSize() const override;

// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const H5_OVERRIDE;
virtual size_t getInMemDataSize() const override;

// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize(const DataType &type, const DataSpace &space) const;
Expand Down Expand Up @@ -100,7 +100,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("DataSet");
}
Expand All @@ -124,15 +124,15 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
DataSet(const hid_t existing_id);

// Gets the dataset id.
virtual hid_t getId() const H5_OVERRIDE;
virtual hid_t getId() const override;

// Destructor: properly terminates access to this dataset.
virtual ~DataSet() H5_OVERRIDE;
virtual ~DataSet() override;

protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the dataset id.
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS

private:
Expand All @@ -142,7 +142,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const H5_OVERRIDE;
virtual hid_t p_get_type() const override;

// Reads variable or fixed len strings from this dataset.
void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
Expand Down
10 changes: 5 additions & 5 deletions c++/src/H5DataSpace.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
DataSpace &operator=(const DataSpace &rhs);

// Closes this dataspace.
virtual void close() H5_OVERRIDE;
virtual void close() override;

// Makes copy of an existing dataspace.
void copy(const DataSpace &like_space);
Expand Down Expand Up @@ -115,25 +115,25 @@ class H5_DLLCPP DataSpace : public IdComponent {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("DataSpace");
}

// Gets the dataspace id.
virtual hid_t getId() const H5_OVERRIDE;
virtual hid_t getId() const override;

// Deletes the global constant
static void deleteConstants();

// Destructor: properly terminates access to this dataspace.
virtual ~DataSpace() H5_OVERRIDE;
virtual ~DataSpace() override;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

protected:
// Sets the dataspace id.
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
virtual void p_setId(const hid_t new_id) override;

#endif // DOXYGEN_SHOULD_SKIP_THIS

Expand Down
Loading

0 comments on commit b9dbabc

Please sign in to comment.