From 864a1eda22ed99266509ac76451c6f27f91aa17e Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 25 Feb 2021 14:11:04 -0500 Subject: [PATCH] Use 'ust-' prefix for all global private headers Reduce the chances of a header filename clash by namespacing all the global public header files with 'ust-'. Also, consistency makes me happy. Change-Id: I41a0b32885a5568ebf4c554893bde8a1ea5c3402 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- include/Makefile.am | 6 +++--- include/ust-comm.h | 2 +- include/{helper.h => ust-helper.h} | 0 include/{share.h => ust-share.h} | 2 +- include/{ust_snprintf.h => ust-snprintf.h} | 0 include/usterr-signal-safe.h | 2 +- libcounter/counter.c | 2 +- libcounter/counter.h | 2 +- libcounter/shm.c | 2 +- libcounter/shm.h | 2 +- libcounter/smp.h | 2 +- liblttng-ust-comm/lttng-ust-comm.c | 2 +- liblttng-ust-comm/lttng-ust-fd-tracker.c | 2 +- liblttng-ust-ctl/ustctl.c | 2 +- liblttng-ust-dl/lttng-ust-dl.c | 2 +- liblttng-ust-fd/lttng-ust-fd.c | 2 +- liblttng-ust-java-agent/jni/common/lttng_ust_context.c | 2 +- liblttng-ust-libc-wrapper/lttng-ust-malloc.c | 2 +- liblttng-ust-libc-wrapper/lttng-ust-pthread.c | 2 +- liblttng-ust/context-internal.h | 2 +- liblttng-ust/context-provider-internal.h | 2 +- liblttng-ust/event-notifier-notification.c | 2 +- liblttng-ust/futex.h | 2 +- liblttng-ust/getenv.c | 2 +- liblttng-ust/lttng-bytecode.h | 2 +- liblttng-ust/lttng-context-perf-counters.c | 2 +- liblttng-ust/lttng-context-provider.c | 2 +- liblttng-ust/lttng-context.c | 2 +- liblttng-ust/lttng-events.c | 2 +- liblttng-ust/lttng-probes.c | 2 +- liblttng-ust/lttng-tracer-core.h | 2 +- liblttng-ust/lttng-ust-abi.c | 2 +- liblttng-ust/lttng-ust-comm.c | 2 +- liblttng-ust/lttng-ust-dynamic-type.c | 2 +- liblttng-ust/lttng-ust-elf.c | 2 +- liblttng-ust/lttng-ust-statedump.c | 2 +- liblttng-ust/rculfhash-internal.h | 2 +- liblttng-ust/rculfhash.h | 2 +- liblttng-ust/tracef.c | 2 +- liblttng-ust/tracelog.c | 2 +- liblttng-ust/tracepoint.c | 2 +- liblttng-ust/ust-events-internal.h | 2 +- libmsgpack/msgpack.h | 2 +- libringbuffer/ring_buffer_frontend.c | 2 +- libringbuffer/shm.c | 2 +- snprintf/patient_write.c | 2 +- snprintf/snprintf.c | 2 +- tests/unit/snprintf/snprintf.c | 2 +- 48 files changed, 48 insertions(+), 48 deletions(-) rename include/{helper.h => ust-helper.h} (100%) rename include/{share.h => ust-share.h} (95%) rename include/{ust_snprintf.h => ust-snprintf.h} (100%) diff --git a/include/Makefile.am b/include/Makefile.am index 4a9e6d39..c338205c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -53,7 +53,7 @@ nobase_nodist_include_HEADERS = \ noinst_HEADERS = \ usterr-signal-safe.h \ - ust_snprintf.h \ + ust-snprintf.h \ ust-comm.h \ ust-fd.h \ ust-tid.h \ @@ -61,6 +61,6 @@ noinst_HEADERS = \ ust-dlfcn.h \ ust-dynamic-type.h \ ust-context-provider.h \ - helper.h \ - share.h + ust-helper.h \ + ust-share.h diff --git a/include/ust-comm.h b/include/ust-comm.h index 410d3d68..7d1871dc 100644 --- a/include/ust-comm.h +++ b/include/ust-comm.h @@ -21,7 +21,7 @@ #include #include #include -#include "helper.h" +#include "ust-helper.h" #ifndef LTTNG_PACKED #error "LTTNG_PACKED should be defined" diff --git a/include/helper.h b/include/ust-helper.h similarity index 100% rename from include/helper.h rename to include/ust-helper.h diff --git a/include/share.h b/include/ust-share.h similarity index 95% rename from include/share.h rename to include/ust-share.h index 28a4a056..cabb2640 100644 --- a/include/share.h +++ b/include/ust-share.h @@ -10,7 +10,7 @@ #include #include -#include "helper.h" +#include "ust-helper.h" /* Should be hidden but would break the ABI */ ssize_t patient_write(int fd, const void *buf, size_t count); diff --git a/include/ust_snprintf.h b/include/ust-snprintf.h similarity index 100% rename from include/ust_snprintf.h rename to include/ust-snprintf.h diff --git a/include/usterr-signal-safe.h b/include/usterr-signal-safe.h index 478ad1f8..c3050a42 100644 --- a/include/usterr-signal-safe.h +++ b/include/usterr-signal-safe.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "ust-tid.h" enum ust_loglevel { diff --git a/libcounter/counter.c b/libcounter/counter.c index 91506faf..ca25bda6 100644 --- a/libcounter/counter.c +++ b/libcounter/counter.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "smp.h" #include "shm.h" diff --git a/libcounter/counter.h b/libcounter/counter.h index 88e113f9..6b5382f5 100644 --- a/libcounter/counter.h +++ b/libcounter/counter.h @@ -12,7 +12,7 @@ #include #include #include "counter-types.h" -#include "helper.h" +#include "ust-helper.h" /* max_nr_elem is for each dimension. */ LTTNG_HIDDEN diff --git a/libcounter/shm.c b/libcounter/shm.c index efebbd0e..13a9f642 100644 --- a/libcounter/shm.c +++ b/libcounter/shm.c @@ -25,7 +25,7 @@ #include #include #endif -#include +#include #include #include "../libringbuffer/mmap.h" diff --git a/libcounter/shm.h b/libcounter/shm.h index a57b746d..b162e98f 100644 --- a/libcounter/shm.h +++ b/libcounter/shm.h @@ -13,7 +13,7 @@ #include #include #include "shm_types.h" -#include "helper.h" +#include "ust-helper.h" /* lttng_counter_handle_create - for UST. */ extern diff --git a/libcounter/smp.h b/libcounter/smp.h index 8bf8974d..6b3de287 100644 --- a/libcounter/smp.h +++ b/libcounter/smp.h @@ -7,7 +7,7 @@ #ifndef _LIBCOUNTER_SMP_H #define _LIBCOUNTER_SMP_H -#include "helper.h" +#include "ust-helper.h" /* * 4kB of per-cpu data available. diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 8a35d9f7..dd592082 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/liblttng-ust-comm/lttng-ust-fd-tracker.c b/liblttng-ust-comm/lttng-ust-fd-tracker.c index 98990cd9..c9b5fdc0 100644 --- a/liblttng-ust-comm/lttng-ust-fd-tracker.c +++ b/liblttng-ust-comm/lttng-ust-fd-tracker.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index cfe2cc96..38076928 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "../libringbuffer/backend.h" #include "../libringbuffer/frontend.h" diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index 2e4c3c01..6b7362ac 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "usterr-signal-safe.h" /* Include link.h last else it conflicts with ust-dlfcn. */ diff --git a/liblttng-ust-fd/lttng-ust-fd.c b/liblttng-ust-fd/lttng-ust-fd.c index 02a6f33c..c60f3f03 100644 --- a/liblttng-ust-fd/lttng-ust-fd.c +++ b/liblttng-ust-fd/lttng-ust-fd.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include "usterr-signal-safe.h" static int (*__lttng_ust_fd_plibc_close)(int fd); diff --git a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c index 2a06a1b3..bda3b6ee 100644 --- a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c +++ b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c @@ -14,7 +14,7 @@ #include #include -#include "helper.h" +#include "ust-helper.h" #include "lttng_ust_context.h" enum lttng_ust_jni_type { diff --git a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c index 0ad45445..694eed17 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-malloc.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-malloc.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #define TRACEPOINT_DEFINE #define TRACEPOINT_CREATE_PROBES diff --git a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c index 56d0ea3b..06bf791b 100644 --- a/liblttng-ust-libc-wrapper/lttng-ust-pthread.c +++ b/liblttng-ust-libc-wrapper/lttng-ust-pthread.c @@ -10,7 +10,7 @@ * libc. */ #include -#include +#include #include #define TRACEPOINT_DEFINE diff --git a/liblttng-ust/context-internal.h b/liblttng-ust/context-internal.h index 1ec1b57e..3f1f42e8 100644 --- a/liblttng-ust/context-internal.h +++ b/liblttng-ust/context-internal.h @@ -8,7 +8,7 @@ #define _LTTNG_UST_CONTEXT_INTERNAL_H #include -#include "helper.h" +#include "ust-helper.h" LTTNG_HIDDEN int lttng_context_init_all(struct lttng_ctx **ctx); diff --git a/liblttng-ust/context-provider-internal.h b/liblttng-ust/context-provider-internal.h index f688db5e..6834343f 100644 --- a/liblttng-ust/context-provider-internal.h +++ b/liblttng-ust/context-provider-internal.h @@ -9,7 +9,7 @@ #include #include -#include "helper.h" +#include "ust-helper.h" LTTNG_HIDDEN void lttng_ust_context_set_event_notifier_group_provider(const char *name, diff --git a/liblttng-ust/event-notifier-notification.c b/liblttng-ust/event-notifier-notification.c index 472479fd..942f6136 100644 --- a/liblttng-ust/event-notifier-notification.c +++ b/liblttng-ust/event-notifier-notification.c @@ -14,7 +14,7 @@ #include "../libmsgpack/msgpack.h" #include "lttng-bytecode.h" -#include "share.h" +#include "ust-share.h" /* * We want this write to be atomic AND non-blocking, meaning that we diff --git a/liblttng-ust/futex.h b/liblttng-ust/futex.h index 8305c929..9560eaf1 100644 --- a/liblttng-ust/futex.h +++ b/liblttng-ust/futex.h @@ -14,7 +14,7 @@ #include #include -#include "helper.h" +#include "ust-helper.h" #ifdef __cplusplus extern "C" { diff --git a/liblttng-ust/getenv.c b/liblttng-ust/getenv.c index 169c3bdf..f2222ddb 100644 --- a/liblttng-ust/getenv.c +++ b/liblttng-ust/getenv.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include "getenv.h" enum lttng_env_secure { diff --git a/liblttng-ust/lttng-bytecode.h b/liblttng-ust/lttng-bytecode.h index bf1f2cac..c0e90c45 100644 --- a/liblttng-ust/lttng-bytecode.h +++ b/liblttng-ust/lttng-bytecode.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-context-perf-counters.c b/liblttng-ust/lttng-context-perf-counters.c index 9d57a233..c7dc2ecb 100644 --- a/liblttng-ust/lttng-context-perf-counters.c +++ b/liblttng-ust/lttng-context-perf-counters.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index 9af001b5..b3fc21de 100644 --- a/liblttng-ust/lttng-context-provider.c +++ b/liblttng-ust/lttng-context-provider.c @@ -17,7 +17,7 @@ #include "lttng-tracer-core.h" #include "jhash.h" #include "context-provider-internal.h" -#include +#include #define CONTEXT_PROVIDER_HT_BITS 12 #define CONTEXT_PROVIDER_HT_SIZE (1U << CONTEXT_PROVIDER_HT_BITS) diff --git a/liblttng-ust/lttng-context.c b/liblttng-ust/lttng-context.c index 19f392f1..59bc082b 100644 --- a/liblttng-ust/lttng-context.c +++ b/liblttng-ust/lttng-context.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 47460102..72d25bb4 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-probes.c b/liblttng-ust/lttng-probes.c index e7dab9fc..2306e1e6 100644 --- a/liblttng-ust/lttng-probes.c +++ b/liblttng-ust/lttng-probes.c @@ -15,7 +15,7 @@ #include #include "tracepoint-internal.h" #include -#include +#include #include #include "lttng-tracer-core.h" diff --git a/liblttng-ust/lttng-tracer-core.h b/liblttng-ust/lttng-tracer-core.h index efb4f5b6..9042a303 100644 --- a/liblttng-ust/lttng-tracer-core.h +++ b/liblttng-ust/lttng-tracer-core.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include /* * The longuest possible namespace proc path is with the cgroup ns diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 8fd2e958..a367168a 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index af8636a8..891eb16e 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "tracepoint-internal.h" #include "lttng-tracer-core.h" #include "compat.h" diff --git a/liblttng-ust/lttng-ust-dynamic-type.c b/liblttng-ust/lttng-ust-dynamic-type.c index 3c1314c4..6913ca4b 100644 --- a/liblttng-ust/lttng-ust-dynamic-type.c +++ b/liblttng-ust/lttng-ust-dynamic-type.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #define ctf_enum_value(_string, _value) \ diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c index 52078d96..b22b4b63 100644 --- a/liblttng-ust/lttng-ust-elf.c +++ b/liblttng-ust/lttng-ust-elf.c @@ -6,7 +6,7 @@ #define _LGPL_SOURCE #include -#include +#include #include #include #include diff --git a/liblttng-ust/lttng-ust-statedump.c b/liblttng-ust/lttng-ust-statedump.c index 4387cab4..9d48e59b 100644 --- a/liblttng-ust/lttng-ust-statedump.c +++ b/liblttng-ust/lttng-ust-statedump.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include "lttng-tracer-core.h" #include "lttng-ust-statedump.h" #include "jhash.h" diff --git a/liblttng-ust/rculfhash-internal.h b/liblttng-ust/rculfhash-internal.h index 667dd611..39b20ed5 100644 --- a/liblttng-ust/rculfhash-internal.h +++ b/liblttng-ust/rculfhash-internal.h @@ -14,7 +14,7 @@ #include #include #include -#include "helper.h" +#include "ust-helper.h" #ifdef DEBUG #define dbg_printf(fmt, args...) printf("[debug lttng-ust rculfhash] " fmt, ## args) diff --git a/liblttng-ust/rculfhash.h b/liblttng-ust/rculfhash.h index be154498..39f8e5a3 100644 --- a/liblttng-ust/rculfhash.h +++ b/liblttng-ust/rculfhash.h @@ -13,7 +13,7 @@ #include #include #include -#include "helper.h" +#include "ust-helper.h" #ifdef __cplusplus extern "C" { diff --git a/liblttng-ust/tracef.c b/liblttng-ust/tracef.c index 9d922dee..54fb735a 100644 --- a/liblttng-ust/tracef.c +++ b/liblttng-ust/tracef.c @@ -6,7 +6,7 @@ #define _LGPL_SOURCE #include -#include +#include #define TRACEPOINT_CREATE_PROBES #define TRACEPOINT_DEFINE diff --git a/liblttng-ust/tracelog.c b/liblttng-ust/tracelog.c index 3d48b1ed..5dc2ffc5 100644 --- a/liblttng-ust/tracelog.c +++ b/liblttng-ust/tracelog.c @@ -6,7 +6,7 @@ #define _LGPL_SOURCE #include -#include +#include #define TRACEPOINT_CREATE_PROBES #define TRACEPOINT_DEFINE diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index f65097f6..089232e1 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -24,7 +24,7 @@ #include /* for LTTNG_UST_SYM_NAME_LEN */ #include -#include +#include #include "tracepoint-internal.h" #include "lttng-tracer-core.h" diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index 807f14f8..bd30e00a 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include struct lttng_event_enabler { diff --git a/libmsgpack/msgpack.h b/libmsgpack/msgpack.h index ea8a82ee..04606306 100644 --- a/libmsgpack/msgpack.h +++ b/libmsgpack/msgpack.h @@ -12,7 +12,7 @@ #include #else /* __KERNEL__ */ #include -#include "helper.h" +#include "ust-helper.h" #endif /* __KERNEL__ */ struct lttng_msgpack_writer { diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index 90459f00..736c598a 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include "smp.h" #include diff --git a/libringbuffer/shm.c b/libringbuffer/shm.c index 3dbb9f49..58050468 100644 --- a/libringbuffer/shm.c +++ b/libringbuffer/shm.c @@ -24,7 +24,7 @@ #include #include #endif -#include +#include #include #include "mmap.h" diff --git a/snprintf/patient_write.c b/snprintf/patient_write.c index 4f344ec9..2ec00cd9 100644 --- a/snprintf/patient_write.c +++ b/snprintf/patient_write.c @@ -19,7 +19,7 @@ #include -#include +#include /* * This write is patient because it restarts if it was incomplete. diff --git a/snprintf/snprintf.c b/snprintf/snprintf.c index 20012088..7e37a5e5 100644 --- a/snprintf/snprintf.c +++ b/snprintf/snprintf.c @@ -15,7 +15,7 @@ #include #include #include "local.h" -#include "ust_snprintf.h" +#include "ust-snprintf.h" #define DUMMY_LEN 1 diff --git a/tests/unit/snprintf/snprintf.c b/tests/unit/snprintf/snprintf.c index ad739342..a2fbdc96 100644 --- a/tests/unit/snprintf/snprintf.c +++ b/tests/unit/snprintf/snprintf.c @@ -6,7 +6,7 @@ #include #include -#include "ust_snprintf.h" +#include "ust-snprintf.h" #include "tap.h" -- 2.34.1