[v5,0/7] Refactor syslog implementation

Message ID 20220321211913.2347924-1-adhemerval.zanella@linaro.org
Headers
Series Refactor syslog implementation |

Message

Adhemerval Zanella Netto March 21, 2022, 9:19 p.m. UTC
  The main driver of this change is to move away of using 32-bit
timestampsi internally.  Based on discussion where systemd shouldi
support RFC5424 [1], either implementing on glibc or changing syslog
to use gmtime would most likely cause regressions.  Also, using
localtime or setting TZ is not the best solution for the generic
syslog interface [2].

[1] https://github.com/systemd/systemd/issues/19251
[2] 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 and remove memstream
  misc: syslog: Move SYSLOG_NAME to USE_MISC (BZ #16355)
  misc: Use 64 bit time_t interfaces on syslog

 misc/Makefile     |   2 +
 misc/sys/syslog.h |   4 +-
 misc/syslog.c     | 483 ++++++++++++++++++++++------------------------
 misc/tst-syslog.c | 477 +++++++++++++++++++++++++++++++++++++++++++++
 support/Makefile  |   1 +
 support/xmkfifo.c |  29 +++
 support/xunistd.h |   1 +
 7 files changed, 742 insertions(+), 255 deletions(-)
 create mode 100644 misc/tst-syslog.c
 create mode 100644 support/xmkfifo.c
  

Comments

Paul Eggert April 14, 2022, 10:12 p.m. UTC | #1
On 4/14/22 06:42, Adhemerval Zanella wrote:
> 
> On 09/04/2022 03:44, Paul Eggert wrote:
>> If all you did is change gmtime back to localtime it's probably OK.
>>
>> Can you send it to me as just two diffs? One between glibc and what you want. The other between glibc under your previous proposal and glibc under your latest proposal. That will save time for me in reviewing. Thanks.
> Thanks Paul, both diff are in attachment. If you may reply on libc-alpha
> that you are ok I appreciate.

Thanks, this new version looks good.
  
Adhemerval Zanella Netto April 15, 2022, 2 p.m. UTC | #2
On 14/04/2022 19:12, Paul Eggert wrote:
> On 4/14/22 06:42, Adhemerval Zanella wrote:
>>
>> On 09/04/2022 03:44, Paul Eggert wrote:
>>> If all you did is change gmtime back to localtime it's probably OK.
>>>
>>> Can you send it to me as just two diffs? One between glibc and what you want. The other between glibc under your previous proposal and glibc under your latest proposal. That will save time for me in reviewing. Thanks.
>> Thanks Paul, both diff are in attachment. If you may reply on libc-alpha
>> that you are ok I appreciate.
> 
> Thanks, this new version looks good.

Thanks Paul, committed.