From patchwork Fri Mar 18 16:52:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 52117 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9ED183888C4E for ; Fri, 18 Mar 2022 16:52:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9ED183888C4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1647622361; bh=tS04osOKLXS/zl6XYOWHZfQyysD7wRvq5j4lMf0wQng=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OjLHAEsgGMQtYvUMKc9Fp0ZsMXTzTaTxhPFcNNKBmodsx+gsjoZd2Y/5EYP/6qemO ZHWkSlhGTC0mAnQ7VhejVv4278gFEfJS+Ij4XawTwQAVoD/F+B6z3VyyypVejJfrv6 9uzW0n8KC9tNtxsOvx2Xho+EY/N4ehEA63xi1OZI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by sourceware.org (Postfix) with ESMTPS id 524BB3858C2C for ; Fri, 18 Mar 2022 16:52:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 524BB3858C2C Received: by mail-oo1-xc32.google.com with SMTP id w3-20020a4ac183000000b0031d806bbd7eso10753262oop.13 for ; Fri, 18 Mar 2022 09:52:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=tS04osOKLXS/zl6XYOWHZfQyysD7wRvq5j4lMf0wQng=; b=d5oa5pVB8wiqTOqi1/WiJTfmlqpxRsWmhX8hOuT1iKZDVffVTSzEiw9RsgjclRgyvP ZeuHmesUUMZvZLWKhYD/mNPv2sJLpAVSeMY6Sx6ZTfQQ5s4fAr49Yoehzy7aoceeqxGA teEyiCpDqv+sOElka+rvNpCAH8K9xMs1UMUMn0FkW0B27ebkRXyA5QzLdj2ozHQn7NhC 5xvXtQGr6Ye9fvh487kgnCLFQ59aVuVXld/RRTQq6SRZ+7dtn2RgYEsPiFMhvEU+ATLW zw9K6pOT29tJBL+SqanHYQ6GuPquczFIzFy9tzFJ+/qmaubzwO+1eBt9vYCMJ/mb116A p/qA== X-Gm-Message-State: AOAM532xuUrFgv2B20y+tfJoho+7KJ3tuIi891dCCbQHouW7CEjN8wbA pAkxnTp9nq/M1hjzfiDn+Pnprhl1x/k7yg== X-Google-Smtp-Source: ABdhPJzsry/SJl3geNF2p8xpUHzcJzpk8ktJHszE10IYdOiYC6zNJTnodTZSsRHCKCSlRhWuNBIA6w== X-Received: by 2002:a05:6870:4187:b0:d9:f16d:f04a with SMTP id y7-20020a056870418700b000d9f16df04amr7406157oac.68.1647622339240; Fri, 18 Mar 2022 09:52:19 -0700 (PDT) Received: from birita.. ([2804:431:c7ca:99a3:99e2:1060:da92:ae49]) by smtp.gmail.com with ESMTPSA id c12-20020a9d75cc000000b005b24b061940sm3986417otl.33.2022.03.18.09.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 09:52:18 -0700 (PDT) To: libc-alpha@sourceware.org, Paul Eggert Subject: [PATCH v3 0/7] Refactor syslog implementation Date: Fri, 18 Mar 2022 13:52:07 -0300 Message-Id: <20220318165214.2291065-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The main driver of this change is to move away of using 32-bit timestamps. Based on discussion where systemd should support RFC5424 [1], it decided to move away from implementing on glibc [2] and just replace the use of localtime by gmtime. It is a deviation from RFC3164, but it improves some corner cases [3]. [1] https://github.com/systemd/systemd/issues/19251 [2] https://sourceware.org/pipermail/libc-alpha/2022-February/136595.html [3] https://sourceware.org/pipermail/libc-alpha/2021-March/123583.html Adhemerval Zanella (7): support: Add xmkfifo misc: Add syslog test misc: syslog: Fix indentation and style misc: syslog: Simplify implementation misc: syslog: Use fixed-sized buffer misc: syslog: Move SYSLOG_NAME to USE_MISC (BZ #16355) misc: Use gmtime instead of localtime misc/Makefile | 2 + misc/sys/syslog.h | 4 +- misc/syslog.c | 488 +++++++++++++++++++++++----------------------- misc/tst-syslog.c | 477 ++++++++++++++++++++++++++++++++++++++++++++ support/Makefile | 1 + support/xmkfifo.c | 29 +++ support/xunistd.h | 1 + 7 files changed, 756 insertions(+), 246 deletions(-) create mode 100644 misc/tst-syslog.c create mode 100644 support/xmkfifo.c