summaryrefslogtreecommitdiff
path: root/include/stdio.h
AgeCommit message (Collapse)Author
2010-02-25Consistently use __printflike and __scanflike.joerg
2010-01-11Use a proper char */size_t pair in __sfileext to keep track of the linejoerg
buffer for fgetln and fgetwln. Simplifies code by dropping the INT_MAX related logic. Drop conditionals around FREELB, free(NULL) is valid.
2009-07-13Add implementations for getdelim(3) and getline(3).roy
2008-09-21add missing attributes to the remaining calls, even the ones that gcc haschristos
builtin attributes for (for symmetry and consistency). In the future this might change to use compiler-neutral macros. On the other hand I don't know of any other compiler that provides other macros with similar functionality, so why bother?
2008-08-04Add _POSIX_HOST_NAME_MAX and _POSIX_SYMLOOP_MAX to <limits.h> and add somematt
references to them in <sys/param.h> in <stdio.h> also export v*scanf when _ISOC99_SOURCE is defined From andy dot shevchenko at gmail dot com.
2008-03-13Since _file is a short, check that the fd fits in it, otherwise bail withchristos
EMFILE. We treat _file as an unsigned short to double our range, with a special case for -1 (closed). Make a note of what we should do about stdio if we ever bump libc. We could change _file in the future compatibly to an int by putting it in the extension space but for now we don't bother.
2007-08-02Do not include SSP files unless _FORTIFY_SOURCE > 0.kristerw
2007-05-30Match usage of FORTIFY_SOURCE on other platforms by not requiring specialtls
include path: the normal header files now include the "SSP" ones (which one should note are not really named right: SSP and FORTIFY_SOURCE are independent features). Disable USE_SSP on targets where the compiler doesn't support it at all (mips, alpha) or it's known broken (sh3). But enable FORTIFY_SOURCE, without SSP, on those platforms -- tested on mipsel.
2007-02-02remove __SAFEchristos
2006-12-09defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&bjh21
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no need to check both of them.
2006-11-22Don't expose _ss functions for 4.0. Requested by core.christos
2006-10-27- flags should be unsigned short instead of short.christos
- add __SAFE flag, to indicate that we want async-signal-safe functionality only. - add snprintf_ss, and vsnprintf_ss; these are undocumented on purpose.
2006-05-10add __BEGIN_DECLS/__END_DECLS around snprintf() & vsnprintf() prototypes.mrg
2005-12-27inline -> __inline for selected things (specifically, the headerperry
file is POSIX visible and the usage isn't #ifdef _KERNEL) Discussed with core. I may need to go farther than this but for now compilations done with gcc -ansi (i.e. firefox) will be okay.
2005-12-24Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.perry
2005-05-25Include <sys/ansi.h> after <sys/cdefs.h>; from Neil Booth in PR lib/30072.kleink
2005-05-25Belatedly move snprintf() and vnsnprintf() into the XPG4.2/C99 section.kleink
2005-05-25Add restrict qualifiers to fopen()/freopen() arguments.kleink
2005-02-09A little libc namespace housekeeping exercise:kleink
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked(). * Add internal names for arc4random(), endnetpath(), fhstatvfs(), fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(), uuid_create_nil(), uuid_is_nil(), and wcwidth(). * Include namespace.h where supposed to.
2005-02-03de-__P -- the hack is long since useless. Discussed with christos,perry
matt, kleink, others. Approved by christos.
2004-07-01Tidy up the namespace: lint -> __lint__.kleink
2004-05-10remove fgetstr() from public sightdrochner
2004-04-21add fgetstrchristos
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-06-05P_tmpdir isn't in POSIX, so only define it for _XOPEN_SOURCE andbjh21
_NETBSD_SOURCE.
2003-04-28Add a new feature-test macro, _NETBSD_SOURCE. If this is definedbjh21
by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. <sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week.
2003-02-27As with _REENTRANT, don't provide simple non-locking macro versions ofkleink
several functions when _PTHREADS is defined (usually via cc -pthread).
2003-01-18avoid TMP_MAX redefinitionchristos
2003-01-18Merge the nathanw_sa branch.thorpej
2002-12-20Spelling police. "__resitrct" was not spelled cirectly enough.atatat
2002-11-30- Migrate fparseln(3) from libutil to libc, where it should have been inlukem
the first place... - Bump libutil major (to 7.0) and libc minor (to 12.91).
2002-05-24* Move the prototype of __svfscanf from <stdio.h> to libc/stdio/local.h.thorpej
* Add prototype for vfscanf to <stdio.h>. * Remove #define of vfscanf to __svfscanf from <stdio.h>. * Include local.h in libc files which need __svfscanf. * Add vfscanf weak alias to __svfscanf. Fixes standards/16997. NOTE: libc minor not bumped -- ride on the bump to 12.84 made by itojun today.
2002-05-24Parameterize the vfscanf macro's arguments. Without them, 3rd partythorpej
software can become greatly confused. This fixes 4 GCC 3.2 testsuite failures. This is a stop-gap measure which can be easily applied to the 1.6 release branch. A different fix for the trunk is forthcoming.
2002-05-24Add a scanf format attribute to __svfscanf().thorpej
2001-12-07- make FILE structure extensible without breaking binary-compatibility.yamt
- add fputwc, fgetwc, fwide and related functions. - add hooks needed to maintain the orientation of file stream.
2000-12-29Sprinkle some __restrict into stdio.kleink
2000-12-18protect against multiple declarations.christos
2000-11-15Move fmtcheck() prototype to stdio.h. It makes more sense to declare itbriggs
with the formatting functions with which it is meant to be used. Thanks to Klaus Klein for "encouraging" me to make this change.
2000-07-28Avoid recursion with traditional cpp.kleink
2000-07-23This is a HACK so that libc can compile with -ansi.mycroft
2000-07-16- Fix couple of typos.enami
- Protect some func. decls. added recently with __{BEGIN,END}_DECLS.
2000-07-15fix obvious typodrochner
2000-07-08XCU5: Add fseeko() and ftello() functions which provide the functionality ofkleink
fseek() and ftell(), respectively, but operate on file offsets of type off_t.
2000-06-26Get rid of the inclusion of <sys/types.h> and define fpos_t using __off_t.kleink
2000-01-10Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due tokleink
std C headers including it, and a kernel module written in C++ would benfit as well.
1999-12-22For the benefit of G++'s null pointer constant implementation, #define NULLkleink
as __null with egcs 1.0 (GCC 2.90) and above. As several headers are affected by this change, move the definition into a new header file, <null.h>, to ease maintenance.
1998-11-20* Bring *_unlocked() declarations in scope if _REENTRANT is defined, too; addkleink
similar protection for the definitions of the macro versions. * Don't define a macro version of fileno() in a _REENTRANT environment.
1998-09-28Move 1003.1c-1995 declarations inside the appropriate name space protectionkleink
wrapper, and make sure we won't use these decl's as such with C++ linkage(!). Also, make _XOPEN_SOURCE protection of popen()/pclose() decl's a bit more restrictive.
1998-08-28Use __format__, __printf__ for consistencytv
1998-08-28add asprintf and vasprintf, originally written by Todd Miller for OpenBSDperry