summaryrefslogtreecommitdiffstats
path: root/libc/misc/dirent
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-212-20/+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>
* trim Experimentally off and uncommented hiddenAustin Foxley2009-09-188-11/+0
| | | | | | | | sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop 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>
* support building out-of-treeBernhard Reutner-Fischer2009-08-191-0/+2
| | | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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>
* dirent: push dirent type to prototypesMike Frysinger2009-08-196-32/+12
| | | | | | | | | | | This syncs the dirent related functions with the glibc behavior -- rather than take void pointers everywhere, make the struct dirent pointers explicit in the API. After all, the functions themselves will cast the pointers to a dirent structure, so if it isn't as expected, people will crash. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Add strverscmp() and versionsort[64]().Denis Vlasenko2009-02-083-2/+34
| | | | | By Hai Zaar (haizaar AT codefidence.com)
* Synch with trunk @ 24165Carmelo Amoroso2008-11-2711-21/+21
| | | | | Step 17: libc_hidden_proto removal (almost all). and other minor changes (inline keyword, extra character)
* Synch with trunk @ 24087Carmelo Amoroso2008-11-182-2/+2
| | | | Step 10: libc_hidden_removal
* Synch with trunk @ 24075.Carmelo Amoroso2008-11-174-12/+35
| | | | Step 6: libc/misc
* Synch with trunk @ 24075.Carmelo Amoroso2008-11-171-4/+4
| | | | | Step 5 Various Makefile.in
* 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>
* Synch with trunk at rev 22997.Carmelo Amoroso2008-07-313-4/+4
| | | | | | | Basically trailing whitespaces removal, fix non standard keywords asm -> __asm__ inline -> __inline__ and some minor changes on trunk. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* BIG BIG commit: all left files merged from trunk [rev 22714]. Currenntly ↵Carmelo Amoroso2008-07-0912-31/+25
| | | | NPTL sh4 port build and work fine. All committed to allow Khem Ray working on a working branch to integrate the ARM nptl port. MIPS nptl port not tested but should still building and working fine. There are some other part non yet merged with trunk (misc/internals and some headers file that need some more work). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Synch the whole build system. Also including recent fix on testsuite build ↵Carmelo Amoroso2008-07-091-2/+2
| | | | system
* 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>
* Fix Makefile.in and synch them with trunk. Signed-off-by: Carmelo Amoroso ↵Carmelo Amoroso2007-11-201-2/+0
| | | | <carmelo.amoroso@st.com>
* Merge from trunk and bring in NPTL code in the various 'misc' subsystems."Steven J. Hill"2006-08-243-17/+76
|
* Merge from trunk."Steven J. Hill"2006-02-2714-113/+127
|
* Big fricking merge from trunk."Steven J. Hill"2006-01-0711-25/+23
|
* Merge from trunk."Steven J. Hill"2005-12-105-4/+10
|
* Big merge from trunk. Stop the madness!"Steven J. Hill"2005-12-0610-33/+6
|
* Merge from trunk. More to come you betcha'."Steven J. Hill"2005-12-029-50/+18
|
* Massive merge from trunk."Steven J. Hill"2005-11-181-2/+2
|
* Massive merge from trunk."Steven J. Hill"2005-11-171-1/+0
|
* Copy from trunk."Steven J. Hill"2005-10-301-0/+28
|
* merge parallel build supportMike Frysinger2005-01-251-5/+4
|
* Fix a long-standing bug with pthreads. A couple of linuxthreads filesManuel Novoa III2003-12-278-15/+15
| | | | | | | | | | | | | | | | 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.
* Peter Kjellerstedt writes:Eric Andersen2003-10-181-1/+1
| | | | | | | rm.patch: * Define $(RM) as rm -f in Rules.mak and test/Rules.mak (this is the same definition as gmake uses by default). * Change all occurrences of rm and rm -f into $(RM).
* Fixup some small issues that show up when large file support is disabledEric Andersen2003-02-241-0/+2
|
* Fix scandir64 to not free the wrong pieces of memory (which couldEric Andersen2003-01-286-79/+86
| | | | | | | | and did cause segfaults) by adjusting the working scandir.c to the the 64 thing. Fix up potential for mismatches between the libc and kernel dirent structures, which could also cause ugly problems. -Erik
* Ok, this commit is _huge_ and its gonna change the world. I'veEric Andersen2002-10-314-8/+8
| | | | | | | | | | | | | | | been working on a new config system on and off for about 6 months now, but I've never been fully satisfied. Well, I'm finally am happy with the new config system, so here it is. This completely removes the old uClibc configuration system, and replaces it with an entirely new system based on LinuxKernelConf, from http://www.xs4all.nl/~zippel/lc/ As it turns out, Linus has just merged LinuxKernelConf into Linux 2.5.45, so it looks like I made the right choice. I have thus far updated only x86. I'll be updating the other architectures shortly. -Erik
* Implement missing readdir64_r.cEric Andersen2002-08-262-1/+81
| | | | -Erik
* Fixup totally broken locking code... No storage for the mutex,Eric Andersen2002-05-308-29/+29
| | | | | wrong ifdef macro.. -Erik
* Oops. Stupid typo.Eric Andersen2002-05-111-1/+1
|
* Implement readdir_r. Audit for proper thread safety and locking.Eric Andersen2002-05-1110-101/+140
| | | | -Erik
* Avoid defining __USE_FILE_OFFSET64, since we do _NOT_ wantEric Andersen2002-04-093-9/+15
| | | | | | interfaces silently renamed under us or very bad things may happen... -Erik
* Fix a segfault in scandir for empty directories. After looking overEric Andersen2002-03-121-65/+77
| | | | | our version, I'm adopting the scandir from glibc (with minor changes) instead as it seems simpler and already correct.
* Don't redefine stuffEric Andersen2002-02-263-9/+30
|
* Scrub malloc handlingEric Andersen2002-01-082-16/+25
|
* Update my email address. I am no longer andersen@lineo.comEric Andersen2001-12-191-0/+1
|
* Scrub up some lingering problems preventing readdir64 from workingEric Andersen2001-11-1412-18/+38
| | | | | | 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-176-3/+176
| | | | | work yet or not.... -Erik
* ANSI/ISO specifies that no library function sets errno to 0.Manuel Novoa III2001-06-261-2/+0
|
* Looks like we lost clearing errnoEric Andersen2001-06-261-0/+2
|
* Remove simulated d_type support for getdents and the dirent struct, and useManuel Novoa III2001-06-251-11/+1
| | | | the straight getdents syscall instead of the wrapper (which leaked memory).