summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/Makefile.inc
Commit message (Collapse)AuthorAgeFilesLines
* Add dprintf() and vdprintf() from POSIX.1-2008. Like getline(),das2009-03-041-4/+5
| | | | | | dprintf() is a simple wrapper around another function, so we may as well implement it. But also like getline(), we can't prototype it by default right now because it would break too many ports.
* - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(),das2009-02-281-3/+5
| | | | | | | | | | | | wcscasecmp(), and wcsncasecmp(). - Make some previously non-standard extensions visible if POSIX_VISIBLE >= 200809. - Use restrict qualifiers in stpcpy(). - Declare off_t and size_t in stdio.h. - Bump __FreeBSD_version in case the new symbols (particularly getline()) cause issues with ports. Reviewed by: standards@
* Reduce the level of duplication between vfprintf() and vfwprintf()das2008-06-291-1/+2
| | | | | | by moving the positional argument handling code to a new file, printf-pos.c, and moving common definitions to printflocal.h. No functional change intended.
* Next round of stdio changes: Remove all inlining of stdio operations andjhb2008-05-021-1/+1
| | | | | | | | | | | | | | | | move the definition of the type backing FILE (struct __sFILE) into an internal header. - Remove macros to inline certain operations from stdio.h. Applications will now always call the functions instead. - Move the various foo_unlocked() functions from unlocked.c into foo.c. This lets some of the inlining macros (e.g. __sfeof()) move into foo.c. - Update a few comments. - struct __sFILE can now go back to using mbstate_t, pthread_t, and pthread_mutex_t instead of knowing about their private, backing types. MFC after: 1 month Reviewed by: kan
* Add fcloseall() to libc. This removes the need to export _cleanup().deischen2006-04-221-3/+4
| | | | | | Linux also provides an fcloseall() implementation. Discussed on: arch
* Add each directory's symbol map file to SYM_MAPS.deischen2006-03-131-0/+2
|
* Make the %V{is} extension handle a NULL pointer like %s does: output "(null)"phk2006-01-251-1/+2
| | | | | | | | | | | | | Add %M{essage} extension which prints an errno value as the corresponding string if possible or numerically otherwise. It is not currently possible to do the syslog(3) like %m extension because errno would need to get capatured on entry to the first function in the printf family, so %M requires you to supply errno as an argument. Add %Q{uote} extension which will print a string in double quotes with appropriate back-slash escapes (only) if necessary.
* Add an extensible version of our *printf(3) implementation to libcphk2005-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on probationary terms: it may go away again if it transpires it is a bad idea. This extensible printf version will only be used if either environment variable USE_XPRINTF is defined or one of the extension functions are called. or the global variable __use_xprintf is set greater than zero. In all other cases our traditional printf implementation will be used. The extensible version is slower than the default printf, mostly because less opportunity for combining I/O operation exists when faced with extensions. The default printf on the other hand is a bad case of spaghetti code. The extension API has a GLIBC compatible part and a FreeBSD version of same. The FreeBSD version exists because the GLIBC version may run afoul of our FILE * locking in multithreaded programs and it even further eliminate the opportunities for combining I/O operations. Include three demo extensions which can be enabled if desired: time (%T), hexdump (%H) and strvis (%V). %T can format time_t (%T), struct timeval (%lT) and struct timespec (%llT) in one of two human readable duration formats: "%.3llT" -> "20349.245" "%#.3llT" -> "5h39m9.245" %H will hexdump a sequence of bytes and takes a pointer and a length argument. The width specifies number of bytes per line. "%4H" -> "65 72 20 65" "%+4H" -> "0000 65 72 20 65" "%#4H" -> "65 72 20 65 |er e|" "%+#4H" -> "0000 65 72 20 65 |er e|" %V will dump a string in strvis format. "%V" -> "Hello\tWor\377ld" (C-style) "%0V" -> "Hello\011Wor\377ld" (octal) "%+V" -> "Hello%09Wor%FFld" (http-style) Tests, comments, bugreports etc are most welcome.
* Add fgetwln(), a wide character version of fgetln().tjr2004-07-161-2/+4
|
* Document clearerr_unlocked(), feof_unlocked(), ferror_unlocked()tjr2003-01-101-1/+4
| | | | and fileno_unlocked().
* Add a manual page for flockfile(), ftrylockfile(), and funlockfile().tjr2003-01-101-1/+3
|
* Document getc_unlocked(), getchar_unlocked(), putc_unlocked(),tjr2003-01-101-2/+4
| | | | and putchar_unlocked().
* Add function versions of getchar_unlocked(), getc_unlocked(),tjr2003-01-101-1/+2
| | | | | | putchar_unlocked(), putc_unlocked(), feof_unlocked(), ferror_unlocked(), clearerr_unlocked(), and fileno_unlocked(). The first four are required by POSIX. The rest are provided for consistency.
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-3/+1
|
* Backout "compatibility hack" for __sF.alfred2002-11-041-4/+0
| | | | Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter)
* Provide a hook to make __sF visible outside of libc for commercial appsalfred2002-11-021-0/+4
| | | | | | if WANT_COMPAT4_STDIO is defined when compiling libc. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
* Add implementations of wscanf() and related functions: fwscanf(), swscanf(),tjr2002-09-231-6/+11
| | | | | vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide- character versions of the scanf() family of functions.
* Add implementations of the wprintf() family of functions, which performtjr2002-09-211-4/+8
| | | | formatted wide-character output.
* Unbreak one of the most confusing breaks of the tree I've seen.phk2002-08-131-1/+2
| | | | The last commit cannot possibly have been tested.
* Tidy up SRCS and MAN assignments.tjr2002-08-131-20/+13
|
* Basic support for wide character I/O: getwc(), fgetwc(), getwchar(),tjr2002-08-131-9/+18
| | | | putwc(), fputwc(), putwchar(), ungetwc(), fwide().
* MAN[1-9] -> MAN.ru2001-03-271-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add mkstemps to the man page, and create a link for it.imp1999-04-041-2/+2
| | | | | Obtained from: OpenBSD Poked in the eye about committing new functions without a manpage: obrien
* Fixed disordering and incoinsistent style in previous commit.bde1999-03-051-3/+3
|
* Added functions fseeko() and ftello() (from susv2).dt1999-02-081-1/+2
| | | | | | | Fixed fgetpos() and fsetpos() for offsets > 2GB. PR: 8637 Submitted by: Dan Nelson <dnelson@emsphone.com> (adjusted by me a little)
* Remote the NetBSD kludge for vfprintf.cjb1998-05-081-9/+2
|
* Add FILE locking stubs for libc.jb1998-04-111-3/+11
| | | | | | | | Change the FILE locking to support kernel threads when linked with libpthread (which you haven't see yet). This requires that libc become thread-safe and thread-aware, testing __isthreaded before attempting to do lock/unlock calls. The impact on non-threaded programs is minor. This change works with libc_r, so it's the best compromise.
* Fixed disordering and inconsistent style in previous commit.bde1998-03-121-3/+2
|
* Many security improvements from OpenBSD:imp1998-02-131-1/+2
| | | | | | | | | | | implement mkdtemp improve man page for mk*temp use arc4random to seed extra XXX's randomly Optionally warn of unsafe mktemp uses From various commits by theo de raadt and Todd Miller. Obtained from: OpenBSD This should go into 2.2 after a testing period.
* Sorted lists.bde1997-10-211-3/+5
|
* Removed the subdirectory paths from the definitions of MAN[1-9]. Theybde1997-10-151-7/+4
| | | | | were a workaround for limitations in bsd.man.mk that were fixed about 2 years ago.
* Changed all paths to be relative to src/lib instead of src/lib/libcjb1997-05-031-2/+5
| | | | | | | | | | so that all these makefiles can be used to build libc_r too. Added .if ${LIB} == "c" tests to restrict man page builds to libc to avoid needlessly building them with libc_r too. Split libc Makefile into Makefile and Makefile.inc to allow the libc_r Makefile to include Makefile.inc too.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix bogus MLINKS line from vasprintf change.jkh1996-05-291-2/+2
|
* add manpage linkswosch1996-05-291-1/+2
| | | | | asprintf.3 -> printf.3 vasprintf -> printf.3
* Add an implementation of the gnu-ish asprintf() and vasprintf(). They arepeter1996-05-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | not based on gpl'ed code, just prototype and usage. I'm not 100% certain they behave the same while the system is in trouble (eg: malloc() failing) but in those circumstances all bets would be off anyway. These routines work like sprintf() and vsprintf(), except that instead of using a fixed buffer, they allocate memory and return it to the user and it's the user's responsibility to free() it. They have allocate as much memory as they need (and can get), so the size of strings it can deal with is limited only by the amount of memory it can malloc() on your behalf. There are a few gpl'ed programs starting to use this interface, and it's becoming more common with the scares about security risks with sprintf(). I dont like the look of the code that the various programs (including cvs, gdb, libg++, etc) provide if configure can't find it on the system. It should be possible to modify the stdio core code to provide this interface more efficiently, I was more worried about having something that worked and was secure. :-) (I noticed that there was once intended to be a smprintf() routine when our stdio was written for 4.4BSD, but it looks pretty stillborn, and it's intended interface is not clear). Since Linux and gnu libc have this interface, it seemed silly to bring yet another one onto the scene.
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* First crack at making libc work with the new make macros. It compiles onwollman1994-08-051-3/+5
| | | | | my machine, and a simple static (genassym) and shared (sysctl) executable both work. Still to be done: RPCand YP merge.
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+38
OpenPOWER on IntegriCloud