summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/perror.c
Commit message (Collapse)AuthorAgeFilesLines
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Make stdio deferred cancel-safe.Konstantin Belousov2017-06-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | If used with fopen(3)/fdopen(3)-ed FILEs, stdio accurately uses non-cancellable internal versions of the functions, i.e. it seems to be fine with regard to cancellation. But if the funopen(3) and f{r,w}open(3) functions were used to open the FILE, and corresponding user functions create cancellation points (they typically have no other choice), then stdio code at least leaks FILE' lock. The change installs cleanup handler which unlocks FILE. Some minimal restructuring of the code was required to make it use common return place to satisfy hand-rolled pthread_cleanup_pop() requirements. Noted by: eugen Reviewed by: eugen, vangyzen Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D11246 Notes: svn path=/head/; revision=320472
* Convert libc/stdio from K&R to ANSI CEd Maste2013-04-231-2/+1
| | | | | | | And add '__restrict' where it appeared in the header prototypes Notes: svn path=/head/; revision=249810
* Renumber clauses to reduce diffs to other versionsEd Maste2013-04-231-1/+1
| | | | | | | | | | NetBSD, OpenBSD, and Android's Bionic all number the clauses 1 through 3, so follow suit to make comparison easier. Acked-by: imp@ Notes: svn path=/head/; revision=249808
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Write the message to stderr, not file descriptor 2, so that perror()Tim J. Robbins2002-12-191-1/+7
| | | | | | | writes to the correct stream if stderr has been redirected with freopen(). Notes: svn path=/head/; revision=108090
* Use strerror_r() to format the error message so that strerror()'s staticTim J. Robbins2002-12-191-1/+4
| | | | | | | | | | | buffer does not get clobbered. ISO/IEC 9899:1999 7.21.6.2 3: "The implementation shall behave as if no library function calls the strerror function." Notes: svn path=/head/; revision=108089
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-2/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove 'register' keyword.David E. O'Brien2002-03-211-1/+1
| | | | Notes: svn path=/head/; revision=92889
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch Notes: svn path=/head/; revision=71579
* Check for a zero-length as well as a NULL string argument.Robert Nordier1998-10-291-1/+1
| | | | Notes: svn path=/head/; revision=40731
* perror () does not prepend ": " for the non-NULL argument "". close PR 1492Wolfram Schneider1996-09-301-1/+1
| | | | | | | | | | Submitted by: Kent Vander Velden <graphix@iastate.edu> Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=18577
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+67
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573