summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common/getdents.c
Commit message (Collapse)AuthorAgeFilesLines
* new helper funcs for alloca/malloc with mmu/nommuMike Frysinger2010-07-271-3/+7
| | | | | | | | | | | | | The rpc rcmd code has some ugly ifdef mazes to handle mmu/nommu differences just to select alloca or malloc. Unify those with some helper macros in a new header, and then convert the rcmd code over to it. This is all geared towards fixing the getdents helper functions which only use alloca() atm. Now that we have helper functions, convert the getdents functions over too. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Steven J. Magnani <steve@digidescorp.com>
* getdents: Fix mips64 buildAtsushi Nemoto2010-02-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, 27 Jan 2010 07:14:08 +0100, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote: > I would re-write your patch in a simpler way. > > We already have the following > > 136 #if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 > 137 attribute_hidden strong_alias(__getdents,__getdents64) > 138 #endif > > I think that it's simpler to move in the proper place this statement. Thanks, indeed. If we came into "#elif WORDSIZE == 32" block, above condition never be true. So we can just move this statement out of "#if...#elif...#elif...#endif" block. Here is a revised patch. ------------------------------------------------------ From: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Subject: [PATCH] getdents: Fix mips64 build Some archs (such as mips64) do not have getdents64 syscall but have getdents syscall. Define alias for it. This fixes regression from 0.9.30.1. Backgrounds: This is once done by commit e8b1c674. But after the commit 33bcf733 ("Use getdents syscall if kernel provide supports for this instead of relying upon getdents64."), if __ASSUME_GETDENTS32_D_TYPE was defined the alias for getdents64 is not defined. The macro __ASSUME_GETDENTS32_D_TYPE had been effectively ignored until 0.9.30.1 but the commit 0f0f20ab ("Move kernel-features.h header from the linuxthread directory to a common one...") really enables it. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fix breakage in x86_64 defconfigDenis Vlasenko2009-02-271-6/+9
|
* Move kernel-features.h header from the linuxthread directoryCarmelo Amoroso2008-12-111-0/+1
| | | | | | | | to a common one (libc/sysdeps/linux/common/bits) so that any function can access to supported kernel feature (i.e. getdents). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-201-1/+1
|
* - trim superfluous ';'. No objcode changesBernhard Reutner-Fischer2008-10-281-1/+1
|
* - tidy up inline:Bernhard Reutner-Fischer2008-10-241-1/+1
| | | | ldso and syscalls are __always_inline (the latter would need more cleanup)
* Use getdents syscall if kernel provide supports for thisCarmelo Amoroso2008-09-091-6/+33
| | | | | | | instead of relying upon getdents64. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* - trim any trailing whitespaceBernhard Reutner-Fischer2008-07-231-2/+2
|
* - fix inline keywordBernhard Reutner-Fischer2008-07-231-1/+1
|
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-191-2/+2
| | | | | | | | | 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.
* prepare to later remove bits/kernel_types.h from bits/types.hEric Andersen2006-12-061-0/+1
|
* Atsushi Nemoto writes: Some archs (such as mips64) do not have getdents64 ↵Mike Frysinger2006-07-051-0/+4
| | | | syscall but have getdents syscall. Define alias for it.
* Kill 2 signedness warningsPeter S. Mazinger2006-02-151-1/+1
|
* Move hidden prototypes to proper place and get rid of duplicate hiddenPeter S. Mazinger2006-02-151-5/+5
|
* we cant simply alias getdents to getdents64 as they deal with structures of ↵Mike Frysinger2006-02-151-5/+34
| | | | different sizes on 32bit hosts
* use just __getdents64 rather than either __getdents and __getdents64 when ↵Mike Frysinger2006-02-041-4/+18
| | | | possible (saves space and gives us access to d_type most of the time)
* create local prototypes to shutup warningsMike Frysinger2006-01-291-0/+1
|
* make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger2006-01-141-19/+6
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-141-2/+5
| | | | missing headers, other jump relocs removed
* Convert all users of earlier hiddensPeter S. Mazinger2005-12-131-1/+1
|
* only define offsetof macro if it isnt already definedMike Frysinger2005-12-061-1/+2
|
* Kill 2 redefine warnings w/ gcc-4.xPeter S. Mazinger2005-12-011-1/+1
|
* Hide mostly used functionsPeter S. Mazinger2005-12-011-1/+1
|
* get rid of unused sysdep.h headerMike Frysinger2005-11-301-1/+0
|
* Hide more of stdio,getdents, use internal __raisePeter S. Mazinger2005-11-151-1/+1
|
* Use local copy of sysdep.hPeter S. Mazinger2005-10-251-1/+1
|
* We need to have the size of struct dirent equal to the size of struct dirent64Eric Andersen2003-02-101-5/+5
| | | | | | | so when _FILE_OFFSET_BITS=64 (such that we transparently change 32bit into 64 bit interfaces), we will not lose an unsigned char from d_name which silently becomes the d_type field instead. oops. -Erik
* Fix scandir64 to not free the wrong pieces of memory (which couldEric Andersen2003-01-281-0/+100
| | | | | | | | 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
* Remove obsolete files tell.c and getdents.cManuel Novoa III2001-06-271-119/+0
|
* Just define __kernel_off_t ourselves...Eric Andersen2000-12-231-1/+1
|
* This file violated policy and directly used kernel headers.Eric Andersen2000-12-211-5/+10
| | | | This fixes it by using our own copy of the stuct in question.
* First pass at fixing readdir by adding a getdents wrapper...Eric Andersen2000-10-301-0/+114