Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5Utils issues with long and long long types #16398

Closed
quantumsteve opened this issue May 24, 2016 · 5 comments
Closed

H5Utils issues with long and long long types #16398

quantumsteve opened this issue May 24, 2016 · 5 comments
Assignees
Labels
Framework Issues and pull requests related to components in the Framework Stale This label is automatically applied to issues that are automatically closed by the stale bot

Comments

@quantumsteve
Copy link
Contributor

quantumsteve commented May 24, 2016

Expected behavior

H5Utils "does the right thing" when loading or writing either a std::vector<long> or std::vector<long long>

Actual behavior

On certain platforms, the user will encounter a linking error.

Platforms affected

On Windows long has the same length as int32_t, but it is a ​_different_​ type.
On Windows long long has the same length as int64_t, and it is the ​_same_​ type.
http://rextester.com/EEFS42414

On OS X & Linux long has the same length as int64_t, and is the ​_same_​ type.
On OS X & Linux long long has the same length as int64_t, but is a ​_different_​ type.
http://cpp.sh/7u2t

Related issue is nexus-code#428.

@quantumsteve quantumsteve added the Framework Issues and pull requests related to components in the Framework label May 24, 2016
@quantumsteve quantumsteve added this to the Release 3.8 milestone May 24, 2016
@quantumsteve
Copy link
Contributor Author

HDF5 has H5T_NATIVE_LONG, H5T_NATIVE_ULONG, H5T_NATIVE_LLONG, H5T_NATIVE_ULLONG types, which (assuming the NeXus format allows them) may be useful. Otherwise, we may need our own logic to steer long on Win32 to int32_t and long long on Linux to int64_t.

@peterfpeterson
Copy link
Member

The good news is we don't support win32.

@quantumsteve
Copy link
Contributor Author

By Win32 I mean 64-bit Windows, which we do support. WIN32 is a macro often used to determine a Windows machine and defined in both 32 and 64-bit builds..

@NickDraper NickDraper modified the milestones: Release 3.8, Release 3.9 Oct 3, 2016
@NickDraper NickDraper modified the milestones: Release 3.9, Temporary Holding Oct 14, 2016
@NickDraper NickDraper removed this from the Temporary Holding milestone Oct 3, 2017
@stale
Copy link

stale bot commented Feb 24, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you feel this is incorrect please comment to keep it alive, with a reason why.

To prevent closure, e.g. for long-term planning issues, add the "Never Stale" label.

@stale stale bot added the Stale This label is automatically applied to issues that are automatically closed by the stale bot label Feb 24, 2021
@stale
Copy link

stale bot commented Mar 3, 2021

This issue has been closed automatically. If this still affects you please re-open this issue with a comment so we can look into resolving it.

@stale stale bot closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework Stale This label is automatically applied to issues that are automatically closed by the stale bot
Projects
None yet
Development

No branches or pull requests

3 participants