Skip to content

Commit d2da9a9

Browse files
committed
API: rename HAVE_32BITS_PCI_DOMAIN with HWLOC_ prefix
To avoid polluting the public macro namespace. Signed-off-by: Brice Goglin <[email protected]>
1 parent 5984a7f commit d2da9a9

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

config/hwloc.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ return 0;
848848
fi
849849
850850
AS_IF([test "x$enable_32bits_pci_domain" = "xyes"], [
851-
AC_DEFINE([HAVE_32BITS_PCI_DOMAIN], 1,
851+
AC_DEFINE([HWLOC_HAVE_32BITS_PCI_DOMAIN], 1,
852852
[Define to 1 if --enable-32bits-pci-domain is called.])
853853
])
854854

hwloc/topology-linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6486,15 +6486,15 @@ hwloc_linuxfs_pci_look_pcidevices(struct hwloc_backend *backend)
64866486
if (sscanf(dirent->d_name, "%x:%02x:%02x.%01x", &domain, &bus, &dev, &func) != 4)
64876487
continue;
64886488

6489-
#ifndef HAVE_32BITS_PCI_DOMAIN
6489+
#ifndef HWLOC_HAVE_32BITS_PCI_DOMAIN
64906490
if (domain > 0xffff) {
64916491
static int warned = 0;
64926492
if (!warned && !hwloc_hide_errors())
64936493
fprintf(stderr, "Ignoring PCI device with non-16bit domain.\nPass --enable-32bits-pci-domain to configure to support such devices\n(warning: it would break the library ABI, don't enable unless really needed).\n");
64946494
warned = 1;
64956495
continue;
64966496
}
6497-
#endif
6497+
#endif
64986498

64996499
/* initialize the config space in case we fail to read it (missing permissions, etc). */
65006500
memset(config_space_cache, 0xff, CONFIG_SPACE_CACHESIZE);

hwloc/topology-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,15 @@ hwloc_look_pci(struct hwloc_backend *backend, struct hwloc_disc_status *dstatus)
200200
dev = pcidev->dev;
201201
func = pcidev->func;
202202

203-
#ifndef HAVE_32BITS_PCI_DOMAIN
203+
#ifndef HWLOC_HAVE_32BITS_PCI_DOMAIN
204204
if (domain > 0xffff) {
205205
static int warned = 0;
206206
if (!warned && !hwloc_hide_errors())
207207
fprintf(stderr, "Ignoring PCI device with non-16bit domain.\nPass --enable-32bits-pci-domain to configure to support such devices\n(warning: it would break the library ABI, don't enable unless really needed).\n");
208208
warned = 1;
209209
continue;
210210
}
211-
#endif
211+
#endif
212212

213213
/* initialize the config space in case we fail to read it (missing permissions, etc). */
214214
memset(config_space_cache, 0xff, CONFIG_SPACE_CACHESIZE);

hwloc/topology-xml.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ hwloc__xml_import_object_attr(struct hwloc_topology *topology,
259259
fprintf(stderr, "%s: ignoring invalid pci_busid format string %s\n",
260260
state->global->msgprefix, value);
261261
*ignore = 1;
262-
#ifndef HAVE_32BITS_PCI_DOMAIN
262+
#ifndef HWLOC_HAVE_32BITS_PCI_DOMAIN
263263
} else if (domain > 0xffff) {
264264
static int warned = 0;
265265
if (!warned && !hwloc_hide_errors())
@@ -358,7 +358,7 @@ hwloc__xml_import_object_attr(struct hwloc_topology *topology,
358358
fprintf(stderr, "%s: ignoring invalid bridge_pci format string %s\n",
359359
state->global->msgprefix, value);
360360
*ignore = 1;
361-
#ifndef HAVE_32BITS_PCI_DOMAIN
361+
#ifndef HWLOC_HAVE_32BITS_PCI_DOMAIN
362362
} else if (domain > 0xffff) {
363363
static int warned = 0;
364364
if (!warned && !hwloc_hide_errors())

include/hwloc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,11 @@ union hwloc_obj_attr_u {
617617
} group;
618618
/** \brief PCI Device specific Object Attributes */
619619
struct hwloc_pcidev_attr_s {
620-
#ifndef HAVE_32BITS_PCI_DOMAIN
620+
#ifndef HWLOC_HAVE_32BITS_PCI_DOMAIN
621621
unsigned short domain; /* Only 16bits PCI domains are supported by default */
622-
#else
622+
#else
623623
unsigned int domain; /* 32bits PCI domain support break the library ABI, hence it's disabled by default */
624-
#endif
624+
#endif
625625
unsigned char bus, dev, func;
626626
unsigned short class_id;
627627
unsigned short vendor_id, device_id, subvendor_id, subdevice_id;
@@ -636,7 +636,7 @@ union hwloc_obj_attr_u {
636636
hwloc_obj_bridge_type_t upstream_type;
637637
union {
638638
struct {
639-
#ifndef HAVE_32BITS_PCI_DOMAIN
639+
#ifndef HWLOC_HAVE_32BITS_PCI_DOMAIN
640640
unsigned short domain; /* Only 16bits PCI domains are supported by default */
641641
#else
642642
unsigned int domain; /* 32bits PCI domain support break the library ABI, hence it's disabled by default */

include/hwloc/autogen/config.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ typedef uint64_t hwloc_uint64_t;
218218
#endif /* HWLOC_HAVE_WINDOWS_H */
219219

220220
/* Define to 1 if --enable-32bits-pci-domain is called. */
221-
#undef HAVE_32BITS_PCI_DOMAIN
221+
#undef HWLOC_HAVE_32BITS_PCI_DOMAIN
222222

223223
/* Whether we need to re-define all the hwloc public symbols or not */
224224
#undef HWLOC_SYM_TRANSFORM

0 commit comments

Comments
 (0)