From owner-cvs-all@FreeBSD.ORG Fri May 9 14:57:34 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14056106566C; Fri, 9 May 2008 14:57:34 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 29B7A8FC0C; Fri, 9 May 2008 14:57:33 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (HPooka@thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.3/8.14.3) with ESMTP id m49ET55G085147; Fri, 9 May 2008 09:29:06 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Fri, 9 May 2008 09:29:05 -0500 (CDT) From: "Sean C. Farley" To: "Daniel O'Connor" In-Reply-To: <200805091450.39656.doconnor@gsoft.com.au> Message-ID: References: <200805082357.m48NvTBx012316@repoman.freebsd.org> <200805091450.39656.doconnor@gsoft.com.au> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail.farley.org Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include readpassphrase.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2008 14:57:34 -0000 On Fri, 9 May 2008, Daniel O'Connor wrote: > On Fri, 9 May 2008, Sean Farley wrote: >> scf 2008-05-08 23:57:29 UTC >> >> FreeBSD src repository >> >> Modified files: >> include readpassphrase.h >> Log: >> Define the size_t type since readpassphrase(3) requires it in its >> definition and sys/types.h is not listed within the synopsis of the >> man page. > > Surely it would be better to amend the documentation? I had difficulty deciding on this. It was either change the code to follow the specification (man page) or update the documentation. What tipped it toward patching the code was the assumption that the man page may be correct for some OS's and coders may have written their code based on the man page. Of course, they probably have already included sys/types.h (or any header that defines size_t) to get it to compile. Questions: 1. Does the fact that it is not a system call mean that it should not define size_t? 2. Are string.h and strings.h, for example, exceptions due to legacy? I am open to changing the man page. Does anyone know if other *BSD systems also need sys/types.h with this program[1]? Sean 1. http://www.farley.org/freebsd/tmp/readpassphrase.c -- scf@FreeBSD.org