Skip to content

Commit

Permalink
rename.h: replace hwloc_ with HWLOC_ when renaming capital names
Browse files Browse the repository at this point in the history
Thanks to Samuel K. Gutierrez for reporting this issue
a long time ago.

This shouldn't break anything since people are supposed
to call non-renamed symbols and let rename.h rename them.
In case it manages to break something, we're only changing
this in a major ABI-breaking release.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Dec 12, 2022
1 parent 704c316 commit c0c5151
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/hwloc.doxy
Expand Up @@ -3289,7 +3289,7 @@ HWLOC_SETUP_CORE <em>must</em> be invoked if using the m4 macros):
hwloc's types and public symbols with "foo_"; meaning that function
hwloc_init() becomes foo_hwloc_init(). Enum values are prefixed
with an upper-case translation if the prefix supplied;
HWLOC_OBJ_CORE becomes FOO_hwloc_OBJ_CORE. This is recommended
HWLOC_OBJ_CORE becomes FOO_HWLOC_OBJ_CORE. This is recommended
behavior if you are including hwloc in middleware -- it is possible
that your software will be combined with other software that links
to another copy of hwloc. If both uses of hwloc utilize different
Expand Down
2 changes: 1 addition & 1 deletion include/hwloc/rename.h
Expand Up @@ -29,7 +29,7 @@ extern "C" {
#define HWLOC_MUNGE_NAME2(a, b) a ## b
#define HWLOC_NAME(name) HWLOC_MUNGE_NAME(HWLOC_SYM_PREFIX, hwloc_ ## name)
/* FIXME: should be "HWLOC_ ## name" below, unchanged because it doesn't matter much and could break some embedders hacks */
#define HWLOC_NAME_CAPS(name) HWLOC_MUNGE_NAME(HWLOC_SYM_PREFIX_CAPS, hwloc_ ## name)
#define HWLOC_NAME_CAPS(name) HWLOC_MUNGE_NAME(HWLOC_SYM_PREFIX_CAPS, HWLOC_ ## name)

/* Now define all the "real" names to be the prefixed names. This
allows us to use the real names throughout the code base (i.e.,
Expand Down

0 comments on commit c0c5151

Please sign in to comment.