From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 3D0A43857825 for ; Sat, 24 Jul 2021 08:37:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3D0A43857825 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x331.google.com with SMTP id j6-20020a05600c1906b029023e8d74d693so2990639wmq.3 for ; Sat, 24 Jul 2021 01:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sphzWGWIldd5tcP69aiVCPyCZ0T0eu7N/47V8wI0BWA=; b=cIDp+9UIcvryJAqNWqF1Nhh4U8r8zImbXoF0FfcobmDT5tDu1uyt/QKWueVQhPOn06 qBMwFeN+61XE3ah7/HnzRPRBsNntEU2al4sfFj5ZF5+9OyIZQd3+wKchUd5rBHQzQ/ZZ RKxPPGMJNGI7jBBazwXRR9uOs8/iJxhKSmpjdkqYFAq5+RnjDP7VxDTX4haELelVMG/b klChw4rP8qX+Uo0h/Y49CfehdhNdCnfkm0AHq8rIHFhapa85/CafFRiN/JRoxsjl3gMd 0s4LieY1GkfiAJSaZsMZceH0afr7csthFKLIp6zDhKApaEIr/4aMqUi9/oS6oMsLKhec lkfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sphzWGWIldd5tcP69aiVCPyCZ0T0eu7N/47V8wI0BWA=; b=NAh/1qiqh7R5EimmOG4SYw8tRjb8sltr/eHTmWrQ7LBjRSz5RBZVfFYzDdxyL+ndC6 6yjecsHhd4fs5wm4W3G2DGr7sV59ynDlaGc8RkpuIu6VL2ro20k8s9bNPBwFpRA4sPGd biDW02UYX+JqxA58rDkq7r61u5lsw2EzFVNG8oP4+02rSX4chfG0TI2AfQ5dayGxEv5w U43/PUe/24xB6mtepHO+Vve2FH3nbYpXbwzgkkl6RaVx3jTTKhf7EFQLF2tfzPFsMTud yirVoZsASnNhUhCNrMLA0ZeCvzcx4rBstijNe6QzNVVpM3vX55oyo8rbVKMG7V5CBL6z j3yw== X-Gm-Message-State: AOAM531dmfIER+rv+fi6hEe7UwCW1A0D6EMQhEowJ5FsRciMNwH6xeHH j7nFwA0wlZN+eQGgfVQcQ99M7V+DrCcj X-Google-Smtp-Source: ABdhPJyW9OyQSgB0Bg1p0x8TvX7GaqAWKnqoa4aeQFVnux33pduTIzKbkR7dd/YNjKkC2qLsCMwFTA== X-Received: by 2002:a05:600c:3595:: with SMTP id p21mr7694045wmq.105.1627115866996; Sat, 24 Jul 2021 01:37:46 -0700 (PDT) Received: from localhost.localdomain (p579c318f.dip0.t-ipconnect.de. [87.156.49.143]) by smtp.gmail.com with ESMTPSA id q17sm171741wre.3.2021.07.24.01.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jul 2021 01:37:46 -0700 (PDT) From: Matt Joyce To: newlib@sourceware.org Cc: Matt Joyce Subject: [PATCH 0/1] V2 Implementation of sig2str/str2sig Date: Sat, 24 Jul 2021 10:37:29 +0200 Message-Id: <20210724083730.16959-1-mfjoyce2004@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2021 08:37:50 -0000 Dear Newlib Maintainers, I have updated the following on my initial patch: 1) Added Makefile entries to build new file 2) Edited definition of SIG2STR_MAX as discussed 3) Added code for "RTMAX-m" in sig2str 4) Added check for whether RTMIN==RTMAX 5) Removed from "Unknown signal" error message. I reasoned that this would be ok because the standard does not mention any error message anyway and it could potentially avoid problems with the length of the string representation of the invalid signum exceeding the length of the SIG2STR_MAX sized buffer. Standing by for any further feedback. Thank you very much for your time! Matt Joyce (1): libc: Added implementations and prototypes for sig2str/str2sig methods newlib/libc/include/sys/signal.h | 16 ++ newlib/libc/signal/Makefile.am | 4 +- newlib/libc/signal/sig2str.c | 257 +++++++++++++++++++++++++++++++ 3 files changed, 275 insertions(+), 2 deletions(-) create mode 100644 newlib/libc/signal/sig2str.c -- 2.31.1