summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/freopen.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* two more syscall == -1 checksderaadt2019-06-291-3/+3
|
* Delete casts to off_t and size_t that are implied by assignmentsguenther2016-09-211-2/+2
| | | | | | | or prototypes. Ditto for some of the char* and void* casts too. verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@
* Add framework for resolving (pun intended) libc namespace issues, usingguenther2015-08-311-1/+2
| | | | | | | | | | | | wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here. tests clean on i386, amd64, sparc64, powerpc, and mips64 naming feedback from kettenis@ and millert@ ok kettenis@
* Add additional userland interfaces for setting close-on-exec on fdsguenther2014-08-311-2/+2
| | | | | | | | | | | | | when creating them: mkostemp(), mkostemps(), the 'e' mode letter for fopen(), freopen(), fdopen(), and popen(). The close-on-exec flag will be cleared by the action created by posix_spawn_file_actions_adddup2(). Also, add support for the C11 'x' mode letter for fopen() and freopen(), setting O_EXCL when possibly creating files. Note: this requires kernel support for pipe2() and dup3()! ok millert@
* Fix the handle locking in stdio to use flockfile/funlockfilekurt2009-11-091-1/+6
| | | | | | | | | | | | | internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. committing on behalf of and okay guenther@ now that we have install media space available.
* Back out previous commit, as it caused too much growth for the installguenther2009-10-221-6/+1
| | | | media to fit
* Fix the handle locking in stdio to use flockfile/funlockfileguenther2009-10-211-1/+6
| | | | | | | | | | | | internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. ok kurt@, earlier version tested by sthen@ and jj@
* _file is only a short, so prevent truncation if we happen to hitotto2008-04-211-1/+9
| | | | | upon a fd > SHRT_MAX. From freebsd via Jan Schaumann; ok deraadt@ millert@ espie@
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* next citrus step.espie2005-06-171-1/+2
| | | | | reviewed by millert, otto, kevlo, naddy, kettenis... libc+libstdc++ bump
* Change internals of FILE: reuse the unget buffer field to access anespie2005-04-301-2/+2
| | | | | | | | | | | | | | | | extended attribute data structure (pimpl idiom). Idea taken from citrus. Much discussion with deraadt@, otto@, millert@... This is the least disruptive way to extend FILE, since its size can't really change without this being a flag day. So the size doesn't change. Actual additions to the structure will come in separate steps, since this change is nasty enough on its own. Tests by otto@ and others, careful reading of code by otto@ and millert@. This is definitely a major bump, and has been checked to not impact a full ports build.
* deregister + ansify, no change in object code. ok deraadt@ millert@otto2004-09-281-5/+3
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* fix append mode; mason@primenet.com.auderaadt1998-11-101-1/+12
|
* Fix RCS idstholo1996-08-191-6/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* torek fix to close old descriptor silentlyderaadt1996-05-101-3/+3
|
* initial import of NetBSD treederaadt1995-10-181-0/+160