From owner-cvs-src-old@FreeBSD.ORG Mon Jan 4 15:46:42 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6786E106566B for ; Mon, 4 Jan 2010 15:46:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 51D078FC18 for ; Mon, 4 Jan 2010 15:46:42 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o04FkgDv090787 for ; Mon, 4 Jan 2010 15:46:42 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o04FkgIf090786 for cvs-src-old@freebsd.org; Mon, 4 Jan 2010 15:46:42 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <201001041546.o04FkgIf090786@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Mon, 4 Jan 2010 15:40:17 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/include dirent.h src/lib/libc/gen opendir.c scandir.3 scandir.c src/usr.bin/catman catman.c src/usr.bin/makewhatis makewhatis.c src/usr.sbin/lpr/common_source lp.h rmjob.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:46:42 -0000 kib 2010-01-04 15:40:17 UTC FreeBSD src repository Modified files: include dirent.h lib/libc/gen opendir.c scandir.3 scandir.c usr.bin/catman catman.c usr.bin/makewhatis makewhatis.c usr.sbin/lpr/common_source lp.h rmjob.c Log: SVN rev 201512 on 2010-01-04 15:40:17Z by kib Modernize scandir(3) and alphasort(3) interfaces according to the IEEE Std 1003.1-2008. Both Linux and Solaris conforms to the new definitions, so we better follow too (older glibc used old BSDish alphasort prototype and corresponding type of the comparision function for scandir). While there, change the definitions of the functions to ANSI C and fix several style issues nearby. Remove requirement for "sys/types.h" include for functions from manpage. POSIX also requires that alphasort(3) sorts as if strcoll(3) was used, but leave the strcmp(3) call in the function for now. Adapt in-tree callers of scandir(3) to new declaration. The fact that select_sections() from catman(1) could modify supplied struct dirent is a bug. PR: standards/142255 MFC after: 2 weeks Revision Changes Path 1.17 +3 -2 src/include/dirent.h 1.26 +2 -1 src/lib/libc/gen/opendir.c 1.10 +3 -4 src/lib/libc/gen/scandir.3 1.10 +10 -13 src/lib/libc/gen/scandir.c 1.17 +8 -2 src/usr.bin/catman/catman.c 1.13 +2 -2 src/usr.bin/makewhatis/makewhatis.c 1.26 +1 -1 src/usr.sbin/lpr/common_source/lp.h 1.22 +1 -1 src/usr.sbin/lpr/common_source/rmjob.c