Clean-up: run format-cpp on the tree
[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
28f23191 12#if defined(__GNUC__) && ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5) || __GNUC__ >= 5)
1239a312
DG
13#define LTTNG_DEPRECATED(msg) __attribute__((deprecated(msg)))
14#else
15#define LTTNG_DEPRECATED(msg) __attribute__((deprecated))
16#endif /* defined __GNUC__ */
17#endif /* LTTNG_DEPRECATED */
18
19#include <limits.h>
20/*
21 * Necessary to include the fixed width type limits on glibc versions older
22 * than 2.18 when building with a C++ compiler.
23 */
24#ifndef __STDC_LIMIT_MACROS
25#define __STDC_LIMIT_MACROS
26#include <stdint.h>
27#undef __STDC_LIMIT_MACROS
28#else /* #ifndef __STDC_LIMIT_MACROS */
29#include <stdint.h>
30#endif /* #else #ifndef __STDC_LIMIT_MACROS */
31#include <sys/types.h>
32
33/*
34 * Event symbol length. Copied from LTTng kernel ABI.
35 */
28f23191 36#define LTTNG_SYMBOL_NAME_LEN 256
fae9a062
JG
37
38/*
39 * PROC(5) mentions that PID_MAX_LIMIT may not exceed 2^22 on 64-bit HW.
40 * We prefer to use 32-bits for simplicity's sake.
41 */
28f23191
JG
42#define LTTNG_MAX_PID INT32_MAX
43#define LTTNG_MAX_PID_STR "2147483647"
1239a312 44
28f23191 45#define LTTNG_NAME_MAX 255
36d2e35d 46
b867041c
JG
47/*
48 * POSIX guarantees that a host name will not exceed 255 characters.
49 * Moreover, RFC 1035 limits the length of a fully qualified domain name (FQDN)
50 * to 255 characters.
51 *
52 * 256 is used to include a trailing NULL character.
53 */
28f23191 54#define LTTNG_HOST_NAME_MAX 256
9cf3eb20 55
28f23191 56#define LTTNG_PATH_MAX 4096
ba86d0a7 57
1239a312 58#endif /* LTTNG_CONSTANT_H */
This page took 0.047755 seconds and 4 git commands to generate.