summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
AgeCommit message (Collapse)Author
2021-02-07Pull up following revision(s) (requested by jdolecek in ticket #1198):martin
lib/libc/stdio/fread.c: revision 1.24 (via patch) for unbuffered I/O arrange for the destination buffer to be filled in one go, instead of triggering long series of 1 byte read(2)s; this speeds up fread() several order of magnitudes for this case, directly proportional to the size of the supplied buffer change adapted from OpenBSD rev. 1.19 fixes PR lib/55808 by Roland Illig
2019-09-05Pull up following revision(s) (requested by sevan in ticket #174):martin
lib/libc/sys/chmod.2: revision 1.48 lib/libc/sys/stat.2: revision 1.59 lib/libc/sys/unlink.2: revision 1.30 lib/libc/sys/lseek.2: revision 1.25 lib/libc/sys/getuid.2: revision 1.18 lib/libc/sys/chown.2: revision 1.37 lib/libm/man/exp.3: revision 1.32 lib/libm/man/log.3: revision 1.7 lib/libc/sys/open.2: revision 1.60 lib/libc/stdio/fopen.3: revision 1.36 lib/libc/stdio/putc.3: revision 1.14 lib/libc/sys/mount.2: revision 1.51 share/man/man9/copy.9: revision 1.22 share/man/man9/uiomove.9: revision 1.20 lib/libc/sys/setuid.2: revision 1.23 lib/libc/sys/close.2: revision 1.18 sbin/init/init.8: revision 1.61 lib/libc/sys/write.2: revision 1.36 lib/libc/sys/read.2: revision 1.39 sbin/init/init.8: revision 1.62 lib/libc/sys/wait.2: revision 1.40 usr.bin/tty/tty.1: revision 1.10 lib/libc/sys/link.2: revision 1.33 usr.bin/du/du.1: revision 1.24 lib/libc/stdlib/exit.3: revision 1.17 usr.bin/su/su.1: revision 1.53 usr.bin/mail/mail.1: revision 1.66 lib/libc/sys/fork.2: revision 1.25 usr.bin/su/su.1: revision 1.54 usr.bin/mail/mail.1: revision 1.67 lib/libm/man/sin.3: revision 1.15 share/man/man9/intro.9: revision 1.26 share/man/man5/utmp.5: revision 1.17 lib/libc/compat-43/creat.3: revision 1.17 lib/libc/time/ctime.3: revision 1.61 lib/libcompat/4.1/stty.3: revision 1.10 usr.bin/dc/dc.1: revision 1.3 lib/libm/man/cos.3: revision 1.17 lib/libc/sys/chdir.2: revision 1.23 lib/libc/gen/exec.3: revision 1.30 lib/libc/gen/exec.3: revision 1.31 games/bcd/bcd.6: revision 1.18 games/bcd/bcd.6: revision 1.19 usr.bin/write/write.1: revision 1.7 usr.bin/wc/wc.1: revision 1.18 usr.bin/pr/pr.1: revision 1.24 usr.bin/who/who.1: revision 1.25 lib/libc/sys/mkdir.2: revision 1.30 lib/libc/stdio/getc.3: revision 1.13 usr.bin/sort/sort.1: revision 1.40 usr.bin/mesg/mesg.1: revision 1.11 share/man/man5/passwd.5: revision 1.34 sort was there since v1 https://www.bell-labs.com/usr/dmr/www/man61.pdf dc was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf du was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf mail was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf mesg was in v1 https://www.bell-labs.com/usr/dmr/www/man12.pdf Document history https://www.bell-labs.com/usr/dmr/www/man13.pdf su was in v1 https://www.bell-labs.com/usr/dmr/www/man13.pdf Document history https://www.bell-labs.com/usr/dmr/www/man13.pdf Document history https://www.bell-labs.com/usr/dmr/www/man14.pdf Update URL write was in v1 https://www.bell-labs.com/usr/dmr/www/man14.pdf grammar passwd(5) was in v1 https://www.bell-labs.com/usr/dmr/www/man51.pdf utmp(5) was present in v1 https://www.bell-labs.com/usr/dmr/www/man51.pdf Earliest version of wtmp I could find was in v3 https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5 Document history of chdir(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of chmod(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of chown(2) https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf create was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history of exec() Move statement on execlpe() & execvpe() to HISTORY section. Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf fork was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf stat() was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf document history of fstat() https://www.bell-labs.com/usr/dmr/www/man21.pdf getuid was present in v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf Document history https://www.bell-labs.com/usr/dmr/www/man21.pdf stty & gtty were around since v1 https://www.bell-labs.com/usr/dmr/www/man21.pdf https://www.bell-labs.com/usr/dmr/www/man22.pdf mount & umount were present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf Open was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf read was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf seek was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf setuid was in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf unlink was presen in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf wait was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf write was present in v1 https://www.bell-labs.com/usr/dmr/www/man22.pdf start documenting history exp was present in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf log appeared in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf putc & putw were in v1 https://www.bell-labs.com/usr/dmr/www/man31.pdf putchar was in v4 https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3 Start documenting history https://www.bell-labs.com/usr/dmr/www/man31.pdf Document history. https://www.bell-labs.com/usr/dmr/www/man11.pdf Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which version, hence I've skipped mentioning it. End sentence with a dot. Remove superfluous Pp. Remove superfluous Pp. Remove superfluous Ns. Remove superfluous Pp. fetch(9) -> ufetch(9) fetch(9) -> ufetch(9). Remove superfluous Pp. fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
2019-03-21Minor markup and wording fixes.uwe
2019-01-23remove diag assert - the compiler demands fp is non NULL now.mrg
2018-12-14Don't leave a subordinate clause out in the cold.uwe
2018-12-14Fix typo in the function comment.uwe
2018-07-04Indent.msaitoh
2018-02-22Remove extra "an"pgoyette
Thanks to J. Lewis Muir
2018-02-20Markup "stdin".uwe
2018-02-20Make the list of STDBUF values and the list of mode values congruentuwe
in formatting and spelling.
2018-02-20Use semantic markup.uwe
2018-02-20Remove ineffective macros and arguments.wiz
2018-02-20Improve the setbuf(3) man-pagekamil
Move historical lines to newly added HISTORY section. Additional historical notes obtained from OpenBSD.
2018-02-04fixes for GCC 6:mrg
- -Wstrict-prototypes is not available for C++, so don't try to ignore it for C++. - remove many _DIAGASSERT() checks against not NULL for functions with arguments with nonnull attributes. in two cases, leave code behind that should set defaults to "(null)". - use -Wno-error=frame-address for i386 mcount, as it seems valid to assume the caller will have a frame.fair
2018-01-17Revert to commits as they broke few rump testskamil
"Include namespace.h in a few of libc source files [...] This change finishes elimination of usage of the global name of the following symbols: - close -> _close - execve -> _execve - fcntl -> _fcntl - setcontext -> _setcontext - wait6 -> _wait6 - write -> _write - writev -> _writev" "Register more syscalls in namespace.h (of libc) Add weak symbols for: - fcntl - close - execve - setcontext - wait6 - write - writev" These changes broke: fs/nfs/t_rquotad:get_nfs_be_1_both fs/nfs/t_rquotad:get_nfs_be_1_group fs/nfs/t_rquotad:get_nfs_be_1_user fs/nfs/t_rquotad:get_nfs_le_1_both fs/nfs/t_rquotad:get_nfs_le_1_group fs/nfs/t_rquotad:get_nfs_le_1_user lib/librumphijack/t_config:fdoff lib/librumphijack/t_tcpip:http lib/librumphijack/t_tcpip:nfs lib/librumphijack/t_vfs:cpcopy lib/librumphijack/t_vfs:mv_x lib/librumphijack/t_vfs:paxcopy net/net/t_forwarding:ipforwarding_fastforward_v4 net/net/t_forwarding:ipforwarding_fastforward_v6 net/net/t_forwarding:ipforwarding_fragment_v4 net/net/t_forwarding:ipforwarding_misc net/net/t_mtudisc6:mtudisc6_basic This revert fixes the failures, except lib/librumphijack/t_vfs. The original changes were added in order to facilitate a usage of sanitizers against programs linked with NetBSD's libc. It is no longer needed, so abandon these changes. Sponsored by <The NetBSD Foundation>
2018-01-05Include namespace.h in a few of libc source fileskamil
The NetBSD Standard C Library uses internally some of its functions with a mangled symbol name, usually "_symbol". The internal functions shall not use the global (public) symbols. This change finishes elimination of usage of the global name of the following symbols: - close -> _close - execve -> _execve - fcntl -> _fcntl - setcontext -> _setcontext - wait6 -> _wait6 - write -> _write - writev -> _writev Sponsored by <The NetBSD Foundation>
2017-12-31Fix plurals.dholland
2017-11-09Add O_REGULAR to enforce opening of only regular fileschristos
(like we have O_DIRECTORY for directories). This is better than open(, O_NONBLOCK), fstat()+S_ISREG() because opening devices can have side effects.
2017-11-04Be more consistent with how we refer to fopen() - pointed out by wiz@kre
2017-11-04Some (mostly minor) wording improvements (IMO)kre
2017-11-04Fix xref. Remove Tn.wiz
2017-11-04Avoid losing a fd (ie: close it) in the (ever so likely) case that thekre
fd exceeds the limits of what can be stored in a FILE (65535).
2017-11-04Implement nofollow (l) for fopen(3).christos
2017-10-25Remove comma after last Nm entryabhinav
2017-07-30Bump date for previous.wiz
2017-07-30According to POSIX return value of fputs(3) should be a non-netagive value ↵cheusov
if it succeeds
2017-07-11A more correct fix for PR standards/52282.perseant
2017-07-10Do not use thousands grouping when none is specified by the locale.perseant
Fixes PR standards/52282.
2017-07-03Remove workaround for ancient HTML generation code.wiz
2017-06-08Don't use "NULL" to talk about null-terminated strings.uwe
The C standard seems to be inconsistent about dash vs. space. Old text uses dash, Annex K uses space. I'll let wizd(8) to sort that out.
2017-02-22Add reference to flockfile(3) in SEE ALSO section.abhinav
2017-02-22Fix a sentence.abhinav
Add write(2) in SEE ALSO.
2017-02-21Insert comma between two Nm entries.abhinav
Replace Nm with Fn to refer a function.
2017-01-12undo SSP damage from -Wsystem-headerschristos
2017-01-10include <sys/stat.h>christos
2017-01-10add linted commentchristos
2017-01-10Need <sys/stat.h>christos
2017-01-01Fix sentences at a couple of places.abhinav
Reorganize the RETURN VALUES section a bit to improve readability. Add xrefs to clearerr(3) and ungetc(3) in SEE ALSO. Bump date. ok wiz@
2016-12-29Mention stdarg.h for va_list.wiz
2016-10-23PR/51572: calling funopen on each printw call is a tad excessive, but thischristos
is not a reason for funopen to leak. Always call the close function since we are indirecting through our cookie and we need to free it.
2016-08-27Improvements to fgetwln(3) from Andrey Chernov:christos
1) Set the stdio error indicator on __slbexpand() failure. 2) fgetwc(3) may succeed even when ferror(3) is already set (for example, consider a program using SIG_IGN on SIGTTIN, reading from the tty while in the background, getting EIO, then coming to the foreground and reading again). So do not force fgetwln(3) to fail in such a case either. (Yes, the program should probably clearerr(3) before reading again, but let's be nicer in case it forgets.)
2016-08-22missing _christos
2016-08-22From OpenBSD:christos
bugfix: when fgetwc(3) fails, fgetwln(3) must fail as well;
2016-04-06improve usagedholland
2015-12-29Add printf/scanf man pages from FreeBSDchristos
2015-11-19Remove duplicated 'i' from list of numeric formatspgoyette
2015-09-06add a bunch of functions found in <stdio.h> that weren't listed here.mrg
(this list may still be incomplete.)
2015-09-06English grammar nit: there's only one function described in this man pagepgoyette
2015-09-06Improve the short description.dholland
2015-09-06SEE ALSO fmemopen(3)dholland