summaryrefslogtreecommitdiffstats
path: root/libc/misc/dirent
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>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prettify make cleanBernhard Reutner-Fischer2010-03-251-2/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | use *_not_cancel variants to avoid accidental cancellations with nptlAustin Foxley2009-10-172-5/+8
|/ | | | 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>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-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: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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>
* support building out-of-treeBernhard Reutner-Fischer2009-08-171-0/+2
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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>
* dirent: push dirent type to prototypesMike Frysinger2009-07-206-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>
* Add strverscmp() and versionsort[64]().Denis Vlasenko2009-02-083-2/+34
| | | | | By Hai Zaar (haizaar AT codefidence.com)
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-209-15/+15
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-203-6/+6
|
* libc_hidden_proto removal, just a few functionsDenis Vlasenko2008-11-182-2/+2
|
* - less verbose make cleanBernhard Reutner-Fischer2008-11-071-4/+4
|
* - sync fix for scandir errno handling to scandir64 (r23600)Bernhard Reutner-Fischer2008-10-182-17/+28
| | | | Thanks to Peter S. Mazinger for mentioning this.
* Fix scandir function to reset the errno when the Carmelo Amoroso2008-10-061-2/+16
| | | | | | | | | | | selector returns zero(no entries) modifying the errno. The attached test case implements a dummy filter that returns alway no entries, but change the errno. scandir is not expected to fail, just returning 0 entries. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* 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>
* - remove a couple of duplicate includesBernhard Reutner-Fischer2008-08-272-2/+0
|
* - trim any trailing whitespaceBernhard Reutner-Fischer2008-07-233-4/+4
|
* - adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer2008-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | like o UCLIBC_HAS_GNU_ERROR o UCLIBC_HAS_BSD_ERR o UCLIBC_HAS_PTY o UCLIBC_HAS_GETPT (1) o UCLIBC_SYSCALL_STUBS o UCLIBC_SYSCALL_STUB_WARNING o UCLIBC_LINUX_SPECIFIC (2) o UCLIBC_BSD_SPECIFIC (3) o UCLIBC_NTP_LEGACY (4) o UCLIBC_SV4_DEPRECATED (5) o UCLIBC_HAVE_REALTIME (6) o UCLIBC_HAVE_ADVANCED_REALTIME (7) o UCLIBC_HAVE_EPOLL (8) o UCLIBC_HAVE_XATTR (9) o UCLIBC_HAVE_PROFILING (10) (1) make non-standard getpt optional and implement standard posix_openpt (2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(), personality() ppoll(), setresuid() (3) mincore(), getdomainname(), setdomainname() (4) ntp_adjtime(), ntp_gettime() aliases (5) ustat() [use statfs(2) in your code instead] (6) All marked as "(REALTIME)" in SUSv3 (7) All marked as "(ADVANCED REALTIME)" in SUSv3 (8) epoll_create(), epoll_ctl(), epoll_wait() (9) all Extended Attributes (10) helpers for gcc's -finstrument-functions - Fixes _dl_exit() - Implements sleep(3) for !UCLIBC_HAVE_REALTIME - Implements usleep(3) for !UCLIBC_HAVE_REALTIME - adds #warning about incorrect posix_fadvise{,64}() - removes unused and unwanted uselib() Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead of formerly 130k.
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-196-6/+6
| | | | | | | | | in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
* 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>
* also fix bug 1012 by moschny in 64bit version of readdirMike Frysinger2007-09-151-1/+1
|
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-078-23/+17
| | | | | | | things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
* fix bug 1012 as noted by moschnyEric Andersen2006-08-301-1/+1
|
* fixup my copyright notice, trim stale remnants of older notices whichEric Andersen2006-07-051-1/+0
| | | | I had clearly run search/replace on that were cluttering things up.
* Remove unneeded hidden_proto(readdir*)Peter S. Mazinger2006-02-261-2/+0
|
* Use _lfs_64.h in all *64.cPeter S. Mazinger2006-02-263-41/+4
|
* Define internal readdir*_r() and use _lfs_64.hPeter S. Mazinger2006-02-262-13/+5
|
* remove fstat jump relocPeter S. Mazinger2006-02-141-0/+1
|
* libc-{a,so,multi}-y replaced by libc-y covering common objects both in ↵Peter S. Mazinger2006-02-131-12/+9
| | | | libc.a/libc.so, the diffs go into libc-static-y/libc-shared-y exclusively, add IMA to libc, don't use any MSRC anymore
* 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-0411-0/+67
|
* make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger2006-01-141-1/+2
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-1414-57/+73
| | | | missing headers, other jump relocs removed
* Build x64 versions only if LFS is enabledPeter S. Mazinger2005-12-167-17/+13
|
* Convert all users of earlier hiddensPeter S. Mazinger2005-12-135-5/+5
|
* Hidden readdir*Peter S. Mazinger2005-12-132-4/+6
|
* Convert internal users of chmod/*stat*, minimize change for __strsepPeter S. Mazinger2005-12-131-1/+1
|
* Use internal versionsPeter S. Mazinger2005-12-083-1/+6
|
* Implement __x versionsPeter S. Mazinger2005-12-082-3/+4
|
* macro out the thread funcs in libc if threading is disabledMike Frysinger2005-12-068-33/+2
|
* More hiding, 300 leftPeter S. Mazinger2005-12-042-0/+4
|
* Hide mostly used functionsPeter S. Mazinger2005-12-018-10/+10
|