summaryrefslogtreecommitdiff
path: root/include/stdio.h
AgeCommit message (Collapse)Author
2009-11-09Fix the handle locking in stdio to use flockfile/funlockfileKurt Miller
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.
2009-10-22Back out previous commit, as it caused too much growth for the installPhilip Guenthe
media to fit
2009-10-21Fix the handle locking in stdio to use flockfile/funlockfilePhilip Guenthe
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@
2006-01-13Remove neither documented nor found in any spec ctermid_r() function - ctermid()Miod Vallat
is reentrant in its current implementation anyway. Surfing on the recent major version bump, ok millert@ deraadt@
2006-01-06Adapt things to use __type_t instead of _BSD_TYPE_T_Todd C. Miller
Add new sys/_types.h header Include machine/_types.h or sys/_types.h where applicable
2005-12-13First step in include files overhaul. Use __FOO_VISIBLE (as definedTodd C. Miller
in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace pollution issues, including the byte order defines. OK deraadt@
2005-05-11let vfscanf be a real function. Use a weak_alias on systems where thisMarc Espie
is feasible. Okay millert@ There's a major libc bump coming that is going to cover this as well...
2005-04-30Change internals of FILE: reuse the unget buffer field to access anMarc Espie
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.
2004-06-07major bump to libc and libpthread to break the dependency of aMarco S Hyman
particular implementation of libpthread for libc. libc no longer needs pthread.h to compile. OK millert@, brad@, tedu@
2003-08-01add __bounded__ attributes for userland headers; enabled with -WboundedAnil Madhavapeddy
ok deraadt@
2003-06-26backout the __bounded__ attributes for a while; requested by deraadt@Anil Madhavapeddy
2003-06-26Mark various standard library functions with the __bounded__ attribute.Anil Madhavapeddy
You must have an up-to-date gcc for this! deraadt@ ok
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2002-12-30Back out __EOF stuff and just use -1 in ctype.h. This is OK sinceTodd C. Miller
we don't want any user defines to change how the inlined ctype functions behave.
2002-12-29Don't define EOF In ctype.h, some 3rd party code checks whether orTodd C. Miller
not EOF is defined to determine if stdio.h has been included. Instead, use __EOF which should be OK wrt namespace safety.
2002-10-25NULL is now 0L so it is the same size as a pointer.Todd C. Miller
OK mickey@ and discussed with deraadt@
2002-02-19We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.Todd C. Miller
2002-02-17Manual cleanup of remaining userland __P use (excluding packages maintained ↵Todd C. Miller
outside the tree)
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-11-02attribute(format) no longer implies nonnull...Marc Espie
ok millert@ miod@
2001-09-04put changes back, this time ALL the files.Federico G. Schwindt
2001-08-30Back out fgsch@'s tree breaking commits.Todd T. Fries
Test next time, ok?
2001-08-30fix some const warningsFederico G. Schwindt
2000-12-06use __x__ formats for __attribute__ arguments; guenther@gac.eduTheo de Raadt
2000-03-04Make P_tmpdir point to /tmp/ not /var/tmpTodd C. Miller
Really, there should be a way to make configurable by the admin at runtime (say, a gettmpdir() function).
2000-02-22Use an _BSD_FOO_T_ type declaration for off_t in machine/ansi.h to allowTodd C. Miller
off_t to be visible in stdio.h even in strict ansi mode. This is needed for ftello()/fseeko() and it allows us to remove the horrible fpos_t hack.
2000-02-21Add fseeko() and ftello() -- versions of fseek() and ftell() that use off_t.Todd C. Miller
Also make fsetpos() and fgetpos() use fseeko() and ftello() respectively since fpos_t is actually a 64bit type.
1999-09-17Be thorough about NULL as __null for C++.Marc Espie
1998-11-20Add thread-safety to libc, so that libc_r will build (on i386 at least).David Leonard
All POSIX libc api now there (to P1003.1c/D10) (more md stuff is needed for other libc/arch/*) (setlogin is no longer a special syscall) Add -pthread option to gcc (that makes it use -lc_r and -D_POSIX_THREADS). Doc some re-entrant routines Add libc_r to intro(3) dig() uses some libc srcs and an extra -I was needed there. Add more md stuff to libc_r. Update includes for the pthreads api Update libc_r TODO
1997-11-29Add __attribute__ for asprintf.Todd C. Miller
1997-11-29Implement asprintf(3) and vasprintf(3) functions similar to theTodd C. Miller
ones in the glibc. Some man pages changes from FreeBSD (asprintf.c/vasprintf.c are not based on GNU or FreeBSD code).
1996-10-28Do not enable putc() macro implementation if _POSIX_SOURCE is defined;Thorsten Lockert
it is not fully compliant
1996-07-26export non-constipated sys_errlist[] to userlandTheo de Raadt
1996-07-25Partially revert back to the old behaviour of declaring sys_errlist here.Jason Downs
sys/errno.h can declare it as well.
1996-05-01typo in __STRICT_ANSI__Theo de Raadt
1996-03-24Prefix "long long" with "/* LONGLONG */" to shut up lint(1)Thorsten Lockert
1996-01-29from netbsd; move sys_nerr/sys_errlist decls to errno.hTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt