From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 1558D385742A for ; Thu, 20 May 2021 19:54:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1558D385742A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vinschen@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621540485; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=8v9obJUB56kUUruJbcSkgPQ5qBq51V2KHUJ1AyN3TyI=; b=ZVgWRdoh/wLYOscrvNcRtTvsJJI/JcIS0QxpNKWdwhMGeKc/4EHdHw2yAgYeWSsCLcBcn/ ap0gbF8QkaSek2ugLLDO/7ZoBivw+TGSKm+45rzadn4f4kWhVWKAEIA6OycIiiVqbz3FwE t0D90rxfM5a3dZpGQV/EIdd37axN0Nk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-89-7S3MSy6HOays7MdmyGqZ3w-1; Thu, 20 May 2021 15:54:44 -0400 X-MC-Unique: 7S3MSy6HOays7MdmyGqZ3w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 141F6107ACC7 for ; Thu, 20 May 2021 19:54:43 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-115-127.ams2.redhat.com [10.36.115.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA95D5D9DC for ; Thu, 20 May 2021 19:54:42 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 3537EA82BFD; Thu, 20 May 2021 21:54:41 +0200 (CEST) Date: Thu, 20 May 2021 21:54:41 +0200 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: Does Cygwin have str2sig/sig2str? Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vinschen@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Thu, 20 May 2021 19:54:47 -0000 On May 20 09:58, Joel Sherrill wrote: > Hi > > The next POSIX version is wrapping up and unless something changes will be > adding str2sig and sig2str. Does Cygwin have those? > > I'm asking to see if we adapt the Cygwin version for general use or have to > write it from scratch. > > The glibc and Illumos implementations are what you would expect. They just I don't see glibc defining the above symbols in the master branch. > use an array of { signal, string_name} and a lookup search. > Something similar would be OK for newlib. Cygwin exports two functions with equivalent functionality: char *strsignal (int signo); int strtosigno (const char *name); see the file winsup/cygwin/strsig.cc. HTH, Corinna