freebsd-nq/usr.bin
Konstantin Belousov 4176dd5267 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
2010-01-04 15:40:17 +00:00
..
alias - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
apply Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ar Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
asa - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
at Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
atm Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
awk Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
banner ANSIfy various tools in usr.bin/. 2010-01-02 10:09:20 +00:00
basename Alow dirname(1) to accept multiple arguments in the same way that 2009-02-02 11:19:56 +00:00
biff ANSIfy various tools in usr.bin/. 2010-01-02 10:09:20 +00:00
bluetooth Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
brandelf - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
bsdiff Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
bzip2 Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
bzip2recover - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
c89 Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
c99 - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
calendar Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
cap_mkdb - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
catman Modernize scandir(3) and alphasort(3) interfaces according to the IEEE 2010-01-04 15:40:17 +00:00
chat - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
checknr - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
chkey Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
chpass Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
cksum Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
cmp Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
col - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
colcrt Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
colldef Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
colrm Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
column - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
comm - Prevent overflowing of the buffer length variable in getline() by 2009-12-16 14:34:48 +00:00
compile_et Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
compress Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
cpio Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
cpuset Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
csplit A bit of rewording for clarity, taken from OpenBSD. 2009-01-10 12:47:22 +00:00
csup - Add missing rsyncfile from Makefile 2008-11-23 19:43:45 +00:00
ctags Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
cut Fix punctuation. 2009-04-01 08:33:54 +00:00
dig Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
dirname Alow dirname(1) to accept multiple arguments in the same way that 2009-02-02 11:19:56 +00:00
du Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ee Remove single occurance of HAS_CTYPE ifdef, ctype functions 2009-09-04 07:44:27 +00:00
elf2aout Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
elfdump Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
enigma - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
env Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
expand Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
false - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
fetch Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
file Merge vendor/file/dist@191739, bringing FILE 5.00 to 8-CURRENT. 2009-05-04 00:37:44 +00:00
file2c Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
find Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
finger Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
fmt Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
fold Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
from - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
fstat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
fsync Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ftp Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
gcore Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
gencat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
getconf - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
getent Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
getopt Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
gprof Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
gzip Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
head Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
hesinfo - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
hexdump Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
host Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
id Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
indent - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
ipcrm Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ipcs Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
join - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
jot Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
kdump Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
keylogin Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
keylogout K&R -> ANSI 2009-06-23 23:17:04 +00:00
killall Fix grammar and reduce ambiguity. 2009-12-26 00:46:05 +00:00
ktrace Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ktrdump Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
lam ANSIfy various tools in usr.bin/. 2010-01-02 10:09:20 +00:00
last Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
lastcomm Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ldd Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
leave Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
less Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
lessecho - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
lesskey - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
lex Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
limits Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
locale Add the comment "(FreeBSD only)" to the altmonth_x keywords 2009-10-07 21:14:45 +00:00
locate Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
lock Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
lockf - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
logger Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
login Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
logins Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
logname Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
look Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
lorder - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
lsvfs Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
m4 Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
mail Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
make Report lines that ought to contain a ':' operator but start with a '.' 2010-01-04 00:49:04 +00:00
makewhatis Modernize scandir(3) and alphasort(3) interfaces according to the IEEE 2010-01-04 15:40:17 +00:00
mesg Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
minigzip Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ministat Fix some warns - mainly signedness and unused variables. 2009-03-17 19:37:47 +00:00
mkdep - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
mkfifo Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
mklocale Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
mkstr Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
mktemp Use prototype for usage(). 2009-12-13 03:18:37 +00:00
mkuzip Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
msgs Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
mt - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
nc Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ncal Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
ncplist Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ncplogin - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
netstat Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
newgrp Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
newkey Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
nfsstat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
nice - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
nl Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
nohup Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
nslookup Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
nsupdate Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
objformat - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
opieinfo Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
opiekey Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
opiepasswd Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
pagesize - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
passwd Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
paste Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
pathchk - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
perror The output of perror(1) is now showing local messages for locales 2009-11-22 05:17:22 +00:00
pr Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
printenv Define extern **environ in global scope instead of in function. 2009-02-21 03:50:25 +00:00
printf Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
procstat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
quota In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
renice ANSIfy various tools in usr.bin/. 2010-01-02 10:09:20 +00:00
rev Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
revoke Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
rlogin Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
rpcgen Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
rpcinfo Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
rs - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
rsh Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
rup Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ruptime Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
rusers Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
rwall Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
rwho Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
script Remove a warning by adding extra parentheses. 2010-01-02 10:13:21 +00:00
sed Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
setchannel - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
shar - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
showmount ANSIfy various tools in usr.bin/. 2010-01-02 10:09:20 +00:00
smbutil Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
sockstat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
split When "-b" is specified, one could easily create "smaller" files 2009-01-24 05:32:11 +00:00
stat Let stat(1) use fdevname(3). 2009-02-11 20:36:17 +00:00
su Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
systat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
tabs - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
tail Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
talk Move unistd.h includes to individual .c files and remove unnecessary 2009-12-11 23:23:57 +00:00
tar Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
tcopy Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
tee Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
telnet Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
tftp Fix return code in the case of successful file transfer, broken in 2010-01-03 13:48:58 +00:00
time Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
tip - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
top Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
touch - If lstat()/stat() fails with an error other than ENOENT, don't ignore 2009-10-16 20:52:45 +00:00
tput Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
tr Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
true - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
truncate Initialize 'sz' as 0. 2009-02-21 03:42:31 +00:00
truss Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
tset Remove unnecessary termcap.h includes inherited from extern.h and other 2009-12-11 23:30:22 +00:00
tsort Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
tty - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
ul Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
uname - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
unexpand Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
unifdef Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
uniq Sync getline() with comm(1): 2009-12-17 17:03:47 +00:00
units - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
unvis - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
unzip Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
usbhidaction Revert most part of 200420 as requested, as more review and polish is 2009-12-13 03:14:06 +00:00
usbhidctl Use getprogname() instead of referencing __progname. 2009-06-23 23:16:00 +00:00
users Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
uudecode Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
uuencode Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
vacation Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
vgrind Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
vi Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
vis Use ANSI prototype for foldit(). 2009-12-13 04:14:55 +00:00
vmstat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
w Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
wall Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
wc Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
what - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
whereis Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
which - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
who Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
whois The 6bone was decommissioned on 6/6/06, so remove references to it. 2009-10-03 02:37:21 +00:00
write Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
xargs Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
xinstall Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
xlint Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
xstr - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
yacc Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
yes - Import the HEAD csup code which is the basis for the cvsmode work. 2008-10-19 08:41:10 +00:00
ypcat Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ypmatch Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
ypwhich Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
Makefile Connect unzip to the build. 2009-12-03 18:02:55 +00:00
Makefile.inc Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00