From owner-freebsd-standards@FreeBSD.ORG Tue Apr 18 17:50:15 2006 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org 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 8027216A400 for ; Tue, 18 Apr 2006 17:50:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BAF943D53 for ; Tue, 18 Apr 2006 17:50:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k3IHoDDV070790 for ; Tue, 18 Apr 2006 17:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k3IHoDkU070787; Tue, 18 Apr 2006 17:50:13 GMT (envelope-from gnats) Resent-Date: Tue, 18 Apr 2006 17:50:13 GMT Resent-Message-Id: <200604181750.k3IHoDkU070787@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Millan Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E11AD16A413 for ; Tue, 18 Apr 2006 17:40:24 +0000 (UTC) (envelope-from rmh@io.debian.net) Received: from io.debian.net (io.ethz.ch [129.132.80.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F26143D72 for ; Tue, 18 Apr 2006 17:40:24 +0000 (GMT) (envelope-from rmh@io.debian.net) Received: from rmh by io.debian.net with local (Exim 4.61) (envelope-from ) id 1FVuBa-000Et7-KJ for FreeBSD-gnats-submit@freebsd.org; Tue, 18 Apr 2006 19:40:22 +0200 Message-Id: Date: Tue, 18 Apr 2006 19:40:22 +0200 From: Robert Millan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: standards/96016: clock_getres et al should be in X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Robert Millan List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 17:50:15 -0000 >Number: 96016 >Category: standards >Synopsis: clock_getres et al should be in >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 18 17:50:12 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Robert Millan >Release: GNU/kFreeBSD 5.4-1-586 i586 >Organization: >Environment: System: GNU/kFreeBSD io.debian.net 5.4-1-586 #0 Mon Dec 5 19:45:10 CET 2005 i586 i386 AMD-K6(tm) 3D processor GNU/kFreeBSD Architecture: i586 >Description: POSIX says that the following functions should be declared in , rather than : clock_getres, clock_gettime, clock_settime See http://www.opengroup.org/onlinepubs/009695399/functions/clock_settime.html >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Wed Apr 19 10:22:15 2006 Return-Path: X-Original-To: freebsd-standards@FreeBSD.org 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 D4FC816A401; Wed, 19 Apr 2006 10:22:15 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66C6D43D49; Wed, 19 Apr 2006 10:22:15 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (Postfix) with ESMTP id C642F32FF39; Wed, 19 Apr 2006 20:22:13 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3J9j0Tl012213; Wed, 19 Apr 2006 19:45:01 +1000 Date: Wed, 19 Apr 2006 20:22:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Robert Millan In-Reply-To: Message-ID: <20060419192833.F72898@delplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: standards/96016: clock_getres et al should be in X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 10:22:15 -0000 On Tue, 18 Apr 2006, Robert Millan wrote: >> Description: > POSIX says that the following functions should be declared in , rather > than : > > clock_getres, clock_gettime, clock_settime Er, that's why they _are_ in declared in . From "cvs ann src/include/time.h": % 1.24 (wollman 27-Jun-02): #if __POSIX_VISIBLE >= 199309 % 1.24 (wollman 27-Jun-02): int clock_getres(clockid_t, struct timespec *); % 1.24 (wollman 27-Jun-02): int clock_gettime(clockid_t, struct timespec *); % 1.24 (wollman 27-Jun-02): int clock_settime(clockid_t, const struct timespec *); % 1.32 (das 02-Apr-05): /* XXX missing: clock_nanosleep() */ % 1.24 (wollman 27-Jun-02): int nanosleep(const struct timespec *, struct timespec *); % 1.24 (wollman 27-Jun-02): #endif /* __POSIX_VISIBLE >= 199309 */ The main bugs in this area are: - includes in the !_KERNEL case. This gives lots of namespace pollution in including clock_getres() etc., and worse, struct tm etc. Lots of FreeBSD sources depend on this pollution. When I last tried removing this include (almost 4 years ago), there were several hundred lines of error output. - all CLOCK_* ids are declared in where they cause namespace pollution due to not being under any visibility ifdefs. - the visibility ifdefs for the declarations of the CLOCK_* ids in are mostly wrong. - all CLOCK_* ids are declared with style bugs in and . Duplication should be avoided by declaring the CLOCK_* ids in a little namespace-nonpolluting header in , but there are already too many of those, especially for times (there are , sys/<_timespec.h> and <_sys/_timeval.h>). Bruce From owner-freebsd-standards@FreeBSD.ORG Wed Apr 19 10:30:24 2006 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org 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 6B95616A401 for ; Wed, 19 Apr 2006 10:30:24 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3B8943D45 for ; Wed, 19 Apr 2006 10:30:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k3JAUNRs044162 for ; Wed, 19 Apr 2006 10:30:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k3JAUNL1044161; Wed, 19 Apr 2006 10:30:23 GMT (envelope-from gnats) Date: Wed, 19 Apr 2006 10:30:23 GMT Message-Id: <200604191030.k3JAUNL1044161@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Bruce Evans Cc: Subject: Re: standards/96016: clock_getres et al should be in X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Evans List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2006 10:30:25 -0000 The following reply was made to PR standards/96016; it has been noted by GNATS. From: Bruce Evans To: Robert Millan Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: standards/96016: clock_getres et al should be in Date: Wed, 19 Apr 2006 20:22:11 +1000 (EST) On Tue, 18 Apr 2006, Robert Millan wrote: >> Description: > POSIX says that the following functions should be declared in , rather > than : > > clock_getres, clock_gettime, clock_settime Er, that's why they _are_ in declared in . From "cvs ann src/include/time.h": % 1.24 (wollman 27-Jun-02): #if __POSIX_VISIBLE >= 199309 % 1.24 (wollman 27-Jun-02): int clock_getres(clockid_t, struct timespec *); % 1.24 (wollman 27-Jun-02): int clock_gettime(clockid_t, struct timespec *); % 1.24 (wollman 27-Jun-02): int clock_settime(clockid_t, const struct timespec *); % 1.32 (das 02-Apr-05): /* XXX missing: clock_nanosleep() */ % 1.24 (wollman 27-Jun-02): int nanosleep(const struct timespec *, struct timespec *); % 1.24 (wollman 27-Jun-02): #endif /* __POSIX_VISIBLE >= 199309 */ The main bugs in this area are: - includes in the !_KERNEL case. This gives lots of namespace pollution in including clock_getres() etc., and worse, struct tm etc. Lots of FreeBSD sources depend on this pollution. When I last tried removing this include (almost 4 years ago), there were several hundred lines of error output. - all CLOCK_* ids are declared in where they cause namespace pollution due to not being under any visibility ifdefs. - the visibility ifdefs for the declarations of the CLOCK_* ids in are mostly wrong. - all CLOCK_* ids are declared with style bugs in and . Duplication should be avoided by declaring the CLOCK_* ids in a little namespace-nonpolluting header in , but there are already too many of those, especially for times (there are , sys/<_timespec.h> and <_sys/_timeval.h>). Bruce