From pfeifer@sputnik1.dbai.tuwien.ac.at  Tue Aug 31 22:52:31 2010
Return-Path: <pfeifer@sputnik1.dbai.tuwien.ac.at>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 697B610656BB
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 31 Aug 2010 22:52:31 +0000 (UTC)
	(envelope-from pfeifer@sputnik1.dbai.tuwien.ac.at)
Received: from sputnik1.dbai.tuwien.ac.at (sputnik1.dbai.tuwien.ac.at [128.131.111.141])
	by mx1.freebsd.org (Postfix) with ESMTP id 001C68FC1F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 31 Aug 2010 22:52:30 +0000 (UTC)
Received: from sputnik1.dbai.tuwien.ac.at (localhost [127.0.0.1])
	by sputnik1.dbai.tuwien.ac.at (8.14.4/8.14.4) with ESMTP id o7VMW2a3028336;
	Wed, 1 Sep 2010 00:32:02 +0200 (CEST)
	(envelope-from pfeifer@sputnik1.dbai.tuwien.ac.at)
Received: (from pfeifer@localhost)
	by sputnik1.dbai.tuwien.ac.at (8.14.4/8.14.4/Submit) id o7VMW1MX028335;
	Wed, 1 Sep 2010 00:32:01 +0200 (CEST)
	(envelope-from pfeifer)
Message-Id: <201008312232.o7VMW1MX028335@sputnik1.dbai.tuwien.ac.at>
Date: Wed, 1 Sep 2010 00:32:01 +0200 (CEST)
From: Gerald Pfeifer <gerald@pfeifer.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when sig_atomic_t is 64-bit
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         150170
>Category:       amd64
>Synopsis:       [patch] [amd64] [headers] SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when sig_atomic_t is 64-bit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 31 23:00:13 UTC 2010
>Closed-Date:    Sun Dec 11 09:50:29 UTC 2011
>Last-Modified:  Sun Dec 11 09:50:29 UTC 2011
>Originator:     Gerald Pfeifer
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD ref9-amd64.freebsd.org 9.0-CURRENT FreeBSD 9.0-CURRENT #4 r208973: Thu Jun 10 08:49:43 UTC 2010     simon@ref9-amd64.freebsd.org:/scratch/obj/usr/src/sys/REF9-AMD64  amd64
>Description:
	On a 9.0-CURRENT machine, amd64, we have:

/usr/include/machine/signal.h:typedef long sig_atomic_t;

	This is 64-bit.  At the same time we have:

/usr/include/machine/_stdint.h:#define	SIG_ATOMIC_MIN	INT32_MIN
/usr/include/machine/_stdint.h:#define	SIG_ATOMIC_MAX	INT32_MAX

	Which is 32-bit.

>How-To-Repeat:

	Run GCC's C testsuite and notice a number of C conformance tests
	around stdint fail:

FAIL: gcc.dg/c99-stdint-1.c (test for excess errors)
FAIL: gcc.dg/c99-stdint-2.c (test for excess errors)
FAIL: gcc.dg/c99-stdint-5.c (test for excess errors)
FAIL: gcc.dg/c99-stdint-6.c (test for excess errors)

>Fix:
	Initially I thought we may want to adjust SIG_ATOMIC_MIN and
	SIG_ATOMIC_MAX, but really, who need sig_atomic_t to be 64-bit?
	(Linux does not, for what it's worth.)

	In any case, having a type that is larger than the values it can
	take like this is something we should be able to avoid.  At a
	minimum it's inconsistent.
>Release-Note:
>Audit-Trail:

From: Andriy Gapon <avg@icyb.net.ua>
To: Gerald Pfeifer <pfeifer@sputnik1.dbai.tuwien.ac.at>
Cc: Gerald Pfeifer <gerald@pfeifer.com>, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: amd64/150170: SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when sig_atomic_t
 is 64-bit
Date: Wed, 01 Sep 2010 13:26:36 +0300

 32-bit vs 64-bit seems to be reversed here...
 
 -- 
 Andriy Gapon

From: Gerald Pfeifer <gerald@pfeifer.com>
To: Andriy Gapon <avg@icyb.net.ua>, bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/150170: SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when sig_atomic_t
 is 64-bit
Date: Wed, 1 Sep 2010 15:32:20 +0200 (CEST)

 On Wed, 1 Sep 2010, Andriy Gapon wrote:
 > 32-bit vs 64-bit seems to be reversed here...
 
 Yes, you're absolutely right.  I noticed this after submitting the PR and 
 fixed it in GNATS, but the mails already had gone out of course.  My bad.
 
 Gerald

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/150170: SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when
	sig_atomic_t is 64-bit
Date: Mon, 6 Sep 2010 02:16:31 -0500

 ----- Forwarded message from John Baldwin <jhb@freebsd.org> -----
 
 From: John Baldwin <jhb@freebsd.org>
 To: freebsd-amd64@freebsd.org, Andriy Gapon <avg@icyb.net.ua>
 Cc: bde@freebsd.org
 Subject: Re: amd64/150170: SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when
 	sig_atomic_t is 64-bit
 
 >  32-bit vs 64-bit seems to be reversed here...
 
 Yes, but we should still fix this one way or another.  I was surprised 
 recently when I found that sig_atomic_t was long on amd64.  Perhaps Bruce 
 (cc'd) knows which way it should be fixed?
 
 -- 
 John Baldwin
 _______________________________________________
 freebsd-amd64@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
 To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org"
 
 ----- End forwarded message -----

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/150170: [patch] [amd64] [headers]
	SIG_ATOMIC_MIN/SIG_ATOMIC_MAX 32-bit when sig_atomic_t is 64-bit
Date: Sat, 29 Jan 2011 03:07:49 +0000

 See also kern/145590.

From: "b. f." <bf1783@googlemail.com>
To: bug-followup@FreeBSD.org, gerald@FreeBSD.org, 
	Peter Jeremy <peterjeremy@acm.org>, John Baldwin <jhb@freebsd.org>, Bruce Evans <bde@FreeBSD.org>, 
	Mark Linimon <linimon@lonesome.com>, Andriy Gapon <avg@icyb.net.ua>
Cc:  
Subject: Re: amd64/150170: [patch] [amd64] [headers] SIG_ATOMIC_MIN/SIG_ATOMIC_MAX
 32-bit when sig_atomic_t is 64-bit
Date: Fri, 28 Jan 2011 21:54:28 -0500

 This PR:
 
 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=amd64/150170
 
 seems to be a duplicate of:
 
 kern/145590: [kernel] [[patch] SIG_ATOMIC_{MIN,MAX} does not match
 sig_atomic_t on 64-bit archs
 
 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/145590
 
 Regards,
 
 b.
State-Changed-From-To: open->closed 
State-Changed-By: jh 
State-Changed-When: Sun Dec 11 09:50:28 UTC 2011 
State-Changed-Why:  
Duplicate of kern/145590. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150170 
>Unformatted:
