From: Michael Jeanson Date: Tue, 23 Mar 2021 20:31:22 +0000 (-0400) Subject: cleanup: Remove redefinition of CHAR_BIT X-Git-Tag: v2.13.0-rc1~196 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9af5d97a36b0cd4ed5d5868855f03c810d171aad;p=lttng-ust.git cleanup: Remove redefinition of CHAR_BIT Remove the redefinition of CHAR_BIT in 'lttng/ust-tracer.h', it is defined in 'limits.h' by all major Linux libc and even other Unices. Explicitly include in all files using CHAR_BIT. Change-Id: I917f6ee16898a6f99fa32db5d6ebd701e95400cc Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-events.h b/include/lttng/ust-events.h index 8b45cb7f..b687934d 100644 --- a/include/lttng/ust-events.h +++ b/include/lttng/ust-events.h @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/lttng/ust-tracer.h b/include/lttng/ust-tracer.h index acc475bf..b451eae6 100644 --- a/include/lttng/ust-tracer.h +++ b/include/lttng/ust-tracer.h @@ -9,8 +9,6 @@ #ifndef _LTTNG_UST_TRACER_H #define _LTTNG_UST_TRACER_H -#include - #include #include #include @@ -22,10 +20,6 @@ #define RING_BUFFER_ALIGN #endif -#ifndef CHAR_BIT -#define CHAR_BIT 8 -#endif - #ifdef RING_BUFFER_ALIGN #define lttng_alignof(type) __alignof__(type) #else diff --git a/liblttng-ust/event-notifier-notification.c b/liblttng-ust/event-notifier-notification.c index 40ad731e..42223326 100644 --- a/liblttng-ust/event-notifier-notification.c +++ b/liblttng-ust/event-notifier-notification.c @@ -8,6 +8,8 @@ #include #include +#include + #include #include #include diff --git a/liblttng-ust/lttng-bytecode-specialize.c b/liblttng-ust/lttng-bytecode-specialize.c index 130b4edf..44eafb85 100644 --- a/liblttng-ust/lttng-bytecode-specialize.c +++ b/liblttng-ust/lttng-bytecode-specialize.c @@ -7,6 +7,7 @@ */ #define _LGPL_SOURCE +#include #include #include diff --git a/liblttng-ust/lttng-context-cgroup-ns.c b/liblttng-ust/lttng-context-cgroup-ns.c index 623689cc..5c0394d3 100644 --- a/liblttng-ust/lttng-context-cgroup-ns.c +++ b/liblttng-ust/lttng-context-cgroup-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-cpu-id.c b/liblttng-ust/lttng-context-cpu-id.c index baa1a889..8636b1ba 100644 --- a/liblttng-ust/lttng-context-cpu-id.c +++ b/liblttng-ust/lttng-context-cpu-id.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include "../libringbuffer/getcpu.h" diff --git a/liblttng-ust/lttng-context-ip.c b/liblttng-ust/lttng-context-ip.c index d163a6e0..903123a7 100644 --- a/liblttng-ust/lttng-context-ip.c +++ b/liblttng-ust/lttng-context-ip.c @@ -7,6 +7,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-ipc-ns.c b/liblttng-ust/lttng-context-ipc-ns.c index 836bca50..4186d4e7 100644 --- a/liblttng-ust/lttng-context-ipc-ns.c +++ b/liblttng-ust/lttng-context-ipc-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-mnt-ns.c b/liblttng-ust/lttng-context-mnt-ns.c index 19fa0c74..6f9fe80a 100644 --- a/liblttng-ust/lttng-context-mnt-ns.c +++ b/liblttng-ust/lttng-context-mnt-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-net-ns.c b/liblttng-ust/lttng-context-net-ns.c index 1efcceda..3cbfd391 100644 --- a/liblttng-ust/lttng-context-net-ns.c +++ b/liblttng-ust/lttng-context-net-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-perf-counters.c b/liblttng-ust/lttng-context-perf-counters.c index e3378a7d..df10e4f1 100644 --- a/liblttng-ust/lttng-context-perf-counters.c +++ b/liblttng-ust/lttng-context-perf-counters.c @@ -7,6 +7,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-pid-ns.c b/liblttng-ust/lttng-context-pid-ns.c index d52c0b9b..9a06a15d 100644 --- a/liblttng-ust/lttng-context-pid-ns.c +++ b/liblttng-ust/lttng-context-pid-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-pthread-id.c b/liblttng-ust/lttng-context-pthread-id.c index 65f77d9b..bc235826 100644 --- a/liblttng-ust/lttng-context-pthread-id.c +++ b/liblttng-ust/lttng-context-pthread-id.c @@ -7,6 +7,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-time-ns.c b/liblttng-ust/lttng-context-time-ns.c index a82d12af..d487189e 100644 --- a/liblttng-ust/lttng-context-time-ns.c +++ b/liblttng-ust/lttng-context-time-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-user-ns.c b/liblttng-ust/lttng-context-user-ns.c index 464e7368..a2916f94 100644 --- a/liblttng-ust/lttng-context-user-ns.c +++ b/liblttng-ust/lttng-context-user-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-uts-ns.c b/liblttng-ust/lttng-context-uts-ns.c index 729f934f..a8d03d98 100644 --- a/liblttng-ust/lttng-context-uts-ns.c +++ b/liblttng-ust/lttng-context-uts-ns.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-vegid.c b/liblttng-ust/lttng-context-vegid.c index b504b714..065e9e15 100644 --- a/liblttng-ust/lttng-context-vegid.c +++ b/liblttng-ust/lttng-context-vegid.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-veuid.c b/liblttng-ust/lttng-context-veuid.c index 5099d202..7de2136b 100644 --- a/liblttng-ust/lttng-context-veuid.c +++ b/liblttng-ust/lttng-context-veuid.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-vgid.c b/liblttng-ust/lttng-context-vgid.c index 6e413d93..c1a630ac 100644 --- a/liblttng-ust/lttng-context-vgid.c +++ b/liblttng-ust/lttng-context-vgid.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-vpid.c b/liblttng-ust/lttng-context-vpid.c index 514c69fc..3a8a6ea4 100644 --- a/liblttng-ust/lttng-context-vpid.c +++ b/liblttng-ust/lttng-context-vpid.c @@ -7,6 +7,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-vsgid.c b/liblttng-ust/lttng-context-vsgid.c index 07a2ccad..e24f4689 100644 --- a/liblttng-ust/lttng-context-vsgid.c +++ b/liblttng-ust/lttng-context-vsgid.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-vsuid.c b/liblttng-ust/lttng-context-vsuid.c index ed00301e..bb5e415f 100644 --- a/liblttng-ust/lttng-context-vsuid.c +++ b/liblttng-ust/lttng-context-vsuid.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-vtid.c b/liblttng-ust/lttng-context-vtid.c index 57abdf73..2344825b 100644 --- a/liblttng-ust/lttng-context-vtid.c +++ b/liblttng-ust/lttng-context-vtid.c @@ -7,6 +7,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context-vuid.c b/liblttng-ust/lttng-context-vuid.c index 5bfb92a2..df880de3 100644 --- a/liblttng-ust/lttng-context-vuid.c +++ b/liblttng-ust/lttng-context-vuid.c @@ -8,6 +8,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include diff --git a/liblttng-ust/lttng-context.c b/liblttng-ust/lttng-context.c index 8bc99987..ca88bb1d 100644 --- a/liblttng-ust/lttng-context.c +++ b/liblttng-ust/lttng-context.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "tracepoint-internal.h" #include "context-internal.h" diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index 9ecf4524..506429a8 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -6,6 +6,7 @@ * LTTng lib ring buffer client template. */ +#include #include #include diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.h b/liblttng-ust/lttng-ring-buffer-metadata-client.h index ed2dcb67..0911d37a 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.h +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.h @@ -6,6 +6,7 @@ * LTTng lib ring buffer client template. */ +#include #include #include diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index 1ce6b4b5..8116a71e 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -7,6 +7,7 @@ #ifndef _LTTNG_UST_EVENTS_INTERNAL_H #define _LTTNG_UST_EVENTS_INTERNAL_H +#include #include #include