summaryrefslogtreecommitdiffstats
path: root/libc/misc/dirent/opendir.c
Commit message (Collapse)AuthorAgeFilesLines
* clean up O_CLOEXEC handlingMike Frysinger2009-10-161-7/+3
| | | | | | | | Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h headers, and import __ASSUME_O_CLOEXEC from glibc. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* not-cancel: use *_not_cancel variants directlyAustin Foxley2009-09-211-14/+0
| | | | | | add a no threads version of not-cancel.h to fallback on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-181-4/+4
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* do not save/restore errno around free() callsDenys Vlasenko2009-09-181-4/+5
| | | | | | | | | In any non-buggy program free() does not fail. And when it fails in a buggy program, the failure is usually fatal (heap corruption and segfault). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* CLOEXEC: use open(CLOEXEC) if exist; do not check fcntl(FD_CLOEXEC) failureDenys Vlasenko2009-09-181-10/+15
| | | | | | | | | | | | | text data bss dec hex filename - 370 0 0 370 172 libc/misc/dirent/opendir.o + 366 0 0 366 16e libc/misc/dirent/opendir.o - 375 4 0 379 17b libc/pwd_grp/lckpwdf.o + 356 4 0 360 168 libc/pwd_grp/lckpwdf.o - 248 0 0 248 f8 librt/shm.o + 209 0 0 209 d1 librt/shm.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* first pass at implementing *at funcsMike Frysinger2009-08-191-18/+49
| | | | | | | | Tested basic functionality with coreutils and things seem to work. At least gives us a basis to jump from. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Synch with trunk @ 24165Carmelo Amoroso2008-11-271-5/+5
| | | | | Step 17: libc_hidden_proto removal (almost all). and other minor changes (inline keyword, extra character)
* Synch with trunk @ 24087Carmelo Amoroso2008-11-181-1/+1
| | | | Step 10: libc_hidden_removal
* Make sure that multi-threaded statically linked applications use the realCarmelo Amoroso2008-09-031-2/+1
| | | | | | | | | | locking implementations instead of the empty stubs from libc.a. Removed also old work-around added to opendir, due to wrong pthread_mutex_init (from libc.a) used in static binaries. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Remove pointless initialisation to 0 of some DIR's fieldsCarmelo Amoroso2007-12-091-1/+0
| | | | | | | | having called memset on whole DIR structure (and synch with trunk). Pointed out by Peter Mazinger Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Fix opendir problem when statically linked due to a missingCarmelo Amoroso2007-12-051-0/+1
| | | | | | | | | initialization of the mutex field within DIR struct. When linked dynamically instead, __pthread_mutex_init will initialize the mutex itself. Without this fix, any call to readdir will stuck forever trying to acquire the mutex. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Merge from trunk and bring in NPTL code in the various 'misc' subsystems."Steven J. Hill"2006-08-241-13/+55
|
* Big fricking merge from trunk."Steven J. Hill"2006-01-071-2/+2
|
* Merge from trunk."Steven J. Hill"2005-12-101-1/+2
|
* Big merge from trunk. Stop the madness!"Steven J. Hill"2005-12-061-2/+0
|
* Merge from trunk. More to come you betcha'."Steven J. Hill"2005-12-021-3/+3
|
* Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III2003-12-271-1/+1
| | | | | | | | | | | | | | | | were including libc-lock.h which had a bunch of weak pragmas. Also, uClibc supplied a number of no-op weak thread functions even though many weren't needed. This combined result was that sometimes the functional versions of thread functions in pthread would not override the weaks in libc. While fixing this, I also prepended double-underscore to all necessary weak thread funcs in uClibc, and removed all unused weaks. I did a test build, but haven't tested this since these changes are a backport from my working tree. I did test the changes there and no longer need to explicitly add -lpthread in the perl build for perl to pass its thread self tests.
* Fixup totally broken locking code... No storage for the mutex,Eric Andersen2002-05-301-2/+2
| | | | | wrong ifdef macro.. -Erik
* Implement readdir_r. Audit for proper thread safety and locking.Eric Andersen2002-05-111-1/+3
| | | | -Erik
* Scrub up some lingering problems preventing readdir64 from workingEric Andersen2001-11-141-4/+5
| | | | | | and creating several *64 problems, particualrly when client apps used -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64. All better now. -Erik
* In theory, this adds readdir64 and friends. Dunno if theyEric Andersen2001-10-171-1/+1
| | | | | work yet or not.... -Erik
* Fix include/errno.h to not use kernel header, and instead use bits/errno.h.Eric Andersen2001-04-061-3/+3
| | | | | | | This required we use _LIBC instead of __LIBC__ to be consistent with glibc. This had some sideffects in sys/syscalls.h. While fixing things, I made everything use __set_errno() for (eventual) thread support. -Erik
* Move the dirent stuff. I suppose it is system dependant, but thenEric Andersen2001-03-191-0/+55
it really should be grouped together too. And it needed to be grouped more then it needed to be in sysdeps/linux/common