cleanup: Remove redefinition of CHAR_BIT
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 23 Mar 2021 20:31:22 +0000 (16:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 29 Mar 2021 17:58:19 +0000 (13:58 -0400)
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 <limits.h> in all files using CHAR_BIT.

Change-Id: I917f6ee16898a6f99fa32db5d6ebd701e95400cc
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
28 files changed:
include/lttng/ust-events.h
include/lttng/ust-tracer.h
liblttng-ust/event-notifier-notification.c
liblttng-ust/lttng-bytecode-specialize.c
liblttng-ust/lttng-context-cgroup-ns.c
liblttng-ust/lttng-context-cpu-id.c
liblttng-ust/lttng-context-ip.c
liblttng-ust/lttng-context-ipc-ns.c
liblttng-ust/lttng-context-mnt-ns.c
liblttng-ust/lttng-context-net-ns.c
liblttng-ust/lttng-context-perf-counters.c
liblttng-ust/lttng-context-pid-ns.c
liblttng-ust/lttng-context-pthread-id.c
liblttng-ust/lttng-context-time-ns.c
liblttng-ust/lttng-context-user-ns.c
liblttng-ust/lttng-context-uts-ns.c
liblttng-ust/lttng-context-vegid.c
liblttng-ust/lttng-context-veuid.c
liblttng-ust/lttng-context-vgid.c
liblttng-ust/lttng-context-vpid.c
liblttng-ust/lttng-context-vsgid.c
liblttng-ust/lttng-context-vsuid.c
liblttng-ust/lttng-context-vtid.c
liblttng-ust/lttng-context-vuid.c
liblttng-ust/lttng-context.c
liblttng-ust/lttng-ring-buffer-client.h
liblttng-ust/lttng-ring-buffer-metadata-client.h
liblttng-ust/ust-events-internal.h

index 8b45cb7f89ac2e2088f0ad01f48201f52fb77b13..b687934d67b889fa6ec40e58447aa1c8a94865d6 100644 (file)
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <urcu/ref.h>
 #include <pthread.h>
+#include <limits.h>
 
 #ifdef __cplusplus
 extern "C" {
index acc475bfe1dde65bb16a239652b359568da6448c..b451eae626f427058cd0e77dc686b2a31795a705 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef _LTTNG_UST_TRACER_H
 #define _LTTNG_UST_TRACER_H
 
-#include <limits.h>
-
 #include <lttng/ust-arch.h>
 #include <lttng/ust-compiler.h>
 #include <lttng/ust-config.h>
 #define RING_BUFFER_ALIGN
 #endif
 
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-
 #ifdef RING_BUFFER_ALIGN
 #define lttng_alignof(type)    __alignof__(type)
 #else
index 40ad731e856b7e200ec4bf9b5b2abb35b7d33afa..422233265944f0dc991a90110f5027dabd508358 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <assert.h>
 #include <errno.h>
+#include <limits.h>
+
 #include <lttng/ust-endian.h>
 #include <usterr-signal-safe.h>
 #include <urcu/rculist.h>
index 130b4edf76d028b55c491756aee08cc40a9bbd0b..44eafb858ac45b24eb44a07240920b9fb1eb0753 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <stdint.h>
 
index 623689cc12dfa1632f17318c7453152825c8f85f..5c0394d332aec48ee1ba7ab32f4e0f1ee65ddf20 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index baa1a8893e87411496e2912511f1fb3bd567bcd4..8636b1ba3a78d703e7748b3dda1985c0e173bb77 100644 (file)
@@ -16,6 +16,7 @@
 #include <stddef.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <limits.h>
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include "../libringbuffer/getcpu.h"
index d163a6e04f69450502a1937c4f2c5dd5a1d1dae6..903123a74686d9e04dde46792076671a17fc346a 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <unistd.h>
index 836bca5092003f7f3aec0c6ca020b6f191c7bf98..4186d4e72e36e90024803feddb330bee08c2c78c 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 19fa0c74f6495513ff180c2f7056813e7c071a58..6f9fe80ab397b56ea394d37ca2b0856c3b0e9131 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 1efcceda9f7a60ac1bdd6de3193f71db843e2bbe..3cbfd3911f98f5c37a8a7de33a21c4e96a74e246 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index e3378a7daa75d5ef55067dbbec03ff012554609f..df10e4f128cc11d5d13e0cd7e0bed0bf8c84f881 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <string.h>
index d52c0b9b9abe101db137685885c54310c0742e61..9a06a15d0215a814e562b97e458b454250ed782b 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 65f77d9be5b3d1709225f9b31da2dfd9fae8f6e7..bc235826f106cb7049880d05ae4ec03da9fa0718 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <pthread.h>
 #include <lttng/ust-events.h>
index a82d12af7e558e31ae7c1e2499ef7ce04df1010b..d487189eb302810b305585bb24fbe33e04c3281c 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 464e7368a084ff8cbf28441a4da1ad5ac22e6485..a2916f946c1ad2ea2801714a011d89057ca2f52f 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 729f934f62e9b728d99a33f7cb9c3eed7d788da1..a8d03d9806dc9901c41fe3716886d8bf432611f8 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index b504b714299ef9fc7ff9ed846462eeec6c90760c..065e9e15607752a5aa2f927304e68fd3a8e9d081 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 5099d202eb1752db158cc7edc44813cfc6bb950e..7de2136b95ae360e8df84c490f151fa69123b448 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 6e413d93caa320651fc95b971d835ebe1e01db48..c1a630ac7ea263fa5026976130d8e3f1bc3cae01 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 514c69fc64d5f2504040006cd6a80f09b13bda2f..3a8a6ea4eb389e8ecedbaaf0b735cda2f722fc05 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <unistd.h>
index 07a2ccadb756a5c35e71bb615ffbc916ad0411b1..e24f4689538789142b10d73cd6c6671ab87a1e6e 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index ed00301ec56654879035b7112c18aab2eae551a1..bb5e415fe2fe9f5a2283b4dea13e3a89b2cc5393 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 57abdf733fc100287f7fb66b80ba63f83c92abee..2344825b9195ceaf8ee6e28469b2b18b7afd7159 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <unistd.h>
index 5bfb92a22bf74c04d56280fbedbccf4ebf7931ea..df880de33cea72ef66bcd7038b5b5ab4255e9988 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 8bc9998774b52dbba3a2198c50fa4b71b2136ed6..ca88bb1d82ef23dac341002ae1f4dfa348d5b3b9 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <string.h>
 #include <assert.h>
+#include <limits.h>
 #include "tracepoint-internal.h"
 
 #include "context-internal.h"
index 9ecf452498435185c1f80cbe9553fde6ca3cbd11..506429a8ee381d1a32e0dda329831fc93fba6dd9 100644 (file)
@@ -6,6 +6,7 @@
  * LTTng lib ring buffer client template.
  */
 
+#include <limits.h>
 #include <stddef.h>
 #include <stdint.h>
 
index ed2dcb67509701d99b7d8155d6a77adea502ebbf..0911d37a04ae59512abd1f0c59a1b5bf7b0fd5ad 100644 (file)
@@ -6,6 +6,7 @@
  * LTTng lib ring buffer client template.
  */
 
+#include <limits.h>
 #include <stddef.h>
 #include <stdint.h>
 
index 1ce6b4b511bc0c434a69a927be74f9fc28e8ac8a..8116a71e31e0bacf5b3243fdb424ce4173443be3 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef _LTTNG_UST_EVENTS_INTERNAL_H
 #define _LTTNG_UST_EVENTS_INTERNAL_H
 
+#include <limits.h>
 #include <stdint.h>
 
 #include <urcu/list.h>
This page took 0.044212 seconds and 4 git commands to generate.