Skip to content

COMP: Rename the simplnx HDF5 lock macro to remove a name conflict - #1961

Closed
imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:topic/rename_simplnx_h5support_mutex_macro
Closed

imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:topic/rename_simplnx_h5support_mutex_macro

Conversation

@imikejackson

Copy link
Copy Markdown
Contributor

Summary

simplnx defined the macro H5SUPPORT_MUTEX_LOCK() and the compile definition H5Support_USE_MUTEX. The H5Support library defines a macro with the same name in H5Support/H5Support.h. When one file included both headers, the compiler gave a macro redefinition warning. The definition that the compiler used depended on the include order.

This pull request gives the simplnx names a SIMPLNX_ prefix, so that they do not conflict with the H5Support library.

  • H5SUPPORT_MUTEX_LOCK() is now SIMPLNX_H5SUPPORT_MUTEX_LOCK().
  • The compile definition H5Support_USE_MUTEX is now SIMPLNX_H5Support_USE_MUTEX.
  • The names are changed in CMakeLists.txt, H5Support.hpp, H5Support.cpp and test/H5Test.cpp. There are no other code changes.

Test Plan

  • macOS, Release, DREAM3D-NX build with local simplnx and EbsdLib: the simplnx, simplnx_test, OrientationAnalysis and test targets build with 0 -Wmacro-redefined warnings. The test HDF5 ApiLock serializes access via SIMPLNX_H5SUPPORT_MUTEX_LOCK passes. This build also had other uncommitted changes that do not touch these four files.
  • A search of simplnx and SimplnxOoc finds no other use of the old names.
  • CI passes.

Related Issue

  • This PR has no related issue

@imikejackson imikejackson self-assigned this Nov 11, 2026
* simplnx defined H5SUPPORT_MUTEX_LOCK() and the compile definition
  H5Support_USE_MUTEX. The H5Support library defines a macro with the
  same name in H5Support/H5Support.h. When one file included both
  headers, the compiler gave a macro redefinition warning, and the
  definition that the compiler used depended on the include order.
* The simplnx macro is now SIMPLNX_H5SUPPORT_MUTEX_LOCK(), and the
  compile definition is now SIMPLNX_H5Support_USE_MUTEX.
* The names are changed in CMakeLists.txt, H5Support.hpp,
  H5Support.cpp and test/H5Test.cpp. No other code changes.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
@imikejackson
imikejackson force-pushed the topic/rename_simplnx_h5support_mutex_macro branch from f4c5f6d to df34f41 Compare November 12, 2026 15:18
@imikejackson

Copy link
Copy Markdown
Contributor Author

Closed in favor of #1973, which merges this branch (with its history) together with the other EBSD fixes that need the next EbsdLib release (BlueQuartzSoftware/EbsdLib#86). The branch is kept.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant