From owner-freebsd-standards@FreeBSD.ORG Mon Dec 6 01:50:16 2004 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 AA5F716A4CE for ; Mon, 6 Dec 2004 01:50:15 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B6E143D55 for ; Mon, 6 Dec 2004 01:50:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iB61oFVn033614 for ; Mon, 6 Dec 2004 01:50:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iB61oFPA033613; Mon, 6 Dec 2004 01:50:15 GMT (envelope-from gnats) Resent-Date: Mon, 6 Dec 2004 01:50:15 GMT Resent-Message-Id: <200412060150.iB61oFPA033613@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, Craig Rodrigues Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0674616A4D2 for ; Mon, 6 Dec 2004 01:40:49 +0000 (GMT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id D352043D4C for ; Mon, 6 Dec 2004 01:40:48 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.30.114.143]) by comcast.net (rwcrmhc11) with ESMTP id <2004120601404601300hhjree>; Mon, 6 Dec 2004 01:40:46 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost [127.0.0.1]) iB61eiHY032461 for ; Sun, 5 Dec 2004 20:40:44 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)iB61eiUm032460; Sun, 5 Dec 2004 20:40:44 -0500 (EST) (envelope-from rodrigc) Message-Id: <200412060140.iB61eiUm032460@h00609772adf0.ne.client2.attbi.com> Date: Sun, 5 Dec 2004 20:40:44 -0500 (EST) From: Craig Rodrigues To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/74751: swab() should be declared in , not X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Craig Rodrigues List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2004 01:50:16 -0000 >Number: 74751 >Category: standards >Synopsis: swab() should be declared in , not >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 06 01:50:15 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Craig Rodrigues >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD dibbler.crodrigues.org 6.0-CURRENT FreeBSD 6.0-CURRENT #44: Sun Dec 5 14:16:56 EST 2004 rodrigc@dibbler.crodrigues.org:/usr/obj/usr/src/sys/MYKERNEL1 i386 >Description: I was trying to compile the ACE library, which follows the Single Unix Specification fairly closesly, and compilation failed because our swab() is declared in , not in . The prototype for swab() should be in , not in , according to: http://www.opengroup.org/onlinepubs/009695399/functions/swab.html >How-To-Repeat: >Fix: --- include/string.h.orig Sun Dec 5 20:24:50 2004 +++ include/string.h Sun Dec 5 20:34:09 2004 @@ -108,8 +108,13 @@ #endif size_t strxfrm(char * __restrict, const char * __restrict, size_t); #if __BSD_VISIBLE -void swab(const void *, void *, size_t); -#endif + +#ifndef _SWAB_DECLARED +#define _SWAB_DECLARED +void swab(const void * __restrict, void * __restrict, ssize_t); +#endif /* _SWAB_DECLARED */ + +#endif /* __BSD_VISIBLE */ __END_DECLS #endif /* _STRING_H_ */ --- include/unistd.h.orig Sun Dec 5 20:29:04 2004 +++ include/unistd.h Sun Dec 5 20:32:11 2004 @@ -436,7 +436,12 @@ int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */ int setregid(gid_t, gid_t); int setreuid(uid_t, uid_t); -/* void swab(const void * __restrict, void * __restrict, ssize_t); */ + +#ifndef _SWAB_DECLARED +#define _SWAB_DECLARED +void swab(const void * __restrict, void * __restrict, ssize_t); +#endif /* _SWAB_DECLARED */ + void sync(void); useconds_t ualarm(useconds_t, useconds_t); int usleep(useconds_t); --- lib/libc/string/swab.c.orig Sun Dec 5 20:21:03 2004 +++ lib/libc/string/swab.c Sun Dec 5 20:21:18 2004 @@ -40,7 +40,7 @@ #include __FBSDID("$FreeBSD: src/lib/libc/string/swab.c,v 1.5 2002/08/30 20:33:05 robert Exp $"); -#include +#include void swab(const void * __restrict from, void * __restrict to, size_t len) --- lib/libc/string/swab.3.orig Sun Dec 5 20:22:22 2004 +++ lib/libc/string/swab.3 Sun Dec 5 20:23:46 2004 @@ -41,7 +41,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In string.h +.In unistd.h .Ft void .Fn swab "const void * restrict src" "void * restrict dst" "size_t len" .Sh DESCRIPTION >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Mon Dec 6 04:50:31 2004 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 786F916A4CE for ; Mon, 6 Dec 2004 04:50:31 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40FAA43D66 for ; Mon, 6 Dec 2004 04:50:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iB64oU3B058428 for ; Mon, 6 Dec 2004 04:50:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iB64oUtM058427; Mon, 6 Dec 2004 04:50:30 GMT (envelope-from gnats) Date: Mon, 6 Dec 2004 04:50:30 GMT Message-Id: <200412060450.iB64oUtM058427@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Craig Rodrigues Subject: Re: standards/74751: swab() should be declared in , not X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Craig Rodrigues List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2004 04:50:31 -0000 The following reply was made to PR standards/74751; it has been noted by GNATS. From: Craig Rodrigues To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: standards/74751: swab() should be declared in , not Date: Sun, 5 Dec 2004 23:44:20 -0500 Hi, This is a more correct patch, to match the prototype in SUS. At some point this prototype should be removed from string.h, but I left it in there, in case we want to preserve some backwards compatibility. -- Craig Rodrigues rodrigc@crodrigues.org --- ./include/string.h.orig Sun Dec 5 20:24:50 2004 +++ ./include/string.h Sun Dec 5 23:25:56 2004 @@ -108,8 +108,19 @@ #endif size_t strxfrm(char * __restrict, const char * __restrict, size_t); #if __BSD_VISIBLE -void swab(const void *, void *, size_t); -#endif + +#ifndef _SWAB_DECLARED +#define _SWAB_DECLARED + +#ifndef _SSIZE_T_DECLARED +typedef __ssize_t ssize_t; +#define _SSIZE_T_DECLARED +#endif /* _SIZE_T_DECLARED */ + +void swab(const void * __restrict, void * __restrict, ssize_t); +#endif /* _SWAB_DECLARED */ + +#endif /* __BSD_VISIBLE */ __END_DECLS #endif /* _STRING_H_ */ --- ./include/unistd.h.orig Sun Dec 5 20:29:04 2004 +++ ./include/unistd.h Sun Dec 5 20:32:11 2004 @@ -436,7 +436,12 @@ int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */ int setregid(gid_t, gid_t); int setreuid(uid_t, uid_t); -/* void swab(const void * __restrict, void * __restrict, ssize_t); */ + +#ifndef _SWAB_DECLARED +#define _SWAB_DECLARED +void swab(const void * __restrict, void * __restrict, ssize_t); +#endif /* _SWAB_DECLARED */ + void sync(void); useconds_t ualarm(useconds_t, useconds_t); int usleep(useconds_t); --- ./lib/libc/string/swab.c.orig Sun Dec 5 20:21:03 2004 +++ ./lib/libc/string/swab.c Sun Dec 5 23:11:39 2004 @@ -40,10 +40,10 @@ #include __FBSDID("$FreeBSD: src/lib/libc/string/swab.c,v 1.5 2002/08/30 20:33:05 robert Exp $"); -#include +#include void -swab(const void * __restrict from, void * __restrict to, size_t len) +swab(const void * __restrict from, void * __restrict to, ssize_t len) { unsigned long temp; int n; --- ./lib/libc/string/swab.3.orig Sun Dec 5 20:22:22 2004 +++ ./lib/libc/string/swab.3 Sun Dec 5 23:22:00 2004 @@ -41,9 +41,9 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In string.h +.In unistd.h .Ft void -.Fn swab "const void * restrict src" "void * restrict dst" "size_t len" +.Fn swab "const void * restrict src" "void * restrict dst" "ssize_t len" .Sh DESCRIPTION The function .Fn swab From owner-freebsd-standards@FreeBSD.ORG Mon Dec 6 11:02:30 2004 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 E47FD16A4CF for ; Mon, 6 Dec 2004 11:02:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C733343D1D for ; Mon, 6 Dec 2004 11:02:29 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iB6B2T2J027473 for ; Mon, 6 Dec 2004 11:02:29 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iB6B2TD8027467 for freebsd-standards@freebsd.org; Mon, 6 Dec 2004 11:02:29 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 6 Dec 2004 11:02:29 GMT Message-Id: <200412061102.iB6B2TD8027467@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, 06 Dec 2004 11:02:30 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/03/05] bin/25542 standards /bin/sh: null char in quoted string p [2002/02/25] standards/35307standards standard include files are not standard c o [2002/12/13] kern/46239 standards posix semaphore implementation errors 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/18] kern/53447 standards poll(2) semantics differ from susV3/POSIX 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 o [2004/01/01] standards/60772standards _Bool and bool should be unsigned o [2004/12/06] standards/74751standards swab() should be declared in , 10 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [1995/01/11] kern/105 standards Distributed libm (msun) has non-standard o [2000/09/24] bin/21519 standards sys/dir.h should be deprecated some more o [2001/01/16] bin/24390 standards Replacing old dir-symlinks when using /bi s [2001/01/24] standards/24590standards timezone function not compatible witn Sin s [2001/06/18] kern/28260 standards UIO_MAXIOV needs to be made public p [2001/11/20] standards/32126standards getopt(3) not Unix-98 conformant o [2002/02/27] misc/35381 standards incorrect floating-point display of large s [2002/03/19] standards/36076standards Implementation of POSIX fuser command o [2002/06/14] standards/39256standards [v]snprintf aren't POSIX-conformant for s o [2002/07/09] kern/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/06/22] standards/53613standards FreeBSD doesn't define EPROTO o [2003/07/24] standards/54809standards pcvt deficits o [2003/07/25] standards/54833standards more pcvt deficits o [2003/07/25] standards/54839standards pcvt deficits o [2003/07/31] standards/55112standards glob.h, glob_t's gl_pathc should be "size o [2003/09/05] standards/56476standards cd9660 unicode support simple hack o [2003/10/29] standards/58676standards grantpt(3) alters storage used by ptsname p [2003/12/26] standards/60597standards FreeBSD's /usr/include lacks of cpio.h s [2004/02/14] standards/62858standards malloc(0) not C99 compliant p [2004/02/21] standards/63173standards Patch to add getopt_long_only(3) to libc o [2004/03/29] kern/64875 standards [patch] add a system call: fdatasync() o [2004/05/07] standards/66357standards make POSIX conformance problem ('sh -e' & o [2004/05/11] standards/66531standards _gettemp uses a far smaller set of filena o [2004/08/22] standards/70813standards [PATCH] ls not Posix compliant o [2004/08/26] docs/70985 standards [patch] sh(1): incomplete documentation o o [2004/09/22] standards/72006standards floating point formating in non-C locales 30 problems total. From owner-freebsd-standards@FreeBSD.ORG Fri Dec 10 15:56:29 2004 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 7844A16A4CE; Fri, 10 Dec 2004 15:56:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5200643D41; Fri, 10 Dec 2004 15:56:29 +0000 (GMT) (envelope-from trhodes@FreeBSD.org) Received: from freefall.freebsd.org (trhodes@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBAFuTec085711; Fri, 10 Dec 2004 15:56:29 GMT (envelope-from trhodes@freefall.freebsd.org) Received: (from trhodes@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBAFuTnO085707; Fri, 10 Dec 2004 15:56:29 GMT (envelope-from trhodes) Date: Fri, 10 Dec 2004 15:56:29 GMT From: Tom Rhodes Message-Id: <200412101556.iBAFuTnO085707@freefall.freebsd.org> To: rodrigc@crodrigues.org, trhodes@FreeBSD.org, freebsd-standards@FreeBSD.org, trhodes@FreeBSD.org Subject: Re: standards/74751: swab() should be declared in , not 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, 10 Dec 2004 15:56:29 -0000 Synopsis: swab() should be declared in , not State-Changed-From-To: open->patched State-Changed-By: trhodes State-Changed-When: Fri Dec 10 15:55:52 GMT 2004 State-Changed-Why: Patch committed Responsible-Changed-From-To: freebsd-standards->trhodes Responsible-Changed-By: trhodes Responsible-Changed-When: Fri Dec 10 15:55:52 GMT 2004 Responsible-Changed-Why: Over to me. http://www.freebsd.org/cgi/query-pr.cgi?pr=74751