Skip to content

Conversation

derobins
Copy link
Member

@derobins derobins commented Sep 11, 2025

Supporting off_t is a pain on Windows and is only used in one
pair of public API calls, where it's semantically odd because
negative values aren't allowed.

This PR removes off_t and replaces it with uint64_t.

  • Remove off_t from H5Pset/get_external() calls
  • Remove off_t from set/getExternal() C++ calls
  • Remove off_t from the Fortran interface
  • Remove OFF_T as a Fortran INTEGER KIND

Internally, HDoff_t remains in a few places where it's used
in POSIX I/O calls.


Important

Replace off_t with uint64_t in HDF5 external file interfaces for better Windows compatibility.

  • Behavior:
    • Replace off_t with uint64_t in H5Pset_external() and H5Pget_external() in H5Pdcpl.c and H5Ppublic.h.
    • Update C++ methods setExternal() and getExternal() in H5DcreatProp.cpp and H5DcreatProp.h to use uint64_t.
    • Modify Fortran interfaces h5pset_external_c() and h5pget_external_c() in H5Pf.c and H5Pff.F90 to use uint64_t_f.
  • Fortran:
    • Remove OFF_T as a Fortran INTEGER KIND in H5match_types.c.
  • Java:
    • Change offset parameter to uint64_t in h5pDCPLImp.c.
  • Documentation:
    • Update RELEASE.txt to reflect changes in offset parameter types and removal of OFF_T.
  • Misc:
    • Internal HDoff_t usage remains for POSIX I/O calls in H5Defl.c and H5FDstdio.c.

This description was created by Ellipsis for cc4a37f. You can customize this summary. It will automatically update as commits are pushed.

* Remove off_t from H5Pset/get_external() calls
* Remove off_t from set/getExternal() C++ calls
* Remove off_t from the Fortran interface
* Remove OFF_T as a Fortran INTEGER KIND

HDoff_t remains in a few places where it's used in POSIX I/O calls.
@derobins
Copy link
Member Author

This PR replaces #5082, which was wildly out of date.

@derobins derobins marked this pull request as draft September 11, 2025 16:33
Copy link
Collaborator

@brtnfld brtnfld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the C wrappers for Fortran and call the C API directly, as long as we are doing updates anyway. I can do that later if you'd like.

@derobins
Copy link
Member Author

I would remove the C wrappers for Fortran and call the C API directly, as long as we are doing updates anyway. I can do that later if you'd like.

I'll update it tonight.

Copy link
Collaborator

@jhendersonHDF jhendersonHDF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally approved; We decided that for consistency it would be a good idea to version H5Pset/get_external. @derobins could you do this?

@github-project-automation github-project-automation bot moved this from To be triaged to In progress in HDF5 - TRIAGE & TRACK Sep 12, 2025
@derobins
Copy link
Member Author

Accidentally approved; We decided that for consistency it would be a good idea to version H5Pset/get_external. @derobins could you do this?

I can but it'll take more time. I'll have to write tests, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants