Clean-up: ust-consumer: fix -Wshadow issues in lttng_ustconsumer_recv_cmd
[lttng-tools.git] / include / lttng / constant.h
CommitLineData
1239a312 1/*
ab5be9fa 2 * Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
1239a312 3 *
ab5be9fa 4 * SPDX-License-Identifier: LGPL-2.1-only
1239a312 5 *
1239a312
DG
6 */
7
8#ifndef LTTNG_CONSTANT_H
9#define LTTNG_CONSTANT_H
10
11#ifndef LTTNG_DEPRECATED
12#if defined (__GNUC__) \
13 && ((__GNUC_MAJOR__ == 4) && (__GNUC_MINOR__ >= 5) \
14 || __GNUC_MAJOR__ >= 5)
15#define LTTNG_DEPRECATED(msg) __attribute__((deprecated(msg)))
16#else
17#define LTTNG_DEPRECATED(msg) __attribute__((deprecated))
18#endif /* defined __GNUC__ */
19#endif /* LTTNG_DEPRECATED */
20
21#include <limits.h>
22/*
23 * Necessary to include the fixed width type limits on glibc versions older
24 * than 2.18 when building with a C++ compiler.
25 */
26#ifndef __STDC_LIMIT_MACROS
27#define __STDC_LIMIT_MACROS
28#include <stdint.h>
29#undef __STDC_LIMIT_MACROS
30#else /* #ifndef __STDC_LIMIT_MACROS */
31#include <stdint.h>
32#endif /* #else #ifndef __STDC_LIMIT_MACROS */
33#include <sys/types.h>
34
35/*
36 * Event symbol length. Copied from LTTng kernel ABI.
37 */
fae9a062
JG
38#define LTTNG_SYMBOL_NAME_LEN 256
39
40/*
41 * PROC(5) mentions that PID_MAX_LIMIT may not exceed 2^22 on 64-bit HW.
42 * We prefer to use 32-bits for simplicity's sake.
43 */
44#define LTTNG_MAX_PID INT32_MAX
45#define LTTNG_MAX_PID_STR "2147483647"
1239a312 46
36d2e35d
MJ
47#define LTTNG_NAME_MAX 255
48
b867041c
JG
49/*
50 * POSIX guarantees that a host name will not exceed 255 characters.
51 * Moreover, RFC 1035 limits the length of a fully qualified domain name (FQDN)
52 * to 255 characters.
53 *
54 * 256 is used to include a trailing NULL character.
55 */
56#define LTTNG_HOST_NAME_MAX 256
9cf3eb20 57
ba86d0a7
MJ
58#define LTTNG_PATH_MAX 4096
59
1239a312 60#endif /* LTTNG_CONSTANT_H */
This page took 0.035115 seconds and 4 git commands to generate.