summaryrefslogtreecommitdiff
path: root/include/dirent.h
AgeCommit message (Collapse)Author
2016-09-09Move the 10 (!) defintions of NULL to their own mini header file andTodd C. Miller
update the NULL definition for C++11. OK deraadt@ guenther@ kettenis@
2013-12-13Zap some getdirentries() leftovers.Vadim Zhukov
okay guenther@
2013-08-16Tweak the getdents() kernel prototype to use "void *"Philip Guenther
Provide a declaration for userspace Fix the kernel's sanity check on the buflen argument lack of prototype pointed out by sthen@ and landry@ ok kettenis@ otto@
2013-06-02XPG 4 apparently exposed d_ino and ino_t. Also, always pull inPhilip Guenther
<sys/_types.h> for the internal types ok matthew@
2013-03-24I can see no reason for #ifndef _KERNEL check in a /usr/includeTheo de Raadt
(ie. non-kernel) .h file
2012-11-29Change scandir()'s 'select' argument fromPhilip Guenthe
int (*)(struct dirent *) to int (*)(const struct dirent *) to match POSIX. ok millert@, ports check by naddy@
2012-03-24Provide the old prototypes for scandir() and alphasort() for code thatPhilip Guenthe
requests the pre-standardized version requested by millert@
2012-03-22Make DIR a private type within libc, give it the same underlyingMatthew Dempsky
typedef regardless of __BSD_VISIBLE, and eliminate the dirfd() macro. ok guenther@
2012-03-22Update alphasort() and scandir()'s argument types to match POSIX:Philip Guenthe
use "const struct dirent **" instead of "const void *". Also, add __restrict to readdir_r(). ok matthew@
2012-03-22Add dirfd() as a function to libc per POSIX requirement; dirfd() macroMatthew Dempsky
to be pruned later when DIR is made an opaque type. ok guenther@; prodding by brad@ for VLC and other ports
2011-07-18Expose a bunch of new functionality from POSIX 2008: openat(2),Matthew Dempsky
fchmodat(2), fstatat(2), mkdirat(2), mkfifoat(2), mknodat(2), faccessat(2), fchownat(2), linkat(2), readlinkat(2), renameat(2), symlinkat(2), unlinkat(2), utimensat(2), futimens(2), and fdopendir(3). "Minor" libc bump. Tested in a bulk build by naddy@ Much help from guenther@, thib@, tedu@, oga@, and others. ok deraadt@, naddy@
2011-07-14__opendir2, DTF_NODUP, and __DTF_READALL can die. struct direntTheo de Raadt
dd_flags is renamed to the placeholder position dd_unused so that we can spot "broken software" which assumes we have Jan Simon Pendry's union mounts (we don't have them, and won't have them ever again). __opendir2 question spotted by matthew verified to not break ports by sthen
2011-07-03As pointed out by Richard Guenther our definitionJonathan Gray
of NULL was incorrect for c++ compilers that aren't gcc (or pretend to be gcc like clang). ok miod@
2011-04-06Define NULL as a void * instead of a long integer, as required by Single Unix.Miod Vallat
Kernel and bootblocks still use the old 0L value until all the NULL abuses in the code are fixed.
2010-12-31Standards compliance: expose dirfd with XPG7 and scandir and alphasortPhilip Guenthe
with POSIX 2008 ok millert@
2010-10-28Change basep parameter of getdirentries() to be off_t *, not long *Todd C. Miller
so it works correctly with large offsets (and matches other systems). This requires adding a new getdirentries syscall, with the old one renamed to ogetdirentries. All in-tree consumers of getdirentries() have been updated. Bump libc and libpthread major numbers. OK and with deraadt@
2007-06-05_FD_LOCK/UNLOCK() is libpthread specific and not needed for librthread, soKurt Miller
isolate its usage to libpthread only and replace with generic non-static mutex support in the one place it is needed: - remove _FD_LOCK/UNLOCK from lseek and ftruncate in libc and make the functions weak so that libpthread can override with its own new versions that do the locking. - remove _thread_fd_lock/unlock() weak functions from libc and adjust libpthread for the change. - add generic _thread_mutex_lock/unlock/destroy() weak functions in libc to support non-static mutexes in libc and add libpthread and librthread implementations for them. libc can utilize non-static mutexes via the new _MUTEX_LOCK/UNLOCK/DESTROY() macros. Actually these new macros can support both static and non-static mutexes but currently only using them for non-static. - make opendir/closedir/readdir/readdir_r/seekdir/telldir() thread-safe for both thread libraries by using a non-static mutex in the struct _dirdesc (typedef DIR), utilizing it in the *dir functions and remove remaining and incorrect _FD_LOCK/UNLOCK() use in libc. - add comments to both thread libraries to indicate libc depends on the current implementation of static mutex initialization. suggested by marc@ - major bump libc and libpthread due to function removal, structure change and weak symbol conversions. okay marc@, tedu@
2007-02-08g/c __DTF_READALL. It was a flag to the internal __opendir2() butTodd C. Miller
is never set now that the unionfs support has been removed from readdir(). OK pedro@
2006-04-01- Plug huge mem leak; mostly samba was suffering.Otto Moerbeek
- Fix semantics: seekdir(pos); telldir() shoud return pos. The code that implements this will be made faster in a later commit. - We loose documented behaviour (after closedir() the telldir() positions are not valid anymore). This was never in Posix, and most other systems have nothing like it. Diff originally from Paul Thorn, rewritten by me using some FreeBSD code. "slap it in" deraadt@
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-06-18Remove remaining whiteout tentacles; OK deraadt@ miod@ weingart@Todd C. Miller
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-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-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.
1999-09-17Be thorough about NULL as __null for C++.Marc Espie
1999-06-11Define NULL to be __null for C++: better quality of implementation.Marc Espie
__null is a magic constant of integral type that converts to a null pointer as should be, but warns for ambiguity when used to resolved an overload between an integral type and a pointer type.
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-09-21Well, as we are heading for a release people are encouraged to rebuild theirNiklas Hallqvist
entire trees for testing anyway, I might as well do this intrusive touching of include files now. Added openBSD tags.
1995-11-23include sys/types.h as mandated by X/Open XPG 4.2; from ↵Theo de Raadt
agc@sde.uts.amdahl.com; netbsd pr#1785
1995-10-18initial import of NetBSD treeTheo de Raadt