fix: wrong define used for GCC version check
[lttng-tools.git] / include / lttng / constant.h
index 10f1bf694503fc5e42d9a20632fb5c5c9c2fdce7..1d35652f753d61fe38e3cf46ed58022a3bf84b3f 100644 (file)
@@ -20,8 +20,8 @@
 
 #ifndef LTTNG_DEPRECATED
 #if defined (__GNUC__) \
-       && ((__GNUC_MAJOR__ == 4) && (__GNUC_MINOR__ >= 5)  \
-                       || __GNUC_MAJOR__ >= 5)
+       && ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)  \
+                       || __GNUC__ >= 5)
 #define LTTNG_DEPRECATED(msg) __attribute__((deprecated(msg)))
 #else
 #define LTTNG_DEPRECATED(msg) __attribute__((deprecated))
 #define LTTNG_MAX_PID                          INT32_MAX
 #define LTTNG_MAX_PID_STR                      "2147483647"
 
+#define LTTNG_NAME_MAX                         255
+
+/*
+ * POSIX guarantees that a host name will not exceed 255 characters.
+ * Moreover, RFC 1035 limits the length of a fully qualified domain name (FQDN)
+ * to 255 characters.
+ *
+ * 256 is used to include a trailing NULL character.
+ */
+#define LTTNG_HOST_NAME_MAX                    256
+
+#define LTTNG_PATH_MAX                         4096
+
 #endif /* LTTNG_CONSTANT_H */
This page took 0.025486 seconds and 4 git commands to generate.