valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0580-def-add-new-constant-LONG_LINE_MAX.patch

dd65c9
From 4cd343cf1a25e603ea78acbac027589f6a53a118 Mon Sep 17 00:00:00 2001
dd65c9
From: Jan Synacek <jsynacek@redhat.com>
dd65c9
Date: Thu, 23 Nov 2017 09:22:21 +0100
dd65c9
Subject: [PATCH] def: add new constant LONG_LINE_MAX
dd65c9
dd65c9
LONG_LINE_MAX is much like LINE_MAX, but longer.
dd65c9
dd65c9
As it turns out LINE_MAX at 4096 is too short for many usecases. Since
dd65c9
the general concept of having a common maximum line length limit makes
dd65c9
sense let's add our own, and make it larger (1MB for now).
dd65c9
dd65c9
(cherry-picked from commit 189912440f6545404e84b3cd1d6ca54f1057e3e6)
dd65c9
dd65c9
Resolves: #1503106
dd65c9
---
dd65c9
 src/shared/def.h | 2 ++
dd65c9
 1 file changed, 2 insertions(+)
dd65c9
dd65c9
diff --git a/src/shared/def.h b/src/shared/def.h
dd65c9
index 76daf012d..9e008a6d2 100644
dd65c9
--- a/src/shared/def.h
dd65c9
+++ b/src/shared/def.h
dd65c9
@@ -87,3 +87,5 @@
dd65c9
 
dd65c9
 #define NOTIFY_FD_MAX 768
dd65c9
 #define NOTIFY_BUFFER_MAX PIPE_BUF
dd65c9
+
dd65c9
+#define LONG_LINE_MAX (1U*1024U*1024U)