From owner-freebsd-standards@FreeBSD.ORG Sun Dec 7 20:31:07 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA0B816A4CE for ; Sun, 7 Dec 2003 20:31:07 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C915343F75 for ; Sun, 7 Dec 2003 20:31:05 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id PAA07922; Mon, 8 Dec 2003 15:30:55 +1100 Date: Mon, 8 Dec 2003 15:30:54 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Marcel Moolenaar In-Reply-To: <20031201000659.GA48096@dhcp01.pn.xcllnt.net> Message-ID: <20031208150831.D4790@gamplex.bde.org> References: <20031201000659.GA48096@dhcp01.pn.xcllnt.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: standards@freebsd.org Subject: Re: 64-bit NULL: please review patch X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2003 04:31:07 -0000 On Sun, 30 Nov 2003, Marcel Moolenaar wrote: > Attached a patch to help us out in the various ways we may want > or need to define NULL. First and foremost, it centralizes the > definition so that we don't have to modify a dozen headers to > make a change. Secondly, it defines NULL as 0L on ia64 when > compiling for the LP64 runtime. When adding -milp32 to gcc (not > yet supported), __LP64__ is not defined and NULL will be defined > as 0. This is the correct behaviour. > > With the definition of NULL in a seperate header we can also > utilize compiler built-in definitions for NULL is such exist or > define NULL specially for lint or other conditions. > > Please review, The separate header is too much. Since the type of NULL is a type, it should probably go in a _types.h file together with the declarations of hundreds or thousands of other types. Having a seperate header for it is like having a seperate header for each type. Since the type is MD, it must be defined in each and not centrally in . % Index: include/dirent.h % =========================================================================== % --- include/dirent.h 2003/11/30 14:58:52 #4 % +++ include/dirent.h 2003/11/30 14:58:52 % ... % @@ -81,10 +83,6 @@ % #define DTF_REWIND 0x0004 /* rewind after reading union stack */ % #define __DTF_READALL 0x0008 /* everything has been read */ % % -#ifndef NULL % -#define NULL 0 % -#endif % - % #else /* !__BSD_VISIBLE */ % % typedef void * DIR; This should use '#define\tNULL\t__NULL'. I dislike "#ifndef NULL" and plan to remove it. It mainly breaks warnings in applications that #define NULL. Ifdefs are not needed to prevent redefinition to the system's common value like they are for typedefs. % Index: sys/sys/_null.h % =========================================================================== % *** /dev/null Sun Nov 30 14:55:39 2003 % --- sys/sys/_null.h Sun Nov 30 14:59:01 2003 % *************** % *** 0 **** % --- 1,37 ---- % + #ifndef NULL % + % + #ifdef __LP64__ % + #define NULL 0L % + #else % + #define NULL 0 % + #endif % + % + #endif This central defininition depends on a gccism (__LP64__). Hmm. If we use _types.h then we already have a suitable MD integer type, namely __intptr_t (intptr_t is optional in C99 but is required in FreeBSD and maybe in POSIX in practice. All the places that #define NULL now could define it to ((__intptr_t)0) after including which they mostly already include. Using a integral type would avoid the problem that C++ doesn't permit ((void *)0) (unless it requires a plain int type). Howver, I'm not really happy with casting 0 on machines that don't need it. A centralized definition of __NULL in starting with ((__intptr_t)0) would be easier to change. Bruce From owner-freebsd-standards@FreeBSD.ORG Mon Dec 8 11:03:37 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58E1316A4FD for ; Mon, 8 Dec 2003 11:03:37 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B17E43FFD for ; Mon, 8 Dec 2003 11:01:49 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hB8J1nFY057045 for ; Mon, 8 Dec 2003 11:01:49 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hB8J1mla057040 for freebsd-standards@freebsd.org; Mon, 8 Dec 2003 11:01:48 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 8 Dec 2003 11:01:48 -0800 (PST) Message-Id: <200312081901.hB8J1mla057040@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2003 19:03:37 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- s [2001/01/23] misc/24590 standards timezone function not compatible witn Sin o [2002/02/25] bin/35307 standards standard include files are not standard c o [2003/03/05] bin/48958 standards The type 'bool' has different sizes for C o [2003/04/21] standards/51209standards [PATCH] add a64l()/l64a/l64a_r functions p [2003/06/05] standards/52972standards /bin/sh arithmetic not POSIX compliant o [2003/06/20] standards/53554standards interval timers not cleared in fork() o [2003/07/12] standards/54410standards one-true-awk not POSIX compliant (no exte o [2003/09/15] standards/56906standards Several math(3) functions fail to set err 8 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/01/16] bin/24390 standards Replacing old dir-symlinks when using /bi o [2001/11/20] standards/32126standards getopt(3) not Unix-98 conformant s [2002/03/18] standards/36076standards Implementation of POSIX fuser command o [2002/06/13] standards/39256standards [v]snprintf aren't POSIX-conformant for s o [2002/07/09] misc/40378 standards stdlib.h gives needless warnings with -an p [2002/08/12] standards/41576standards POSIX compliance of ln(1) o [2002/10/23] standards/44425standards getcwd() succeeds even if current dir has o [2002/12/09] standards/46119standards Priority problems for SCHED_OTHER using p o [2002/12/23] standards/46504standards Warnings in headers o [2003/04/22] standards/51292standards [PATCH] add ecvt()/fcvt()/gcvt() function o [2003/06/22] standards/53613standards FreeBSD doesn't define EPROTO o [2003/06/24] bin/53682 standards [PATCH] add fuser(1) utitity o [2003/07/24] standards/54809standards pcvt deficits o [2003/07/24] standards/54833standards more pcvt deficits o [2003/07/25] standards/54839standards pcvt deficits o [2003/09/04] standards/56476standards cd9660 unicode support simple hack o [2003/09/27] standards/57295standards [patch] make does not include cmd line va o [2003/10/12] standards/57911standards fnmatch ("[[:alpha:]]","x", FNM_PATHNAME) o [2003/10/29] standards/58676standards grantpt(3) alters storage used by ptsname o [2003/11/29] standards/59797standards Implement C99's round[f]() math fucntions 20 problems total. From owner-freebsd-standards@FreeBSD.ORG Mon Dec 8 11:06:13 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EE8716A4CF for ; Mon, 8 Dec 2003 11:06:13 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D506A4408C for ; Mon, 8 Dec 2003 11:03:58 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hB8J3wFY059229 for ; Mon, 8 Dec 2003 11:03:58 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hB8J3v2b059223 for standards@freebsd.org; Mon, 8 Dec 2003 11:03:57 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 8 Dec 2003 11:03:57 -0800 (PST) Message-Id: <200312081903.hB8J3v2b059223@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: standards@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2003 19:06:13 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/08/18] kern/29844 standards [PATCH] setpgrp does not behave as manual 1 problem total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/03/05] bin/25542 standards /bin/sh: null char in quoted string 1 problem total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [1995/01/11] i386/105 standards Distributed libm (msun) has non-standard o [2000/09/24] bin/21519 standards sys/dir.h should be deprecated some more o [2000/12/05] kern/23304 standards POSIX clock_gettime, clock_getres return s [2001/06/18] kern/28260 standards UIO_MAXIOV needs to be made public 4 problems total. From owner-freebsd-standards@FreeBSD.ORG Tue Dec 9 20:43:14 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 014FC16A4CE; Tue, 9 Dec 2003 20:43:14 -0800 (PST) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 823D643D2E; Tue, 9 Dec 2003 20:43:12 -0800 (PST) (envelope-from kargl@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) hBA4hCwg002477; Tue, 9 Dec 2003 20:43:12 -0800 (PST) (envelope-from kargl@troutmask.apl.washington.edu) Received: (from kargl@localhost)hBA4hCxu002476; Tue, 9 Dec 2003 20:43:12 -0800 (PST) (envelope-from kargl) From: "Steven G. Kargl" Message-Id: <200312100443.hBA4hCxu002476@troutmask.apl.washington.edu> In-Reply-To: <200311291810.hATIAIWu084953@freefall.freebsd.org> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-standards@FreeBSD.org Date: Tue, 9 Dec 2003 20:43:12 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL99f (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Subject: Re: standards/59797: Implement C99's round[f]() math fucntions X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 04:43:14 -0000 FreeBSD-gnats-submit@FreeBSD.org wrote: > Thank you very much for your problem report. > It has the internal identification `standards/59797'. > The individual assigned to look at your > report is: freebsd-standards. > > You can access the state of your problem report at any time > via this link: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=59797 > > >Category: standards > >Responsible: freebsd-standards > >Synopsis: Implement C99's round[f]() math fucntions > >Arrival-Date: Sat Nov 29 10:10:18 PST 2003 > I've updated the patch to 1) handle Inf and NaN on input. 2) add a BUGS section to the man page about FP exception handling 3) hopefully comply better with style(9) -- Steve http://troutmask.apl.washington.edu/~kargl/ From owner-freebsd-standards@FreeBSD.ORG Tue Dec 9 20:50:28 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0128016A4CE for ; Tue, 9 Dec 2003 20:50:28 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32BAA43D13 for ; Tue, 9 Dec 2003 20:50:27 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hBA4oRFY068583 for ; Tue, 9 Dec 2003 20:50:27 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hBA4oR9q068582; Tue, 9 Dec 2003 20:50:27 -0800 (PST) (envelope-from gnats) Date: Tue, 9 Dec 2003 20:50:27 -0800 (PST) Message-Id: <200312100450.hBA4oR9q068582@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: "Steven G. Kargl" Subject: Re: standards/59797: Implement C99's round[f]() math fucntions X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Steven G. Kargl" List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 04:50:28 -0000 The following reply was made to PR standards/59797; it has been noted by GNATS. From: "Steven G. Kargl" To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-standards@FreeBSD.org Cc: Subject: Re: standards/59797: Implement C99's round[f]() math fucntions Date: Tue, 9 Dec 2003 20:43:12 -0800 (PST) FreeBSD-gnats-submit@FreeBSD.org wrote: > Thank you very much for your problem report. > It has the internal identification `standards/59797'. > The individual assigned to look at your > report is: freebsd-standards. > > You can access the state of your problem report at any time > via this link: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=59797 > > >Category: standards > >Responsible: freebsd-standards > >Synopsis: Implement C99's round[f]() math fucntions > >Arrival-Date: Sat Nov 29 10:10:18 PST 2003 > I've updated the patch to 1) handle Inf and NaN on input. 2) add a BUGS section to the man page about FP exception handling 3) hopefully comply better with style(9) -- Steve http://troutmask.apl.washington.edu/~kargl/ From owner-freebsd-standards@FreeBSD.ORG Tue Dec 9 22:37:46 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3B6D16A4CE; Tue, 9 Dec 2003 22:37:46 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7539243D33; Tue, 9 Dec 2003 22:37:45 -0800 (PST) (envelope-from mikeh@FreeBSD.org) Received: from freefall.freebsd.org (mikeh@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hBA6bjFY077656; Tue, 9 Dec 2003 22:37:45 -0800 (PST) (envelope-from mikeh@freefall.freebsd.org) Received: (from mikeh@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hBA6bjZo077652; Tue, 9 Dec 2003 22:37:45 -0800 (PST) (envelope-from mikeh) Date: Tue, 9 Dec 2003 22:37:45 -0800 (PST) From: Mike Heffner Message-Id: <200312100637.hBA6bjZo077652@freefall.freebsd.org> To: mikeh@FreeBSD.org, mikeh@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: standards/55112: glob.h, glob_t's gl_pathc should be "size_t", not "int". X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 06:37:46 -0000 Synopsis: glob.h, glob_t's gl_pathc should be "size_t", not "int". Responsible-Changed-From-To: mikeh->freebsd-standards Responsible-Changed-By: mikeh Responsible-Changed-When: Tue Dec 9 22:33:52 PST 2003 Responsible-Changed-Why: Throw this back to -standards, as it isn't what I originally thought. I don't believe we can just change from int->size_t because it would introduce ABI compatibility problems where sizeof(int) != sizeof(size_t). This will most likely have to wait until a libc major bump. http://www.freebsd.org/cgi/query-pr.cgi?pr=55112 From owner-freebsd-standards@FreeBSD.ORG Wed Dec 10 09:11:53 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB83B16A4CE; Wed, 10 Dec 2003 09:11:53 -0800 (PST) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30CC543D1D; Wed, 10 Dec 2003 09:11:51 -0800 (PST) (envelope-from kargl@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) hBAHBowg007530; Wed, 10 Dec 2003 09:11:50 -0800 (PST) (envelope-from kargl@troutmask.apl.washington.edu) Received: (from kargl@localhost)hBAHBoEL007529; Wed, 10 Dec 2003 09:11:50 -0800 (PST) (envelope-from kargl) From: "Steven G. Kargl" Message-Id: <200312101711.hBAHBoEL007529@troutmask.apl.washington.edu> In-Reply-To: <200311291810.hATIAIWu084953@freefall.freebsd.org> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-standards@FreeBSD.org Date: Wed, 10 Dec 2003 09:11:50 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL99f (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1071076310-7460-0_ Content-Transfer-Encoding: 7bit Subject: Re: standards/59797: Implement C99's round[f]() math fucntions X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 17:11:53 -0000 --ELM1071076310-7460-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII FreeBSD-gnats-submit@FreeBSD.org wrote: > Thank you very much for your problem report. > It has the internal identification `standards/59797'. > The individual assigned to look at your > report is: freebsd-standards. > > You can access the state of your problem report at any time > via this link: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=59797 > > >Category: standards > >Responsible: freebsd-standards > >Synopsis: Implement C99's round[f]() math fucntions > >Arrival-Date: Sat Nov 29 10:10:18 PST 2003 > Aargh. Here the actual patch that 1) handle Inf and NaN on input. 2) add a BUGS section to the man page about FP exception handling 3) hopefully comply better with style(9) -- Steve http://troutmask.apl.washington.edu/~kargl/ --ELM1071076310-7460-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-patch Content-Disposition: attachment; filename=msun.patch Content-Description: diff -Nbur msun.orig/Makefile msun/Makefile --- msun.orig/Makefile Sat Oct 25 02:32:18 2003 +++ msun/Makefile Tue Dec 9 20:39:18 2003 @@ -84,7 +84,8 @@ s_floor.c s_floorf.c s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ s_isnanf.c s_ldexpf.c s_lib_version.c s_log1p.c \ s_log1pf.c s_logb.c s_logbf.c s_matherr.c s_modff.c \ - s_nextafter.c s_nextafterf.c s_rint.c s_rintf.c s_scalbn.c s_scalbnf.c \ + s_nextafter.c s_nextafterf.c s_rint.c s_rintf.c s_round.c s_roundf.c \ + s_scalbn.c s_scalbnf.c \ s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c s_tan.c \ s_tanf.c s_tanh.c s_tanhf.c \ w_acos.c w_acosf.c w_acosh.c w_acoshf.c w_asin.c w_asinf.c w_atan2.c \ @@ -121,7 +122,7 @@ MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \ cos.3 cosh.3 erf.3 exp.3 fabs.3 floor.3 fmod.3 hypot.3 ieee.3 \ - ieee_test.3 j0.3 lgamma.3 math.3 rint.3 sin.3 sinh.3 sqrt.3 \ + ieee_test.3 j0.3 lgamma.3 math.3 rint.3 round.3 sin.3 sinh.3 sqrt.3 \ tan.3 tanh.3 MLINKS+=acos.3 acosf.3 @@ -153,6 +154,7 @@ MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3 MLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 lgammaf.3 lgamma.3 tgamma.3 MLINKS+=rint.3 rintf.3 +MLINKS+=round.3 roundf.3 MLINKS+=sin.3 sinf.3 MLINKS+=sinh.3 sinhf.3 MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 sqrtf.3 diff -Nbur msun.orig/man/round.3 msun/man/round.3 --- msun.orig/man/round.3 Wed Dec 31 16:00:00 1969 +++ msun/man/round.3 Tue Dec 9 20:35:48 2003 @@ -0,0 +1,71 @@ +.\" Copyright (c) 2003, Steven G. Kargl +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd November 29, 2003 +.Dt ROUND 3 +.Os +.Sh NAME +.Nm round , +.Nm roundf +.Nd nearest integral value; if the argument is halfway between two integral +values then round away from zero +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In math.h +.Ft double +.Fn round "double x" +.Ft float +.Fn roundf "float x" +.Sh DESCRIPTION +The +.Fn round +and the +.Fn roundf +functions return the nearest integral value to +.Fa x ; +if +.Fa x +lies halfway between two integral values, then these +functions return the integral value with the larger +absolute value (i.e., they round away from zero). +.Sh SEE ALSO +.Xr ceil 3 , +.Xr floor 3 , +.Xr ieee 3 , +.Xr math 3 , +.Xr rint 3 +.Sh BUGS +.Fn round +and +.Fn roundf +do currently support floating-point exception handling as +specified by +.St -isoC-99 . +.Sh STANDARDS +The +.Fn round +function conforms to +.St -isoC-99 . + diff -Nbur msun.orig/src/math.h msun/src/math.h --- msun.orig/src/math.h Thu Oct 23 01:23:38 2003 +++ msun/src/math.h Tue Dec 9 20:29:39 2003 @@ -191,6 +191,7 @@ double fabs(double); double floor(double); double fmod(double, double); +double round(double); /* * These functions are not in C90 so they can be "right". The ones that @@ -281,6 +282,7 @@ float fabsf(float); float floorf(float); float fmodf(float, float); +float roundf(float); float erff(float); float erfcf(float) __pure2; diff -Nbur msun.orig/src/s_round.c msun/src/s_round.c --- msun.orig/src/s_round.c Wed Dec 31 16:00:00 1969 +++ msun/src/s_round.c Tue Dec 9 20:33:41 2003 @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2003, Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + + +#include + +double +round(double x) +{ + double t; + int i; + + if ((i = fpclassify(x)) == FP_INFINITE || i == FP_NAN) + return (x); + + if (x >= 0.0) { + t = ceil(x); + if (t - x > 0.5) t -= 1.0; + return (t); + } else { + t = ceil(-x); + if (t + x > 0.5) t -= 1.0; + return (-t); + } +} diff -Nbur msun.orig/src/s_roundf.c msun/src/s_roundf.c --- msun.orig/src/s_roundf.c Wed Dec 31 16:00:00 1969 +++ msun/src/s_roundf.c Tue Dec 9 20:32:58 2003 @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2003, Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +float +roundf(float x) +{ + float t; + int i; + + if ((i = fpclassify(x)) == FP_INFINITE || i == FP_NAN) + return (x); + + if (x >= 0.0) { + t = ceilf(x); + if (t - x > 0.5) t -= 1.0; + return t; + } else { + t = ceilf(-x); + if (t + x > 0.5) t -= 1.0; + return -t; + } +} --ELM1071076310-7460-0_-- From owner-freebsd-standards@FreeBSD.ORG Wed Dec 10 09:20:17 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D554E16A4CE for ; Wed, 10 Dec 2003 09:20:17 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BDD743D1D for ; Wed, 10 Dec 2003 09:20:10 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hBAHKAFY014498 for ; Wed, 10 Dec 2003 09:20:10 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hBAHKAlv014496; Wed, 10 Dec 2003 09:20:10 -0800 (PST) (envelope-from gnats) Date: Wed, 10 Dec 2003 09:20:10 -0800 (PST) Message-Id: <200312101720.hBAHKAlv014496@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: "Steven G. Kargl" Subject: Re: standards/59797: Implement C99's round[f]() math fucntions X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Steven G. Kargl" List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 17:20:17 -0000 The following reply was made to PR standards/59797; it has been noted by GNATS. From: "Steven G. Kargl" To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-standards@FreeBSD.org Cc: Subject: Re: standards/59797: Implement C99's round[f]() math fucntions Date: Wed, 10 Dec 2003 09:11:50 -0800 (PST) --ELM1071076310-7460-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII FreeBSD-gnats-submit@FreeBSD.org wrote: > Thank you very much for your problem report. > It has the internal identification `standards/59797'. > The individual assigned to look at your > report is: freebsd-standards. > > You can access the state of your problem report at any time > via this link: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=59797 > > >Category: standards > >Responsible: freebsd-standards > >Synopsis: Implement C99's round[f]() math fucntions > >Arrival-Date: Sat Nov 29 10:10:18 PST 2003 > Aargh. Here the actual patch that 1) handle Inf and NaN on input. 2) add a BUGS section to the man page about FP exception handling 3) hopefully comply better with style(9) -- Steve http://troutmask.apl.washington.edu/~kargl/ --ELM1071076310-7460-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-patch Content-Disposition: attachment; filename=msun.patch Content-Description: diff -Nbur msun.orig/Makefile msun/Makefile --- msun.orig/Makefile Sat Oct 25 02:32:18 2003 +++ msun/Makefile Tue Dec 9 20:39:18 2003 @@ -84,7 +84,8 @@ s_floor.c s_floorf.c s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ s_isnanf.c s_ldexpf.c s_lib_version.c s_log1p.c \ s_log1pf.c s_logb.c s_logbf.c s_matherr.c s_modff.c \ - s_nextafter.c s_nextafterf.c s_rint.c s_rintf.c s_scalbn.c s_scalbnf.c \ + s_nextafter.c s_nextafterf.c s_rint.c s_rintf.c s_round.c s_roundf.c \ + s_scalbn.c s_scalbnf.c \ s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c s_tan.c \ s_tanf.c s_tanh.c s_tanhf.c \ w_acos.c w_acosf.c w_acosh.c w_acoshf.c w_asin.c w_asinf.c w_atan2.c \ @@ -121,7 +122,7 @@ MAN= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \ cos.3 cosh.3 erf.3 exp.3 fabs.3 floor.3 fmod.3 hypot.3 ieee.3 \ - ieee_test.3 j0.3 lgamma.3 math.3 rint.3 sin.3 sinh.3 sqrt.3 \ + ieee_test.3 j0.3 lgamma.3 math.3 rint.3 round.3 sin.3 sinh.3 sqrt.3 \ tan.3 tanh.3 MLINKS+=acos.3 acosf.3 @@ -153,6 +154,7 @@ MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3 MLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 lgammaf.3 lgamma.3 tgamma.3 MLINKS+=rint.3 rintf.3 +MLINKS+=round.3 roundf.3 MLINKS+=sin.3 sinf.3 MLINKS+=sinh.3 sinhf.3 MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 sqrtf.3 diff -Nbur msun.orig/man/round.3 msun/man/round.3 --- msun.orig/man/round.3 Wed Dec 31 16:00:00 1969 +++ msun/man/round.3 Tue Dec 9 20:35:48 2003 @@ -0,0 +1,71 @@ +.\" Copyright (c) 2003, Steven G. Kargl +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd November 29, 2003 +.Dt ROUND 3 +.Os +.Sh NAME +.Nm round , +.Nm roundf +.Nd nearest integral value; if the argument is halfway between two integral +values then round away from zero +.Sh LIBRARY +.Lb libm +.Sh SYNOPSIS +.In math.h +.Ft double +.Fn round "double x" +.Ft float +.Fn roundf "float x" +.Sh DESCRIPTION +The +.Fn round +and the +.Fn roundf +functions return the nearest integral value to +.Fa x ; +if +.Fa x +lies halfway between two integral values, then these +functions return the integral value with the larger +absolute value (i.e., they round away from zero). +.Sh SEE ALSO +.Xr ceil 3 , +.Xr floor 3 , +.Xr ieee 3 , +.Xr math 3 , +.Xr rint 3 +.Sh BUGS +.Fn round +and +.Fn roundf +do currently support floating-point exception handling as +specified by +.St -isoC-99 . +.Sh STANDARDS +The +.Fn round +function conforms to +.St -isoC-99 . + diff -Nbur msun.orig/src/math.h msun/src/math.h --- msun.orig/src/math.h Thu Oct 23 01:23:38 2003 +++ msun/src/math.h Tue Dec 9 20:29:39 2003 @@ -191,6 +191,7 @@ double fabs(double); double floor(double); double fmod(double, double); +double round(double); /* * These functions are not in C90 so they can be "right". The ones that @@ -281,6 +282,7 @@ float fabsf(float); float floorf(float); float fmodf(float, float); +float roundf(float); float erff(float); float erfcf(float) __pure2; diff -Nbur msun.orig/src/s_round.c msun/src/s_round.c --- msun.orig/src/s_round.c Wed Dec 31 16:00:00 1969 +++ msun/src/s_round.c Tue Dec 9 20:33:41 2003 @@ -0,0 +1,50 @@ +/*- + * Copyright (c) 2003, Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + + +#include + +double +round(double x) +{ + double t; + int i; + + if ((i = fpclassify(x)) == FP_INFINITE || i == FP_NAN) + return (x); + + if (x >= 0.0) { + t = ceil(x); + if (t - x > 0.5) t -= 1.0; + return (t); + } else { + t = ceil(-x); + if (t + x > 0.5) t -= 1.0; + return (-t); + } +} diff -Nbur msun.orig/src/s_roundf.c msun/src/s_roundf.c --- msun.orig/src/s_roundf.c Wed Dec 31 16:00:00 1969 +++ msun/src/s_roundf.c Tue Dec 9 20:32:58 2003 @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2003, Steven G. Kargl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +float +roundf(float x) +{ + float t; + int i; + + if ((i = fpclassify(x)) == FP_INFINITE || i == FP_NAN) + return (x); + + if (x >= 0.0) { + t = ceilf(x); + if (t - x > 0.5) t -= 1.0; + return t; + } else { + t = ceilf(-x); + if (t + x > 0.5) t -= 1.0; + return -t; + } +} --ELM1071076310-7460-0_-- From owner-freebsd-standards@FreeBSD.ORG Fri Dec 12 10:53:00 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E16BC16A4CF; Fri, 12 Dec 2003 10:53:00 -0800 (PST) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4868543D31; Fri, 12 Dec 2003 10:52:58 -0800 (PST) (envelope-from Alexander@Leidinger.net) Received: from fwd01.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1AUsPJ-00089W-03; Fri, 12 Dec 2003 19:52:57 +0100 Received: from Andro-Beta.Leidinger.net (rfv9UkZUreQDcT3uchpQ7rcvUZ1oSu02TMQideRshF5bC80NyaTMwL@[217.229.217.137]) by fmrl01.sul.t-online.com with esmtp id 1AUsP0-037aQi0; Fri, 12 Dec 2003 19:52:38 +0100 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) hBCIqmYh052495; Fri, 12 Dec 2003 19:52:49 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (netchild@localhost [127.0.0.1]) hBCIqlx7093521; Fri, 12 Dec 2003 19:52:47 +0100 (CET) (envelope-from Alexander@Leidinger.net) Date: Fri, 12 Dec 2003 19:52:47 +0100 From: Alexander Leidinger To: arch@freebsd.org Message-Id: <20031212195247.4ff07669.Alexander@Leidinger.net> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: rfv9UkZUreQDcT3uchpQ7rcvUZ1oSu02TMQideRshF5bC80NyaTMwL@t-dialin.net cc: bhughes@trolltech.com cc: freebsd-standards@FreeBSD.org Subject: Patch to support the C++ DSO Object Destruction API (PR 59552) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 18:53:01 -0000 Hi, can someone please look at PR 59552 (author CCed)? I quote the description of the PR here: ---snip--- Below is a test-case and patch to support the cross-vendor C++ DSO Object Destruction API used by GCC 3.x and the Intel C/C++ compilers, defined at http://www.codesourcery.com/cxx-abi/abi.html#dso-dtor Here is a quote from the web-page, describing the motivation/rationale behind this API: The C++ Standard requires that destructors be called for global objects when a program exits in the opposite order of construction. Most implementations have handled this by calling the C library atexit(3) routine to register the destructors. This is problematic because the 1999 C Standard only requires that the implementation support 32 register function, although most implementations support many more. More important, it does not deal at all with the ability in most implementations to remove DSOs (dynamic shared objects) from a running program image by calling dlclose(3) prior to program termination. The API specified below is intended to provide standard-conforming treatment during normal program exit, which includes executing atexit(3)-registered functions in the correct sequence relative to constructor-registered destructors, and reasonable treatment during early DSO unload (e.g. dlclose(3)). ---snip--- I don't know which list is more appropriate, so please decide on your own (I'm not subscribed to the standards list, so please CC me if you follow up to it only). I haven't tested it yet, but I will test it with icc as soon as I get time. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 From owner-freebsd-standards@FreeBSD.ORG Fri Dec 12 11:33:40 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D0E716A4CE for ; Fri, 12 Dec 2003 11:33:40 -0800 (PST) Received: from quic.net (rrcs-central-24-123-205-180.biz.rr.com [24.123.205.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5144043D09 for ; Fri, 12 Dec 2003 11:33:39 -0800 (PST) (envelope-from utsl@quic.net) Received: from localhost (localhost [127.0.0.1]) (uid 1032) by quic.net with local; Fri, 12 Dec 2003 14:33:38 -0500 Date: Fri, 12 Dec 2003 14:33:37 -0500 To: giffunip@asme.org Message-ID: <20031212193337.GA14768@quic.net> References: <20031130205803.83961.qmail@web13407.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <20031130205803.83961.qmail@web13407.mail.yahoo.com> User-Agent: Mutt/1.3.28i From: Nathan Hawkins cc: freebsd-standards@FreeBSD.org Subject: Re: libc should provide ftw/nftw (from NetBSD's PR database) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 19:33:40 -0000 On Sun, Nov 30, 2003 at 08:58:03PM +0000, Pedro F. Giffuni wrote: > Hi; > > Someone might want to contact the author of this NetBSD PR: > > http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=18378 > > The author is working on Debian-NetBSD and his website > seems to be temporarily down, but when I emailed him last year he was willing > to contribute to FreeBSD too. If the website in question is hosted at debian.org, it is probably due to cleanup of Debian's servers after the recent intrusion. The Debian/BSD porting efforts have accumulated other code that could be useful to FreeBSD. I have also code to support utmp(x) and the shadow password API (based on SUSv2 and glibc). These would need some work to integrate, though. You can find them here: http://cvs.alioth.debian.org/cgi-bin/cvsweb.cgi/freebsd-libc/?cvsroot=glibc-bsd Or by CVS: cvs -d:pserver:anonymous@cvs.alioth.debian.org:/cvsroot/glibc-bsd co freebsd-libc All this code is BSD licensed. ---Nathan