summaryrefslogtreecommitdiffstats
path: root/libc/misc/dirent/opendir.c
Commit message (Collapse)AuthorAgeFilesLines
* libc: remove libc weak __pthreads_* wrappersTimo Teras2010-04-161-1/+1
| | | | | | | | | | | | | | | | | It is not possible to override for libpthread to override the weak libc definitions. This has never worked in uclibc, and does no longer work in glibc either (unless you use LD_DYNAMIC_WEAK). The proper thing to do is have weak prototypes in libc, and definitions in libpthread only. This way libc runs even if those functions are not defined, but just needs to protect against the NULL values (done by implementing __uclibc_maybe_call). This fix the problems if libc is linked before libpthread or if libpthread is pulled by a dependency library. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* use *_not_cancel variants to avoid accidental cancellations with nptlAustin Foxley2009-10-171-4/+6
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-071-5/+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>
* 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>
* do not save/restore errno around free() callsDenys Vlasenko2009-09-051-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>
* CLOEXEC: use open(CLOEXEC) if exist; do not check fcntl(FD_CLOEXEC) failureDenys Vlasenko2009-09-051-9/+12
| | | | | | | | | | | | 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>
* first pass at implementing *at funcsMike Frysinger2009-07-201-19/+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>
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-201-1/+1
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-201-4/+4
|
* libc_hidden_proto removal, just a few functionsDenis Vlasenko2008-11-181-1/+1
|
* Revert latest changes. Instead of applying this work-aroundCarmelo Amoroso2008-09-091-2/+1
| | | | | | | a proper fix should ensure that statically linked mutli-threaded binaries take always the proper locking implementation. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Removed pointless initialization to 0 of DIR fieldsCarmelo Amoroso2007-12-071-1/+0
| | | | | | | after having added memset. Thanks to Peter Mazinger for pointing this out. 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>
* remove fstat jump relocPeter S. Mazinger2006-02-141-0/+1
|
* rfelker reports in Bug 683 that we leak file descriptors if the fcntl() ↵Mike Frysinger2006-02-041-8/+13
| | | | fails ... so fix that. add back in fstat() ofter we open() the directory as we need the blocksize further down in the code. unify the memory error handling to shrink the code there a little.
* add note about raceconditionMike Frysinger2006-02-041-0/+5
|
* use O_DIRECTORY when possible, saves us from having to use stat() thus ↵Mike Frysinger2006-02-041-1/+6
| | | | cutting codesize/race condition
* add some copyright/license infoMike Frysinger2006-02-041-0/+6
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-141-7/+12
| | | | missing headers, other jump relocs removed
* Convert all users of earlier hiddensPeter S. Mazinger2005-12-131-1/+1
|
* Convert internal users of chmod/*stat*, minimize change for __strsepPeter S. Mazinger2005-12-131-1/+1
|
* Implement __x versionsPeter S. Mazinger2005-12-081-1/+2
|
* macro out the thread funcs in libc if threading is disabledMike Frysinger2005-12-061-2/+0
|
* Hide mostly used functionsPeter S. Mazinger2005-12-011-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